blob: 56ed6c2a3a342c0ad62d7e3d35dc2dc04851b790 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002# From configure.in Revision: 46491 .
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
651MACHDEP
652SGI_ABI
653EXTRAPLATDIR
654EXTRAMACHDEPPATH
655CONFIGURE_MACOSX_DEPLOYMENT_TARGET
656EXPORT_MACOSX_DEPLOYMENT_TARGET
657CC
658CFLAGS
659LDFLAGS
660CPPFLAGS
661ac_ct_CC
662EXEEXT
663OBJEXT
664CXX
665MAINCC
666CPP
667GREP
668EGREP
669BUILDEXEEXT
670LIBRARY
671LDLIBRARY
672DLLLIBRARY
673BLDLIBRARY
674LDLIBRARYDIR
675INSTSONAME
676RUNSHARED
677LINKCC
678RANLIB
679AR
680SVNVERSION
681INSTALL_PROGRAM
682INSTALL_SCRIPT
683INSTALL_DATA
684LN
685OPT
686BASECFLAGS
687OTHER_LIBTOOL_OPT
688LIBTOOL_CRUFT
689SO
690LDSHARED
691BLDSHARED
692CCSHARED
693LINKFORSHARED
694CFLAGSFORSHARED
695SHLIBS
696USE_SIGNAL_MODULE
697SIGNAL_OBJS
698USE_THREAD_MODULE
699LDLAST
700THREADOBJ
701DLINCLDIR
702DYNLOADFILE
703MACHDEP_OBJS
704TRUE
705LIBOBJS
706HAVE_GETHOSTBYNAME_R_6_ARG
707HAVE_GETHOSTBYNAME_R_5_ARG
708HAVE_GETHOSTBYNAME_R_3_ARG
709HAVE_GETHOSTBYNAME_R
710HAVE_GETHOSTBYNAME
711LIBM
712LIBC
713UNICODE_OBJS
714THREADHEADERS
715SRCDIRS
716LTLIBOBJS'
Skip Montanaro6dead952003-09-25 14:50:04 +0000717ac_subst_files=''
Thomas Wouters477c8d52006-05-27 19:21:47 +0000718 ac_precious_vars='build_alias
719host_alias
720target_alias
721CC
722CFLAGS
723LDFLAGS
724CPPFLAGS
725CPP'
726
Guido van Rossum627b2d71993-12-24 10:39:16 +0000727
Guido van Rossum7f43da71994-08-01 12:15:30 +0000728# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000729ac_init_help=
730ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000731# The variables have the same names as the options, with
732# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000733cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000734exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000735no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000736no_recursion=
737prefix=NONE
738program_prefix=NONE
739program_suffix=NONE
740program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000741silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000742site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000743srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000744verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000745x_includes=NONE
746x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000747
748# Installation directory options.
749# These are left unexpanded so users can "make install exec_prefix=/foo"
750# and all the variables that are supposed to be based on exec_prefix
751# by default will actually change.
752# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters477c8d52006-05-27 19:21:47 +0000753# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000754bindir='${exec_prefix}/bin'
755sbindir='${exec_prefix}/sbin'
756libexecdir='${exec_prefix}/libexec'
Thomas Wouters477c8d52006-05-27 19:21:47 +0000757datarootdir='${prefix}/share'
758datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000759sysconfdir='${prefix}/etc'
760sharedstatedir='${prefix}/com'
761localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000762includedir='${prefix}/include'
763oldincludedir='/usr/include'
Thomas Wouters477c8d52006-05-27 19:21:47 +0000764docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
765infodir='${datarootdir}/info'
766htmldir='${docdir}'
767dvidir='${docdir}'
768pdfdir='${docdir}'
769psdir='${docdir}'
770libdir='${exec_prefix}/lib'
771localedir='${datarootdir}/locale'
772mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000773
Guido van Rossum7f43da71994-08-01 12:15:30 +0000774ac_prev=
Thomas Wouters477c8d52006-05-27 19:21:47 +0000775ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000776for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000777do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000778 # If the previous option needs an argument, assign it.
779 if test -n "$ac_prev"; then
Thomas Wouters477c8d52006-05-27 19:21:47 +0000780 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000781 ac_prev=
782 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000783 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000784
Thomas Wouters477c8d52006-05-27 19:21:47 +0000785 case $ac_option in
786 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
787 *) ac_optarg=yes ;;
788 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000789
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000790 # Accept the important Cygnus configure options, so we can diagnose typos.
791
Thomas Wouters477c8d52006-05-27 19:21:47 +0000792 case $ac_dashdash$ac_option in
793 --)
794 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000795
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000796 -bindir | --bindir | --bindi | --bind | --bin | --bi)
797 ac_prev=bindir ;;
798 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000799 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000800
801 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000802 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000803 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000804 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000805
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000806 -cache-file | --cache-file | --cache-fil | --cache-fi \
807 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
808 ac_prev=cache_file ;;
809 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
810 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000811 cache_file=$ac_optarg ;;
812
813 --config-cache | -C)
814 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000815
Thomas Wouters477c8d52006-05-27 19:21:47 +0000816 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000817 ac_prev=datadir ;;
Thomas Wouters477c8d52006-05-27 19:21:47 +0000818 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000819 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000820
Thomas Wouters477c8d52006-05-27 19:21:47 +0000821 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
822 | --dataroo | --dataro | --datar)
823 ac_prev=datarootdir ;;
824 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
825 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
826 datarootdir=$ac_optarg ;;
827
Guido van Rossum7f43da71994-08-01 12:15:30 +0000828 -disable-* | --disable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000829 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000830 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000831 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
832 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
833 { (exit 1); exit 1; }; }
834 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
Thomas Wouters477c8d52006-05-27 19:21:47 +0000835 eval enable_$ac_feature=no ;;
836
837 -docdir | --docdir | --docdi | --doc | --do)
838 ac_prev=docdir ;;
839 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
840 docdir=$ac_optarg ;;
841
842 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
843 ac_prev=dvidir ;;
844 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
845 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000846
847 -enable-* | --enable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000848 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000849 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000850 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
851 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
852 { (exit 1); exit 1; }; }
853 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
Thomas Wouters477c8d52006-05-27 19:21:47 +0000854 eval enable_$ac_feature=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000855
Guido van Rossum7f43da71994-08-01 12:15:30 +0000856 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
857 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
858 | --exec | --exe | --ex)
859 ac_prev=exec_prefix ;;
860 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
861 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
862 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000863 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000864
865 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000866 # Obsolete; use --with-gas.
867 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000868
Martin v. Löwis11437992002-04-12 09:54:03 +0000869 -help | --help | --hel | --he | -h)
870 ac_init_help=long ;;
871 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
872 ac_init_help=recursive ;;
873 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
874 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000875
876 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000877 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000878 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000879 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000880
Thomas Wouters477c8d52006-05-27 19:21:47 +0000881 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
882 ac_prev=htmldir ;;
883 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
884 | --ht=*)
885 htmldir=$ac_optarg ;;
886
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000887 -includedir | --includedir | --includedi | --included | --include \
888 | --includ | --inclu | --incl | --inc)
889 ac_prev=includedir ;;
890 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
891 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000892 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000893
894 -infodir | --infodir | --infodi | --infod | --info | --inf)
895 ac_prev=infodir ;;
896 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000897 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000898
899 -libdir | --libdir | --libdi | --libd)
900 ac_prev=libdir ;;
901 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000902 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000903
904 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
905 | --libexe | --libex | --libe)
906 ac_prev=libexecdir ;;
907 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
908 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000909 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000910
Thomas Wouters477c8d52006-05-27 19:21:47 +0000911 -localedir | --localedir | --localedi | --localed | --locale)
912 ac_prev=localedir ;;
913 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
914 localedir=$ac_optarg ;;
915
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000916 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters477c8d52006-05-27 19:21:47 +0000917 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000918 ac_prev=localstatedir ;;
919 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters477c8d52006-05-27 19:21:47 +0000920 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000921 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000922
923 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
924 ac_prev=mandir ;;
925 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000926 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000927
Guido van Rossum7f43da71994-08-01 12:15:30 +0000928 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000929 # Obsolete; use --without-fp.
930 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000931
932 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000933 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000934 no_create=yes ;;
935
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000936 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
937 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
938 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000939
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000940 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
941 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
942 | --oldin | --oldi | --old | --ol | --o)
943 ac_prev=oldincludedir ;;
944 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
945 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
946 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000947 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000948
Guido van Rossum7f43da71994-08-01 12:15:30 +0000949 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
950 ac_prev=prefix ;;
951 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000952 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000953
954 -program-prefix | --program-prefix | --program-prefi | --program-pref \
955 | --program-pre | --program-pr | --program-p)
956 ac_prev=program_prefix ;;
957 -program-prefix=* | --program-prefix=* | --program-prefi=* \
958 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000959 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000960
961 -program-suffix | --program-suffix | --program-suffi | --program-suff \
962 | --program-suf | --program-su | --program-s)
963 ac_prev=program_suffix ;;
964 -program-suffix=* | --program-suffix=* | --program-suffi=* \
965 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000966 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000967
968 -program-transform-name | --program-transform-name \
969 | --program-transform-nam | --program-transform-na \
970 | --program-transform-n | --program-transform- \
971 | --program-transform | --program-transfor \
972 | --program-transfo | --program-transf \
973 | --program-trans | --program-tran \
974 | --progr-tra | --program-tr | --program-t)
975 ac_prev=program_transform_name ;;
976 -program-transform-name=* | --program-transform-name=* \
977 | --program-transform-nam=* | --program-transform-na=* \
978 | --program-transform-n=* | --program-transform-=* \
979 | --program-transform=* | --program-transfor=* \
980 | --program-transfo=* | --program-transf=* \
981 | --program-trans=* | --program-tran=* \
982 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000983 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000984
Thomas Wouters477c8d52006-05-27 19:21:47 +0000985 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
986 ac_prev=pdfdir ;;
987 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
988 pdfdir=$ac_optarg ;;
989
990 -psdir | --psdir | --psdi | --psd | --ps)
991 ac_prev=psdir ;;
992 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
993 psdir=$ac_optarg ;;
994
Guido van Rossum7f43da71994-08-01 12:15:30 +0000995 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
996 | -silent | --silent | --silen | --sile | --sil)
997 silent=yes ;;
998
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000999 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1000 ac_prev=sbindir ;;
1001 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1002 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001003 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001004
1005 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1006 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1007 | --sharedst | --shareds | --shared | --share | --shar \
1008 | --sha | --sh)
1009 ac_prev=sharedstatedir ;;
1010 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1011 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1012 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1013 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001014 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001015
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001016 -site | --site | --sit)
1017 ac_prev=site ;;
1018 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001019 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001020
Guido van Rossum7f43da71994-08-01 12:15:30 +00001021 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1022 ac_prev=srcdir ;;
1023 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001024 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001025
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001026 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1027 | --syscon | --sysco | --sysc | --sys | --sy)
1028 ac_prev=sysconfdir ;;
1029 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1030 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001031 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001032
Guido van Rossum7f43da71994-08-01 12:15:30 +00001033 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001034 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001035 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001036 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001037
1038 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1039 verbose=yes ;;
1040
Martin v. Löwis11437992002-04-12 09:54:03 +00001041 -version | --version | --versio | --versi | --vers | -V)
1042 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001043
1044 -with-* | --with-*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001045 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001046 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001047 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
1048 { echo "$as_me: error: invalid package name: $ac_package" >&2
1049 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001050 ac_package=`echo $ac_package| sed 's/-/_/g'`
Thomas Wouters477c8d52006-05-27 19:21:47 +00001051 eval with_$ac_package=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001052
1053 -without-* | --without-*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001054 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001055 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001056 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
1057 { echo "$as_me: error: invalid package name: $ac_package" >&2
1058 { (exit 1); exit 1; }; }
1059 ac_package=`echo $ac_package | sed 's/-/_/g'`
Thomas Wouters477c8d52006-05-27 19:21:47 +00001060 eval with_$ac_package=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001061
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001062 --x)
1063 # Obsolete; use --with-x.
1064 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001065
1066 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1067 | --x-incl | --x-inc | --x-in | --x-i)
1068 ac_prev=x_includes ;;
1069 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1070 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001071 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001072
1073 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1074 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1075 ac_prev=x_libraries ;;
1076 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1077 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001078 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001079
Martin v. Löwis11437992002-04-12 09:54:03 +00001080 -*) { echo "$as_me: error: unrecognized option: $ac_option
1081Try \`$0 --help' for more information." >&2
1082 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001083 ;;
1084
Martin v. Löwis11437992002-04-12 09:54:03 +00001085 *=*)
1086 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1087 # Reject names that are not valid shell variable names.
1088 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
1089 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
1090 { (exit 1); exit 1; }; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00001091 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001092 export $ac_envvar ;;
1093
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001094 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001095 # FIXME: should be removed in autoconf 3.0.
1096 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1097 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1098 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1099 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001100 ;;
1101
1102 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001103done
1104
Guido van Rossum7f43da71994-08-01 12:15:30 +00001105if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001106 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1107 { echo "$as_me: error: missing argument to $ac_option" >&2
1108 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001109fi
1110
Thomas Wouters477c8d52006-05-27 19:21:47 +00001111# Be sure to have absolute directory names.
1112for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1113 datadir sysconfdir sharedstatedir localstatedir includedir \
1114 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1115 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001116do
Thomas Wouters477c8d52006-05-27 19:21:47 +00001117 eval ac_val=\$$ac_var
Martin v. Löwis11437992002-04-12 09:54:03 +00001118 case $ac_val in
Thomas Wouters477c8d52006-05-27 19:21:47 +00001119 [\\/$]* | ?:[\\/]* ) continue;;
1120 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001121 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +00001122 { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
1123 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001124done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001125
Martin v. Löwis11437992002-04-12 09:54:03 +00001126# There might be people who depend on the old broken behavior: `$host'
1127# used to hold the argument of --host etc.
1128# FIXME: To remove some day.
1129build=$build_alias
1130host=$host_alias
1131target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001132
Martin v. Löwis11437992002-04-12 09:54:03 +00001133# FIXME: To remove some day.
1134if test "x$host_alias" != x; then
1135 if test "x$build_alias" = x; then
1136 cross_compiling=maybe
1137 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1138 If a cross compiler is detected then cross compile mode will be used." >&2
1139 elif test "x$build_alias" != "x$host_alias"; then
1140 cross_compiling=yes
1141 fi
1142fi
1143
1144ac_tool_prefix=
1145test -n "$host_alias" && ac_tool_prefix=$host_alias-
1146
1147test "$silent" = yes && exec 6>/dev/null
1148
Guido van Rossum627b2d71993-12-24 10:39:16 +00001149
Thomas Wouters477c8d52006-05-27 19:21:47 +00001150ac_pwd=`pwd` && test -n "$ac_pwd" &&
1151ac_ls_di=`ls -di .` &&
1152ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1153 { echo "$as_me: error: Working directory cannot be determined" >&2
1154 { (exit 1); exit 1; }; }
1155test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1156 { echo "$as_me: error: pwd does not report name of working directory" >&2
1157 { (exit 1); exit 1; }; }
1158
1159
Guido van Rossum627b2d71993-12-24 10:39:16 +00001160# Find the source files, if location was not specified.
1161if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001162 ac_srcdir_defaulted=yes
Thomas Wouters477c8d52006-05-27 19:21:47 +00001163 # Try the directory containing this script, then the parent directory.
1164 ac_confdir=`$as_dirname -- "$0" ||
Martin v. Löwis11437992002-04-12 09:54:03 +00001165$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +00001166 X"$0" : 'X\(//\)[^/]' \| \
1167 X"$0" : 'X\(//\)$' \| \
Thomas Wouters477c8d52006-05-27 19:21:47 +00001168 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +00001169echo X"$0" |
Thomas Wouters477c8d52006-05-27 19:21:47 +00001170 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1171 s//\1/
1172 q
1173 }
1174 /^X\(\/\/\)[^/].*/{
1175 s//\1/
1176 q
1177 }
1178 /^X\(\/\/\)$/{
1179 s//\1/
1180 q
1181 }
1182 /^X\(\/\).*/{
1183 s//\1/
1184 q
1185 }
1186 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001187 srcdir=$ac_confdir
Thomas Wouters477c8d52006-05-27 19:21:47 +00001188 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001189 srcdir=..
1190 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001191else
1192 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001193fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00001194if test ! -r "$srcdir/$ac_unique_file"; then
1195 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1196 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001197 { (exit 1); exit 1; }; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001198fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00001199ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1200ac_abs_confdir=`(
1201 cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00001202 { (exit 1); exit 1; }; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00001203 pwd)`
1204# When building in place, set srcdir=.
1205if test "$ac_abs_confdir" = "$ac_pwd"; then
1206 srcdir=.
1207fi
1208# Remove unnecessary trailing slashes from srcdir.
1209# Double slashes in file names in object file debugging info
1210# mess up M-x gdb in Emacs.
1211case $srcdir in
1212*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1213esac
1214for ac_var in $ac_precious_vars; do
1215 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1216 eval ac_env_${ac_var}_value=\$${ac_var}
1217 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1218 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1219done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001220
Martin v. Löwis11437992002-04-12 09:54:03 +00001221#
1222# Report the --help message.
1223#
1224if test "$ac_init_help" = "long"; then
1225 # Omit some internal or obsolete options to make the list less imposing.
1226 # This message is too long to be a string in the A/UX 3.1 sh.
1227 cat <<_ACEOF
Guido van Rossum0c4eb622006-03-30 16:19:24 +00001228\`configure' configures python 3.0 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001229
1230Usage: $0 [OPTION]... [VAR=VALUE]...
1231
1232To assign environment variables (e.g., CC, CFLAGS...), specify them as
1233VAR=VALUE. See below for descriptions of some of the useful variables.
1234
1235Defaults for the options are specified in brackets.
1236
1237Configuration:
1238 -h, --help display this help and exit
1239 --help=short display options specific to this package
1240 --help=recursive display the short help of all the included packages
1241 -V, --version display version information and exit
1242 -q, --quiet, --silent do not print \`checking...' messages
1243 --cache-file=FILE cache test results in FILE [disabled]
1244 -C, --config-cache alias for \`--cache-file=config.cache'
1245 -n, --no-create do not create output files
1246 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1247
Martin v. Löwis11437992002-04-12 09:54:03 +00001248Installation directories:
1249 --prefix=PREFIX install architecture-independent files in PREFIX
Skip Montanarof0d5f792004-08-15 14:08:23 +00001250 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001251 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Skip Montanarof0d5f792004-08-15 14:08:23 +00001252 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001253
1254By default, \`make install' will install all the files in
1255\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1256an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1257for instance \`--prefix=\$HOME'.
1258
1259For better control, use the options below.
1260
1261Fine tuning of the installation directories:
1262 --bindir=DIR user executables [EPREFIX/bin]
1263 --sbindir=DIR system admin executables [EPREFIX/sbin]
1264 --libexecdir=DIR program executables [EPREFIX/libexec]
Martin v. Löwis11437992002-04-12 09:54:03 +00001265 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1266 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1267 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1268 --libdir=DIR object code libraries [EPREFIX/lib]
1269 --includedir=DIR C header files [PREFIX/include]
1270 --oldincludedir=DIR C header files for non-gcc [/usr/include]
Thomas Wouters477c8d52006-05-27 19:21:47 +00001271 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1272 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1273 --infodir=DIR info documentation [DATAROOTDIR/info]
1274 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1275 --mandir=DIR man documentation [DATAROOTDIR/man]
1276 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1277 --htmldir=DIR html documentation [DOCDIR]
1278 --dvidir=DIR dvi documentation [DOCDIR]
1279 --pdfdir=DIR pdf documentation [DOCDIR]
1280 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001281_ACEOF
1282
1283 cat <<\_ACEOF
1284_ACEOF
1285fi
1286
1287if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001288 case $ac_init_help in
Guido van Rossum0c4eb622006-03-30 16:19:24 +00001289 short | recursive ) echo "Configuration of python 3.0:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001290 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001291 cat <<\_ACEOF
1292
1293Optional Features:
1294 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1295 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Thomas Wouters477c8d52006-05-27 19:21:47 +00001296 --enable-universalsdk[SDKDIR]
1297 Build agains Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001298 --enable-framework[=INSTALLDIR]
1299 Build (MacOSX|Darwin) framework
1300 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001301 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001302 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
1303 --enable-ipv6 Enable ipv6 (with ipv4) support
1304 --disable-ipv6 Disable ipv6 support
1305 --enable-unicode[=ucs[24]]
1306 Enable Unicode strings (default is yes)
Martin v. Löwis11437992002-04-12 09:54:03 +00001307
1308Optional Packages:
1309 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1310 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001311 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001312 --with-cxx-main=<compiler>
1313 compile main() and link python executable with C++
1314 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001315 --with-suffix=.exe set executable suffix
1316 --with-pydebug build with Py_DEBUG defined
1317 --with-libs='lib1 ...' link against additional libs
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001318 --with-system-ffi build _ctypes module using an installed ffi library
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001319 --with-signal-module disable/enable signal module
1320 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1321 --with(out)-threads[=DIRECTORY]
1322 disable/enable thread support
1323 --with(out)-thread[=DIRECTORY]
1324 deprecated; use --with(out)-threads
1325 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001326 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001327 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001328 --with(out)-pymalloc disable/enable specialized mallocs
1329 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001330 --with-fpectl enable SIGFPE catching
1331 --with-libm=STRING math library
1332 --with-libc=STRING C library
Martin v. Löwis11437992002-04-12 09:54:03 +00001333
1334Some influential environment variables:
1335 CC C compiler command
1336 CFLAGS C compiler flags
1337 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1338 nonstandard directory <lib dir>
Thomas Wouters477c8d52006-05-27 19:21:47 +00001339 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1340 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001341 CPP C preprocessor
1342
1343Use these variables to override the choices made by `configure' or to help
1344it to find libraries and programs with nonstandard names/locations.
1345
Martin v. Löwis1d459062005-03-14 21:23:33 +00001346Report bugs to <http://www.python.org/python-bugs>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001347_ACEOF
Thomas Wouters477c8d52006-05-27 19:21:47 +00001348ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001349fi
1350
1351if test "$ac_init_help" = "recursive"; then
1352 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001353 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00001354 test -d "$ac_dir" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001355 ac_builddir=.
1356
Thomas Wouters477c8d52006-05-27 19:21:47 +00001357case "$ac_dir" in
1358.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1359*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001360 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Thomas Wouters477c8d52006-05-27 19:21:47 +00001361 # A ".." for each directory in $ac_dir_suffix.
1362 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
1363 case $ac_top_builddir_sub in
1364 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1365 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1366 esac ;;
1367esac
1368ac_abs_top_builddir=$ac_pwd
1369ac_abs_builddir=$ac_pwd$ac_dir_suffix
1370# for backward compatibility:
1371ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001372
1373case $srcdir in
Thomas Wouters477c8d52006-05-27 19:21:47 +00001374 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001375 ac_srcdir=.
Thomas Wouters477c8d52006-05-27 19:21:47 +00001376 ac_top_srcdir=$ac_top_builddir_sub
1377 ac_abs_top_srcdir=$ac_pwd ;;
1378 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001379 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters477c8d52006-05-27 19:21:47 +00001380 ac_top_srcdir=$srcdir
1381 ac_abs_top_srcdir=$srcdir ;;
1382 *) # Relative name.
1383 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1384 ac_top_srcdir=$ac_top_build_prefix$srcdir
1385 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001386esac
Thomas Wouters477c8d52006-05-27 19:21:47 +00001387ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001388
Thomas Wouters477c8d52006-05-27 19:21:47 +00001389 cd "$ac_dir" || { ac_status=$?; continue; }
1390 # Check for guested configure.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00001391 if test -f "$ac_srcdir/configure.gnu"; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00001392 echo &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00001393 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1394 elif test -f "$ac_srcdir/configure"; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00001395 echo &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00001396 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001397 else
1398 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters477c8d52006-05-27 19:21:47 +00001399 fi || ac_status=$?
1400 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001401 done
1402fi
1403
Thomas Wouters477c8d52006-05-27 19:21:47 +00001404test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001405if $ac_init_version; then
1406 cat <<\_ACEOF
Guido van Rossum0c4eb622006-03-30 16:19:24 +00001407python configure 3.0
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00001408generated by GNU Autoconf 2.59e
Martin v. Löwis11437992002-04-12 09:54:03 +00001409
Thomas Wouters477c8d52006-05-27 19:21:47 +00001410Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
14112002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001412This configure script is free software; the Free Software Foundation
1413gives unlimited permission to copy, distribute and modify it.
1414_ACEOF
Thomas Wouters477c8d52006-05-27 19:21:47 +00001415 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001416fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00001417cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00001418This file contains any messages produced by compilers while
1419running configure, to aid debugging if configure makes a mistake.
1420
Guido van Rossum0c4eb622006-03-30 16:19:24 +00001421It was created by python $as_me 3.0, which was
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00001422generated by GNU Autoconf 2.59e. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00001423
1424 $ $0 $@
1425
1426_ACEOF
Thomas Wouters477c8d52006-05-27 19:21:47 +00001427exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00001428{
1429cat <<_ASUNAME
1430## --------- ##
1431## Platform. ##
1432## --------- ##
1433
1434hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1435uname -m = `(uname -m) 2>/dev/null || echo unknown`
1436uname -r = `(uname -r) 2>/dev/null || echo unknown`
1437uname -s = `(uname -s) 2>/dev/null || echo unknown`
1438uname -v = `(uname -v) 2>/dev/null || echo unknown`
1439
1440/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1441/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1442
1443/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1444/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1445/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters477c8d52006-05-27 19:21:47 +00001446/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00001447/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1448/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1449/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1450
1451_ASUNAME
1452
1453as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1454for as_dir in $PATH
1455do
1456 IFS=$as_save_IFS
1457 test -z "$as_dir" && as_dir=.
1458 echo "PATH: $as_dir"
1459done
Thomas Wouters477c8d52006-05-27 19:21:47 +00001460IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00001461
1462} >&5
1463
1464cat >&5 <<_ACEOF
1465
1466
1467## ----------- ##
1468## Core tests. ##
1469## ----------- ##
1470
1471_ACEOF
1472
1473
1474# Keep a trace of the command line.
1475# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001476# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001477# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001478# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001479ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001480ac_configure_args0=
1481ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00001482ac_must_keep_next=false
1483for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001484do
Skip Montanaro6dead952003-09-25 14:50:04 +00001485 for ac_arg
1486 do
1487 case $ac_arg in
1488 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1489 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1490 | -silent | --silent | --silen | --sile | --sil)
1491 continue ;;
Thomas Wouters477c8d52006-05-27 19:21:47 +00001492 *\'*)
Skip Montanaro6dead952003-09-25 14:50:04 +00001493 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1494 esac
1495 case $ac_pass in
1496 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1497 2)
1498 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1499 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001500 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00001501 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00001502 case $ac_arg in
1503 *=* | --config-cache | -C | -disable-* | --disable-* \
1504 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1505 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1506 | -with-* | --with-* | -without-* | --without-* | --x)
1507 case "$ac_configure_args0 " in
1508 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1509 esac
1510 ;;
1511 -* ) ac_must_keep_next=true ;;
1512 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00001513 fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00001514 ac_configure_args="$ac_configure_args '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00001515 ;;
1516 esac
1517 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001518done
Skip Montanaro6dead952003-09-25 14:50:04 +00001519$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1520$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 +00001521
1522# When interrupted or exit'd, cleanup temporary files, and complete
1523# config.log. We remove comments because anyway the quotes in there
1524# would cause problems or look ugly.
Thomas Wouters477c8d52006-05-27 19:21:47 +00001525# WARNING: Use '\'' to represent an apostrophe within the trap.
1526# 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 +00001527trap 'exit_status=$?
1528 # Save into config.log some information that might help in debugging.
1529 {
1530 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001531
Martin v. Löwis11437992002-04-12 09:54:03 +00001532 cat <<\_ASBOX
1533## ---------------- ##
1534## Cache variables. ##
1535## ---------------- ##
1536_ASBOX
1537 echo
1538 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters477c8d52006-05-27 19:21:47 +00001539(
1540 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1541 eval ac_val=\$$ac_var
1542 case $ac_val in #(
1543 *${as_nl}*)
1544 case $ac_var in #(
1545 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1546echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
1547 esac
1548 case $ac_var in #(
1549 _ | IFS | as_nl) ;; #(
1550 *) $as_unset $ac_var ;;
1551 esac ;;
1552 esac
1553 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001554 (set) 2>&1 |
Thomas Wouters477c8d52006-05-27 19:21:47 +00001555 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1556 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001557 sed -n \
Thomas Wouters477c8d52006-05-27 19:21:47 +00001558 "s/'\''/'\''\\\\'\'''\''/g;
1559 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1560 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +00001561 *)
Thomas Wouters477c8d52006-05-27 19:21:47 +00001562 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +00001563 ;;
Thomas Wouters477c8d52006-05-27 19:21:47 +00001564 esac |
1565 sort
1566)
Martin v. Löwis11437992002-04-12 09:54:03 +00001567 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001568
1569 cat <<\_ASBOX
1570## ----------------- ##
1571## Output variables. ##
1572## ----------------- ##
1573_ASBOX
1574 echo
1575 for ac_var in $ac_subst_vars
1576 do
Thomas Wouters477c8d52006-05-27 19:21:47 +00001577 eval ac_val=\$$ac_var
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00001578 case $ac_val in
1579 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1580 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +00001581 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001582 done | sort
1583 echo
1584
1585 if test -n "$ac_subst_files"; then
1586 cat <<\_ASBOX
Thomas Wouters477c8d52006-05-27 19:21:47 +00001587## ------------------- ##
1588## File substitutions. ##
1589## ------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00001590_ASBOX
1591 echo
1592 for ac_var in $ac_subst_files
1593 do
Thomas Wouters477c8d52006-05-27 19:21:47 +00001594 eval ac_val=\$$ac_var
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00001595 case $ac_val in
1596 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1597 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +00001598 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001599 done | sort
1600 echo
1601 fi
1602
Martin v. Löwis11437992002-04-12 09:54:03 +00001603 if test -s confdefs.h; then
1604 cat <<\_ASBOX
1605## ----------- ##
1606## confdefs.h. ##
1607## ----------- ##
1608_ASBOX
1609 echo
Thomas Wouters477c8d52006-05-27 19:21:47 +00001610 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001611 echo
1612 fi
1613 test "$ac_signal" != 0 &&
1614 echo "$as_me: caught signal $ac_signal"
1615 echo "$as_me: exit $exit_status"
1616 } >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +00001617 rm -f core *.core core.conftest.* &&
1618 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001619 exit $exit_status
Thomas Wouters477c8d52006-05-27 19:21:47 +00001620' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00001621for ac_signal in 1 2 13 15; do
1622 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1623done
1624ac_signal=0
1625
1626# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters477c8d52006-05-27 19:21:47 +00001627rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001628
1629# Predefined preprocessor variables.
1630
1631cat >>confdefs.h <<_ACEOF
1632#define PACKAGE_NAME "$PACKAGE_NAME"
1633_ACEOF
1634
1635
1636cat >>confdefs.h <<_ACEOF
1637#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1638_ACEOF
1639
1640
1641cat >>confdefs.h <<_ACEOF
1642#define PACKAGE_VERSION "$PACKAGE_VERSION"
1643_ACEOF
1644
1645
1646cat >>confdefs.h <<_ACEOF
1647#define PACKAGE_STRING "$PACKAGE_STRING"
1648_ACEOF
1649
1650
1651cat >>confdefs.h <<_ACEOF
1652#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1653_ACEOF
1654
1655
1656# Let the site file select an alternate cache file if it wants to.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001657# Prefer explicitly selected file to automatically selected ones.
Thomas Wouters477c8d52006-05-27 19:21:47 +00001658if test -n "$CONFIG_SITE"; then
1659 set x "$CONFIG_SITE"
1660elif test "x$prefix" != xNONE; then
1661 set x "$prefix/share/config.site" "$prefix/etc/config.site"
1662else
1663 set x "$ac_default_prefix/share/config.site" \
1664 "$ac_default_prefix/etc/config.site"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001665fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00001666shift
1667for ac_site_file
1668do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001669 if test -r "$ac_site_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001670 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1671echo "$as_me: loading site script $ac_site_file" >&6;}
1672 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001673 . "$ac_site_file"
1674 fi
1675done
1676
1677if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001678 # Some versions of bash will fail to source /dev/null (special
1679 # files actually), so we avoid doing that.
1680 if test -f "$cache_file"; then
1681 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1682echo "$as_me: loading cache $cache_file" >&6;}
1683 case $cache_file in
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00001684 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1685 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00001686 esac
1687 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001688else
Martin v. Löwis11437992002-04-12 09:54:03 +00001689 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1690echo "$as_me: creating cache $cache_file" >&6;}
1691 >$cache_file
1692fi
1693
1694# Check that the precious variables saved in the cache have kept the same
1695# value.
1696ac_cache_corrupted=false
Thomas Wouters477c8d52006-05-27 19:21:47 +00001697for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001698 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1699 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters477c8d52006-05-27 19:21:47 +00001700 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1701 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00001702 case $ac_old_set,$ac_new_set in
1703 set,)
1704 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1705echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1706 ac_cache_corrupted=: ;;
1707 ,set)
1708 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1709echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1710 ac_cache_corrupted=: ;;
1711 ,);;
1712 *)
1713 if test "x$ac_old_val" != "x$ac_new_val"; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001714 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001715echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001716 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001717echo "$as_me: former value: $ac_old_val" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001718 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001719echo "$as_me: current value: $ac_new_val" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001720 ac_cache_corrupted=:
Martin v. Löwis11437992002-04-12 09:54:03 +00001721 fi;;
1722 esac
1723 # Pass precious variables to config.status.
1724 if test "$ac_new_set" = set; then
1725 case $ac_new_val in
Thomas Wouters477c8d52006-05-27 19:21:47 +00001726 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001727 *) ac_arg=$ac_var=$ac_new_val ;;
1728 esac
1729 case " $ac_configure_args " in
1730 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1731 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1732 esac
1733 fi
1734done
1735if $ac_cache_corrupted; then
1736 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1737echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1738 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1739echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1740 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001741fi
1742
Thomas Wouters477c8d52006-05-27 19:21:47 +00001743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
Guido van Rossum7f43da71994-08-01 12:15:30 +00001767ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001768ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001769ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1770ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1771ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001772
Guido van Rossum627b2d71993-12-24 10:39:16 +00001773
Michael W. Hudson54241132001-12-07 15:38:26 +00001774
Thomas Wouters477c8d52006-05-27 19:21:47 +00001775ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001776
1777
Martin v. Löwis11437992002-04-12 09:54:03 +00001778
1779
1780
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001781
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001782
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001783# We don't use PACKAGE_ variables, and they cause conflicts
1784# with other autoconf-based packages that include Python.h
1785grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1786rm confdefs.h
1787mv confdefs.h.new confdefs.h
1788
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001789
Guido van Rossum0c4eb622006-03-30 16:19:24 +00001790VERSION=3.0
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001791
Martin v. Löwis1142de32002-03-29 16:28:31 +00001792
1793SOVERSION=1.0
1794
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001795# The later defininition of _XOPEN_SOURCE disables certain features
1796# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1797
1798cat >>confdefs.h <<\_ACEOF
1799#define _GNU_SOURCE 1
1800_ACEOF
1801
1802
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001803# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1804# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1805# them.
1806
1807cat >>confdefs.h <<\_ACEOF
1808#define _NETBSD_SOURCE 1
1809_ACEOF
1810
1811
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001812# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1813# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1814# them.
1815
1816cat >>confdefs.h <<\_ACEOF
1817#define __BSD_VISIBLE 1
1818_ACEOF
1819
1820
Martin v. Löwisd6320502004-08-12 13:45:08 +00001821# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1822# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
1823
1824cat >>confdefs.h <<\_ACEOF
1825#define _BSD_TYPES 1
1826_ACEOF
1827
1828
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001829define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001830
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001831# Arguments passed to configure.
1832
1833CONFIG_ARGS="$ac_configure_args"
1834
Thomas Wouters477c8d52006-05-27 19:21:47 +00001835# Check whether --enable-universalsdk was given.
1836if test "${enable_universalsdk+set}" = set; then
1837 enableval=$enable_universalsdk;
1838 case $enableval in
1839 yes)
1840 enableval=/Developer/SDKs/MacOSX10.4u.sdk
1841 ;;
1842 esac
1843 case $enableval in
1844 no)
1845 UNIVERSALSDK=
1846 enable_universalsdk=
1847 ;;
1848 *)
1849 UNIVERSALSDK=$enableval
1850 ;;
1851 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001852
Thomas Wouters477c8d52006-05-27 19:21:47 +00001853else
1854
1855 UNIVERSALSDK=
1856 enable_universalsdk=
1857
1858fi
1859
1860
1861
1862# Check whether --enable-framework was given.
1863if test "${enable_framework+set}" = set; then
1864 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00001865 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001866 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001867 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001868 esac
1869 case $enableval in
1870 no)
1871 PYTHONFRAMEWORK=
1872 PYTHONFRAMEWORKDIR=no-framework
1873 PYTHONFRAMEWORKPREFIX=
1874 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00001875 FRAMEWORKINSTALLFIRST=
1876 FRAMEWORKINSTALLLAST=
Jack Jansen127e56e2001-09-11 14:41:54 +00001877 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001878 ;;
1879 *)
Jack Jansen127e56e2001-09-11 14:41:54 +00001880 PYTHONFRAMEWORK=Python
1881 PYTHONFRAMEWORKDIR=Python.framework
Jack Jansene578a632001-08-15 01:27:14 +00001882 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001883 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00001884 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
1885 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
Jack Jansen127e56e2001-09-11 14:41:54 +00001886 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00001887
1888 # Add makefiles for Mac specific code to the list of output
1889 # files:
1890 ac_config_files="$ac_config_files Mac/OSX/Makefile"
1891
1892 ac_config_files="$ac_config_files Mac/OSX/PythonLauncher/Makefile"
1893
1894 ac_config_files="$ac_config_files Mac/OSX/IDLE/Makefile"
1895
Jack Jansene578a632001-08-15 01:27:14 +00001896 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001897
Guido van Rossum563e7081996-09-10 18:20:48 +00001898else
Martin v. Löwis11437992002-04-12 09:54:03 +00001899
Jack Jansene578a632001-08-15 01:27:14 +00001900 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00001901 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00001902 PYTHONFRAMEWORKPREFIX=
1903 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00001904 FRAMEWORKINSTALLFIRST=
1905 FRAMEWORKINSTALLLAST=
Jack Jansene578a632001-08-15 01:27:14 +00001906 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001907
Thomas Wouters477c8d52006-05-27 19:21:47 +00001908fi
1909
1910
1911
Michael W. Hudson54241132001-12-07 15:38:26 +00001912
1913
1914
1915
Jack Jansene578a632001-08-15 01:27:14 +00001916
1917##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001918## AC_HELP_STRING(--with-dyld,
1919## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00001920##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001921# Set name for machine-dependent library files
1922
Thomas Wouters477c8d52006-05-27 19:21:47 +00001923{ echo "$as_me:$LINENO: checking MACHDEP" >&5
1924echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001925if test -z "$MACHDEP"
1926then
Guido van Rossum563e7081996-09-10 18:20:48 +00001927 ac_sys_system=`uname -s`
Martin v. Löwis21ee4092002-09-30 16:19:48 +00001928 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \
1929 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00001930 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001931 else
Guido van Rossum563e7081996-09-10 18:20:48 +00001932 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001933 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00001934 ac_md_system=`echo $ac_sys_system |
1935 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
1936 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00001937 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00001938 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00001939
Guido van Rossum07397971997-04-29 21:49:50 +00001940 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001941 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001942 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00001943 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00001944 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00001945 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001946 esac
1947fi
Guido van Rossum91922671997-10-09 20:24:13 +00001948
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001949# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
1950# disable features if it is defined, without any means to access these
1951# features as extensions. For these systems, we skip the definition of
1952# _XOPEN_SOURCE. Before adding a system to the list to gain access to
1953# some feature, make sure there is no alternative way to access this
1954# feature. Also, when using wildcards, make sure you have verified the
1955# need for not defining _XOPEN_SOURCE on all systems matching the
1956# wildcard, and that the wildcard does not include future systems
1957# (which may remove their limitations).
1958case $ac_sys_system/$ac_sys_release in
1959 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
1960 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00001961 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00001962 OpenBSD/2.* | OpenBSD/3.[0123456789])
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001963 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00001964 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
1965 # of union __?sigval. Reported by Stuart Bishop.
1966 SunOS/5.6)
1967 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00001968 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
1969 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00001970 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00001971 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00001972 define_xopen_source=no;;
1973 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00001974 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00001975 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00001976 define_xopen_source=no;;
Anthony Baxter6169c6b2003-10-04 07:46:23 +00001977 # On FreeBSD 4.8 and MacOS X 10.2, a bug in ncurses.h means that
1978 # it craps out if _XOPEN_EXTENDED_SOURCE is defined. Apparently,
1979 # this is fixed in 10.3, which identifies itself as Darwin/7.*
1980 # This should hopefully be fixed in FreeBSD 4.9
1981 FreeBSD/4.8* | Darwin/6* )
1982 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00001983 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
1984 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
1985 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00001986 AIX/4)
1987 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00001988 AIX/5)
1989 if test `uname -r` -eq 1; then
1990 define_xopen_source=no
1991 fi
1992 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00001993 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
1994 # disables platform specific features beyond repair.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001995 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
1996 # has no effect, don't bother defineing them
1997 Darwin/[78].*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00001998 define_xopen_source=no
1999 ;;
2000
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002001esac
2002
2003if test $define_xopen_source = yes
2004then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002005 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
2006 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00002007 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
2008 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00002009 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00002010 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00002011
2012cat >>confdefs.h <<\_ACEOF
2013#define _XOPEN_SOURCE 500
2014_ACEOF
2015
2016 ;;
2017 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002018
2019cat >>confdefs.h <<\_ACEOF
2020#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002021_ACEOF
2022
Skip Montanarof0d5f792004-08-15 14:08:23 +00002023 ;;
2024 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002025
2026 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
2027 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
2028 # several APIs are not declared. Since this is also needed in some
2029 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00002030 # except for Solaris 10, where it must not be defined,
2031 # as it implies XPG4.2
2032 case $ac_sys_system/$ac_sys_release in
2033 SunOS/5.10)
2034 ;;
2035 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002036
2037cat >>confdefs.h <<\_ACEOF
2038#define _XOPEN_SOURCE_EXTENDED 1
2039_ACEOF
2040
Martin v. Löwis7dece662005-11-26 11:38:24 +00002041 ;;
2042 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002043
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002044
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002045cat >>confdefs.h <<\_ACEOF
2046#define _POSIX_C_SOURCE 200112L
2047_ACEOF
2048
2049
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002050fi
2051
Guido van Rossum91922671997-10-09 20:24:13 +00002052#
2053# SGI compilers allow the specification of the both the ABI and the
2054# ISA on the command line. Depending on the values of these switches,
2055# different and often incompatable code will be generated.
2056#
2057# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
2058# thus supply support for various ABI/ISA combinations. The MACHDEP
2059# variable is also adjusted.
2060#
2061
2062if test ! -z "$SGI_ABI"
2063then
2064 CC="cc $SGI_ABI"
2065 LDFLAGS="$SGI_ABI $LDFLAGS"
2066 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
2067fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002068{ echo "$as_me:$LINENO: result: $MACHDEP" >&5
2069echo "${ECHO_T}$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002070
Jack Jansen83f898c2002-12-30 22:23:40 +00002071# And add extra plat-mac for darwin
2072
Jack Jansen7b59b422003-03-17 15:44:10 +00002073
Thomas Wouters477c8d52006-05-27 19:21:47 +00002074{ echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5
2075echo $ECHO_N "checking EXTRAPLATDIR... $ECHO_C" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002076if test -z "$EXTRAPLATDIR"
2077then
2078 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00002079 darwin)
2080 EXTRAPLATDIR="\$(PLATMACDIRS)"
2081 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
2082 ;;
2083 *)
2084 EXTRAPLATDIR=""
2085 EXTRAMACHDEPPATH=""
2086 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00002087 esac
2088fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002089{ echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5
2090echo "${ECHO_T}$EXTRAPLATDIR" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002091
Jack Jansen6b08a402004-06-03 12:41:45 +00002092# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
2093# it may influence the way we can build extensions, so distutils
2094# needs to check it
2095
Thomas Wouters477c8d52006-05-27 19:21:47 +00002096
Jack Jansen6b08a402004-06-03 12:41:45 +00002097CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002098EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00002099
Guido van Rossum627b2d71993-12-24 10:39:16 +00002100# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00002101
2102# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
2103# for debug/optimization stuff. BASECFLAGS is for flags that are required
2104# just to get things to compile and link. Users are free to override OPT
2105# when running configure or make. The build should not break if they do.
2106# BASECFLAGS should generally not be messed with, however.
2107
2108# XXX shouldn't some/most/all of this code be merged with the stuff later
2109# on that fiddles with OPT and BASECFLAGS?
Thomas Wouters477c8d52006-05-27 19:21:47 +00002110{ echo "$as_me:$LINENO: checking for --without-gcc" >&5
2111echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002112
Thomas Wouters477c8d52006-05-27 19:21:47 +00002113# Check whether --with-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002114if test "${with_gcc+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00002115 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002116 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +00002117 no) CC=cc
2118 without_gcc=yes;;
2119 yes) CC=gcc
2120 without_gcc=no;;
2121 *) CC=$withval
2122 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002123 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00002124else
Martin v. Löwis11437992002-04-12 09:54:03 +00002125
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002126 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002127 AIX*) CC=cc_r
2128 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002129 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002130 case $BE_HOST_CPU in
2131 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00002132 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002133 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00002134 BASECFLAGS="$BASECFLAGS -export pragma"
2135 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002136 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002137 ;;
2138 x86)
Fred Drake5790be12000-10-09 17:06:13 +00002139 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002140 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00002141 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002142 ;;
2143 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002144 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
2145echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
2146 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002147 ;;
2148 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002149 AR="\$(srcdir)/Modules/ar_beos"
2150 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002151 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00002152 Monterey*)
2153 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00002154 without_gcc=;;
2155 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00002156 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +00002157fi
2158
2159{ echo "$as_me:$LINENO: result: $without_gcc" >&5
2160echo "${ECHO_T}$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002161
Guido van Rossum8b131c51995-03-09 14:10:13 +00002162# If the user switches compilers, we can't believe the cache
2163if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
2164then
Martin v. Löwis11437992002-04-12 09:54:03 +00002165 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
2166(it is also a good idea to do 'make clean' before compiling)" >&5
2167echo "$as_me: error: cached CC is different -- throw away $cache_file
2168(it is also a good idea to do 'make clean' before compiling)" >&2;}
2169 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00002170fi
2171
Martin v. Löwis11437992002-04-12 09:54:03 +00002172ac_ext=c
2173ac_cpp='$CPP $CPPFLAGS'
2174ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2175ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2176ac_compiler_gnu=$ac_cv_c_compiler_gnu
2177if test -n "$ac_tool_prefix"; then
2178 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2179set dummy ${ac_tool_prefix}gcc; ac_word=$2
Thomas Wouters477c8d52006-05-27 19:21:47 +00002180{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2181echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002182if test "${ac_cv_prog_CC+set}" = set; then
2183 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002184else
2185 if test -n "$CC"; then
2186 ac_cv_prog_CC="$CC" # Let the user override the test.
2187else
Martin v. Löwis11437992002-04-12 09:54:03 +00002188as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2189for as_dir in $PATH
2190do
2191 IFS=$as_save_IFS
2192 test -z "$as_dir" && as_dir=.
2193 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters477c8d52006-05-27 19:21:47 +00002194 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 +00002195 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2196 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2197 break 2
2198 fi
2199done
2200done
Thomas Wouters477c8d52006-05-27 19:21:47 +00002201IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002202
Jack Jansendd19cf82001-12-06 22:36:17 +00002203fi
2204fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002205CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00002206if test -n "$CC"; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00002207 { echo "$as_me:$LINENO: result: $CC" >&5
2208echo "${ECHO_T}$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002209else
Thomas Wouters477c8d52006-05-27 19:21:47 +00002210 { echo "$as_me:$LINENO: result: no" >&5
2211echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002212fi
2213
Thomas Wouters477c8d52006-05-27 19:21:47 +00002214
Martin v. Löwis11437992002-04-12 09:54:03 +00002215fi
2216if test -z "$ac_cv_prog_CC"; then
2217 ac_ct_CC=$CC
2218 # Extract the first word of "gcc", so it can be a program name with args.
2219set dummy gcc; ac_word=$2
Thomas Wouters477c8d52006-05-27 19:21:47 +00002220{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2221echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002222if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2223 echo $ECHO_N "(cached) $ECHO_C" >&6
2224else
2225 if test -n "$ac_ct_CC"; then
2226 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2227else
2228as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2229for as_dir in $PATH
2230do
2231 IFS=$as_save_IFS
2232 test -z "$as_dir" && as_dir=.
2233 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters477c8d52006-05-27 19:21:47 +00002234 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 +00002235 ac_cv_prog_ac_ct_CC="gcc"
2236 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2237 break 2
2238 fi
2239done
2240done
Thomas Wouters477c8d52006-05-27 19:21:47 +00002241IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002242
2243fi
2244fi
2245ac_ct_CC=$ac_cv_prog_ac_ct_CC
2246if test -n "$ac_ct_CC"; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00002247 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2248echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002249else
Thomas Wouters477c8d52006-05-27 19:21:47 +00002250 { echo "$as_me:$LINENO: result: no" >&5
2251echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002252fi
2253
Thomas Wouters477c8d52006-05-27 19:21:47 +00002254 if test "x$ac_ct_CC" = x; then
2255 CC=""
2256 else
2257 case $cross_compiling:$ac_tool_warned in
2258yes:)
2259{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2260whose name does not start with the host triplet. If you think this
2261configuration is useful to you, please write to autoconf@gnu.org." >&5
2262echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2263whose name does not start with the host triplet. If you think this
2264configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2265ac_tool_warned=yes ;;
2266esac
2267 CC=$ac_ct_CC
2268 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002269else
2270 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002271fi
2272
Jack Jansendd19cf82001-12-06 22:36:17 +00002273if test -z "$CC"; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00002274 if test -n "$ac_tool_prefix"; then
2275 # 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 +00002276set dummy ${ac_tool_prefix}cc; ac_word=$2
Thomas Wouters477c8d52006-05-27 19:21:47 +00002277{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2278echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002279if test "${ac_cv_prog_CC+set}" = set; then
2280 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002281else
2282 if test -n "$CC"; then
2283 ac_cv_prog_CC="$CC" # Let the user override the test.
2284else
Martin v. Löwis11437992002-04-12 09:54:03 +00002285as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2286for as_dir in $PATH
2287do
2288 IFS=$as_save_IFS
2289 test -z "$as_dir" && as_dir=.
2290 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters477c8d52006-05-27 19:21:47 +00002291 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 +00002292 ac_cv_prog_CC="${ac_tool_prefix}cc"
2293 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2294 break 2
2295 fi
2296done
2297done
Thomas Wouters477c8d52006-05-27 19:21:47 +00002298IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002299
2300fi
2301fi
2302CC=$ac_cv_prog_CC
2303if test -n "$CC"; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00002304 { echo "$as_me:$LINENO: result: $CC" >&5
2305echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002306else
Thomas Wouters477c8d52006-05-27 19:21:47 +00002307 { echo "$as_me:$LINENO: result: no" >&5
2308echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002309fi
2310
Thomas Wouters477c8d52006-05-27 19:21:47 +00002311
Martin v. Löwis11437992002-04-12 09:54:03 +00002312 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002313fi
2314if test -z "$CC"; then
2315 # Extract the first word of "cc", so it can be a program name with args.
2316set dummy cc; ac_word=$2
Thomas Wouters477c8d52006-05-27 19:21:47 +00002317{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2318echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002319if test "${ac_cv_prog_CC+set}" = set; then
2320 echo $ECHO_N "(cached) $ECHO_C" >&6
2321else
2322 if test -n "$CC"; then
2323 ac_cv_prog_CC="$CC" # Let the user override the test.
2324else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002325 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002326as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2327for as_dir in $PATH
2328do
2329 IFS=$as_save_IFS
2330 test -z "$as_dir" && as_dir=.
2331 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters477c8d52006-05-27 19:21:47 +00002332 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 +00002333 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2334 ac_prog_rejected=yes
2335 continue
2336 fi
2337 ac_cv_prog_CC="cc"
2338 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2339 break 2
2340 fi
2341done
2342done
Thomas Wouters477c8d52006-05-27 19:21:47 +00002343IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002344
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002345if test $ac_prog_rejected = yes; then
2346 # We found a bogon in the path, so make sure we never use it.
2347 set dummy $ac_cv_prog_CC
2348 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002349 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002350 # We chose a different compiler from the bogus one.
2351 # However, it has the same basename, so the bogon will be chosen
2352 # first if we set CC to just the basename; use the full file name.
2353 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002354 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002355 fi
2356fi
2357fi
2358fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002359CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002360if test -n "$CC"; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00002361 { echo "$as_me:$LINENO: result: $CC" >&5
2362echo "${ECHO_T}$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002363else
Thomas Wouters477c8d52006-05-27 19:21:47 +00002364 { echo "$as_me:$LINENO: result: no" >&5
2365echo "${ECHO_T}no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002366fi
2367
Thomas Wouters477c8d52006-05-27 19:21:47 +00002368
Martin v. Löwis11437992002-04-12 09:54:03 +00002369fi
2370if test -z "$CC"; then
2371 if test -n "$ac_tool_prefix"; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00002372 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002373 do
2374 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2375set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Thomas Wouters477c8d52006-05-27 19:21:47 +00002376{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2377echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002378if test "${ac_cv_prog_CC+set}" = set; then
2379 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002380else
2381 if test -n "$CC"; then
2382 ac_cv_prog_CC="$CC" # Let the user override the test.
2383else
Martin v. Löwis11437992002-04-12 09:54:03 +00002384as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2385for as_dir in $PATH
2386do
2387 IFS=$as_save_IFS
2388 test -z "$as_dir" && as_dir=.
2389 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters477c8d52006-05-27 19:21:47 +00002390 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 +00002391 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2392 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2393 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002394 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002395done
2396done
Thomas Wouters477c8d52006-05-27 19:21:47 +00002397IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002398
2399fi
2400fi
2401CC=$ac_cv_prog_CC
2402if test -n "$CC"; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00002403 { echo "$as_me:$LINENO: result: $CC" >&5
2404echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002405else
Thomas Wouters477c8d52006-05-27 19:21:47 +00002406 { echo "$as_me:$LINENO: result: no" >&5
2407echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002408fi
2409
Thomas Wouters477c8d52006-05-27 19:21:47 +00002410
Martin v. Löwis11437992002-04-12 09:54:03 +00002411 test -n "$CC" && break
2412 done
2413fi
2414if test -z "$CC"; then
2415 ac_ct_CC=$CC
Thomas Wouters477c8d52006-05-27 19:21:47 +00002416 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002417do
2418 # Extract the first word of "$ac_prog", so it can be a program name with args.
2419set dummy $ac_prog; ac_word=$2
Thomas Wouters477c8d52006-05-27 19:21:47 +00002420{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2421echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002422if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2423 echo $ECHO_N "(cached) $ECHO_C" >&6
2424else
2425 if test -n "$ac_ct_CC"; then
2426 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2427else
2428as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2429for as_dir in $PATH
2430do
2431 IFS=$as_save_IFS
2432 test -z "$as_dir" && as_dir=.
2433 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters477c8d52006-05-27 19:21:47 +00002434 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 +00002435 ac_cv_prog_ac_ct_CC="$ac_prog"
2436 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2437 break 2
2438 fi
2439done
2440done
Thomas Wouters477c8d52006-05-27 19:21:47 +00002441IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00002442
Martin v. Löwis11437992002-04-12 09:54:03 +00002443fi
2444fi
2445ac_ct_CC=$ac_cv_prog_ac_ct_CC
2446if test -n "$ac_ct_CC"; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00002447 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2448echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002449else
Thomas Wouters477c8d52006-05-27 19:21:47 +00002450 { echo "$as_me:$LINENO: result: no" >&5
2451echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002452fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002453
Thomas Wouters477c8d52006-05-27 19:21:47 +00002454
Martin v. Löwis11437992002-04-12 09:54:03 +00002455 test -n "$ac_ct_CC" && break
2456done
Michael W. Hudson54241132001-12-07 15:38:26 +00002457
Thomas Wouters477c8d52006-05-27 19:21:47 +00002458 if test "x$ac_ct_CC" = x; then
2459 CC=""
2460 else
2461 case $cross_compiling:$ac_tool_warned in
2462yes:)
2463{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2464whose name does not start with the host triplet. If you think this
2465configuration is useful to you, please write to autoconf@gnu.org." >&5
2466echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2467whose name does not start with the host triplet. If you think this
2468configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2469ac_tool_warned=yes ;;
2470esac
2471 CC=$ac_ct_CC
2472 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002473fi
2474
2475fi
2476
2477
Skip Montanaro6dead952003-09-25 14:50:04 +00002478test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2479See \`config.log' for more details." >&5
2480echo "$as_me: error: no acceptable C compiler found in \$PATH
2481See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002482 { (exit 1); exit 1; }; }
2483
2484# Provide some information about the compiler.
Thomas Wouters477c8d52006-05-27 19:21:47 +00002485echo "$as_me:$LINENO: checking for C compiler version" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002486ac_compiler=`set X $ac_compile; echo $2`
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002487{ (ac_try="$ac_compiler --version >&5"
2488case "(($ac_try" in
2489 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2490 *) ac_try_echo=$ac_try;;
2491esac
2492eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2493 (eval "$ac_compiler --version >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002494 ac_status=$?
2495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2496 (exit $ac_status); }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002497{ (ac_try="$ac_compiler -v >&5"
2498case "(($ac_try" in
2499 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2500 *) ac_try_echo=$ac_try;;
2501esac
2502eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2503 (eval "$ac_compiler -v >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002504 ac_status=$?
2505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2506 (exit $ac_status); }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002507{ (ac_try="$ac_compiler -V >&5"
2508case "(($ac_try" in
2509 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2510 *) ac_try_echo=$ac_try;;
2511esac
2512eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2513 (eval "$ac_compiler -V >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002514 ac_status=$?
2515 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2516 (exit $ac_status); }
2517
2518cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002519/* confdefs.h. */
2520_ACEOF
2521cat confdefs.h >>conftest.$ac_ext
2522cat >>conftest.$ac_ext <<_ACEOF
2523/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002524
Martin v. Löwis11437992002-04-12 09:54:03 +00002525int
2526main ()
2527{
2528
2529 ;
2530 return 0;
2531}
2532_ACEOF
2533ac_clean_files_save=$ac_clean_files
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002534ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002535# Try to create an executable without -o first, disregard a.out.
2536# It will help us diagnose broken compilers, and finding out an intuition
2537# of exeext.
Thomas Wouters477c8d52006-05-27 19:21:47 +00002538{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2539echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002540ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002541#
2542# List of possible output files, starting from the most likely.
2543# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2544# only as a last resort. b.out is created by i960 compilers.
2545ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2546#
2547# The IRIX 6 linker writes into existing files which may not be
2548# executable, retaining their permissions. Remove them first so a
2549# subsequent execution test works.
2550ac_rmfiles=
2551for ac_file in $ac_files
2552do
2553 case $ac_file in
2554 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2555 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2556 esac
2557done
2558rm -f $ac_rmfiles
Thomas Wouters477c8d52006-05-27 19:21:47 +00002559
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002560if { (ac_try="$ac_link_default"
2561case "(($ac_try" in
2562 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2563 *) ac_try_echo=$ac_try;;
2564esac
2565eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2566 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002567 ac_status=$?
2568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2569 (exit $ac_status); }; then
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002570 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2571# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2572# in a Makefile. We should not override ac_cv_exeext if it was cached,
2573# so that the user can short-circuit this test for compilers unknown to
2574# Autoconf.
2575for ac_file in $ac_files
Skip Montanaro6dead952003-09-25 14:50:04 +00002576do
2577 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002578 case $ac_file in
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002579 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
2580 ;;
2581 [ab].out )
2582 # We found the default executable, but exeext='' is most
2583 # certainly right.
2584 break;;
2585 *.* )
2586 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2587 then :; else
2588 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2589 fi
2590 # We set ac_cv_exeext here because the later test for it is not
2591 # safe: cross compilers may not add the suffix if given an `-o'
2592 # argument, so we may need to know it at that point already.
2593 # Even if this section looks crufty: it has the advantage of
2594 # actually working.
2595 break;;
2596 * )
2597 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002598 esac
2599done
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002600test "$ac_cv_exeext" = no && ac_cv_exeext=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002601
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002602else
Martin v. Löwis11437992002-04-12 09:54:03 +00002603 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002604sed 's/^/| /' conftest.$ac_ext >&5
2605
2606{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2607See \`config.log' for more details." >&5
2608echo "$as_me: error: C compiler cannot create executables
2609See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002610 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002611fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002612
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002613ac_exeext=$ac_cv_exeext
Thomas Wouters477c8d52006-05-27 19:21:47 +00002614{ echo "$as_me:$LINENO: result: $ac_file" >&5
2615echo "${ECHO_T}$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002616
Thomas Wouters477c8d52006-05-27 19:21:47 +00002617# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002618# the compiler is broken, or we cross compile.
Thomas Wouters477c8d52006-05-27 19:21:47 +00002619{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2620echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002621# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2622# If not cross compiling, check that we can run a simple program.
2623if test "$cross_compiling" != yes; then
2624 if { ac_try='./$ac_file'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002625 { (case "(($ac_try" in
2626 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2627 *) ac_try_echo=$ac_try;;
2628esac
2629eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2630 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002631 ac_status=$?
2632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2633 (exit $ac_status); }; }; then
2634 cross_compiling=no
2635 else
2636 if test "$cross_compiling" = maybe; then
2637 cross_compiling=yes
2638 else
2639 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002640If you meant to cross compile, use \`--host'.
2641See \`config.log' for more details." >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002642echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002643If you meant to cross compile, use \`--host'.
2644See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002645 { (exit 1); exit 1; }; }
2646 fi
2647 fi
2648fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002649{ echo "$as_me:$LINENO: result: yes" >&5
2650echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002651
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002652rm -f a.out a.exe conftest$ac_cv_exeext b.out
2653ac_clean_files=$ac_clean_files_save
2654# Check that the compiler produces executables we can run. If not, either
2655# the compiler is broken, or we cross compile.
Thomas Wouters477c8d52006-05-27 19:21:47 +00002656{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2657echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2658{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2659echo "${ECHO_T}$cross_compiling" >&6; }
2660
2661{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2662echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002663if { (ac_try="$ac_link"
2664case "(($ac_try" in
2665 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2666 *) ac_try_echo=$ac_try;;
2667esac
2668eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2669 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002670 ac_status=$?
2671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2672 (exit $ac_status); }; then
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002673 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2674# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2675# work properly (i.e., refer to `conftest.exe'), while it won't with
2676# `rm'.
2677for ac_file in conftest.exe conftest conftest.*; do
2678 test -f "$ac_file" || continue
2679 case $ac_file in
2680 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2681 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2682 break;;
2683 * ) break;;
2684 esac
2685done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002686else
Skip Montanaro6dead952003-09-25 14:50:04 +00002687 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2688See \`config.log' for more details." >&5
2689echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2690See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002691 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002692fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002693
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002694rm -f conftest$ac_cv_exeext
Thomas Wouters477c8d52006-05-27 19:21:47 +00002695{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2696echo "${ECHO_T}$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002697
2698rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002699EXEEXT=$ac_cv_exeext
2700ac_exeext=$EXEEXT
Thomas Wouters477c8d52006-05-27 19:21:47 +00002701{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
2702echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002703if test "${ac_cv_objext+set}" = set; then
2704 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002705else
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002706 cat >conftest.$ac_ext <<_ACEOF
2707/* confdefs.h. */
2708_ACEOF
2709cat confdefs.h >>conftest.$ac_ext
2710cat >>conftest.$ac_ext <<_ACEOF
2711/* end confdefs.h. */
2712
2713int
2714main ()
2715{
2716
2717 ;
2718 return 0;
2719}
2720_ACEOF
2721rm -f conftest.o conftest.obj
2722if { (ac_try="$ac_compile"
2723case "(($ac_try" in
2724 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2725 *) ac_try_echo=$ac_try;;
2726esac
2727eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2728 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002729 ac_status=$?
2730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2731 (exit $ac_status); }; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00002732 for ac_file in conftest.o conftest.obj conftest.*; do
2733 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00002734 case $ac_file in
Thomas Wouters477c8d52006-05-27 19:21:47 +00002735 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002736 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2737 break;;
2738 esac
2739done
2740else
2741 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002742sed 's/^/| /' conftest.$ac_ext >&5
2743
2744{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2745See \`config.log' for more details." >&5
2746echo "$as_me: error: cannot compute suffix of object files: cannot compile
2747See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002748 { (exit 1); exit 1; }; }
2749fi
2750
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002751rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002752fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002753{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2754echo "${ECHO_T}$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002755OBJEXT=$ac_cv_objext
2756ac_objext=$OBJEXT
Thomas Wouters477c8d52006-05-27 19:21:47 +00002757{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2758echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002759if test "${ac_cv_c_compiler_gnu+set}" = set; then
2760 echo $ECHO_N "(cached) $ECHO_C" >&6
2761else
2762 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002763/* confdefs.h. */
2764_ACEOF
2765cat confdefs.h >>conftest.$ac_ext
2766cat >>conftest.$ac_ext <<_ACEOF
2767/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002768
Martin v. Löwis11437992002-04-12 09:54:03 +00002769int
2770main ()
2771{
2772#ifndef __GNUC__
2773 choke me
2774#endif
2775
2776 ;
2777 return 0;
2778}
2779_ACEOF
2780rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002781if { (ac_try="$ac_compile"
2782case "(($ac_try" in
2783 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2784 *) ac_try_echo=$ac_try;;
2785esac
2786eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2787 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002788 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002789 grep -v '^ *+' conftest.er1 >conftest.err
2790 rm -f conftest.er1
2791 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2793 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002794 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
2795 { (case "(($ac_try" in
2796 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2797 *) ac_try_echo=$ac_try;;
2798esac
2799eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2800 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00002801 ac_status=$?
2802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2803 (exit $ac_status); }; } &&
2804 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002805 { (case "(($ac_try" in
2806 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2807 *) ac_try_echo=$ac_try;;
2808esac
2809eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2810 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002811 ac_status=$?
2812 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2813 (exit $ac_status); }; }; then
2814 ac_compiler_gnu=yes
2815else
2816 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002817sed 's/^/| /' conftest.$ac_ext >&5
2818
Thomas Wouters477c8d52006-05-27 19:21:47 +00002819 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002820fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002821
Skip Montanarof0d5f792004-08-15 14:08:23 +00002822rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002823ac_cv_c_compiler_gnu=$ac_compiler_gnu
2824
2825fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002826{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2827echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002828GCC=`test $ac_compiler_gnu = yes && echo yes`
2829ac_test_CFLAGS=${CFLAGS+set}
2830ac_save_CFLAGS=$CFLAGS
Thomas Wouters477c8d52006-05-27 19:21:47 +00002831{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2832echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002833if test "${ac_cv_prog_cc_g+set}" = set; then
2834 echo $ECHO_N "(cached) $ECHO_C" >&6
2835else
Thomas Wouters477c8d52006-05-27 19:21:47 +00002836 ac_save_c_werror_flag=$ac_c_werror_flag
2837 ac_c_werror_flag=yes
2838 ac_cv_prog_cc_g=no
2839 CFLAGS="-g"
2840 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002841/* confdefs.h. */
2842_ACEOF
2843cat confdefs.h >>conftest.$ac_ext
2844cat >>conftest.$ac_ext <<_ACEOF
2845/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002846
Martin v. Löwis11437992002-04-12 09:54:03 +00002847int
2848main ()
2849{
2850
2851 ;
2852 return 0;
2853}
2854_ACEOF
2855rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002856if { (ac_try="$ac_compile"
2857case "(($ac_try" in
2858 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2859 *) ac_try_echo=$ac_try;;
2860esac
2861eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2862 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002863 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002864 grep -v '^ *+' conftest.er1 >conftest.err
2865 rm -f conftest.er1
2866 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2868 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002869 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
2870 { (case "(($ac_try" in
2871 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2872 *) ac_try_echo=$ac_try;;
2873esac
2874eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2875 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00002876 ac_status=$?
2877 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2878 (exit $ac_status); }; } &&
2879 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002880 { (case "(($ac_try" in
2881 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2882 *) ac_try_echo=$ac_try;;
2883esac
2884eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2885 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002886 ac_status=$?
2887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2888 (exit $ac_status); }; }; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002889 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002890else
Martin v. Löwis11437992002-04-12 09:54:03 +00002891 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002892sed 's/^/| /' conftest.$ac_ext >&5
2893
Thomas Wouters477c8d52006-05-27 19:21:47 +00002894 CFLAGS=""
2895 cat >conftest.$ac_ext <<_ACEOF
2896/* confdefs.h. */
2897_ACEOF
2898cat confdefs.h >>conftest.$ac_ext
2899cat >>conftest.$ac_ext <<_ACEOF
2900/* end confdefs.h. */
2901
2902int
2903main ()
2904{
2905
2906 ;
2907 return 0;
2908}
2909_ACEOF
2910rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002911if { (ac_try="$ac_compile"
2912case "(($ac_try" in
2913 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2914 *) ac_try_echo=$ac_try;;
2915esac
2916eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2917 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters477c8d52006-05-27 19:21:47 +00002918 ac_status=$?
2919 grep -v '^ *+' conftest.er1 >conftest.err
2920 rm -f conftest.er1
2921 cat conftest.err >&5
2922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2923 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002924 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
2925 { (case "(($ac_try" in
2926 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2927 *) ac_try_echo=$ac_try;;
2928esac
2929eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2930 (eval "$ac_try") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +00002931 ac_status=$?
2932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2933 (exit $ac_status); }; } &&
2934 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002935 { (case "(($ac_try" in
2936 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2937 *) ac_try_echo=$ac_try;;
2938esac
2939eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2940 (eval "$ac_try") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +00002941 ac_status=$?
2942 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2943 (exit $ac_status); }; }; then
2944 :
2945else
2946 echo "$as_me: failed program was:" >&5
2947sed 's/^/| /' conftest.$ac_ext >&5
2948
2949 ac_c_werror_flag=$ac_save_c_werror_flag
2950 CFLAGS="-g"
2951 cat >conftest.$ac_ext <<_ACEOF
2952/* confdefs.h. */
2953_ACEOF
2954cat confdefs.h >>conftest.$ac_ext
2955cat >>conftest.$ac_ext <<_ACEOF
2956/* end confdefs.h. */
2957
2958int
2959main ()
2960{
2961
2962 ;
2963 return 0;
2964}
2965_ACEOF
2966rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002967if { (ac_try="$ac_compile"
2968case "(($ac_try" in
2969 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2970 *) ac_try_echo=$ac_try;;
2971esac
2972eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2973 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters477c8d52006-05-27 19:21:47 +00002974 ac_status=$?
2975 grep -v '^ *+' conftest.er1 >conftest.err
2976 rm -f conftest.er1
2977 cat conftest.err >&5
2978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2979 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002980 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
2981 { (case "(($ac_try" in
2982 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2983 *) ac_try_echo=$ac_try;;
2984esac
2985eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2986 (eval "$ac_try") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +00002987 ac_status=$?
2988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2989 (exit $ac_status); }; } &&
2990 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002991 { (case "(($ac_try" in
2992 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2993 *) ac_try_echo=$ac_try;;
2994esac
2995eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2996 (eval "$ac_try") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +00002997 ac_status=$?
2998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2999 (exit $ac_status); }; }; then
3000 ac_cv_prog_cc_g=yes
3001else
3002 echo "$as_me: failed program was:" >&5
3003sed 's/^/| /' conftest.$ac_ext >&5
3004
3005
Guido van Rossum627b2d71993-12-24 10:39:16 +00003006fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003007
Skip Montanarof0d5f792004-08-15 14:08:23 +00003008rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003009fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003010
3011rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3012fi
3013
3014rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3015 ac_c_werror_flag=$ac_save_c_werror_flag
3016fi
3017{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3018echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003019if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003020 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003021elif test $ac_cv_prog_cc_g = yes; then
3022 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003023 CFLAGS="-g -O2"
3024 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003025 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003026 fi
3027else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003028 if test "$GCC" = yes; then
3029 CFLAGS="-O2"
3030 else
3031 CFLAGS=
3032 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003033fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003034{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3035echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
3036if test "${ac_cv_prog_cc_c89+set}" = set; then
Skip Montanaro6dead952003-09-25 14:50:04 +00003037 echo $ECHO_N "(cached) $ECHO_C" >&6
3038else
Thomas Wouters477c8d52006-05-27 19:21:47 +00003039 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003040ac_save_CC=$CC
3041cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003042/* confdefs.h. */
3043_ACEOF
3044cat confdefs.h >>conftest.$ac_ext
3045cat >>conftest.$ac_ext <<_ACEOF
3046/* end confdefs.h. */
3047#include <stdarg.h>
3048#include <stdio.h>
3049#include <sys/types.h>
3050#include <sys/stat.h>
3051/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3052struct buf { int x; };
3053FILE * (*rcsopen) (struct buf *, struct stat *, int);
3054static char *e (p, i)
3055 char **p;
3056 int i;
3057{
3058 return p[i];
3059}
3060static char *f (char * (*g) (char **, int), char **p, ...)
3061{
3062 char *s;
3063 va_list v;
3064 va_start (v,p);
3065 s = g (p, va_arg (v,int));
3066 va_end (v);
3067 return s;
3068}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003069
3070/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3071 function prototypes and stuff, but not '\xHH' hex character constants.
3072 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters477c8d52006-05-27 19:21:47 +00003073 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003074 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3075 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters477c8d52006-05-27 19:21:47 +00003076 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003077int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3078
Skip Montanaro6dead952003-09-25 14:50:04 +00003079int test (int i, double x);
3080struct s1 {int (*f) (int a);};
3081struct s2 {int (*f) (double a);};
3082int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3083int argc;
3084char **argv;
3085int
3086main ()
3087{
3088return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3089 ;
3090 return 0;
3091}
3092_ACEOF
Thomas Wouters477c8d52006-05-27 19:21:47 +00003093for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3094 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003095do
3096 CC="$ac_save_CC $ac_arg"
3097 rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003098if { (ac_try="$ac_compile"
3099case "(($ac_try" in
3100 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3101 *) ac_try_echo=$ac_try;;
3102esac
3103eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3104 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00003105 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003106 grep -v '^ *+' conftest.er1 >conftest.err
3107 rm -f conftest.er1
3108 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3110 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003111 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3112 { (case "(($ac_try" in
3113 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3114 *) ac_try_echo=$ac_try;;
3115esac
3116eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3117 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00003118 ac_status=$?
3119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3120 (exit $ac_status); }; } &&
3121 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003122 { (case "(($ac_try" in
3123 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3124 *) ac_try_echo=$ac_try;;
3125esac
3126eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3127 (eval "$ac_try") 2>&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003128 ac_status=$?
3129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3130 (exit $ac_status); }; }; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00003131 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003132else
3133 echo "$as_me: failed program was:" >&5
3134sed 's/^/| /' conftest.$ac_ext >&5
3135
Thomas Wouters477c8d52006-05-27 19:21:47 +00003136
Skip Montanaro6dead952003-09-25 14:50:04 +00003137fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003138
Skip Montanarof0d5f792004-08-15 14:08:23 +00003139rm -f conftest.err conftest.$ac_objext
Thomas Wouters477c8d52006-05-27 19:21:47 +00003140 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003141done
Thomas Wouters477c8d52006-05-27 19:21:47 +00003142rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003143CC=$ac_save_CC
3144
3145fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003146# AC_CACHE_VAL
3147case "x$ac_cv_prog_cc_c89" in
3148 x)
3149 { echo "$as_me:$LINENO: result: none needed" >&5
3150echo "${ECHO_T}none needed" >&6; } ;;
3151 xno)
3152 { echo "$as_me:$LINENO: result: unsupported" >&5
3153echo "${ECHO_T}unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003154 *)
Thomas Wouters477c8d52006-05-27 19:21:47 +00003155 CC="$CC $ac_cv_prog_cc_c89"
3156 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3157echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003158esac
3159
Skip Montanaro6dead952003-09-25 14:50:04 +00003160
Martin v. Löwis11437992002-04-12 09:54:03 +00003161ac_ext=c
3162ac_cpp='$CPP $CPPFLAGS'
3163ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3164ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3165ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003166
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003167
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003168
3169
Thomas Wouters477c8d52006-05-27 19:21:47 +00003170{ echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
3171echo $ECHO_N "checking for --with-cxx-main=<compiler>... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003172
Thomas Wouters477c8d52006-05-27 19:21:47 +00003173# Check whether --with-cxx_main was given.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003174if test "${with_cxx_main+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00003175 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003176
3177 case $withval in
3178 no) with_cxx_main=no
3179 MAINCC='$(CC)';;
3180 yes) with_cxx_main=yes
3181 MAINCC='$(CXX)';;
3182 *) with_cxx_main=yes
3183 MAINCC=$withval
3184 if test -z "$CXX"
3185 then
3186 CXX=$withval
3187 fi;;
3188 esac
3189else
3190
3191 with_cxx_main=no
3192 MAINCC='$(CC)'
3193
Thomas Wouters477c8d52006-05-27 19:21:47 +00003194fi
3195
3196{ echo "$as_me:$LINENO: result: $with_cxx_main" >&5
3197echo "${ECHO_T}$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003198
3199preset_cxx="$CXX"
3200if test -z "$CXX"
3201then
3202 case "$CC" in
3203 gcc) # Extract the first word of "g++", so it can be a program name with args.
3204set dummy g++; ac_word=$2
Thomas Wouters477c8d52006-05-27 19:21:47 +00003205{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3206echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003207if test "${ac_cv_path_CXX+set}" = set; then
3208 echo $ECHO_N "(cached) $ECHO_C" >&6
3209else
3210 case $CXX in
3211 [\\/]* | ?:[\\/]*)
3212 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3213 ;;
3214 *)
3215 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3216for as_dir in notfound
3217do
3218 IFS=$as_save_IFS
3219 test -z "$as_dir" && as_dir=.
3220 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters477c8d52006-05-27 19:21:47 +00003221 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 +00003222 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
3223 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3224 break 2
3225 fi
3226done
3227done
Thomas Wouters477c8d52006-05-27 19:21:47 +00003228IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003229
3230 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
3231 ;;
3232esac
3233fi
3234CXX=$ac_cv_path_CXX
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003235if test -n "$CXX"; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00003236 { echo "$as_me:$LINENO: result: $CXX" >&5
3237echo "${ECHO_T}$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003238else
Thomas Wouters477c8d52006-05-27 19:21:47 +00003239 { echo "$as_me:$LINENO: result: no" >&5
3240echo "${ECHO_T}no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003241fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003242
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003243 ;;
3244 cc) # Extract the first word of "c++", so it can be a program name with args.
3245set dummy c++; ac_word=$2
Thomas Wouters477c8d52006-05-27 19:21:47 +00003246{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3247echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003248if test "${ac_cv_path_CXX+set}" = set; then
3249 echo $ECHO_N "(cached) $ECHO_C" >&6
3250else
3251 case $CXX in
3252 [\\/]* | ?:[\\/]*)
3253 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3254 ;;
3255 *)
3256 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3257for as_dir in notfound
3258do
3259 IFS=$as_save_IFS
3260 test -z "$as_dir" && as_dir=.
3261 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters477c8d52006-05-27 19:21:47 +00003262 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 +00003263 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
3264 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3265 break 2
3266 fi
3267done
3268done
Thomas Wouters477c8d52006-05-27 19:21:47 +00003269IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003270
3271 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
3272 ;;
3273esac
3274fi
3275CXX=$ac_cv_path_CXX
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003276if test -n "$CXX"; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00003277 { echo "$as_me:$LINENO: result: $CXX" >&5
3278echo "${ECHO_T}$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003279else
Thomas Wouters477c8d52006-05-27 19:21:47 +00003280 { echo "$as_me:$LINENO: result: no" >&5
3281echo "${ECHO_T}no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003282fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003283
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003284 ;;
3285 esac
3286 if test "$CXX" = "notfound"
3287 then
3288 CXX=""
3289 fi
3290fi
3291if test -z "$CXX"
3292then
3293 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
3294do
3295 # Extract the first word of "$ac_prog", so it can be a program name with args.
3296set dummy $ac_prog; ac_word=$2
Thomas Wouters477c8d52006-05-27 19:21:47 +00003297{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3298echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003299if test "${ac_cv_prog_CXX+set}" = set; then
3300 echo $ECHO_N "(cached) $ECHO_C" >&6
3301else
3302 if test -n "$CXX"; then
3303 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3304else
3305as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3306for as_dir in $PATH
3307do
3308 IFS=$as_save_IFS
3309 test -z "$as_dir" && as_dir=.
3310 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters477c8d52006-05-27 19:21:47 +00003311 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 +00003312 ac_cv_prog_CXX="$ac_prog"
3313 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3314 break 2
3315 fi
3316done
3317done
Thomas Wouters477c8d52006-05-27 19:21:47 +00003318IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003319
3320fi
3321fi
3322CXX=$ac_cv_prog_CXX
3323if test -n "$CXX"; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00003324 { echo "$as_me:$LINENO: result: $CXX" >&5
3325echo "${ECHO_T}$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003326else
Thomas Wouters477c8d52006-05-27 19:21:47 +00003327 { echo "$as_me:$LINENO: result: no" >&5
3328echo "${ECHO_T}no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003329fi
3330
Thomas Wouters477c8d52006-05-27 19:21:47 +00003331
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003332 test -n "$CXX" && break
3333done
3334test -n "$CXX" || CXX="notfound"
3335
3336 if test "$CXX" = "notfound"
3337 then
3338 CXX=""
3339 fi
3340fi
3341if test "$preset_cxx" != "$CXX"
3342then
3343 { echo "$as_me:$LINENO: WARNING:
3344
3345 By default, distutils will build C++ extension modules with \"$CXX\".
3346 If this is not intended, then set CXX on the configure command line.
3347 " >&5
3348echo "$as_me: WARNING:
3349
3350 By default, distutils will build C++ extension modules with \"$CXX\".
3351 If this is not intended, then set CXX on the configure command line.
3352 " >&2;}
3353fi
3354
3355
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003356# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00003357
3358ac_ext=c
3359ac_cpp='$CPP $CPPFLAGS'
3360ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3361ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3362ac_compiler_gnu=$ac_cv_c_compiler_gnu
Thomas Wouters477c8d52006-05-27 19:21:47 +00003363{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3364echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003365# On Suns, sometimes $CPP names a directory.
3366if test -n "$CPP" && test -d "$CPP"; then
3367 CPP=
3368fi
3369if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003370 if test "${ac_cv_prog_CPP+set}" = set; then
3371 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003372else
Martin v. Löwis11437992002-04-12 09:54:03 +00003373 # Double quotes because CPP needs to be expanded
3374 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3375 do
3376 ac_preproc_ok=false
3377for ac_c_preproc_warn_flag in '' yes
3378do
3379 # Use a header file that comes with gcc, so configuring glibc
3380 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003381 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3382 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003383 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00003384 # not just through cpp. "Syntax error" is here to catch this case.
3385 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003386/* confdefs.h. */
3387_ACEOF
3388cat confdefs.h >>conftest.$ac_ext
3389cat >>conftest.$ac_ext <<_ACEOF
3390/* end confdefs.h. */
3391#ifdef __STDC__
3392# include <limits.h>
3393#else
3394# include <assert.h>
3395#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003396 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003397_ACEOF
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003398if { (ac_try="$ac_cpp conftest.$ac_ext"
3399case "(($ac_try" in
3400 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3401 *) ac_try_echo=$ac_try;;
3402esac
3403eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3404 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003405 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003406 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003407 rm -f conftest.er1
3408 cat conftest.err >&5
3409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3410 (exit $ac_status); } >/dev/null; then
3411 if test -s conftest.err; then
3412 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +00003413 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +00003414 else
3415 ac_cpp_err=
3416 fi
3417else
3418 ac_cpp_err=yes
3419fi
3420if test -z "$ac_cpp_err"; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003421 :
3422else
Martin v. Löwis11437992002-04-12 09:54:03 +00003423 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003424sed 's/^/| /' conftest.$ac_ext >&5
3425
Martin v. Löwis11437992002-04-12 09:54:03 +00003426 # Broken: fails on valid input.
3427continue
Jack Jansendd19cf82001-12-06 22:36:17 +00003428fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003429
Martin v. Löwis11437992002-04-12 09:54:03 +00003430rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00003431
Thomas Wouters477c8d52006-05-27 19:21:47 +00003432 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003433 # can be detected and how.
3434 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003435/* confdefs.h. */
3436_ACEOF
3437cat confdefs.h >>conftest.$ac_ext
3438cat >>conftest.$ac_ext <<_ACEOF
3439/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003440#include <ac_nonexistent.h>
3441_ACEOF
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003442if { (ac_try="$ac_cpp conftest.$ac_ext"
3443case "(($ac_try" in
3444 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3445 *) ac_try_echo=$ac_try;;
3446esac
3447eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3448 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003449 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003450 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003451 rm -f conftest.er1
3452 cat conftest.err >&5
3453 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3454 (exit $ac_status); } >/dev/null; then
3455 if test -s conftest.err; then
3456 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +00003457 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +00003458 else
3459 ac_cpp_err=
3460 fi
3461else
3462 ac_cpp_err=yes
3463fi
3464if test -z "$ac_cpp_err"; then
3465 # Broken: success on invalid input.
3466continue
3467else
3468 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003469sed 's/^/| /' conftest.$ac_ext >&5
3470
Martin v. Löwis11437992002-04-12 09:54:03 +00003471 # Passes both tests.
3472ac_preproc_ok=:
3473break
3474fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003475
Martin v. Löwis11437992002-04-12 09:54:03 +00003476rm -f conftest.err conftest.$ac_ext
3477
3478done
3479# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3480rm -f conftest.err conftest.$ac_ext
3481if $ac_preproc_ok; then
3482 break
3483fi
3484
3485 done
3486 ac_cv_prog_CPP=$CPP
3487
3488fi
3489 CPP=$ac_cv_prog_CPP
3490else
3491 ac_cv_prog_CPP=$CPP
3492fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003493{ echo "$as_me:$LINENO: result: $CPP" >&5
3494echo "${ECHO_T}$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003495ac_preproc_ok=false
3496for ac_c_preproc_warn_flag in '' yes
3497do
3498 # Use a header file that comes with gcc, so configuring glibc
3499 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003500 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3501 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003502 # On the NeXT, cc -E runs the code through the compiler's parser,
3503 # not just through cpp. "Syntax error" is here to catch this case.
3504 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003505/* confdefs.h. */
3506_ACEOF
3507cat confdefs.h >>conftest.$ac_ext
3508cat >>conftest.$ac_ext <<_ACEOF
3509/* end confdefs.h. */
3510#ifdef __STDC__
3511# include <limits.h>
3512#else
3513# include <assert.h>
3514#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003515 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003516_ACEOF
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003517if { (ac_try="$ac_cpp conftest.$ac_ext"
3518case "(($ac_try" in
3519 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3520 *) ac_try_echo=$ac_try;;
3521esac
3522eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3523 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003524 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003525 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003526 rm -f conftest.er1
3527 cat conftest.err >&5
3528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3529 (exit $ac_status); } >/dev/null; then
3530 if test -s conftest.err; then
3531 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +00003532 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +00003533 else
3534 ac_cpp_err=
3535 fi
3536else
3537 ac_cpp_err=yes
3538fi
3539if test -z "$ac_cpp_err"; then
3540 :
3541else
3542 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003543sed 's/^/| /' conftest.$ac_ext >&5
3544
Martin v. Löwis11437992002-04-12 09:54:03 +00003545 # Broken: fails on valid input.
3546continue
3547fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003548
Martin v. Löwis11437992002-04-12 09:54:03 +00003549rm -f conftest.err conftest.$ac_ext
3550
Thomas Wouters477c8d52006-05-27 19:21:47 +00003551 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003552 # can be detected and how.
3553 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003554/* confdefs.h. */
3555_ACEOF
3556cat confdefs.h >>conftest.$ac_ext
3557cat >>conftest.$ac_ext <<_ACEOF
3558/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003559#include <ac_nonexistent.h>
3560_ACEOF
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003561if { (ac_try="$ac_cpp conftest.$ac_ext"
3562case "(($ac_try" in
3563 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3564 *) ac_try_echo=$ac_try;;
3565esac
3566eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3567 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003568 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003569 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003570 rm -f conftest.er1
3571 cat conftest.err >&5
3572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3573 (exit $ac_status); } >/dev/null; then
3574 if test -s conftest.err; then
3575 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +00003576 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +00003577 else
3578 ac_cpp_err=
3579 fi
3580else
3581 ac_cpp_err=yes
3582fi
3583if test -z "$ac_cpp_err"; then
3584 # Broken: success on invalid input.
3585continue
3586else
3587 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003588sed 's/^/| /' conftest.$ac_ext >&5
3589
Martin v. Löwis11437992002-04-12 09:54:03 +00003590 # Passes both tests.
3591ac_preproc_ok=:
3592break
3593fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003594
Martin v. Löwis11437992002-04-12 09:54:03 +00003595rm -f conftest.err conftest.$ac_ext
3596
3597done
3598# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3599rm -f conftest.err conftest.$ac_ext
3600if $ac_preproc_ok; then
3601 :
3602else
Skip Montanaro6dead952003-09-25 14:50:04 +00003603 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3604See \`config.log' for more details." >&5
3605echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3606See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00003607 { (exit 1); exit 1; }; }
3608fi
3609
3610ac_ext=c
3611ac_cpp='$CPP $CPPFLAGS'
3612ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3613ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3614ac_compiler_gnu=$ac_cv_c_compiler_gnu
3615
3616
Thomas Wouters477c8d52006-05-27 19:21:47 +00003617{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3618echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
3619if test "${ac_cv_path_GREP+set}" = set; then
Skip Montanaro6dead952003-09-25 14:50:04 +00003620 echo $ECHO_N "(cached) $ECHO_C" >&6
3621else
Thomas Wouters477c8d52006-05-27 19:21:47 +00003622 # Extract the first word of "grep ggrep" to use in msg output
3623if test -z "$GREP"; then
3624set dummy grep ggrep; ac_prog_name=$2
3625if test "${ac_cv_path_GREP+set}" = set; then
3626 echo $ECHO_N "(cached) $ECHO_C" >&6
3627else
3628 ac_path_GREP_found=false
3629# Loop through the user's path and test for each of PROGNAME-LIST
3630as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3631for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3632do
3633 IFS=$as_save_IFS
3634 test -z "$as_dir" && as_dir=.
3635 for ac_prog in grep ggrep; do
3636 for ac_exec_ext in '' $ac_executable_extensions; do
3637 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3638 { test -f "$ac_path_GREP" && $as_executable_p "$ac_path_GREP"; } || continue
3639 # Check for GNU ac_path_GREP and select it if it is found.
3640 # Check for GNU $ac_path_GREP
3641case `"$ac_path_GREP" --version 2>&1` in
3642*GNU*)
3643 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3644*)
3645 ac_count=0
3646 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3647 while :
3648 do
3649 cat "conftest.in" "conftest.in" >"conftest.tmp"
3650 mv "conftest.tmp" "conftest.in"
3651 cp "conftest.in" "conftest.nl"
3652 echo 'GREP' >> "conftest.nl"
3653 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3654 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3655 ac_count=`expr $ac_count + 1`
3656 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3657 # Best one so far, save it but keep looking for a better one
3658 ac_cv_path_GREP="$ac_path_GREP"
3659 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00003660 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003661 # 10*(2^10) chars as input seems more than enough
3662 test $ac_count -gt 10 && break
3663 done
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003664 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003665esac
3666
3667
3668 $ac_path_GREP_found && break 3
3669 done
3670done
3671
3672done
3673IFS=$as_save_IFS
3674
3675
Skip Montanaro6dead952003-09-25 14:50:04 +00003676fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003677
3678GREP="$ac_cv_path_GREP"
3679if test -z "$GREP"; then
3680 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3681echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
3682 { (exit 1); exit 1; }; }
3683fi
3684
3685else
3686 ac_cv_path_GREP=$GREP
3687fi
3688
3689
3690fi
3691{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3692echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
3693 GREP="$ac_cv_path_GREP"
3694
3695
3696{ echo "$as_me:$LINENO: checking for egrep" >&5
3697echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
3698if test "${ac_cv_path_EGREP+set}" = set; then
3699 echo $ECHO_N "(cached) $ECHO_C" >&6
3700else
3701 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3702 then ac_cv_path_EGREP="$GREP -E"
3703 else
3704 # Extract the first word of "egrep" to use in msg output
3705if test -z "$EGREP"; then
3706set dummy egrep; ac_prog_name=$2
3707if test "${ac_cv_path_EGREP+set}" = set; then
3708 echo $ECHO_N "(cached) $ECHO_C" >&6
3709else
3710 ac_path_EGREP_found=false
3711# Loop through the user's path and test for each of PROGNAME-LIST
3712as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3713for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3714do
3715 IFS=$as_save_IFS
3716 test -z "$as_dir" && as_dir=.
3717 for ac_prog in egrep; do
3718 for ac_exec_ext in '' $ac_executable_extensions; do
3719 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3720 { test -f "$ac_path_EGREP" && $as_executable_p "$ac_path_EGREP"; } || continue
3721 # Check for GNU ac_path_EGREP and select it if it is found.
3722 # Check for GNU $ac_path_EGREP
3723case `"$ac_path_EGREP" --version 2>&1` in
3724*GNU*)
3725 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3726*)
3727 ac_count=0
3728 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3729 while :
3730 do
3731 cat "conftest.in" "conftest.in" >"conftest.tmp"
3732 mv "conftest.tmp" "conftest.in"
3733 cp "conftest.in" "conftest.nl"
3734 echo 'EGREP' >> "conftest.nl"
3735 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3736 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3737 ac_count=`expr $ac_count + 1`
3738 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3739 # Best one so far, save it but keep looking for a better one
3740 ac_cv_path_EGREP="$ac_path_EGREP"
3741 ac_path_EGREP_max=$ac_count
3742 fi
3743 # 10*(2^10) chars as input seems more than enough
3744 test $ac_count -gt 10 && break
3745 done
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003746 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003747esac
3748
3749
3750 $ac_path_EGREP_found && break 3
3751 done
3752done
3753
3754done
3755IFS=$as_save_IFS
3756
3757
3758fi
3759
3760EGREP="$ac_cv_path_EGREP"
3761if test -z "$EGREP"; then
3762 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3763echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
3764 { (exit 1); exit 1; }; }
3765fi
3766
3767else
3768 ac_cv_path_EGREP=$EGREP
3769fi
3770
3771
3772 fi
3773fi
3774{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3775echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
3776 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00003777
3778
Martin v. Löwis11437992002-04-12 09:54:03 +00003779
Thomas Wouters477c8d52006-05-27 19:21:47 +00003780{ echo "$as_me:$LINENO: checking for AIX" >&5
3781echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003782cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003783/* confdefs.h. */
3784_ACEOF
3785cat confdefs.h >>conftest.$ac_ext
3786cat >>conftest.$ac_ext <<_ACEOF
3787/* end confdefs.h. */
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003788#ifdef _AIX
3789 yes
3790#endif
3791
Martin v. Löwis11437992002-04-12 09:54:03 +00003792_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003793if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00003794 $EGREP "yes" >/dev/null 2>&1; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00003795 { echo "$as_me:$LINENO: result: yes" >&5
3796echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003797cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003798#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003799_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003800
3801else
Thomas Wouters477c8d52006-05-27 19:21:47 +00003802 { echo "$as_me:$LINENO: result: no" >&5
3803echo "${ECHO_T}no" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003804fi
3805rm -f conftest*
3806
Michael W. Hudson54241132001-12-07 15:38:26 +00003807
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003808
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003809# Check for unsupported systems
3810case $ac_sys_system/$ac_sys_release in
Martin v. Löwis12af0482004-01-31 12:34:17 +00003811Linux*/1*)
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003812 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3813 echo See README for details.
3814 exit 1;;
3815esac
3816
Michael W. Hudson54241132001-12-07 15:38:26 +00003817
Thomas Wouters477c8d52006-05-27 19:21:47 +00003818{ echo "$as_me:$LINENO: checking for --with-suffix" >&5
3819echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003820
Thomas Wouters477c8d52006-05-27 19:21:47 +00003821# Check whether --with-suffix was given.
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003822if test "${with_suffix+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00003823 withval=$with_suffix;
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003824 case $withval in
3825 no) EXEEXT=;;
3826 yes) EXEEXT=.exe;;
3827 *) EXEEXT=$withval;;
3828 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +00003829fi
3830
3831{ echo "$as_me:$LINENO: result: $EXEEXT" >&5
3832echo "${ECHO_T}$EXEEXT" >&6; }
Jack Jansen1999ef42001-12-06 21:47:20 +00003833
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003834# Test whether we're running on a non-case-sensitive system, in which
3835# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00003836
Thomas Wouters477c8d52006-05-27 19:21:47 +00003837{ echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3838echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6; }
Jack Jansen3c2c4332002-11-06 13:33:32 +00003839if test ! -d CaseSensitiveTestDir; then
3840mkdir CaseSensitiveTestDir
3841fi
3842
3843if test -d casesensitivetestdir
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003844then
Thomas Wouters477c8d52006-05-27 19:21:47 +00003845 { echo "$as_me:$LINENO: result: yes" >&5
3846echo "${ECHO_T}yes" >&6; }
Jack Jansen1999ef42001-12-06 21:47:20 +00003847 BUILDEXEEXT=.exe
3848else
Thomas Wouters477c8d52006-05-27 19:21:47 +00003849 { echo "$as_me:$LINENO: result: no" >&5
3850echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003851 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003852fi
Jack Jansen3c2c4332002-11-06 13:33:32 +00003853rmdir CaseSensitiveTestDir
Guido van Rossumff555e32000-09-22 15:38:21 +00003854
Guido van Rossumdd997f71998-10-07 19:58:26 +00003855case $MACHDEP in
3856bsdos*)
3857 case $CC in
3858 gcc) CC="$CC -D_HAVE_BSDI";;
3859 esac;;
3860esac
3861
Guido van Rossum24b1e751997-08-21 02:29:16 +00003862case $ac_sys_system in
3863hp*|HP*)
3864 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00003865 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003866 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00003867Monterey*)
3868 case $CC in
3869 cc) CC="$CC -Wl,-Bexport";;
3870 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003871SunOS*)
3872 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00003873
3874cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003875#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003876_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003877
3878 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003879esac
3880
Michael W. Hudson54241132001-12-07 15:38:26 +00003881
3882
Thomas Wouters477c8d52006-05-27 19:21:47 +00003883{ echo "$as_me:$LINENO: checking LIBRARY" >&5
3884echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003885if test -z "$LIBRARY"
3886then
3887 LIBRARY='libpython$(VERSION).a'
3888fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003889{ echo "$as_me:$LINENO: result: $LIBRARY" >&5
3890echo "${ECHO_T}$LIBRARY" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003891
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003892# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003893# name of the library into which to insert object files). BLDLIBRARY is also
3894# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3895# is blank as the main program is not linked directly against LDLIBRARY.
3896# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3897# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3898# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3899# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003900#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003901# RUNSHARED is used to run shared python without installed libraries
3902#
3903# INSTSONAME is the name of the shared library that will be use to install
3904# on the system - some systems like version suffix, others don't
3905
3906
Michael W. Hudson54241132001-12-07 15:38:26 +00003907
3908
3909
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003910
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003911LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003912BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis09bdf722002-05-08 08:51:29 +00003913INSTSONAME='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003914DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003915LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003916RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003917
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003918# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003919# If CXX is set, and if it is needed to link a main function that was
3920# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3921# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003922# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003923# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003924
Thomas Wouters477c8d52006-05-27 19:21:47 +00003925{ echo "$as_me:$LINENO: checking LINKCC" >&5
3926echo $ECHO_N "checking LINKCC... $ECHO_C" >&6; }
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003927if test -z "$LINKCC"
3928then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003929 LINKCC='$(PURIFY) $(MAINCC)'
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003930 case $ac_sys_system in
3931 AIX*)
Neal Norwitz0b27ff92003-03-31 15:53:49 +00003932 exp_extra="\"\""
3933 if test $ac_sys_release -ge 5 -o \
3934 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3935 exp_extra="."
3936 fi
3937 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003938 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003939 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003940 esac
3941fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003942{ echo "$as_me:$LINENO: result: $LINKCC" >&5
3943echo "${ECHO_T}$LINKCC" >&6; }
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003944
Thomas Wouters477c8d52006-05-27 19:21:47 +00003945{ echo "$as_me:$LINENO: checking for --enable-shared" >&5
3946echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6; }
3947# Check whether --enable-shared was given.
Martin v. Löwis1142de32002-03-29 16:28:31 +00003948if test "${enable_shared+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00003949 enableval=$enable_shared;
3950fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003951
Martin v. Löwis1142de32002-03-29 16:28:31 +00003952
3953if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00003954then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003955 case $ac_sys_system in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003956 CYGWIN* | atheos*)
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003957 enable_shared="yes";;
3958 *)
3959 enable_shared="no";;
3960 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003961fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003962{ echo "$as_me:$LINENO: result: $enable_shared" >&5
3963echo "${ECHO_T}$enable_shared" >&6; }
Martin v. Löwis1142de32002-03-29 16:28:31 +00003964
Thomas Wouters477c8d52006-05-27 19:21:47 +00003965{ echo "$as_me:$LINENO: checking for --enable-profiling" >&5
3966echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6; }
3967# Check whether --enable-profiling was given.
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003968if test "${enable_profiling+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00003969 enableval=$enable_profiling; ac_save_cc="$CC"
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003970 CC="$CC -pg"
3971 if test "$cross_compiling" = yes; then
3972 ac_enable_profiling="no"
3973else
3974 cat >conftest.$ac_ext <<_ACEOF
3975/* confdefs.h. */
3976_ACEOF
3977cat confdefs.h >>conftest.$ac_ext
3978cat >>conftest.$ac_ext <<_ACEOF
3979/* end confdefs.h. */
3980int main() { return 0; }
3981_ACEOF
3982rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003983if { (ac_try="$ac_link"
3984case "(($ac_try" in
3985 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3986 *) ac_try_echo=$ac_try;;
3987esac
3988eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3989 (eval "$ac_link") 2>&5
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003990 ac_status=$?
3991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3992 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003993 { (case "(($ac_try" in
3994 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3995 *) ac_try_echo=$ac_try;;
3996esac
3997eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3998 (eval "$ac_try") 2>&5
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003999 ac_status=$?
4000 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4001 (exit $ac_status); }; }; then
4002 ac_enable_profiling="yes"
4003else
4004 echo "$as_me: program exited with status $ac_status" >&5
4005echo "$as_me: failed program was:" >&5
4006sed 's/^/| /' conftest.$ac_ext >&5
4007
4008( exit $ac_status )
4009ac_enable_profiling="no"
4010fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00004011rm -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 +00004012fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00004013
4014
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004015 CC="$ac_save_cc"
Thomas Wouters477c8d52006-05-27 19:21:47 +00004016fi
4017
4018{ echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
4019echo "${ECHO_T}$ac_enable_profiling" >&6; }
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004020
4021case "$ac_enable_profiling" in
4022 "yes")
4023 BASECFLAGS="-pg $BASECFLAGS"
4024 LDFLAGS="-pg $LDFLAGS"
4025 ;;
4026esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004027
Thomas Wouters477c8d52006-05-27 19:21:47 +00004028{ echo "$as_me:$LINENO: checking LDLIBRARY" >&5
4029echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00004030
Guido van Rossumb8552162001-09-05 14:58:11 +00004031# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4032# library that we build, but we do not want to link against it (we
4033# will find it with a -framework option). For this reason there is an
4034# extra variable BLDLIBRARY against which Python and the extension
4035# modules are linked, BLDLIBRARY. This is normally the same as
4036# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00004037if test "$enable_framework"
4038then
4039 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen66b84832003-07-04 12:14:39 +00004040 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
Jack Jansene578a632001-08-15 01:27:14 +00004041 BLDLIBRARY=''
4042else
4043 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00004044fi
Jack Jansene578a632001-08-15 01:27:14 +00004045
Martin v. Löwis1142de32002-03-29 16:28:31 +00004046# Other platforms follow
4047if test $enable_shared = "yes"; then
Mark Hammond8235ea12002-07-19 06:55:41 +00004048
4049cat >>confdefs.h <<\_ACEOF
4050#define Py_ENABLE_SHARED 1
4051_ACEOF
4052
Martin v. Löwis1142de32002-03-29 16:28:31 +00004053 case $ac_sys_system in
4054 BeOS*)
4055 LDLIBRARY='libpython$(VERSION).so'
4056 ;;
4057 CYGWIN*)
4058 LDLIBRARY='libpython$(VERSION).dll.a'
4059 DLLLIBRARY='libpython$(VERSION).dll'
4060 ;;
4061 SunOS*)
4062 LDLIBRARY='libpython$(VERSION).so'
Martin v. Löwisd141a8c2003-06-14 15:20:28 +00004063 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004064 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis2389c412003-10-31 15:42:07 +00004065 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis1142de32002-03-29 16:28:31 +00004066 ;;
Martin v. Löwis86d66262006-02-17 08:40:11 +00004067 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00004068 LDLIBRARY='libpython$(VERSION).so'
4069 BLDLIBRARY='-L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004070 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Hye-Shik Chang33761492004-10-26 09:53:46 +00004071 case $ac_sys_system in
4072 FreeBSD*)
4073 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4074 ;;
4075 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004076 INSTSONAME="$LDLIBRARY".$SOVERSION
4077 ;;
4078 hp*|HP*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00004079 case `uname -m` in
4080 ia64)
4081 LDLIBRARY='libpython$(VERSION).so'
4082 ;;
4083 *)
4084 LDLIBRARY='libpython$(VERSION).sl'
4085 ;;
4086 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004087 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004088 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00004089 ;;
4090 OSF*)
4091 LDLIBRARY='libpython$(VERSION).so'
Neal Norwitz671b9e32006-01-09 07:07:12 +00004092 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004093 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00004094 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00004095 atheos*)
4096 LDLIBRARY='libpython$(VERSION).so'
4097 BLDLIBRARY='-L. -lpython$(VERSION)'
4098 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
4099 ;;
Martin v. Löwis1142de32002-03-29 16:28:31 +00004100 esac
Jason Tishler30765592003-09-04 11:04:06 +00004101else # shared is disabled
4102 case $ac_sys_system in
4103 CYGWIN*)
4104 BLDLIBRARY='$(LIBRARY)'
4105 LDLIBRARY='libpython$(VERSION).dll.a'
4106 ;;
4107 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004108fi
4109
Thomas Wouters477c8d52006-05-27 19:21:47 +00004110{ echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
4111echo "${ECHO_T}$LDLIBRARY" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00004112
Martin v. Löwis11437992002-04-12 09:54:03 +00004113if test -n "$ac_tool_prefix"; then
4114 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4115set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Thomas Wouters477c8d52006-05-27 19:21:47 +00004116{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4117echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004118if test "${ac_cv_prog_RANLIB+set}" = set; then
4119 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004120else
4121 if test -n "$RANLIB"; then
4122 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4123else
Martin v. Löwis11437992002-04-12 09:54:03 +00004124as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4125for as_dir in $PATH
4126do
4127 IFS=$as_save_IFS
4128 test -z "$as_dir" && as_dir=.
4129 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters477c8d52006-05-27 19:21:47 +00004130 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 +00004131 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4132 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4133 break 2
4134 fi
4135done
4136done
Thomas Wouters477c8d52006-05-27 19:21:47 +00004137IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004138
Guido van Rossum627b2d71993-12-24 10:39:16 +00004139fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004140fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004141RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004142if test -n "$RANLIB"; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00004143 { echo "$as_me:$LINENO: result: $RANLIB" >&5
4144echo "${ECHO_T}$RANLIB" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004145else
Thomas Wouters477c8d52006-05-27 19:21:47 +00004146 { echo "$as_me:$LINENO: result: no" >&5
4147echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004148fi
4149
Thomas Wouters477c8d52006-05-27 19:21:47 +00004150
Martin v. Löwis11437992002-04-12 09:54:03 +00004151fi
4152if test -z "$ac_cv_prog_RANLIB"; then
4153 ac_ct_RANLIB=$RANLIB
4154 # Extract the first word of "ranlib", so it can be a program name with args.
4155set dummy ranlib; ac_word=$2
Thomas Wouters477c8d52006-05-27 19:21:47 +00004156{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4157echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004158if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4159 echo $ECHO_N "(cached) $ECHO_C" >&6
4160else
4161 if test -n "$ac_ct_RANLIB"; then
4162 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4163else
4164as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4165for as_dir in $PATH
4166do
4167 IFS=$as_save_IFS
4168 test -z "$as_dir" && as_dir=.
4169 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters477c8d52006-05-27 19:21:47 +00004170 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 +00004171 ac_cv_prog_ac_ct_RANLIB="ranlib"
4172 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4173 break 2
4174 fi
4175done
4176done
Thomas Wouters477c8d52006-05-27 19:21:47 +00004177IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004178
Martin v. Löwis11437992002-04-12 09:54:03 +00004179fi
4180fi
4181ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4182if test -n "$ac_ct_RANLIB"; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00004183 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4184echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004185else
Thomas Wouters477c8d52006-05-27 19:21:47 +00004186 { echo "$as_me:$LINENO: result: no" >&5
4187echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004188fi
4189
Thomas Wouters477c8d52006-05-27 19:21:47 +00004190 if test "x$ac_ct_RANLIB" = x; then
4191 RANLIB=":"
4192 else
4193 case $cross_compiling:$ac_tool_warned in
4194yes:)
4195{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
4196whose name does not start with the host triplet. If you think this
4197configuration is useful to you, please write to autoconf@gnu.org." >&5
4198echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
4199whose name does not start with the host triplet. If you think this
4200configuration is useful to you, please write to autoconf@gnu.org." >&2;}
4201ac_tool_warned=yes ;;
4202esac
4203 RANLIB=$ac_ct_RANLIB
4204 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004205else
4206 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004207fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004208
4209
Guido van Rossum7f43da71994-08-01 12:15:30 +00004210for ac_prog in ar aal
4211do
Martin v. Löwis11437992002-04-12 09:54:03 +00004212 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004213set dummy $ac_prog; ac_word=$2
Thomas Wouters477c8d52006-05-27 19:21:47 +00004214{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4215echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004216if test "${ac_cv_prog_AR+set}" = set; then
4217 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004218else
4219 if test -n "$AR"; then
4220 ac_cv_prog_AR="$AR" # Let the user override the test.
4221else
Martin v. Löwis11437992002-04-12 09:54:03 +00004222as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4223for as_dir in $PATH
4224do
4225 IFS=$as_save_IFS
4226 test -z "$as_dir" && as_dir=.
4227 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters477c8d52006-05-27 19:21:47 +00004228 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 +00004229 ac_cv_prog_AR="$ac_prog"
4230 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4231 break 2
4232 fi
4233done
4234done
Thomas Wouters477c8d52006-05-27 19:21:47 +00004235IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004236
Guido van Rossum7f43da71994-08-01 12:15:30 +00004237fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004238fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004239AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004240if test -n "$AR"; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00004241 { echo "$as_me:$LINENO: result: $AR" >&5
4242echo "${ECHO_T}$AR" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004243else
Thomas Wouters477c8d52006-05-27 19:21:47 +00004244 { echo "$as_me:$LINENO: result: no" >&5
4245echo "${ECHO_T}no" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004246fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00004247
Thomas Wouters477c8d52006-05-27 19:21:47 +00004248
Martin v. Löwis11437992002-04-12 09:54:03 +00004249 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00004250done
4251test -n "$AR" || AR="ar"
4252
Michael W. Hudson54241132001-12-07 15:38:26 +00004253
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004254
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00004255# Extract the first word of "svnversion", so it can be a program name with args.
4256set dummy svnversion; ac_word=$2
Thomas Wouters477c8d52006-05-27 19:21:47 +00004257{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4258echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004259if test "${ac_cv_prog_SVNVERSION+set}" = set; then
4260 echo $ECHO_N "(cached) $ECHO_C" >&6
4261else
4262 if test -n "$SVNVERSION"; then
4263 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
4264else
4265as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4266for as_dir in $PATH
4267do
4268 IFS=$as_save_IFS
4269 test -z "$as_dir" && as_dir=.
4270 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters477c8d52006-05-27 19:21:47 +00004271 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 +00004272 ac_cv_prog_SVNVERSION="found"
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004273 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4274 break 2
4275 fi
4276done
4277done
Thomas Wouters477c8d52006-05-27 19:21:47 +00004278IFS=$as_save_IFS
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004279
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004280 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004281fi
4282fi
4283SVNVERSION=$ac_cv_prog_SVNVERSION
4284if test -n "$SVNVERSION"; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00004285 { echo "$as_me:$LINENO: result: $SVNVERSION" >&5
4286echo "${ECHO_T}$SVNVERSION" >&6; }
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004287else
Thomas Wouters477c8d52006-05-27 19:21:47 +00004288 { echo "$as_me:$LINENO: result: no" >&5
4289echo "${ECHO_T}no" >&6; }
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004290fi
4291
Thomas Wouters477c8d52006-05-27 19:21:47 +00004292
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00004293if test $SVNVERSION = found
4294then
4295 SVNVERSION="svnversion \$(srcdir)"
4296else
4297 SVNVERSION="echo exported"
4298fi
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004299
Neil Schemenauera42c8272001-03-31 00:01:55 +00004300case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00004301bsdos*|hp*|HP*)
4302 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00004303 if test -z "$INSTALL"
4304 then
4305 INSTALL="${srcdir}/install-sh -c"
4306 fi
4307esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004308ac_aux_dir=
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004309for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4310 if test -f "$ac_dir/install-sh"; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004311 ac_aux_dir=$ac_dir
4312 ac_install_sh="$ac_aux_dir/install-sh -c"
4313 break
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004314 elif test -f "$ac_dir/install.sh"; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004315 ac_aux_dir=$ac_dir
4316 ac_install_sh="$ac_aux_dir/install.sh -c"
4317 break
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004318 elif test -f "$ac_dir/shtool"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004319 ac_aux_dir=$ac_dir
4320 ac_install_sh="$ac_aux_dir/shtool install -c"
4321 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004322 fi
4323done
4324if test -z "$ac_aux_dir"; then
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004325 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
4326echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00004327 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004328fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004329
4330# These three variables are undocumented and unsupported,
4331# and are intended to be withdrawn in a future Autoconf release.
4332# They can cause serious problems if a builder's source tree is in a directory
4333# whose full name contains unusual characters.
4334ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4335ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4336ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4337
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004338
4339# Find a good install program. We prefer a C program (faster),
4340# so one script is as good as another. But avoid the broken or
4341# incompatible versions:
4342# SysV /etc/install, /usr/sbin/install
4343# SunOS /usr/etc/install
4344# IRIX /sbin/install
4345# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00004346# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004347# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4348# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4349# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
Skip Montanarof0d5f792004-08-15 14:08:23 +00004350# OS/2's system install, which has a completely different semantic
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004351# ./install, which can be erroneously created by make from ./install.sh.
Thomas Wouters477c8d52006-05-27 19:21:47 +00004352{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4353echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004354if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004355if test "${ac_cv_path_install+set}" = set; then
4356 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004357else
Martin v. Löwis11437992002-04-12 09:54:03 +00004358 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4359for as_dir in $PATH
4360do
4361 IFS=$as_save_IFS
4362 test -z "$as_dir" && as_dir=.
4363 # Account for people who put trailing slashes in PATH elements.
4364case $as_dir/ in
4365 ./ | .// | /cC/* | \
4366 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Skip Montanarof0d5f792004-08-15 14:08:23 +00004367 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
Martin v. Löwis11437992002-04-12 09:54:03 +00004368 /usr/ucb/* ) ;;
4369 *)
4370 # OSF1 and SCO ODT 3.0 have their own names for install.
4371 # Don't use installbsd from OSF since it installs stuff as root
4372 # by default.
4373 for ac_prog in ginstall scoinst install; do
4374 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters477c8d52006-05-27 19:21:47 +00004375 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 +00004376 if test $ac_prog = install &&
4377 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4378 # AIX install. It has an incompatible calling convention.
4379 :
4380 elif test $ac_prog = install &&
4381 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4382 # program-specific install script used by HP pwplus--don't use.
4383 :
4384 else
4385 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4386 break 3
4387 fi
4388 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004389 done
Martin v. Löwis11437992002-04-12 09:54:03 +00004390 done
4391 ;;
4392esac
4393done
Thomas Wouters477c8d52006-05-27 19:21:47 +00004394IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004395
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004396
4397fi
4398 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004399 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004400 else
Thomas Wouters477c8d52006-05-27 19:21:47 +00004401 # As a last resort, use the slow shell script. Don't cache a
4402 # value for INSTALL within a source directory, because that will
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004403 # break other packages using the cache if that directory is
Thomas Wouters477c8d52006-05-27 19:21:47 +00004404 # removed, or if the value is a relative name.
Martin v. Löwis11437992002-04-12 09:54:03 +00004405 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004406 fi
4407fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00004408{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4409echo "${ECHO_T}$INSTALL" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004410
4411# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4412# It thinks the first close brace ends the variable substitution.
4413test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4414
Martin v. Löwis11437992002-04-12 09:54:03 +00004415test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004416
4417test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4418
Michael W. Hudson54241132001-12-07 15:38:26 +00004419
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004420# Not every filesystem supports hard links
4421
4422if test -z "$LN" ; then
4423 case $ac_sys_system in
4424 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00004425 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00004426 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004427 *) LN=ln;;
4428 esac
4429fi
4430
Fred Drake109d9862001-07-11 06:27:56 +00004431# Check for --with-pydebug
Thomas Wouters477c8d52006-05-27 19:21:47 +00004432{ echo "$as_me:$LINENO: checking for --with-pydebug" >&5
4433echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004434
Thomas Wouters477c8d52006-05-27 19:21:47 +00004435# Check whether --with-pydebug was given.
Fred Drake109d9862001-07-11 06:27:56 +00004436if test "${with_pydebug+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00004437 withval=$with_pydebug;
Fred Drake109d9862001-07-11 06:27:56 +00004438if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00004439then
4440
4441cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00004442#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00004443_ACEOF
4444
Thomas Wouters477c8d52006-05-27 19:21:47 +00004445 { echo "$as_me:$LINENO: result: yes" >&5
4446echo "${ECHO_T}yes" >&6; };
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004447 Py_DEBUG='true'
Thomas Wouters477c8d52006-05-27 19:21:47 +00004448else { echo "$as_me:$LINENO: result: no" >&5
4449echo "${ECHO_T}no" >&6; }; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00004450fi
4451else
Thomas Wouters477c8d52006-05-27 19:21:47 +00004452 { echo "$as_me:$LINENO: result: no" >&5
4453echo "${ECHO_T}no" >&6; }
4454fi
4455
Fred Drake109d9862001-07-11 06:27:56 +00004456
Skip Montanarodecc6a42003-01-01 20:07:49 +00004457# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
4458# merged with this chunk of code?
4459
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004460# Optimizer/debugger flags
Skip Montanarodecc6a42003-01-01 20:07:49 +00004461# ------------------------
4462# (The following bit of code is complicated enough - please keep things
4463# indented properly. Just pretend you're editing Python code. ;-)
4464
4465# There are two parallel sets of case statements below, one that checks to
4466# see if OPT was set and one that does BASECFLAGS setting based upon
4467# compiler and platform. BASECFLAGS tweaks need to be made even if the
4468# user set OPT.
4469
4470# tweak OPT based on compiler and platform, only if the user didn't set
4471# it on the command line
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004472
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004473if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004474then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004475 case $GCC in
4476 yes)
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004477 if test "$CC" != 'g++' ; then
4478 STRICT_PROTO="-Wstrict-prototypes"
4479 fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00004480 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004481 yes)
Fred Drake109d9862001-07-11 06:27:56 +00004482 if test "$Py_DEBUG" = 'true' ; then
4483 # Optimization messes up debuggers, so turn it off for
4484 # debug builds.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004485 OPT="-g -Wall $STRICT_PROTO"
Fred Drake109d9862001-07-11 06:27:56 +00004486 else
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004487 OPT="-g -O3 -Wall $STRICT_PROTO"
Skip Montanarodecc6a42003-01-01 20:07:49 +00004488 fi
4489 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004490 *)
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004491 OPT="-O3 -Wall $STRICT_PROTO"
Skip Montanarodecc6a42003-01-01 20:07:49 +00004492 ;;
Fred Drake109d9862001-07-11 06:27:56 +00004493 esac
Martin v. Löwis21ee4092002-09-30 16:19:48 +00004494 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00004495 SCO_SV*) OPT="$OPT -m486 -DSCO5"
4496 ;;
4497 esac
Fred Drake109d9862001-07-11 06:27:56 +00004498 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00004499
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004500 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00004501 OPT="-O"
4502 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004503 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00004504
4505 # The current (beta) Monterey compiler dies with optimizations
4506 # XXX what is Monterey? Does it still die w/ -O? Can we get rid of this?
Jack Jansenca06bc62001-08-03 15:32:23 +00004507 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00004508 Monterey*)
4509 OPT=""
4510 ;;
Jack Jansenca06bc62001-08-03 15:32:23 +00004511 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00004512
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004513fi
4514
Skip Montanarodecc6a42003-01-01 20:07:49 +00004515
4516# tweak BASECFLAGS based on compiler and platform
4517case $GCC in
4518yes)
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004519 # Python violates C99 rules, by casting between incompatible
4520 # pointer types. GCC may generate bad code as a result of that,
4521 # so use -fno-strict-aliasing if supported.
Thomas Wouters477c8d52006-05-27 19:21:47 +00004522 { echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
4523echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6; }
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004524 ac_save_cc="$CC"
4525 CC="$CC -fno-strict-aliasing"
4526 if test "$cross_compiling" = yes; then
4527 ac_cv_no_strict_aliasing_ok=no
4528else
4529 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004530/* confdefs.h. */
4531_ACEOF
4532cat confdefs.h >>conftest.$ac_ext
4533cat >>conftest.$ac_ext <<_ACEOF
4534/* end confdefs.h. */
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004535int main() { return 0; }
4536_ACEOF
4537rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004538if { (ac_try="$ac_link"
4539case "(($ac_try" in
4540 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4541 *) ac_try_echo=$ac_try;;
4542esac
4543eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4544 (eval "$ac_link") 2>&5
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004545 ac_status=$?
4546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4547 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004548 { (case "(($ac_try" in
4549 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4550 *) ac_try_echo=$ac_try;;
4551esac
4552eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4553 (eval "$ac_try") 2>&5
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004554 ac_status=$?
4555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4556 (exit $ac_status); }; }; then
4557 ac_cv_no_strict_aliasing_ok=yes
4558else
4559 echo "$as_me: program exited with status $ac_status" >&5
4560echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004561sed 's/^/| /' conftest.$ac_ext >&5
4562
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004563( exit $ac_status )
4564ac_cv_no_strict_aliasing_ok=no
4565fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00004566rm -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 +00004567fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00004568
4569
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004570 CC="$ac_save_cc"
Thomas Wouters477c8d52006-05-27 19:21:47 +00004571 { echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
4572echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6; }
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004573 if test $ac_cv_no_strict_aliasing_ok = yes
4574 then
4575 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
4576 fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00004577 case $ac_sys_system in
4578 SCO_SV*)
4579 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
4580 ;;
4581 # is there any other compiler on Darwin besides gcc?
4582 Darwin*)
Jack Jansene0040412003-07-23 22:17:28 +00004583 BASECFLAGS="$BASECFLAGS -Wno-long-double -no-cpp-precomp -mno-fused-madd"
Thomas Wouters477c8d52006-05-27 19:21:47 +00004584 if test "${enable_universalsdk}"; then
4585 BASECFLAGS="-arch ppc -arch i386 -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
4586 fi
4587
Skip Montanarodecc6a42003-01-01 20:07:49 +00004588 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004589 OSF*)
4590 BASECFLAGS="$BASECFLAGS -mieee"
4591 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00004592 esac
4593 ;;
4594
4595*)
4596 case $ac_sys_system in
4597 OpenUNIX*|UnixWare*)
4598 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
4599 ;;
Neal Norwitzb44f1652003-05-26 14:11:55 +00004600 OSF*)
4601 BASECFLAGS="$BASECFLAGS -ieee -std"
4602 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00004603 SCO_SV*)
4604 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
4605 ;;
4606 esac
4607 ;;
4608esac
4609
Fred Drakee1ceaa02001-12-04 20:55:47 +00004610if test "$Py_DEBUG" = 'true'; then
4611 :
4612else
4613 OPT="-DNDEBUG $OPT"
4614fi
4615
Guido van Rossum563e7081996-09-10 18:20:48 +00004616if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00004617then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004618 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00004619fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00004620
Neal Norwitz020c46a2006-01-07 21:39:28 +00004621# disable check for icc since it seems to pass, but generates a warning
4622if test "$CC" = icc
4623then
4624 ac_cv_opt_olimit_ok=no
4625fi
4626
Thomas Wouters477c8d52006-05-27 19:21:47 +00004627{ echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
4628echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004629if test "${ac_cv_opt_olimit_ok+set}" = set; then
4630 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00004631else
4632 ac_save_cc="$CC"
4633CC="$CC -OPT:Olimit=0"
4634if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00004635 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00004636else
Martin v. Löwis11437992002-04-12 09:54:03 +00004637 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004638/* confdefs.h. */
4639_ACEOF
4640cat confdefs.h >>conftest.$ac_ext
4641cat >>conftest.$ac_ext <<_ACEOF
4642/* end confdefs.h. */
Guido van Rossum91922671997-10-09 20:24:13 +00004643int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004644_ACEOF
4645rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004646if { (ac_try="$ac_link"
4647case "(($ac_try" in
4648 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4649 *) ac_try_echo=$ac_try;;
4650esac
4651eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4652 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004653 ac_status=$?
4654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4655 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004656 { (case "(($ac_try" in
4657 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4658 *) ac_try_echo=$ac_try;;
4659esac
4660eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4661 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004662 ac_status=$?
4663 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4664 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00004665 ac_cv_opt_olimit_ok=yes
4666else
Martin v. Löwis11437992002-04-12 09:54:03 +00004667 echo "$as_me: program exited with status $ac_status" >&5
4668echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004669sed 's/^/| /' conftest.$ac_ext >&5
4670
Martin v. Löwis11437992002-04-12 09:54:03 +00004671( exit $ac_status )
4672ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00004673fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00004674rm -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 +00004675fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00004676
4677
Guido van Rossum91922671997-10-09 20:24:13 +00004678CC="$ac_save_cc"
4679fi
4680
Thomas Wouters477c8d52006-05-27 19:21:47 +00004681{ echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
4682echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6; }
Guido van Rossum2efa34b1997-10-23 17:43:11 +00004683if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00004684 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00004685 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
4686 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
4687 # environment?
4688 Darwin*)
4689 ;;
4690 *)
4691 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
4692 ;;
Guido van Rossum5839e582000-10-09 19:52:35 +00004693 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004694else
Thomas Wouters477c8d52006-05-27 19:21:47 +00004695 { echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
4696echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004697 if test "${ac_cv_olimit_ok+set}" = set; then
4698 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004699else
4700 ac_save_cc="$CC"
4701 CC="$CC -Olimit 1500"
4702 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00004703 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004704else
Martin v. Löwis11437992002-04-12 09:54:03 +00004705 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004706/* confdefs.h. */
4707_ACEOF
4708cat confdefs.h >>conftest.$ac_ext
4709cat >>conftest.$ac_ext <<_ACEOF
4710/* end confdefs.h. */
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004711int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004712_ACEOF
4713rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004714if { (ac_try="$ac_link"
4715case "(($ac_try" in
4716 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4717 *) ac_try_echo=$ac_try;;
4718esac
4719eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4720 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004721 ac_status=$?
4722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4723 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004724 { (case "(($ac_try" in
4725 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4726 *) ac_try_echo=$ac_try;;
4727esac
4728eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4729 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004730 ac_status=$?
4731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4732 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004733 ac_cv_olimit_ok=yes
4734else
Martin v. Löwis11437992002-04-12 09:54:03 +00004735 echo "$as_me: program exited with status $ac_status" >&5
4736echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004737sed 's/^/| /' conftest.$ac_ext >&5
4738
Martin v. Löwis11437992002-04-12 09:54:03 +00004739( exit $ac_status )
4740ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00004741fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00004742rm -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 +00004743fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00004744
4745
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004746 CC="$ac_save_cc"
4747fi
4748
Thomas Wouters477c8d52006-05-27 19:21:47 +00004749 { echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4750echo "${ECHO_T}$ac_cv_olimit_ok" >&6; }
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004751 if test $ac_cv_olimit_ok = yes; then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004752 BASECFLAGS="$BASECFLAGS -Olimit 1500"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004753 fi
4754fi
4755
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004756# On some compilers, pthreads are available without further options
4757# (e.g. MacOS X). On some of these systems, the compiler will not
4758# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
4759# So we have to see first whether pthreads are available without
4760# options before we can check whether -Kpthread improves anything.
Thomas Wouters477c8d52006-05-27 19:21:47 +00004761{ echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
4762echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004763if test "${ac_cv_pthread_is_default+set}" = set; then
4764 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00004765else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004766 if test "$cross_compiling" = yes; then
4767 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004768else
Martin v. Löwis11437992002-04-12 09:54:03 +00004769 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004770/* confdefs.h. */
4771_ACEOF
4772cat confdefs.h >>conftest.$ac_ext
4773cat >>conftest.$ac_ext <<_ACEOF
4774/* end confdefs.h. */
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004775
Martin v. Löwis130fb172001-07-19 11:00:41 +00004776#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004777
4778void* routine(void* p){return NULL;}
4779
4780int main(){
4781 pthread_t p;
4782 if(pthread_create(&p,NULL,routine,NULL)!=0)
4783 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00004784 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004785 return 0;
4786}
4787
Martin v. Löwis11437992002-04-12 09:54:03 +00004788_ACEOF
4789rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004790if { (ac_try="$ac_link"
4791case "(($ac_try" in
4792 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4793 *) ac_try_echo=$ac_try;;
4794esac
4795eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4796 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004797 ac_status=$?
4798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4799 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004800 { (case "(($ac_try" in
4801 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4802 *) ac_try_echo=$ac_try;;
4803esac
4804eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4805 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004806 ac_status=$?
4807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4808 (exit $ac_status); }; }; then
Skip Montanarod8d39a02003-07-10 20:44:10 +00004809
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004810 ac_cv_pthread_is_default=yes
Skip Montanarod8d39a02003-07-10 20:44:10 +00004811 ac_cv_kthread=no
4812 ac_cv_pthread=no
4813
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004814else
Martin v. Löwis11437992002-04-12 09:54:03 +00004815 echo "$as_me: program exited with status $ac_status" >&5
4816echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004817sed 's/^/| /' conftest.$ac_ext >&5
4818
Martin v. Löwis11437992002-04-12 09:54:03 +00004819( exit $ac_status )
4820ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004821fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00004822rm -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 +00004823fi
4824
Thomas Wouters477c8d52006-05-27 19:21:47 +00004825
4826
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004827fi
4828
Thomas Wouters477c8d52006-05-27 19:21:47 +00004829{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
4830echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; }
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004831
Michael W. Hudson54241132001-12-07 15:38:26 +00004832
Martin v. Löwis11437992002-04-12 09:54:03 +00004833if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004834then
4835 ac_cv_kpthread=no
4836else
4837# -Kpthread, if available, provides the right #defines
4838# and linker options to make pthread_create available
4839# Some compilers won't report that they do not support -Kpthread,
4840# so we need to run a program to see whether it really made the
4841# function available.
Thomas Wouters477c8d52006-05-27 19:21:47 +00004842{ echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
4843echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004844if test "${ac_cv_kpthread+set}" = set; then
4845 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004846else
4847 ac_save_cc="$CC"
4848CC="$CC -Kpthread"
4849if test "$cross_compiling" = yes; then
4850 ac_cv_kpthread=no
4851else
Martin v. Löwis11437992002-04-12 09:54:03 +00004852 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004853/* confdefs.h. */
4854_ACEOF
4855cat confdefs.h >>conftest.$ac_ext
4856cat >>conftest.$ac_ext <<_ACEOF
4857/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004858
4859#include <pthread.h>
4860
4861void* routine(void* p){return NULL;}
4862
4863int main(){
4864 pthread_t p;
4865 if(pthread_create(&p,NULL,routine,NULL)!=0)
4866 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00004867 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004868 return 0;
4869}
4870
Martin v. Löwis11437992002-04-12 09:54:03 +00004871_ACEOF
4872rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004873if { (ac_try="$ac_link"
4874case "(($ac_try" in
4875 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4876 *) ac_try_echo=$ac_try;;
4877esac
4878eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4879 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004880 ac_status=$?
4881 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4882 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004883 { (case "(($ac_try" in
4884 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4885 *) ac_try_echo=$ac_try;;
4886esac
4887eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4888 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004889 ac_status=$?
4890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4891 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00004892 ac_cv_kpthread=yes
4893else
Martin v. Löwis11437992002-04-12 09:54:03 +00004894 echo "$as_me: program exited with status $ac_status" >&5
4895echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004896sed 's/^/| /' conftest.$ac_ext >&5
4897
Martin v. Löwis11437992002-04-12 09:54:03 +00004898( exit $ac_status )
4899ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00004900fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00004901rm -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 +00004902fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00004903
4904
Martin v. Löwis130fb172001-07-19 11:00:41 +00004905CC="$ac_save_cc"
4906fi
4907
Thomas Wouters477c8d52006-05-27 19:21:47 +00004908{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
4909echo "${ECHO_T}$ac_cv_kpthread" >&6; }
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004910fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00004911
Skip Montanarod8d39a02003-07-10 20:44:10 +00004912if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004913then
4914# -Kthread, if available, provides the right #defines
4915# and linker options to make pthread_create available
4916# Some compilers won't report that they do not support -Kthread,
4917# so we need to run a program to see whether it really made the
4918# function available.
Thomas Wouters477c8d52006-05-27 19:21:47 +00004919{ echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
4920echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6; }
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004921if test "${ac_cv_kthread+set}" = set; then
4922 echo $ECHO_N "(cached) $ECHO_C" >&6
4923else
4924 ac_save_cc="$CC"
4925CC="$CC -Kthread"
4926if test "$cross_compiling" = yes; then
4927 ac_cv_kthread=no
4928else
4929 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004930/* confdefs.h. */
4931_ACEOF
4932cat confdefs.h >>conftest.$ac_ext
4933cat >>conftest.$ac_ext <<_ACEOF
4934/* end confdefs.h. */
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004935
4936#include <pthread.h>
4937
4938void* routine(void* p){return NULL;}
4939
4940int main(){
4941 pthread_t p;
4942 if(pthread_create(&p,NULL,routine,NULL)!=0)
4943 return 1;
4944 (void)pthread_detach(p);
4945 return 0;
4946}
4947
4948_ACEOF
4949rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004950if { (ac_try="$ac_link"
4951case "(($ac_try" in
4952 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4953 *) ac_try_echo=$ac_try;;
4954esac
4955eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4956 (eval "$ac_link") 2>&5
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004957 ac_status=$?
4958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4959 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004960 { (case "(($ac_try" in
4961 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4962 *) ac_try_echo=$ac_try;;
4963esac
4964eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4965 (eval "$ac_try") 2>&5
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004966 ac_status=$?
4967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4968 (exit $ac_status); }; }; then
4969 ac_cv_kthread=yes
4970else
4971 echo "$as_me: program exited with status $ac_status" >&5
4972echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004973sed 's/^/| /' conftest.$ac_ext >&5
4974
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004975( exit $ac_status )
4976ac_cv_kthread=no
4977fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00004978rm -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 +00004979fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00004980
4981
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004982CC="$ac_save_cc"
4983fi
4984
Thomas Wouters477c8d52006-05-27 19:21:47 +00004985{ echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
4986echo "${ECHO_T}$ac_cv_kthread" >&6; }
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004987fi
4988
Skip Montanarod8d39a02003-07-10 20:44:10 +00004989if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004990then
4991# -pthread, if available, provides the right #defines
4992# and linker options to make pthread_create available
4993# Some compilers won't report that they do not support -pthread,
4994# so we need to run a program to see whether it really made the
4995# function available.
Thomas Wouters477c8d52006-05-27 19:21:47 +00004996{ echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
4997echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004998if test "${ac_cv_thread+set}" = set; then
4999 echo $ECHO_N "(cached) $ECHO_C" >&6
5000else
5001 ac_save_cc="$CC"
5002CC="$CC -pthread"
5003if test "$cross_compiling" = yes; then
5004 ac_cv_pthread=no
5005else
5006 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005007/* confdefs.h. */
5008_ACEOF
5009cat confdefs.h >>conftest.$ac_ext
5010cat >>conftest.$ac_ext <<_ACEOF
5011/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005012
5013#include <pthread.h>
5014
5015void* routine(void* p){return NULL;}
5016
5017int main(){
5018 pthread_t p;
5019 if(pthread_create(&p,NULL,routine,NULL)!=0)
5020 return 1;
5021 (void)pthread_detach(p);
5022 return 0;
5023}
5024
5025_ACEOF
5026rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00005027if { (ac_try="$ac_link"
5028case "(($ac_try" in
5029 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5030 *) ac_try_echo=$ac_try;;
5031esac
5032eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5033 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005034 ac_status=$?
5035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5036 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00005037 { (case "(($ac_try" in
5038 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5039 *) ac_try_echo=$ac_try;;
5040esac
5041eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5042 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005043 ac_status=$?
5044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5045 (exit $ac_status); }; }; then
5046 ac_cv_pthread=yes
5047else
5048 echo "$as_me: program exited with status $ac_status" >&5
5049echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005050sed 's/^/| /' conftest.$ac_ext >&5
5051
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005052( exit $ac_status )
5053ac_cv_pthread=no
5054fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00005055rm -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 +00005056fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00005057
5058
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005059CC="$ac_save_cc"
5060fi
5061
Thomas Wouters477c8d52006-05-27 19:21:47 +00005062{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5063echo "${ECHO_T}$ac_cv_pthread" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005064fi
5065
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005066# If we have set a CC compiler flag for thread support then
5067# check if it works for CXX, too.
5068ac_cv_cxx_thread=no
5069if test ! -z "$CXX"
5070then
Thomas Wouters477c8d52006-05-27 19:21:47 +00005071{ echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5072echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6; }
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005073ac_save_cxx="$CXX"
5074
5075if test "$ac_cv_kpthread" = "yes"
5076then
5077 CXX="$CXX -Kpthread"
5078 ac_cv_cxx_thread=yes
5079elif test "$ac_cv_kthread" = "yes"
5080then
5081 CXX="$CXX -Kthread"
5082 ac_cv_cxx_thread=yes
5083elif test "$ac_cv_pthread" = "yes"
5084then
5085 CXX="$CXX -pthread"
5086 ac_cv_cxx_thread=yes
5087fi
5088
5089if test $ac_cv_cxx_thread = yes
5090then
5091 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5092 $CXX -c conftest.$ac_ext 2>&5
5093 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5094 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5095 then
5096 ac_cv_cxx_thread=yes
5097 else
5098 ac_cv_cxx_thread=no
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005099 fi
5100 rm -fr conftest*
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005101fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00005102{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5103echo "${ECHO_T}$ac_cv_cxx_thread" >&6; }
Brett Cannonc601e0f2004-11-07 01:24:12 +00005104fi
5105CXX="$ac_save_cxx"
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005106
Michael W. Hudson54241132001-12-07 15:38:26 +00005107
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005108# checks for header files
Thomas Wouters477c8d52006-05-27 19:21:47 +00005109{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5110echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005111if test "${ac_cv_header_stdc+set}" = set; then
5112 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005113else
Martin v. Löwis11437992002-04-12 09:54:03 +00005114 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005115/* confdefs.h. */
5116_ACEOF
5117cat confdefs.h >>conftest.$ac_ext
5118cat >>conftest.$ac_ext <<_ACEOF
5119/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005120#include <stdlib.h>
5121#include <stdarg.h>
5122#include <string.h>
5123#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005124
Skip Montanaro6dead952003-09-25 14:50:04 +00005125int
5126main ()
5127{
5128
5129 ;
5130 return 0;
5131}
Martin v. Löwis11437992002-04-12 09:54:03 +00005132_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005133rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00005134if { (ac_try="$ac_compile"
5135case "(($ac_try" in
5136 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5137 *) ac_try_echo=$ac_try;;
5138esac
5139eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5140 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005141 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005142 grep -v '^ *+' conftest.er1 >conftest.err
5143 rm -f conftest.er1
5144 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005146 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00005147 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
5148 { (case "(($ac_try" in
5149 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5150 *) ac_try_echo=$ac_try;;
5151esac
5152eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5153 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005154 ac_status=$?
5155 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5156 (exit $ac_status); }; } &&
5157 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00005158 { (case "(($ac_try" in
5159 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5160 *) ac_try_echo=$ac_try;;
5161esac
5162eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5163 (eval "$ac_try") 2>&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005164 ac_status=$?
5165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5166 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005167 ac_cv_header_stdc=yes
5168else
Martin v. Löwis11437992002-04-12 09:54:03 +00005169 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005170sed 's/^/| /' conftest.$ac_ext >&5
5171
Thomas Wouters477c8d52006-05-27 19:21:47 +00005172 ac_cv_header_stdc=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005173fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00005174
Skip Montanarof0d5f792004-08-15 14:08:23 +00005175rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005176
5177if test $ac_cv_header_stdc = yes; then
5178 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00005179 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005180/* confdefs.h. */
5181_ACEOF
5182cat confdefs.h >>conftest.$ac_ext
5183cat >>conftest.$ac_ext <<_ACEOF
5184/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005185#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005186
5187_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005188if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005189 $EGREP "memchr" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005190 :
5191else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005192 ac_cv_header_stdc=no
5193fi
5194rm -f conftest*
5195
5196fi
5197
5198if test $ac_cv_header_stdc = yes; then
5199 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00005200 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005201/* confdefs.h. */
5202_ACEOF
5203cat confdefs.h >>conftest.$ac_ext
5204cat >>conftest.$ac_ext <<_ACEOF
5205/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005206#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005207
5208_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005209if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005210 $EGREP "free" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005211 :
5212else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005213 ac_cv_header_stdc=no
5214fi
5215rm -f conftest*
5216
5217fi
5218
5219if test $ac_cv_header_stdc = yes; then
5220 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00005221 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005222 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005223else
Martin v. Löwis11437992002-04-12 09:54:03 +00005224 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005225/* confdefs.h. */
5226_ACEOF
5227cat confdefs.h >>conftest.$ac_ext
5228cat >>conftest.$ac_ext <<_ACEOF
5229/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005230#include <ctype.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +00005231#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005232#if ((' ' & 0x0FF) == 0x020)
5233# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5234# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5235#else
Skip Montanaro6dead952003-09-25 14:50:04 +00005236# define ISLOWER(c) \
Skip Montanarof0d5f792004-08-15 14:08:23 +00005237 (('a' <= (c) && (c) <= 'i') \
5238 || ('j' <= (c) && (c) <= 'r') \
5239 || ('s' <= (c) && (c) <= 'z'))
Martin v. Löwis11437992002-04-12 09:54:03 +00005240# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5241#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00005242
Martin v. Löwis11437992002-04-12 09:54:03 +00005243#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5244int
5245main ()
5246{
5247 int i;
5248 for (i = 0; i < 256; i++)
5249 if (XOR (islower (i), ISLOWER (i))
Skip Montanarof0d5f792004-08-15 14:08:23 +00005250 || toupper (i) != TOUPPER (i))
Thomas Wouters477c8d52006-05-27 19:21:47 +00005251 return 2;
5252 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00005253}
5254_ACEOF
5255rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00005256if { (ac_try="$ac_link"
5257case "(($ac_try" in
5258 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5259 *) ac_try_echo=$ac_try;;
5260esac
5261eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5262 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005263 ac_status=$?
5264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5265 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00005266 { (case "(($ac_try" in
5267 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5268 *) ac_try_echo=$ac_try;;
5269esac
5270eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5271 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005272 ac_status=$?
5273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5274 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005275 :
5276else
Martin v. Löwis11437992002-04-12 09:54:03 +00005277 echo "$as_me: program exited with status $ac_status" >&5
5278echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005279sed 's/^/| /' conftest.$ac_ext >&5
5280
Martin v. Löwis11437992002-04-12 09:54:03 +00005281( exit $ac_status )
5282ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005283fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00005284rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5285fi
5286
5287
Michael W. Hudson54241132001-12-07 15:38:26 +00005288fi
5289fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00005290{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5291echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00005292if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005293
5294cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005295#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005296_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005297
5298fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005299
Skip Montanarob9820a32004-01-17 00:16:12 +00005300# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
Skip Montanarof0d5f792004-08-15 14:08:23 +00005311 inttypes.h stdint.h unistd.h
Skip Montanarob9820a32004-01-17 00:16:12 +00005312do
5313as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Thomas Wouters477c8d52006-05-27 19:21:47 +00005314{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5315echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5316if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Skip Montanarob9820a32004-01-17 00:16:12 +00005317 echo $ECHO_N "(cached) $ECHO_C" >&6
5318else
5319 cat >conftest.$ac_ext <<_ACEOF
Skip Montanarob9820a32004-01-17 00:16:12 +00005320/* confdefs.h. */
5321_ACEOF
5322cat confdefs.h >>conftest.$ac_ext
5323cat >>conftest.$ac_ext <<_ACEOF
5324/* end confdefs.h. */
5325$ac_includes_default
5326
5327#include <$ac_header>
5328_ACEOF
5329rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00005330if { (ac_try="$ac_compile"
5331case "(($ac_try" in
5332 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5333 *) ac_try_echo=$ac_try;;
5334esac
5335eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5336 (eval "$ac_compile") 2>conftest.er1
Skip Montanarob9820a32004-01-17 00:16:12 +00005337 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005338 grep -v '^ *+' conftest.er1 >conftest.err
5339 rm -f conftest.er1
5340 cat conftest.err >&5
Skip Montanarob9820a32004-01-17 00:16:12 +00005341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5342 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00005343 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
5344 { (case "(($ac_try" in
5345 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5346 *) ac_try_echo=$ac_try;;
5347esac
5348eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5349 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005350 ac_status=$?
5351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5352 (exit $ac_status); }; } &&
5353 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00005354 { (case "(($ac_try" in
5355 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5356 *) ac_try_echo=$ac_try;;
5357esac
5358eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5359 (eval "$ac_try") 2>&5
Skip Montanarob9820a32004-01-17 00:16:12 +00005360 ac_status=$?
5361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5362 (exit $ac_status); }; }; then
5363 eval "$as_ac_Header=yes"
5364else
5365 echo "$as_me: failed program was:" >&5
5366sed 's/^/| /' conftest.$ac_ext >&5
5367
Thomas Wouters477c8d52006-05-27 19:21:47 +00005368 eval "$as_ac_Header=no"
Skip Montanarob9820a32004-01-17 00:16:12 +00005369fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00005370
Skip Montanarof0d5f792004-08-15 14:08:23 +00005371rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanarob9820a32004-01-17 00:16:12 +00005372fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00005373ac_res=`eval echo '${'$as_ac_Header'}'`
5374 { echo "$as_me:$LINENO: result: $ac_res" >&5
5375echo "${ECHO_T}$ac_res" >&6; }
Skip Montanarob9820a32004-01-17 00:16:12 +00005376if test `eval echo '${'$as_ac_Header'}'` = yes; then
5377 cat >>confdefs.h <<_ACEOF
5378#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5379_ACEOF
5380
5381fi
5382
5383done
5384
5385
Martin v. Löwis11437992002-04-12 09:54:03 +00005386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
Anthony Baxter8a560de2004-10-13 15:30:56 +00005422
Martin v. Löwisc3001752005-01-23 09:27:24 +00005423
Martin v. Löwis11017b12006-01-14 18:12:57 +00005424
Thomas Wouters477c8d52006-05-27 19:21:47 +00005425
Martin v. Löwis11017b12006-01-14 18:12:57 +00005426for ac_header in asm/types.h curses.h dlfcn.h fcntl.h grp.h \
5427shadow.h langinfo.h libintl.h ncurses.h poll.h pthread.h \
Skip Montanaro7befb992004-02-10 16:50:21 +00005428stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005429unistd.h utime.h \
Anthony Baxter8a560de2004-10-13 15:30:56 +00005430sys/audioio.h sys/bsdtty.h sys/file.h sys/loadavg.h sys/lock.h sys/mkdev.h \
5431sys/modem.h \
Thomas Wouters477c8d52006-05-27 19:21:47 +00005432sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/time.h \
5433sys/times.h sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
Hye-Shik Chang81268602004-02-02 06:05:24 +00005434sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
5435bluetooth/bluetooth.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00005436do
Martin v. Löwis11437992002-04-12 09:54:03 +00005437as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Thomas Wouters477c8d52006-05-27 19:21:47 +00005438if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5439 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5440echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5441if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005442 echo $ECHO_N "(cached) $ECHO_C" >&6
5443fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00005444ac_res=`eval echo '${'$as_ac_Header'}'`
5445 { echo "$as_me:$LINENO: result: $ac_res" >&5
5446echo "${ECHO_T}$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005447else
Martin v. Löwis11437992002-04-12 09:54:03 +00005448 # Is the header compilable?
Thomas Wouters477c8d52006-05-27 19:21:47 +00005449{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5450echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005451cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005452/* confdefs.h. */
5453_ACEOF
5454cat confdefs.h >>conftest.$ac_ext
5455cat >>conftest.$ac_ext <<_ACEOF
5456/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005457$ac_includes_default
5458#include <$ac_header>
5459_ACEOF
5460rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00005461if { (ac_try="$ac_compile"
5462case "(($ac_try" in
5463 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5464 *) ac_try_echo=$ac_try;;
5465esac
5466eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5467 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005468 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005469 grep -v '^ *+' conftest.er1 >conftest.err
5470 rm -f conftest.er1
5471 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5473 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00005474 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
5475 { (case "(($ac_try" in
5476 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5477 *) ac_try_echo=$ac_try;;
5478esac
5479eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5480 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005481 ac_status=$?
5482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5483 (exit $ac_status); }; } &&
5484 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00005485 { (case "(($ac_try" in
5486 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5487 *) ac_try_echo=$ac_try;;
5488esac
5489eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5490 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005491 ac_status=$?
5492 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5493 (exit $ac_status); }; }; then
5494 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00005495else
Martin v. Löwis11437992002-04-12 09:54:03 +00005496 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005497sed 's/^/| /' conftest.$ac_ext >&5
5498
Thomas Wouters477c8d52006-05-27 19:21:47 +00005499 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005500fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00005501
Skip Montanarof0d5f792004-08-15 14:08:23 +00005502rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +00005503{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5504echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005505
5506# Is the header present?
Thomas Wouters477c8d52006-05-27 19:21:47 +00005507{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5508echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005509cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005510/* confdefs.h. */
5511_ACEOF
5512cat confdefs.h >>conftest.$ac_ext
5513cat >>conftest.$ac_ext <<_ACEOF
5514/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005515#include <$ac_header>
5516_ACEOF
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00005517if { (ac_try="$ac_cpp conftest.$ac_ext"
5518case "(($ac_try" in
5519 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5520 *) ac_try_echo=$ac_try;;
5521esac
5522eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5523 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005524 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005525 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00005526 rm -f conftest.er1
5527 cat conftest.err >&5
5528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5529 (exit $ac_status); } >/dev/null; then
5530 if test -s conftest.err; then
5531 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +00005532 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +00005533 else
5534 ac_cpp_err=
5535 fi
5536else
5537 ac_cpp_err=yes
5538fi
5539if test -z "$ac_cpp_err"; then
5540 ac_header_preproc=yes
5541else
5542 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005543sed 's/^/| /' conftest.$ac_ext >&5
5544
Martin v. Löwis11437992002-04-12 09:54:03 +00005545 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00005546fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00005547
Martin v. Löwis11437992002-04-12 09:54:03 +00005548rm -f conftest.err conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +00005549{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5550echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005551
5552# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005553case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5554 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +00005555 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5556echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005557 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5558echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
5559 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005560 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005561 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005562 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5563echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005564 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5565echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5566 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5567echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5568 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5569echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005570 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5571echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005572 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5573echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +00005574 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00005575## ------------------------------------------------ ##
5576## Report this to http://www.python.org/python-bugs ##
5577## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005578_ASBOX
Thomas Wouters477c8d52006-05-27 19:21:47 +00005579 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005580 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00005581esac
Thomas Wouters477c8d52006-05-27 19:21:47 +00005582{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5583echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5584if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005585 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005586else
Skip Montanarof0d5f792004-08-15 14:08:23 +00005587 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005588fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00005589ac_res=`eval echo '${'$as_ac_Header'}'`
5590 { echo "$as_me:$LINENO: result: $ac_res" >&5
5591echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005592
5593fi
5594if test `eval echo '${'$as_ac_Header'}'` = yes; then
5595 cat >>confdefs.h <<_ACEOF
5596#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5597_ACEOF
5598
5599fi
5600
Guido van Rossum627b2d71993-12-24 10:39:16 +00005601done
5602
Martin v. Löwis11437992002-04-12 09:54:03 +00005603
5604
5605
5606
5607
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005608ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005609for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
5610 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
Thomas Wouters477c8d52006-05-27 19:21:47 +00005611{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5612echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
5613if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005614 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005615else
Martin v. Löwis11437992002-04-12 09:54:03 +00005616 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005617/* confdefs.h. */
5618_ACEOF
5619cat confdefs.h >>conftest.$ac_ext
5620cat >>conftest.$ac_ext <<_ACEOF
5621/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005622#include <sys/types.h>
5623#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00005624
Martin v. Löwis11437992002-04-12 09:54:03 +00005625int
5626main ()
5627{
5628if ((DIR *) 0)
5629return 0;
5630 ;
5631 return 0;
5632}
5633_ACEOF
5634rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00005635if { (ac_try="$ac_compile"
5636case "(($ac_try" in
5637 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5638 *) ac_try_echo=$ac_try;;
5639esac
5640eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5641 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005642 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005643 grep -v '^ *+' conftest.er1 >conftest.err
5644 rm -f conftest.er1
5645 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5647 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00005648 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
5649 { (case "(($ac_try" in
5650 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5651 *) ac_try_echo=$ac_try;;
5652esac
5653eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5654 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005655 ac_status=$?
5656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5657 (exit $ac_status); }; } &&
5658 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00005659 { (case "(($ac_try" in
5660 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5661 *) ac_try_echo=$ac_try;;
5662esac
5663eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5664 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005665 ac_status=$?
5666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5667 (exit $ac_status); }; }; then
5668 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00005669else
Martin v. Löwis11437992002-04-12 09:54:03 +00005670 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005671sed 's/^/| /' conftest.$ac_ext >&5
5672
Thomas Wouters477c8d52006-05-27 19:21:47 +00005673 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005674fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00005675
Skip Montanarof0d5f792004-08-15 14:08:23 +00005676rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005677fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00005678ac_res=`eval echo '${'$as_ac_Header'}'`
5679 { echo "$as_me:$LINENO: result: $ac_res" >&5
5680echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005681if test `eval echo '${'$as_ac_Header'}'` = yes; then
5682 cat >>confdefs.h <<_ACEOF
5683#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
5684_ACEOF
5685
5686ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00005687fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005688
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005689done
5690# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5691if test $ac_header_dirent = dirent.h; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00005692 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5693echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005694if test "${ac_cv_search_opendir+set}" = set; then
5695 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005696else
Martin v. Löwis11437992002-04-12 09:54:03 +00005697 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005698cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005699/* confdefs.h. */
5700_ACEOF
5701cat confdefs.h >>conftest.$ac_ext
5702cat >>conftest.$ac_ext <<_ACEOF
5703/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005704
Thomas Wouters477c8d52006-05-27 19:21:47 +00005705/* Override any GCC internal prototype to avoid an error.
5706 Use char because int might match the return type of a GCC
5707 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005708#ifdef __cplusplus
5709extern "C"
5710#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005711char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005712int
5713main ()
5714{
Thomas Wouters477c8d52006-05-27 19:21:47 +00005715return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005716 ;
5717 return 0;
5718}
5719_ACEOF
Thomas Wouters477c8d52006-05-27 19:21:47 +00005720for ac_lib in '' dir; do
5721 if test -z "$ac_lib"; then
5722 ac_res="none required"
5723 else
5724 ac_res=-l$ac_lib
Martin v. Löwis11437992002-04-12 09:54:03 +00005725 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters477c8d52006-05-27 19:21:47 +00005726 fi
5727 rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00005728if { (ac_try="$ac_link"
5729case "(($ac_try" in
5730 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5731 *) ac_try_echo=$ac_try;;
5732esac
5733eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5734 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005735 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005736 grep -v '^ *+' conftest.er1 >conftest.err
5737 rm -f conftest.er1
5738 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5740 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00005741 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
5742 { (case "(($ac_try" in
5743 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5744 *) ac_try_echo=$ac_try;;
5745esac
5746eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5747 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005748 ac_status=$?
5749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5750 (exit $ac_status); }; } &&
5751 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00005752 { (case "(($ac_try" in
5753 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5754 *) ac_try_echo=$ac_try;;
5755esac
5756eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5757 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005758 ac_status=$?
5759 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5760 (exit $ac_status); }; }; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00005761 ac_cv_search_opendir=$ac_res
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005762else
Martin v. Löwis11437992002-04-12 09:54:03 +00005763 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005764sed 's/^/| /' conftest.$ac_ext >&5
5765
Thomas Wouters477c8d52006-05-27 19:21:47 +00005766
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005767fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00005768
Skip Montanarof0d5f792004-08-15 14:08:23 +00005769rm -f conftest.err conftest.$ac_objext \
Thomas Wouters477c8d52006-05-27 19:21:47 +00005770 conftest$ac_exeext
5771 if test "${ac_cv_search_opendir+set}" = set; then
5772 break
Martin v. Löwis11437992002-04-12 09:54:03 +00005773fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00005774done
5775if test "${ac_cv_search_opendir+set}" = set; then
5776 :
5777else
5778 ac_cv_search_opendir=no
5779fi
5780rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005781LIBS=$ac_func_search_save_LIBS
5782fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00005783{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5784echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
5785ac_res=$ac_cv_search_opendir
5786if test "$ac_res" != no; then
5787 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005788
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005789fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005790
Michael W. Hudson54241132001-12-07 15:38:26 +00005791else
Thomas Wouters477c8d52006-05-27 19:21:47 +00005792 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5793echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005794if test "${ac_cv_search_opendir+set}" = set; then
5795 echo $ECHO_N "(cached) $ECHO_C" >&6
5796else
5797 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005798cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005799/* confdefs.h. */
5800_ACEOF
5801cat confdefs.h >>conftest.$ac_ext
5802cat >>conftest.$ac_ext <<_ACEOF
5803/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005804
Thomas Wouters477c8d52006-05-27 19:21:47 +00005805/* Override any GCC internal prototype to avoid an error.
5806 Use char because int might match the return type of a GCC
5807 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005808#ifdef __cplusplus
5809extern "C"
5810#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005811char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005812int
5813main ()
5814{
Thomas Wouters477c8d52006-05-27 19:21:47 +00005815return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005816 ;
5817 return 0;
5818}
5819_ACEOF
Thomas Wouters477c8d52006-05-27 19:21:47 +00005820for ac_lib in '' x; do
5821 if test -z "$ac_lib"; then
5822 ac_res="none required"
5823 else
5824 ac_res=-l$ac_lib
Martin v. Löwis11437992002-04-12 09:54:03 +00005825 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters477c8d52006-05-27 19:21:47 +00005826 fi
5827 rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00005828if { (ac_try="$ac_link"
5829case "(($ac_try" in
5830 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5831 *) ac_try_echo=$ac_try;;
5832esac
5833eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5834 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005835 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005836 grep -v '^ *+' conftest.er1 >conftest.err
5837 rm -f conftest.er1
5838 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5840 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00005841 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
5842 { (case "(($ac_try" in
5843 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5844 *) ac_try_echo=$ac_try;;
5845esac
5846eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5847 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005848 ac_status=$?
5849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5850 (exit $ac_status); }; } &&
5851 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00005852 { (case "(($ac_try" in
5853 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5854 *) ac_try_echo=$ac_try;;
5855esac
5856eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5857 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005858 ac_status=$?
5859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5860 (exit $ac_status); }; }; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00005861 ac_cv_search_opendir=$ac_res
Martin v. Löwis11437992002-04-12 09:54:03 +00005862else
5863 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005864sed 's/^/| /' conftest.$ac_ext >&5
5865
Thomas Wouters477c8d52006-05-27 19:21:47 +00005866
Martin v. Löwis11437992002-04-12 09:54:03 +00005867fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00005868
Skip Montanarof0d5f792004-08-15 14:08:23 +00005869rm -f conftest.err conftest.$ac_objext \
Thomas Wouters477c8d52006-05-27 19:21:47 +00005870 conftest$ac_exeext
5871 if test "${ac_cv_search_opendir+set}" = set; then
5872 break
Martin v. Löwis11437992002-04-12 09:54:03 +00005873fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00005874done
5875if test "${ac_cv_search_opendir+set}" = set; then
5876 :
5877else
5878 ac_cv_search_opendir=no
5879fi
5880rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005881LIBS=$ac_func_search_save_LIBS
5882fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00005883{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5884echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
5885ac_res=$ac_cv_search_opendir
5886if test "$ac_res" != no; then
5887 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00005888
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005889fi
5890
5891fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005892
Thomas Wouters477c8d52006-05-27 19:21:47 +00005893{ echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
5894echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005895if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
5896 echo $ECHO_N "(cached) $ECHO_C" >&6
5897else
5898 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005899/* confdefs.h. */
5900_ACEOF
5901cat confdefs.h >>conftest.$ac_ext
5902cat >>conftest.$ac_ext <<_ACEOF
5903/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005904#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005905int
5906main ()
5907{
5908return makedev(0, 0);
5909 ;
5910 return 0;
5911}
5912_ACEOF
5913rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00005914if { (ac_try="$ac_link"
5915case "(($ac_try" in
5916 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5917 *) ac_try_echo=$ac_try;;
5918esac
5919eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5920 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005921 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005922 grep -v '^ *+' conftest.er1 >conftest.err
5923 rm -f conftest.er1
5924 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5926 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00005927 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
5928 { (case "(($ac_try" in
5929 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5930 *) ac_try_echo=$ac_try;;
5931esac
5932eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5933 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005934 ac_status=$?
5935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5936 (exit $ac_status); }; } &&
5937 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00005938 { (case "(($ac_try" in
5939 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5940 *) ac_try_echo=$ac_try;;
5941esac
5942eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5943 (eval "$ac_try") 2>&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005944 ac_status=$?
5945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5946 (exit $ac_status); }; }; then
5947 ac_cv_header_sys_types_h_makedev=yes
5948else
5949 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005950sed 's/^/| /' conftest.$ac_ext >&5
5951
Thomas Wouters477c8d52006-05-27 19:21:47 +00005952 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005953fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00005954
Skip Montanarof0d5f792004-08-15 14:08:23 +00005955rm -f conftest.err conftest.$ac_objext \
5956 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005957
5958fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00005959{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
5960echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005961
5962if test $ac_cv_header_sys_types_h_makedev = no; then
5963if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00005964 { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
5965echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005966if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
5967 echo $ECHO_N "(cached) $ECHO_C" >&6
5968fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00005969{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
5970echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005971else
5972 # Is the header compilable?
Thomas Wouters477c8d52006-05-27 19:21:47 +00005973{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
5974echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005975cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005976/* confdefs.h. */
5977_ACEOF
5978cat confdefs.h >>conftest.$ac_ext
5979cat >>conftest.$ac_ext <<_ACEOF
5980/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005981$ac_includes_default
5982#include <sys/mkdev.h>
5983_ACEOF
5984rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00005985if { (ac_try="$ac_compile"
5986case "(($ac_try" in
5987 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5988 *) ac_try_echo=$ac_try;;
5989esac
5990eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5991 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005992 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005993 grep -v '^ *+' conftest.er1 >conftest.err
5994 rm -f conftest.er1
5995 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5997 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00005998 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
5999 { (case "(($ac_try" in
6000 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6001 *) ac_try_echo=$ac_try;;
6002esac
6003eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6004 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006005 ac_status=$?
6006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6007 (exit $ac_status); }; } &&
6008 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006009 { (case "(($ac_try" in
6010 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6011 *) ac_try_echo=$ac_try;;
6012esac
6013eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6014 (eval "$ac_try") 2>&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006015 ac_status=$?
6016 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6017 (exit $ac_status); }; }; then
6018 ac_header_compiler=yes
6019else
6020 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006021sed 's/^/| /' conftest.$ac_ext >&5
6022
Thomas Wouters477c8d52006-05-27 19:21:47 +00006023 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006024fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00006025
Skip Montanarof0d5f792004-08-15 14:08:23 +00006026rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +00006027{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6028echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006029
6030# Is the header present?
Thomas Wouters477c8d52006-05-27 19:21:47 +00006031{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
6032echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006033cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006034/* confdefs.h. */
6035_ACEOF
6036cat confdefs.h >>conftest.$ac_ext
6037cat >>conftest.$ac_ext <<_ACEOF
6038/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006039#include <sys/mkdev.h>
6040_ACEOF
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006041if { (ac_try="$ac_cpp conftest.$ac_ext"
6042case "(($ac_try" in
6043 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6044 *) ac_try_echo=$ac_try;;
6045esac
6046eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6047 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006048 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006049 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006050 rm -f conftest.er1
6051 cat conftest.err >&5
6052 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6053 (exit $ac_status); } >/dev/null; then
6054 if test -s conftest.err; then
6055 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +00006056 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006057 else
6058 ac_cpp_err=
6059 fi
6060else
6061 ac_cpp_err=yes
6062fi
6063if test -z "$ac_cpp_err"; then
6064 ac_header_preproc=yes
6065else
6066 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006067sed 's/^/| /' conftest.$ac_ext >&5
6068
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006069 ac_header_preproc=no
6070fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00006071
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006072rm -f conftest.err conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +00006073{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6074echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006075
6076# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006077case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6078 yes:no: )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006079 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
6080echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006081 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
6082echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
6083 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006084 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006085 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006086 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
6087echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006088 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
6089echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
6090 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
6091echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
6092 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
6093echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006094 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
6095echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006096 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
6097echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +00006098 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00006099## ------------------------------------------------ ##
6100## Report this to http://www.python.org/python-bugs ##
6101## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006102_ASBOX
Thomas Wouters477c8d52006-05-27 19:21:47 +00006103 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006104 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006105esac
Thomas Wouters477c8d52006-05-27 19:21:47 +00006106{ echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6107echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006108if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
6109 echo $ECHO_N "(cached) $ECHO_C" >&6
6110else
6111 ac_cv_header_sys_mkdev_h=$ac_header_preproc
6112fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00006113{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6114echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006115
6116fi
6117if test $ac_cv_header_sys_mkdev_h = yes; then
6118
6119cat >>confdefs.h <<\_ACEOF
6120#define MAJOR_IN_MKDEV 1
6121_ACEOF
6122
6123fi
6124
6125
6126
6127 if test $ac_cv_header_sys_mkdev_h = no; then
6128 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00006129 { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6130echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006131if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
6132 echo $ECHO_N "(cached) $ECHO_C" >&6
6133fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00006134{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6135echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006136else
6137 # Is the header compilable?
Thomas Wouters477c8d52006-05-27 19:21:47 +00006138{ echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6139echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006140cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006141/* confdefs.h. */
6142_ACEOF
6143cat confdefs.h >>conftest.$ac_ext
6144cat >>conftest.$ac_ext <<_ACEOF
6145/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006146$ac_includes_default
6147#include <sys/sysmacros.h>
6148_ACEOF
6149rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006150if { (ac_try="$ac_compile"
6151case "(($ac_try" in
6152 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6153 *) ac_try_echo=$ac_try;;
6154esac
6155eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6156 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006157 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006158 grep -v '^ *+' conftest.er1 >conftest.err
6159 rm -f conftest.er1
6160 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006161 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6162 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006163 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
6164 { (case "(($ac_try" in
6165 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6166 *) ac_try_echo=$ac_try;;
6167esac
6168eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6169 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006170 ac_status=$?
6171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6172 (exit $ac_status); }; } &&
6173 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006174 { (case "(($ac_try" in
6175 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6176 *) ac_try_echo=$ac_try;;
6177esac
6178eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6179 (eval "$ac_try") 2>&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006180 ac_status=$?
6181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6182 (exit $ac_status); }; }; then
6183 ac_header_compiler=yes
6184else
6185 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006186sed 's/^/| /' conftest.$ac_ext >&5
6187
Thomas Wouters477c8d52006-05-27 19:21:47 +00006188 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006189fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00006190
Skip Montanarof0d5f792004-08-15 14:08:23 +00006191rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +00006192{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6193echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006194
6195# Is the header present?
Thomas Wouters477c8d52006-05-27 19:21:47 +00006196{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6197echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006198cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006199/* confdefs.h. */
6200_ACEOF
6201cat confdefs.h >>conftest.$ac_ext
6202cat >>conftest.$ac_ext <<_ACEOF
6203/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006204#include <sys/sysmacros.h>
6205_ACEOF
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006206if { (ac_try="$ac_cpp conftest.$ac_ext"
6207case "(($ac_try" in
6208 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6209 *) ac_try_echo=$ac_try;;
6210esac
6211eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6212 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006213 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006214 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006215 rm -f conftest.er1
6216 cat conftest.err >&5
6217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6218 (exit $ac_status); } >/dev/null; then
6219 if test -s conftest.err; then
6220 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +00006221 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006222 else
6223 ac_cpp_err=
6224 fi
6225else
6226 ac_cpp_err=yes
6227fi
6228if test -z "$ac_cpp_err"; then
6229 ac_header_preproc=yes
6230else
6231 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006232sed 's/^/| /' conftest.$ac_ext >&5
6233
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006234 ac_header_preproc=no
6235fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00006236
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006237rm -f conftest.err conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +00006238{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6239echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006240
6241# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006242case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6243 yes:no: )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006244 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6245echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006246 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6247echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
6248 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006249 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006250 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006251 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6252echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006253 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6254echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6255 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6256echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6257 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6258echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006259 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6260echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006261 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6262echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +00006263 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00006264## ------------------------------------------------ ##
6265## Report this to http://www.python.org/python-bugs ##
6266## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006267_ASBOX
Thomas Wouters477c8d52006-05-27 19:21:47 +00006268 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006269 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006270esac
Thomas Wouters477c8d52006-05-27 19:21:47 +00006271{ echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6272echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006273if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
6274 echo $ECHO_N "(cached) $ECHO_C" >&6
6275else
6276 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6277fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00006278{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6279echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006280
6281fi
6282if test $ac_cv_header_sys_sysmacros_h = yes; then
6283
6284cat >>confdefs.h <<\_ACEOF
6285#define MAJOR_IN_SYSMACROS 1
6286_ACEOF
6287
6288fi
6289
6290
6291 fi
6292fi
6293
Michael W. Hudson54241132001-12-07 15:38:26 +00006294
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006295# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006296
6297for ac_header in term.h
6298do
6299as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Thomas Wouters477c8d52006-05-27 19:21:47 +00006300{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6301echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6302if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006303 echo $ECHO_N "(cached) $ECHO_C" >&6
6304else
6305 cat >conftest.$ac_ext <<_ACEOF
6306/* confdefs.h. */
6307_ACEOF
6308cat confdefs.h >>conftest.$ac_ext
6309cat >>conftest.$ac_ext <<_ACEOF
6310/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006311
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006312#ifdef HAVE_CURSES_H
6313#include <curses.h>
6314#endif
6315
6316
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006317#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006318_ACEOF
6319rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006320if { (ac_try="$ac_compile"
6321case "(($ac_try" in
6322 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6323 *) ac_try_echo=$ac_try;;
6324esac
6325eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6326 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006327 ac_status=$?
6328 grep -v '^ *+' conftest.er1 >conftest.err
6329 rm -f conftest.er1
6330 cat conftest.err >&5
6331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6332 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006333 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
6334 { (case "(($ac_try" in
6335 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6336 *) ac_try_echo=$ac_try;;
6337esac
6338eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6339 (eval "$ac_try") 2>&5
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006340 ac_status=$?
6341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6342 (exit $ac_status); }; } &&
6343 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006344 { (case "(($ac_try" in
6345 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6346 *) ac_try_echo=$ac_try;;
6347esac
6348eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6349 (eval "$ac_try") 2>&5
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006350 ac_status=$?
6351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6352 (exit $ac_status); }; }; then
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006353 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006354else
6355 echo "$as_me: failed program was:" >&5
6356sed 's/^/| /' conftest.$ac_ext >&5
6357
Thomas Wouters477c8d52006-05-27 19:21:47 +00006358 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006359fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00006360
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006361rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6362fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00006363ac_res=`eval echo '${'$as_ac_Header'}'`
6364 { echo "$as_me:$LINENO: result: $ac_res" >&5
6365echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006366if test `eval echo '${'$as_ac_Header'}'` = yes; then
6367 cat >>confdefs.h <<_ACEOF
6368#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6369_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006370
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006371fi
6372
6373done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006374
6375
Martin v. Löwis11017b12006-01-14 18:12:57 +00006376# On Linux, netlink.h requires asm/types.h
6377
6378for ac_header in linux/netlink.h
6379do
6380as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Thomas Wouters477c8d52006-05-27 19:21:47 +00006381{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6382echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6383if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006384 echo $ECHO_N "(cached) $ECHO_C" >&6
6385else
6386 cat >conftest.$ac_ext <<_ACEOF
6387/* confdefs.h. */
6388_ACEOF
6389cat confdefs.h >>conftest.$ac_ext
6390cat >>conftest.$ac_ext <<_ACEOF
6391/* end confdefs.h. */
6392
6393#ifdef HAVE_ASM_TYPES_H
6394#include <asm/types.h>
6395#endif
6396#ifdef HAVE_SYS_SOCKET_H
6397#include <sys/socket.h>
6398#endif
6399
6400
6401#include <$ac_header>
6402_ACEOF
6403rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006404if { (ac_try="$ac_compile"
6405case "(($ac_try" in
6406 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6407 *) ac_try_echo=$ac_try;;
6408esac
6409eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6410 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006411 ac_status=$?
6412 grep -v '^ *+' conftest.er1 >conftest.err
6413 rm -f conftest.er1
6414 cat conftest.err >&5
6415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6416 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006417 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
6418 { (case "(($ac_try" in
6419 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6420 *) ac_try_echo=$ac_try;;
6421esac
6422eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6423 (eval "$ac_try") 2>&5
Martin v. Löwis11017b12006-01-14 18:12:57 +00006424 ac_status=$?
6425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6426 (exit $ac_status); }; } &&
6427 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006428 { (case "(($ac_try" in
6429 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6430 *) ac_try_echo=$ac_try;;
6431esac
6432eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6433 (eval "$ac_try") 2>&5
Martin v. Löwis11017b12006-01-14 18:12:57 +00006434 ac_status=$?
6435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6436 (exit $ac_status); }; }; then
6437 eval "$as_ac_Header=yes"
6438else
6439 echo "$as_me: failed program was:" >&5
6440sed 's/^/| /' conftest.$ac_ext >&5
6441
Thomas Wouters477c8d52006-05-27 19:21:47 +00006442 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00006443fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00006444
Martin v. Löwis11017b12006-01-14 18:12:57 +00006445rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6446fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00006447ac_res=`eval echo '${'$as_ac_Header'}'`
6448 { echo "$as_me:$LINENO: result: $ac_res" >&5
6449echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11017b12006-01-14 18:12:57 +00006450if test `eval echo '${'$as_ac_Header'}'` = yes; then
6451 cat >>confdefs.h <<_ACEOF
6452#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6453_ACEOF
6454
6455fi
6456
6457done
6458
6459
Guido van Rossum627b2d71993-12-24 10:39:16 +00006460# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006461was_it_defined=no
Thomas Wouters477c8d52006-05-27 19:21:47 +00006462{ echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
6463echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006464cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006465/* confdefs.h. */
6466_ACEOF
6467cat confdefs.h >>conftest.$ac_ext
6468cat >>conftest.$ac_ext <<_ACEOF
6469/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006470#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006471
6472_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006473if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006474 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006475 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006476else
Martin v. Löwis11437992002-04-12 09:54:03 +00006477
6478
6479cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006480#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00006481_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006482
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006483
Guido van Rossum627b2d71993-12-24 10:39:16 +00006484fi
6485rm -f conftest*
6486
Thomas Wouters477c8d52006-05-27 19:21:47 +00006487{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
6488echo "${ECHO_T}$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006489
Neal Norwitz11690112002-07-30 01:08:28 +00006490# Check whether using makedev requires defining _OSF_SOURCE
Thomas Wouters477c8d52006-05-27 19:21:47 +00006491{ echo "$as_me:$LINENO: checking for makedev" >&5
6492echo $ECHO_N "checking for makedev... $ECHO_C" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006493cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006494/* confdefs.h. */
6495_ACEOF
6496cat confdefs.h >>conftest.$ac_ext
6497cat >>conftest.$ac_ext <<_ACEOF
6498/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006499#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006500int
6501main ()
6502{
6503 makedev(0, 0)
6504 ;
6505 return 0;
6506}
6507_ACEOF
6508rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006509if { (ac_try="$ac_link"
6510case "(($ac_try" in
6511 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6512 *) ac_try_echo=$ac_try;;
6513esac
6514eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6515 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006516 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006517 grep -v '^ *+' conftest.er1 >conftest.err
6518 rm -f conftest.er1
6519 cat conftest.err >&5
Neal Norwitz11690112002-07-30 01:08:28 +00006520 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6521 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006522 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
6523 { (case "(($ac_try" in
6524 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6525 *) ac_try_echo=$ac_try;;
6526esac
6527eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6528 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006529 ac_status=$?
6530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6531 (exit $ac_status); }; } &&
6532 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006533 { (case "(($ac_try" in
6534 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6535 *) ac_try_echo=$ac_try;;
6536esac
6537eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6538 (eval "$ac_try") 2>&5
Neal Norwitz11690112002-07-30 01:08:28 +00006539 ac_status=$?
6540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6541 (exit $ac_status); }; }; then
6542 ac_cv_has_makedev=yes
6543else
6544 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006545sed 's/^/| /' conftest.$ac_ext >&5
6546
Thomas Wouters477c8d52006-05-27 19:21:47 +00006547 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006548fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00006549
Skip Montanarof0d5f792004-08-15 14:08:23 +00006550rm -f conftest.err conftest.$ac_objext \
6551 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006552if test "$ac_cv_has_makedev" = "no"; then
6553 # we didn't link, try if _OSF_SOURCE will allow us to link
6554 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006555/* confdefs.h. */
6556_ACEOF
6557cat confdefs.h >>conftest.$ac_ext
6558cat >>conftest.$ac_ext <<_ACEOF
6559/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006560
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006561#define _OSF_SOURCE 1
6562#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006563
Neal Norwitz11690112002-07-30 01:08:28 +00006564int
6565main ()
6566{
6567 makedev(0, 0)
6568 ;
6569 return 0;
6570}
6571_ACEOF
6572rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006573if { (ac_try="$ac_link"
6574case "(($ac_try" in
6575 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6576 *) ac_try_echo=$ac_try;;
6577esac
6578eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6579 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006580 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006581 grep -v '^ *+' conftest.er1 >conftest.err
6582 rm -f conftest.er1
6583 cat conftest.err >&5
Neal Norwitz11690112002-07-30 01:08:28 +00006584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6585 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006586 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
6587 { (case "(($ac_try" in
6588 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6589 *) ac_try_echo=$ac_try;;
6590esac
6591eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6592 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006593 ac_status=$?
6594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6595 (exit $ac_status); }; } &&
6596 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006597 { (case "(($ac_try" in
6598 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6599 *) ac_try_echo=$ac_try;;
6600esac
6601eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6602 (eval "$ac_try") 2>&5
Neal Norwitz11690112002-07-30 01:08:28 +00006603 ac_status=$?
6604 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6605 (exit $ac_status); }; }; then
6606 ac_cv_has_makedev=yes
6607else
6608 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006609sed 's/^/| /' conftest.$ac_ext >&5
6610
Thomas Wouters477c8d52006-05-27 19:21:47 +00006611 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006612fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00006613
Skip Montanarof0d5f792004-08-15 14:08:23 +00006614rm -f conftest.err conftest.$ac_objext \
6615 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006616 if test "$ac_cv_has_makedev" = "yes"; then
6617
6618cat >>confdefs.h <<\_ACEOF
6619#define _OSF_SOURCE 1
6620_ACEOF
6621
6622 fi
6623fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00006624{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
6625echo "${ECHO_T}$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006626if test "$ac_cv_has_makedev" = "yes"; then
6627
6628cat >>confdefs.h <<\_ACEOF
6629#define HAVE_MAKEDEV 1
6630_ACEOF
6631
6632fi
6633
Martin v. Löwis399a6892002-10-04 10:22:02 +00006634# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6635# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6636# defined, but the compiler does not support pragma redefine_extname,
6637# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6638# structures (such as rlimit64) without declaring them. As a
6639# work-around, disable LFS on such configurations
6640
6641use_lfs=yes
Thomas Wouters477c8d52006-05-27 19:21:47 +00006642{ echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
6643echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006644cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006645/* confdefs.h. */
6646_ACEOF
6647cat confdefs.h >>conftest.$ac_ext
6648cat >>conftest.$ac_ext <<_ACEOF
6649/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006650
6651#define _LARGEFILE_SOURCE 1
6652#define _FILE_OFFSET_BITS 64
6653#include <sys/resource.h>
6654
Martin v. Löwis399a6892002-10-04 10:22:02 +00006655int
6656main ()
6657{
6658struct rlimit foo;
6659 ;
6660 return 0;
6661}
6662_ACEOF
6663rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006664if { (ac_try="$ac_compile"
6665case "(($ac_try" in
6666 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6667 *) ac_try_echo=$ac_try;;
6668esac
6669eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6670 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00006671 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006672 grep -v '^ *+' conftest.er1 >conftest.err
6673 rm -f conftest.er1
6674 cat conftest.err >&5
Martin v. Löwis399a6892002-10-04 10:22:02 +00006675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6676 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006677 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
6678 { (case "(($ac_try" in
6679 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6680 *) ac_try_echo=$ac_try;;
6681esac
6682eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6683 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006684 ac_status=$?
6685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6686 (exit $ac_status); }; } &&
6687 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006688 { (case "(($ac_try" in
6689 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6690 *) ac_try_echo=$ac_try;;
6691esac
6692eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6693 (eval "$ac_try") 2>&5
Martin v. Löwis399a6892002-10-04 10:22:02 +00006694 ac_status=$?
6695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6696 (exit $ac_status); }; }; then
6697 sol_lfs_bug=no
6698else
6699 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006700sed 's/^/| /' conftest.$ac_ext >&5
6701
Thomas Wouters477c8d52006-05-27 19:21:47 +00006702 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006703fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00006704
Skip Montanarof0d5f792004-08-15 14:08:23 +00006705rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +00006706{ echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
6707echo "${ECHO_T}$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006708if test "$sol_lfs_bug" = "yes"; then
6709 use_lfs=no
6710fi
6711
6712if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006713# Two defines needed to enable largefile support on various platforms
6714# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006715
Martin v. Löwis11437992002-04-12 09:54:03 +00006716cat >>confdefs.h <<\_ACEOF
6717#define _LARGEFILE_SOURCE 1
6718_ACEOF
6719
6720
6721cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006722#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00006723_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006724
Martin v. Löwis399a6892002-10-04 10:22:02 +00006725fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006726
Guido van Rossum84e7b241996-08-19 21:59:00 +00006727# Add some code to confdefs.h so that the test for off_t works on SCO
6728cat >> confdefs.h <<\EOF
6729#if defined(SCO_DS)
6730#undef _OFF_T
6731#endif
6732EOF
6733
Guido van Rossumef2255b2000-03-10 22:30:29 +00006734# Type availability checks
Thomas Wouters477c8d52006-05-27 19:21:47 +00006735{ echo "$as_me:$LINENO: checking for mode_t" >&5
6736echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006737if test "${ac_cv_type_mode_t+set}" = set; then
6738 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006739else
Martin v. Löwis11437992002-04-12 09:54:03 +00006740 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006741/* confdefs.h. */
6742_ACEOF
6743cat confdefs.h >>conftest.$ac_ext
6744cat >>conftest.$ac_ext <<_ACEOF
6745/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006746$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00006747typedef mode_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006748int
6749main ()
6750{
Thomas Wouters477c8d52006-05-27 19:21:47 +00006751if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006752 return 0;
Thomas Wouters477c8d52006-05-27 19:21:47 +00006753if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006754 return 0;
6755 ;
6756 return 0;
6757}
6758_ACEOF
6759rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006760if { (ac_try="$ac_compile"
6761case "(($ac_try" in
6762 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6763 *) ac_try_echo=$ac_try;;
6764esac
6765eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6766 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006767 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006768 grep -v '^ *+' conftest.er1 >conftest.err
6769 rm -f conftest.er1
6770 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6772 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006773 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
6774 { (case "(($ac_try" in
6775 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6776 *) ac_try_echo=$ac_try;;
6777esac
6778eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6779 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006780 ac_status=$?
6781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6782 (exit $ac_status); }; } &&
6783 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006784 { (case "(($ac_try" in
6785 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6786 *) ac_try_echo=$ac_try;;
6787esac
6788eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6789 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006790 ac_status=$?
6791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6792 (exit $ac_status); }; }; then
Jack Jansendd19cf82001-12-06 22:36:17 +00006793 ac_cv_type_mode_t=yes
6794else
Martin v. Löwis11437992002-04-12 09:54:03 +00006795 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006796sed 's/^/| /' conftest.$ac_ext >&5
6797
Thomas Wouters477c8d52006-05-27 19:21:47 +00006798 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00006799fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00006800
Skip Montanarof0d5f792004-08-15 14:08:23 +00006801rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006802fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00006803{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
6804echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006805if test $ac_cv_type_mode_t = yes; then
6806 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006807else
Martin v. Löwis11437992002-04-12 09:54:03 +00006808
6809cat >>confdefs.h <<_ACEOF
6810#define mode_t int
6811_ACEOF
6812
6813fi
6814
Thomas Wouters477c8d52006-05-27 19:21:47 +00006815{ echo "$as_me:$LINENO: checking for off_t" >&5
6816echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006817if test "${ac_cv_type_off_t+set}" = set; then
6818 echo $ECHO_N "(cached) $ECHO_C" >&6
6819else
6820 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006821/* confdefs.h. */
6822_ACEOF
6823cat confdefs.h >>conftest.$ac_ext
6824cat >>conftest.$ac_ext <<_ACEOF
6825/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006826$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00006827typedef off_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006828int
6829main ()
6830{
Thomas Wouters477c8d52006-05-27 19:21:47 +00006831if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006832 return 0;
Thomas Wouters477c8d52006-05-27 19:21:47 +00006833if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006834 return 0;
6835 ;
6836 return 0;
6837}
6838_ACEOF
6839rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006840if { (ac_try="$ac_compile"
6841case "(($ac_try" in
6842 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6843 *) ac_try_echo=$ac_try;;
6844esac
6845eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6846 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006847 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006848 grep -v '^ *+' conftest.er1 >conftest.err
6849 rm -f conftest.er1
6850 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6852 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006853 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
6854 { (case "(($ac_try" in
6855 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6856 *) ac_try_echo=$ac_try;;
6857esac
6858eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6859 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006860 ac_status=$?
6861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6862 (exit $ac_status); }; } &&
6863 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006864 { (case "(($ac_try" in
6865 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6866 *) ac_try_echo=$ac_try;;
6867esac
6868eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6869 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006870 ac_status=$?
6871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6872 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006873 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006874else
Martin v. Löwis11437992002-04-12 09:54:03 +00006875 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006876sed 's/^/| /' conftest.$ac_ext >&5
6877
Thomas Wouters477c8d52006-05-27 19:21:47 +00006878 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006879fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00006880
Skip Montanarof0d5f792004-08-15 14:08:23 +00006881rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006882fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00006883{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6884echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006885if test $ac_cv_type_off_t = yes; then
6886 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006887else
Martin v. Löwis11437992002-04-12 09:54:03 +00006888
6889cat >>confdefs.h <<_ACEOF
Thomas Wouters477c8d52006-05-27 19:21:47 +00006890#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006891_ACEOF
6892
6893fi
6894
Thomas Wouters477c8d52006-05-27 19:21:47 +00006895{ echo "$as_me:$LINENO: checking for pid_t" >&5
6896echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006897if test "${ac_cv_type_pid_t+set}" = set; then
6898 echo $ECHO_N "(cached) $ECHO_C" >&6
6899else
6900 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006901/* confdefs.h. */
6902_ACEOF
6903cat confdefs.h >>conftest.$ac_ext
6904cat >>conftest.$ac_ext <<_ACEOF
6905/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006906$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00006907typedef pid_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006908int
6909main ()
6910{
Thomas Wouters477c8d52006-05-27 19:21:47 +00006911if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006912 return 0;
Thomas Wouters477c8d52006-05-27 19:21:47 +00006913if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006914 return 0;
6915 ;
6916 return 0;
6917}
6918_ACEOF
6919rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006920if { (ac_try="$ac_compile"
6921case "(($ac_try" in
6922 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6923 *) ac_try_echo=$ac_try;;
6924esac
6925eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6926 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006927 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006928 grep -v '^ *+' conftest.er1 >conftest.err
6929 rm -f conftest.er1
6930 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6932 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006933 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
6934 { (case "(($ac_try" in
6935 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6936 *) ac_try_echo=$ac_try;;
6937esac
6938eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6939 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006940 ac_status=$?
6941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6942 (exit $ac_status); }; } &&
6943 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006944 { (case "(($ac_try" in
6945 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6946 *) ac_try_echo=$ac_try;;
6947esac
6948eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6949 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006950 ac_status=$?
6951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6952 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006953 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006954else
Martin v. Löwis11437992002-04-12 09:54:03 +00006955 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006956sed 's/^/| /' conftest.$ac_ext >&5
6957
Thomas Wouters477c8d52006-05-27 19:21:47 +00006958 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006959fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00006960
Skip Montanarof0d5f792004-08-15 14:08:23 +00006961rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006962fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00006963{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
6964echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006965if test $ac_cv_type_pid_t = yes; then
6966 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006967else
Martin v. Löwis11437992002-04-12 09:54:03 +00006968
6969cat >>confdefs.h <<_ACEOF
6970#define pid_t int
6971_ACEOF
6972
6973fi
6974
Thomas Wouters477c8d52006-05-27 19:21:47 +00006975{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
6976echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006977if test "${ac_cv_type_signal+set}" = set; then
6978 echo $ECHO_N "(cached) $ECHO_C" >&6
6979else
6980 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006981/* confdefs.h. */
6982_ACEOF
6983cat confdefs.h >>conftest.$ac_ext
6984cat >>conftest.$ac_ext <<_ACEOF
6985/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00006986#include <sys/types.h>
6987#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006988
Martin v. Löwis11437992002-04-12 09:54:03 +00006989int
6990main ()
6991{
Thomas Wouters477c8d52006-05-27 19:21:47 +00006992return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00006993 ;
6994 return 0;
6995}
6996_ACEOF
6997rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006998if { (ac_try="$ac_compile"
6999case "(($ac_try" in
7000 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7001 *) ac_try_echo=$ac_try;;
7002esac
7003eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7004 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007005 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007006 grep -v '^ *+' conftest.er1 >conftest.err
7007 rm -f conftest.er1
7008 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7010 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007011 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7012 { (case "(($ac_try" in
7013 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7014 *) ac_try_echo=$ac_try;;
7015esac
7016eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7017 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007018 ac_status=$?
7019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7020 (exit $ac_status); }; } &&
7021 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007022 { (case "(($ac_try" in
7023 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7024 *) ac_try_echo=$ac_try;;
7025esac
7026eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7027 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007028 ac_status=$?
7029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7030 (exit $ac_status); }; }; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00007031 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00007032else
Martin v. Löwis11437992002-04-12 09:54:03 +00007033 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007034sed 's/^/| /' conftest.$ac_ext >&5
7035
Thomas Wouters477c8d52006-05-27 19:21:47 +00007036 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00007037fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00007038
Skip Montanarof0d5f792004-08-15 14:08:23 +00007039rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007040fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00007041{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
7042echo "${ECHO_T}$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007043
Martin v. Löwis11437992002-04-12 09:54:03 +00007044cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007045#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00007046_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007047
Michael W. Hudson54241132001-12-07 15:38:26 +00007048
Thomas Wouters477c8d52006-05-27 19:21:47 +00007049{ echo "$as_me:$LINENO: checking for size_t" >&5
7050echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007051if test "${ac_cv_type_size_t+set}" = set; then
7052 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007053else
Martin v. Löwis11437992002-04-12 09:54:03 +00007054 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007055/* confdefs.h. */
7056_ACEOF
7057cat confdefs.h >>conftest.$ac_ext
7058cat >>conftest.$ac_ext <<_ACEOF
7059/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007060$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00007061typedef size_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007062int
7063main ()
7064{
Thomas Wouters477c8d52006-05-27 19:21:47 +00007065if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007066 return 0;
Thomas Wouters477c8d52006-05-27 19:21:47 +00007067if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00007068 return 0;
7069 ;
7070 return 0;
7071}
7072_ACEOF
7073rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007074if { (ac_try="$ac_compile"
7075case "(($ac_try" in
7076 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7077 *) ac_try_echo=$ac_try;;
7078esac
7079eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7080 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007081 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007082 grep -v '^ *+' conftest.er1 >conftest.err
7083 rm -f conftest.er1
7084 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007085 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7086 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007087 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7088 { (case "(($ac_try" in
7089 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7090 *) ac_try_echo=$ac_try;;
7091esac
7092eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7093 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007094 ac_status=$?
7095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7096 (exit $ac_status); }; } &&
7097 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007098 { (case "(($ac_try" in
7099 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7100 *) ac_try_echo=$ac_try;;
7101esac
7102eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7103 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007104 ac_status=$?
7105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7106 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00007107 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007108else
Martin v. Löwis11437992002-04-12 09:54:03 +00007109 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007110sed 's/^/| /' conftest.$ac_ext >&5
7111
Thomas Wouters477c8d52006-05-27 19:21:47 +00007112 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007113fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00007114
Skip Montanarof0d5f792004-08-15 14:08:23 +00007115rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007116fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00007117{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
7118echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007119if test $ac_cv_type_size_t = yes; then
7120 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007121else
Martin v. Löwis11437992002-04-12 09:54:03 +00007122
7123cat >>confdefs.h <<_ACEOF
Thomas Wouters477c8d52006-05-27 19:21:47 +00007124#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007125_ACEOF
7126
7127fi
7128
Thomas Wouters477c8d52006-05-27 19:21:47 +00007129{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
7130echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007131if test "${ac_cv_type_uid_t+set}" = set; then
7132 echo $ECHO_N "(cached) $ECHO_C" >&6
7133else
7134 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007135/* confdefs.h. */
7136_ACEOF
7137cat confdefs.h >>conftest.$ac_ext
7138cat >>conftest.$ac_ext <<_ACEOF
7139/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007140#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007141
7142_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007143if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00007144 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007145 ac_cv_type_uid_t=yes
7146else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007147 ac_cv_type_uid_t=no
7148fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007149rm -f conftest*
7150
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007151fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00007152{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
7153echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007154if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007155
Martin v. Löwis11437992002-04-12 09:54:03 +00007156cat >>confdefs.h <<\_ACEOF
7157#define uid_t int
7158_ACEOF
7159
7160
7161cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007162#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00007163_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007164
7165fi
7166
Thomas Wouters477c8d52006-05-27 19:21:47 +00007167{ echo "$as_me:$LINENO: checking for ssize_t" >&5
7168echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00007169if test "${ac_cv_type_ssize_t+set}" = set; then
7170 echo $ECHO_N "(cached) $ECHO_C" >&6
7171else
7172 cat >conftest.$ac_ext <<_ACEOF
7173/* confdefs.h. */
7174_ACEOF
7175cat confdefs.h >>conftest.$ac_ext
7176cat >>conftest.$ac_ext <<_ACEOF
7177/* end confdefs.h. */
7178$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00007179typedef ssize_t ac__type_new_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00007180int
7181main ()
7182{
Thomas Wouters477c8d52006-05-27 19:21:47 +00007183if ((ac__type_new_ *) 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +00007184 return 0;
Thomas Wouters477c8d52006-05-27 19:21:47 +00007185if (sizeof (ac__type_new_))
Martin v. Löwis18e16552006-02-15 17:27:45 +00007186 return 0;
7187 ;
7188 return 0;
7189}
7190_ACEOF
7191rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007192if { (ac_try="$ac_compile"
7193case "(($ac_try" in
7194 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7195 *) ac_try_echo=$ac_try;;
7196esac
7197eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7198 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00007199 ac_status=$?
7200 grep -v '^ *+' conftest.er1 >conftest.err
7201 rm -f conftest.er1
7202 cat conftest.err >&5
7203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7204 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007205 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7206 { (case "(($ac_try" in
7207 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7208 *) ac_try_echo=$ac_try;;
7209esac
7210eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7211 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +00007212 ac_status=$?
7213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7214 (exit $ac_status); }; } &&
7215 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007216 { (case "(($ac_try" in
7217 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7218 *) ac_try_echo=$ac_try;;
7219esac
7220eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7221 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +00007222 ac_status=$?
7223 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7224 (exit $ac_status); }; }; then
7225 ac_cv_type_ssize_t=yes
7226else
7227 echo "$as_me: failed program was:" >&5
7228sed 's/^/| /' conftest.$ac_ext >&5
7229
Thomas Wouters477c8d52006-05-27 19:21:47 +00007230 ac_cv_type_ssize_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00007231fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00007232
Martin v. Löwis18e16552006-02-15 17:27:45 +00007233rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7234fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00007235{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
7236echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00007237if test $ac_cv_type_ssize_t = yes; then
7238
7239cat >>confdefs.h <<\_ACEOF
7240#define HAVE_SSIZE_T 1
7241_ACEOF
7242
7243fi
7244
Jack Jansendd19cf82001-12-06 22:36:17 +00007245
Michael W. Hudson54241132001-12-07 15:38:26 +00007246# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007247# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters477c8d52006-05-27 19:21:47 +00007248{ echo "$as_me:$LINENO: checking for int" >&5
7249echo $ECHO_N "checking for int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007250if test "${ac_cv_type_int+set}" = set; then
7251 echo $ECHO_N "(cached) $ECHO_C" >&6
7252else
7253 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007254/* confdefs.h. */
7255_ACEOF
7256cat confdefs.h >>conftest.$ac_ext
7257cat >>conftest.$ac_ext <<_ACEOF
7258/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007259$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00007260typedef int ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007261int
7262main ()
7263{
Thomas Wouters477c8d52006-05-27 19:21:47 +00007264if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007265 return 0;
Thomas Wouters477c8d52006-05-27 19:21:47 +00007266if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00007267 return 0;
7268 ;
7269 return 0;
7270}
7271_ACEOF
7272rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007273if { (ac_try="$ac_compile"
7274case "(($ac_try" in
7275 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7276 *) ac_try_echo=$ac_try;;
7277esac
7278eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7279 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007280 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007281 grep -v '^ *+' conftest.er1 >conftest.err
7282 rm -f conftest.er1
7283 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7285 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007286 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7287 { (case "(($ac_try" in
7288 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7289 *) ac_try_echo=$ac_try;;
7290esac
7291eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7292 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007293 ac_status=$?
7294 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7295 (exit $ac_status); }; } &&
7296 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007297 { (case "(($ac_try" in
7298 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7299 *) ac_try_echo=$ac_try;;
7300esac
7301eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7302 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007303 ac_status=$?
7304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7305 (exit $ac_status); }; }; then
7306 ac_cv_type_int=yes
7307else
7308 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007309sed 's/^/| /' conftest.$ac_ext >&5
7310
Thomas Wouters477c8d52006-05-27 19:21:47 +00007311 ac_cv_type_int=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007312fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00007313
Skip Montanarof0d5f792004-08-15 14:08:23 +00007314rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007315fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00007316{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
7317echo "${ECHO_T}$ac_cv_type_int" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007318
Thomas Wouters477c8d52006-05-27 19:21:47 +00007319{ echo "$as_me:$LINENO: checking size of int" >&5
7320echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007321if test "${ac_cv_sizeof_int+set}" = set; then
7322 echo $ECHO_N "(cached) $ECHO_C" >&6
7323else
7324 if test "$ac_cv_type_int" = yes; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00007325 # The cast to long int works around a bug in the HP C Compiler
Martin v. Löwis11437992002-04-12 09:54:03 +00007326 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7327 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7328 # This bug is HP SR number 8606223364.
7329 if test "$cross_compiling" = yes; then
7330 # Depending upon the size, compute the lo and hi bounds.
7331cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007332/* confdefs.h. */
7333_ACEOF
7334cat confdefs.h >>conftest.$ac_ext
7335cat >>conftest.$ac_ext <<_ACEOF
7336/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007337$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00007338 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007339int
7340main ()
7341{
Thomas Wouters477c8d52006-05-27 19:21:47 +00007342static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007343test_array [0] = 0
7344
7345 ;
7346 return 0;
7347}
7348_ACEOF
7349rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007350if { (ac_try="$ac_compile"
7351case "(($ac_try" in
7352 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7353 *) ac_try_echo=$ac_try;;
7354esac
7355eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7356 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007357 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007358 grep -v '^ *+' conftest.er1 >conftest.err
7359 rm -f conftest.er1
7360 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7362 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007363 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7364 { (case "(($ac_try" in
7365 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7366 *) ac_try_echo=$ac_try;;
7367esac
7368eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7369 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007370 ac_status=$?
7371 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7372 (exit $ac_status); }; } &&
7373 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007374 { (case "(($ac_try" in
7375 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7376 *) ac_try_echo=$ac_try;;
7377esac
7378eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7379 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007380 ac_status=$?
7381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7382 (exit $ac_status); }; }; then
7383 ac_lo=0 ac_mid=0
7384 while :; do
7385 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007386/* confdefs.h. */
7387_ACEOF
7388cat confdefs.h >>conftest.$ac_ext
7389cat >>conftest.$ac_ext <<_ACEOF
7390/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007391$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00007392 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007393int
7394main ()
7395{
Thomas Wouters477c8d52006-05-27 19:21:47 +00007396static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007397test_array [0] = 0
7398
7399 ;
7400 return 0;
7401}
7402_ACEOF
7403rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007404if { (ac_try="$ac_compile"
7405case "(($ac_try" in
7406 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7407 *) ac_try_echo=$ac_try;;
7408esac
7409eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7410 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007411 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007412 grep -v '^ *+' conftest.er1 >conftest.err
7413 rm -f conftest.er1
7414 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7416 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007417 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7418 { (case "(($ac_try" in
7419 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7420 *) ac_try_echo=$ac_try;;
7421esac
7422eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7423 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007424 ac_status=$?
7425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7426 (exit $ac_status); }; } &&
7427 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007428 { (case "(($ac_try" in
7429 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7430 *) ac_try_echo=$ac_try;;
7431esac
7432eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7433 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007434 ac_status=$?
7435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7436 (exit $ac_status); }; }; then
7437 ac_hi=$ac_mid; break
7438else
7439 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007440sed 's/^/| /' conftest.$ac_ext >&5
7441
Thomas Wouters477c8d52006-05-27 19:21:47 +00007442 ac_lo=`expr $ac_mid + 1`
7443 if test $ac_lo -le $ac_mid; then
7444 ac_lo= ac_hi=
7445 break
7446 fi
7447 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007448fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00007449
Skip Montanarof0d5f792004-08-15 14:08:23 +00007450rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007451 done
7452else
7453 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007454sed 's/^/| /' conftest.$ac_ext >&5
7455
Thomas Wouters477c8d52006-05-27 19:21:47 +00007456 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007457/* confdefs.h. */
7458_ACEOF
7459cat confdefs.h >>conftest.$ac_ext
7460cat >>conftest.$ac_ext <<_ACEOF
7461/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007462$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00007463 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007464int
7465main ()
7466{
Thomas Wouters477c8d52006-05-27 19:21:47 +00007467static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007468test_array [0] = 0
7469
7470 ;
7471 return 0;
7472}
7473_ACEOF
7474rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007475if { (ac_try="$ac_compile"
7476case "(($ac_try" in
7477 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7478 *) ac_try_echo=$ac_try;;
7479esac
7480eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7481 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007482 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007483 grep -v '^ *+' conftest.er1 >conftest.err
7484 rm -f conftest.er1
7485 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7487 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007488 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7489 { (case "(($ac_try" in
7490 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7491 *) ac_try_echo=$ac_try;;
7492esac
7493eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7494 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007495 ac_status=$?
7496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7497 (exit $ac_status); }; } &&
7498 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007499 { (case "(($ac_try" in
7500 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7501 *) ac_try_echo=$ac_try;;
7502esac
7503eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7504 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007505 ac_status=$?
7506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7507 (exit $ac_status); }; }; then
7508 ac_hi=-1 ac_mid=-1
7509 while :; do
7510 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007511/* confdefs.h. */
7512_ACEOF
7513cat confdefs.h >>conftest.$ac_ext
7514cat >>conftest.$ac_ext <<_ACEOF
7515/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007516$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00007517 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007518int
7519main ()
7520{
Thomas Wouters477c8d52006-05-27 19:21:47 +00007521static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007522test_array [0] = 0
7523
7524 ;
7525 return 0;
7526}
7527_ACEOF
7528rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007529if { (ac_try="$ac_compile"
7530case "(($ac_try" in
7531 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7532 *) ac_try_echo=$ac_try;;
7533esac
7534eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7535 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007536 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007537 grep -v '^ *+' conftest.er1 >conftest.err
7538 rm -f conftest.er1
7539 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7541 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007542 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7543 { (case "(($ac_try" in
7544 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7545 *) ac_try_echo=$ac_try;;
7546esac
7547eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7548 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007549 ac_status=$?
7550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7551 (exit $ac_status); }; } &&
7552 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007553 { (case "(($ac_try" in
7554 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7555 *) ac_try_echo=$ac_try;;
7556esac
7557eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7558 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007559 ac_status=$?
7560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7561 (exit $ac_status); }; }; then
7562 ac_lo=$ac_mid; break
7563else
7564 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007565sed 's/^/| /' conftest.$ac_ext >&5
7566
Thomas Wouters477c8d52006-05-27 19:21:47 +00007567 ac_hi=`expr '(' $ac_mid ')' - 1`
7568 if test $ac_mid -le $ac_hi; then
7569 ac_lo= ac_hi=
7570 break
7571 fi
7572 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007573fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00007574
Skip Montanarof0d5f792004-08-15 14:08:23 +00007575rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007576 done
7577else
7578 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007579sed 's/^/| /' conftest.$ac_ext >&5
7580
Thomas Wouters477c8d52006-05-27 19:21:47 +00007581 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007582fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00007583
Skip Montanarof0d5f792004-08-15 14:08:23 +00007584rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007585fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00007586
Skip Montanarof0d5f792004-08-15 14:08:23 +00007587rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007588# Binary search between lo and hi bounds.
7589while test "x$ac_lo" != "x$ac_hi"; do
7590 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7591 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007592/* confdefs.h. */
7593_ACEOF
7594cat confdefs.h >>conftest.$ac_ext
7595cat >>conftest.$ac_ext <<_ACEOF
7596/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007597$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00007598 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007599int
7600main ()
7601{
Thomas Wouters477c8d52006-05-27 19:21:47 +00007602static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007603test_array [0] = 0
7604
7605 ;
7606 return 0;
7607}
7608_ACEOF
7609rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007610if { (ac_try="$ac_compile"
7611case "(($ac_try" in
7612 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7613 *) ac_try_echo=$ac_try;;
7614esac
7615eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7616 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007617 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007618 grep -v '^ *+' conftest.er1 >conftest.err
7619 rm -f conftest.er1
7620 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7622 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007623 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7624 { (case "(($ac_try" in
7625 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7626 *) ac_try_echo=$ac_try;;
7627esac
7628eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7629 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007630 ac_status=$?
7631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7632 (exit $ac_status); }; } &&
7633 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007634 { (case "(($ac_try" in
7635 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7636 *) ac_try_echo=$ac_try;;
7637esac
7638eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7639 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007640 ac_status=$?
7641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7642 (exit $ac_status); }; }; then
7643 ac_hi=$ac_mid
7644else
7645 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007646sed 's/^/| /' conftest.$ac_ext >&5
7647
Thomas Wouters477c8d52006-05-27 19:21:47 +00007648 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007649fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00007650
Skip Montanarof0d5f792004-08-15 14:08:23 +00007651rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007652done
7653case $ac_lo in
7654?*) ac_cv_sizeof_int=$ac_lo;;
Thomas Wouters477c8d52006-05-27 19:21:47 +00007655'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007656See \`config.log' for more details." >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +00007657echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007658See \`config.log' for more details." >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +00007659 { (exit 77); exit 77; }; } ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007660esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007661else
Martin v. Löwis11437992002-04-12 09:54:03 +00007662 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007663/* confdefs.h. */
7664_ACEOF
7665cat confdefs.h >>conftest.$ac_ext
7666cat >>conftest.$ac_ext <<_ACEOF
7667/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007668$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00007669 typedef int ac__type_sizeof_;
7670static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7671static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007672#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007673#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007674int
7675main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007676{
Martin v. Löwis11437992002-04-12 09:54:03 +00007677
7678 FILE *f = fopen ("conftest.val", "w");
7679 if (! f)
Thomas Wouters477c8d52006-05-27 19:21:47 +00007680 return 1;
7681 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007682 {
Thomas Wouters477c8d52006-05-27 19:21:47 +00007683 long int i = longval ();
7684 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7685 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007686 fprintf (f, "%ld\n", i);
7687 }
7688 else
7689 {
Thomas Wouters477c8d52006-05-27 19:21:47 +00007690 unsigned long int i = ulongval ();
7691 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7692 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007693 fprintf (f, "%lu\n", i);
7694 }
Thomas Wouters477c8d52006-05-27 19:21:47 +00007695 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007696
7697 ;
7698 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007699}
Martin v. Löwis11437992002-04-12 09:54:03 +00007700_ACEOF
7701rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007702if { (ac_try="$ac_link"
7703case "(($ac_try" in
7704 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7705 *) ac_try_echo=$ac_try;;
7706esac
7707eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7708 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007709 ac_status=$?
7710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7711 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007712 { (case "(($ac_try" in
7713 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7714 *) ac_try_echo=$ac_try;;
7715esac
7716eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7717 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007718 ac_status=$?
7719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7720 (exit $ac_status); }; }; then
7721 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007722else
Martin v. Löwis11437992002-04-12 09:54:03 +00007723 echo "$as_me: program exited with status $ac_status" >&5
7724echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007725sed 's/^/| /' conftest.$ac_ext >&5
7726
Martin v. Löwis11437992002-04-12 09:54:03 +00007727( exit $ac_status )
Thomas Wouters477c8d52006-05-27 19:21:47 +00007728{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007729See \`config.log' for more details." >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +00007730echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007731See \`config.log' for more details." >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +00007732 { (exit 77); exit 77; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007733fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00007734rm -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 +00007735fi
7736rm -f conftest.val
7737else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007738 ac_cv_sizeof_int=0
7739fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007740fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00007741{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
7742echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007743cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007744#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007745_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007746
7747
Thomas Wouters477c8d52006-05-27 19:21:47 +00007748{ echo "$as_me:$LINENO: checking for long" >&5
7749echo $ECHO_N "checking for long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007750if test "${ac_cv_type_long+set}" = set; then
7751 echo $ECHO_N "(cached) $ECHO_C" >&6
7752else
7753 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007754/* confdefs.h. */
7755_ACEOF
7756cat confdefs.h >>conftest.$ac_ext
7757cat >>conftest.$ac_ext <<_ACEOF
7758/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007759$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00007760typedef long ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007761int
7762main ()
7763{
Thomas Wouters477c8d52006-05-27 19:21:47 +00007764if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007765 return 0;
Thomas Wouters477c8d52006-05-27 19:21:47 +00007766if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00007767 return 0;
7768 ;
7769 return 0;
7770}
7771_ACEOF
7772rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007773if { (ac_try="$ac_compile"
7774case "(($ac_try" in
7775 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7776 *) ac_try_echo=$ac_try;;
7777esac
7778eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7779 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007780 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007781 grep -v '^ *+' conftest.er1 >conftest.err
7782 rm -f conftest.er1
7783 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7785 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007786 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7787 { (case "(($ac_try" in
7788 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7789 *) ac_try_echo=$ac_try;;
7790esac
7791eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7792 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007793 ac_status=$?
7794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7795 (exit $ac_status); }; } &&
7796 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007797 { (case "(($ac_try" in
7798 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7799 *) ac_try_echo=$ac_try;;
7800esac
7801eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7802 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007803 ac_status=$?
7804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7805 (exit $ac_status); }; }; then
7806 ac_cv_type_long=yes
7807else
7808 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007809sed 's/^/| /' conftest.$ac_ext >&5
7810
Thomas Wouters477c8d52006-05-27 19:21:47 +00007811 ac_cv_type_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007812fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00007813
Skip Montanarof0d5f792004-08-15 14:08:23 +00007814rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007815fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00007816{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
7817echo "${ECHO_T}$ac_cv_type_long" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007818
Thomas Wouters477c8d52006-05-27 19:21:47 +00007819{ echo "$as_me:$LINENO: checking size of long" >&5
7820echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007821if test "${ac_cv_sizeof_long+set}" = set; then
7822 echo $ECHO_N "(cached) $ECHO_C" >&6
7823else
7824 if test "$ac_cv_type_long" = yes; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00007825 # The cast to long int works around a bug in the HP C Compiler
Martin v. Löwis11437992002-04-12 09:54:03 +00007826 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7827 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7828 # This bug is HP SR number 8606223364.
7829 if test "$cross_compiling" = yes; then
7830 # Depending upon the size, compute the lo and hi bounds.
7831cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007832/* confdefs.h. */
7833_ACEOF
7834cat confdefs.h >>conftest.$ac_ext
7835cat >>conftest.$ac_ext <<_ACEOF
7836/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007837$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00007838 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007839int
7840main ()
7841{
Thomas Wouters477c8d52006-05-27 19:21:47 +00007842static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007843test_array [0] = 0
7844
7845 ;
7846 return 0;
7847}
7848_ACEOF
7849rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007850if { (ac_try="$ac_compile"
7851case "(($ac_try" in
7852 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7853 *) ac_try_echo=$ac_try;;
7854esac
7855eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7856 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007857 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007858 grep -v '^ *+' conftest.er1 >conftest.err
7859 rm -f conftest.er1
7860 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7862 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007863 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7864 { (case "(($ac_try" in
7865 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7866 *) ac_try_echo=$ac_try;;
7867esac
7868eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7869 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007870 ac_status=$?
7871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7872 (exit $ac_status); }; } &&
7873 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007874 { (case "(($ac_try" in
7875 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7876 *) ac_try_echo=$ac_try;;
7877esac
7878eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7879 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007880 ac_status=$?
7881 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7882 (exit $ac_status); }; }; then
7883 ac_lo=0 ac_mid=0
7884 while :; do
7885 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007886/* confdefs.h. */
7887_ACEOF
7888cat confdefs.h >>conftest.$ac_ext
7889cat >>conftest.$ac_ext <<_ACEOF
7890/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007891$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00007892 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007893int
7894main ()
7895{
Thomas Wouters477c8d52006-05-27 19:21:47 +00007896static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007897test_array [0] = 0
7898
7899 ;
7900 return 0;
7901}
7902_ACEOF
7903rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007904if { (ac_try="$ac_compile"
7905case "(($ac_try" in
7906 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7907 *) ac_try_echo=$ac_try;;
7908esac
7909eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7910 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007911 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007912 grep -v '^ *+' conftest.er1 >conftest.err
7913 rm -f conftest.er1
7914 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7916 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007917 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7918 { (case "(($ac_try" in
7919 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7920 *) ac_try_echo=$ac_try;;
7921esac
7922eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7923 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007924 ac_status=$?
7925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7926 (exit $ac_status); }; } &&
7927 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007928 { (case "(($ac_try" in
7929 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7930 *) ac_try_echo=$ac_try;;
7931esac
7932eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7933 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007934 ac_status=$?
7935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7936 (exit $ac_status); }; }; then
7937 ac_hi=$ac_mid; break
7938else
7939 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007940sed 's/^/| /' conftest.$ac_ext >&5
7941
Thomas Wouters477c8d52006-05-27 19:21:47 +00007942 ac_lo=`expr $ac_mid + 1`
7943 if test $ac_lo -le $ac_mid; then
7944 ac_lo= ac_hi=
7945 break
7946 fi
7947 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007948fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00007949
Skip Montanarof0d5f792004-08-15 14:08:23 +00007950rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007951 done
7952else
7953 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007954sed 's/^/| /' conftest.$ac_ext >&5
7955
Thomas Wouters477c8d52006-05-27 19:21:47 +00007956 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007957/* confdefs.h. */
7958_ACEOF
7959cat confdefs.h >>conftest.$ac_ext
7960cat >>conftest.$ac_ext <<_ACEOF
7961/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007962$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00007963 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007964int
7965main ()
7966{
Thomas Wouters477c8d52006-05-27 19:21:47 +00007967static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007968test_array [0] = 0
7969
7970 ;
7971 return 0;
7972}
7973_ACEOF
7974rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007975if { (ac_try="$ac_compile"
7976case "(($ac_try" in
7977 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7978 *) ac_try_echo=$ac_try;;
7979esac
7980eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7981 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007982 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007983 grep -v '^ *+' conftest.er1 >conftest.err
7984 rm -f conftest.er1
7985 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7987 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007988 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7989 { (case "(($ac_try" in
7990 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7991 *) ac_try_echo=$ac_try;;
7992esac
7993eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7994 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007995 ac_status=$?
7996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7997 (exit $ac_status); }; } &&
7998 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007999 { (case "(($ac_try" in
8000 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8001 *) ac_try_echo=$ac_try;;
8002esac
8003eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8004 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008005 ac_status=$?
8006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8007 (exit $ac_status); }; }; then
8008 ac_hi=-1 ac_mid=-1
8009 while :; do
8010 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008011/* confdefs.h. */
8012_ACEOF
8013cat confdefs.h >>conftest.$ac_ext
8014cat >>conftest.$ac_ext <<_ACEOF
8015/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008016$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00008017 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008018int
8019main ()
8020{
Thomas Wouters477c8d52006-05-27 19:21:47 +00008021static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008022test_array [0] = 0
8023
8024 ;
8025 return 0;
8026}
8027_ACEOF
8028rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008029if { (ac_try="$ac_compile"
8030case "(($ac_try" in
8031 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8032 *) ac_try_echo=$ac_try;;
8033esac
8034eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8035 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008036 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008037 grep -v '^ *+' conftest.er1 >conftest.err
8038 rm -f conftest.er1
8039 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8041 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008042 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
8043 { (case "(($ac_try" in
8044 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8045 *) ac_try_echo=$ac_try;;
8046esac
8047eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8048 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008049 ac_status=$?
8050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8051 (exit $ac_status); }; } &&
8052 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008053 { (case "(($ac_try" in
8054 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8055 *) ac_try_echo=$ac_try;;
8056esac
8057eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8058 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008059 ac_status=$?
8060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8061 (exit $ac_status); }; }; then
8062 ac_lo=$ac_mid; break
8063else
8064 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008065sed 's/^/| /' conftest.$ac_ext >&5
8066
Thomas Wouters477c8d52006-05-27 19:21:47 +00008067 ac_hi=`expr '(' $ac_mid ')' - 1`
8068 if test $ac_mid -le $ac_hi; then
8069 ac_lo= ac_hi=
8070 break
8071 fi
8072 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008073fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00008074
Skip Montanarof0d5f792004-08-15 14:08:23 +00008075rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008076 done
8077else
8078 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008079sed 's/^/| /' conftest.$ac_ext >&5
8080
Thomas Wouters477c8d52006-05-27 19:21:47 +00008081 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008082fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00008083
Skip Montanarof0d5f792004-08-15 14:08:23 +00008084rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008085fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00008086
Skip Montanarof0d5f792004-08-15 14:08:23 +00008087rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008088# Binary search between lo and hi bounds.
8089while test "x$ac_lo" != "x$ac_hi"; do
8090 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8091 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008092/* confdefs.h. */
8093_ACEOF
8094cat confdefs.h >>conftest.$ac_ext
8095cat >>conftest.$ac_ext <<_ACEOF
8096/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008097$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00008098 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008099int
8100main ()
8101{
Thomas Wouters477c8d52006-05-27 19:21:47 +00008102static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008103test_array [0] = 0
8104
8105 ;
8106 return 0;
8107}
8108_ACEOF
8109rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008110if { (ac_try="$ac_compile"
8111case "(($ac_try" in
8112 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8113 *) ac_try_echo=$ac_try;;
8114esac
8115eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8116 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008117 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008118 grep -v '^ *+' conftest.er1 >conftest.err
8119 rm -f conftest.er1
8120 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8122 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008123 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
8124 { (case "(($ac_try" in
8125 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8126 *) ac_try_echo=$ac_try;;
8127esac
8128eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8129 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008130 ac_status=$?
8131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8132 (exit $ac_status); }; } &&
8133 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008134 { (case "(($ac_try" in
8135 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8136 *) ac_try_echo=$ac_try;;
8137esac
8138eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8139 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008140 ac_status=$?
8141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8142 (exit $ac_status); }; }; then
8143 ac_hi=$ac_mid
8144else
8145 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008146sed 's/^/| /' conftest.$ac_ext >&5
8147
Thomas Wouters477c8d52006-05-27 19:21:47 +00008148 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008149fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00008150
Skip Montanarof0d5f792004-08-15 14:08:23 +00008151rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008152done
8153case $ac_lo in
8154?*) ac_cv_sizeof_long=$ac_lo;;
Thomas Wouters477c8d52006-05-27 19:21:47 +00008155'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008156See \`config.log' for more details." >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +00008157echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008158See \`config.log' for more details." >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +00008159 { (exit 77); exit 77; }; } ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008160esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008161else
Martin v. Löwis11437992002-04-12 09:54:03 +00008162 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008163/* confdefs.h. */
8164_ACEOF
8165cat confdefs.h >>conftest.$ac_ext
8166cat >>conftest.$ac_ext <<_ACEOF
8167/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008168$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00008169 typedef long ac__type_sizeof_;
8170static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8171static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008172#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008173#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008174int
8175main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008176{
Martin v. Löwis11437992002-04-12 09:54:03 +00008177
8178 FILE *f = fopen ("conftest.val", "w");
8179 if (! f)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008180 return 1;
8181 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008182 {
Thomas Wouters477c8d52006-05-27 19:21:47 +00008183 long int i = longval ();
8184 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8185 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008186 fprintf (f, "%ld\n", i);
8187 }
8188 else
8189 {
Thomas Wouters477c8d52006-05-27 19:21:47 +00008190 unsigned long int i = ulongval ();
8191 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8192 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008193 fprintf (f, "%lu\n", i);
8194 }
Thomas Wouters477c8d52006-05-27 19:21:47 +00008195 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008196
8197 ;
8198 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008199}
Martin v. Löwis11437992002-04-12 09:54:03 +00008200_ACEOF
8201rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008202if { (ac_try="$ac_link"
8203case "(($ac_try" in
8204 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8205 *) ac_try_echo=$ac_try;;
8206esac
8207eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8208 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008209 ac_status=$?
8210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8211 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008212 { (case "(($ac_try" in
8213 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8214 *) ac_try_echo=$ac_try;;
8215esac
8216eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8217 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008218 ac_status=$?
8219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8220 (exit $ac_status); }; }; then
8221 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008222else
Martin v. Löwis11437992002-04-12 09:54:03 +00008223 echo "$as_me: program exited with status $ac_status" >&5
8224echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008225sed 's/^/| /' conftest.$ac_ext >&5
8226
Martin v. Löwis11437992002-04-12 09:54:03 +00008227( exit $ac_status )
Thomas Wouters477c8d52006-05-27 19:21:47 +00008228{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008229See \`config.log' for more details." >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +00008230echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008231See \`config.log' for more details." >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +00008232 { (exit 77); exit 77; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008233fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00008234rm -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 +00008235fi
8236rm -f conftest.val
8237else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008238 ac_cv_sizeof_long=0
8239fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008240fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00008241{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
8242echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008243cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008244#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008245_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008246
8247
Thomas Wouters477c8d52006-05-27 19:21:47 +00008248{ echo "$as_me:$LINENO: checking for void *" >&5
8249echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008250if test "${ac_cv_type_void_p+set}" = set; then
8251 echo $ECHO_N "(cached) $ECHO_C" >&6
8252else
8253 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008254/* confdefs.h. */
8255_ACEOF
8256cat confdefs.h >>conftest.$ac_ext
8257cat >>conftest.$ac_ext <<_ACEOF
8258/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008259$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00008260typedef void * ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008261int
8262main ()
8263{
Thomas Wouters477c8d52006-05-27 19:21:47 +00008264if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008265 return 0;
Thomas Wouters477c8d52006-05-27 19:21:47 +00008266if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00008267 return 0;
8268 ;
8269 return 0;
8270}
8271_ACEOF
8272rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008273if { (ac_try="$ac_compile"
8274case "(($ac_try" in
8275 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8276 *) ac_try_echo=$ac_try;;
8277esac
8278eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8279 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008280 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008281 grep -v '^ *+' conftest.er1 >conftest.err
8282 rm -f conftest.er1
8283 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8285 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008286 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
8287 { (case "(($ac_try" in
8288 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8289 *) ac_try_echo=$ac_try;;
8290esac
8291eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8292 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008293 ac_status=$?
8294 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8295 (exit $ac_status); }; } &&
8296 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008297 { (case "(($ac_try" in
8298 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8299 *) ac_try_echo=$ac_try;;
8300esac
8301eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8302 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008303 ac_status=$?
8304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8305 (exit $ac_status); }; }; then
8306 ac_cv_type_void_p=yes
8307else
8308 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008309sed 's/^/| /' conftest.$ac_ext >&5
8310
Thomas Wouters477c8d52006-05-27 19:21:47 +00008311 ac_cv_type_void_p=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008312fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00008313
Skip Montanarof0d5f792004-08-15 14:08:23 +00008314rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008315fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00008316{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
8317echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008318
Thomas Wouters477c8d52006-05-27 19:21:47 +00008319{ echo "$as_me:$LINENO: checking size of void *" >&5
8320echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008321if test "${ac_cv_sizeof_void_p+set}" = set; then
8322 echo $ECHO_N "(cached) $ECHO_C" >&6
8323else
8324 if test "$ac_cv_type_void_p" = yes; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00008325 # The cast to long int works around a bug in the HP C Compiler
Martin v. Löwis11437992002-04-12 09:54:03 +00008326 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8327 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8328 # This bug is HP SR number 8606223364.
8329 if test "$cross_compiling" = yes; then
8330 # Depending upon the size, compute the lo and hi bounds.
8331cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008332/* confdefs.h. */
8333_ACEOF
8334cat confdefs.h >>conftest.$ac_ext
8335cat >>conftest.$ac_ext <<_ACEOF
8336/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008337$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00008338 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008339int
8340main ()
8341{
Thomas Wouters477c8d52006-05-27 19:21:47 +00008342static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008343test_array [0] = 0
8344
8345 ;
8346 return 0;
8347}
8348_ACEOF
8349rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008350if { (ac_try="$ac_compile"
8351case "(($ac_try" in
8352 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8353 *) ac_try_echo=$ac_try;;
8354esac
8355eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8356 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008357 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008358 grep -v '^ *+' conftest.er1 >conftest.err
8359 rm -f conftest.er1
8360 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8362 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008363 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
8364 { (case "(($ac_try" in
8365 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8366 *) ac_try_echo=$ac_try;;
8367esac
8368eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8369 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008370 ac_status=$?
8371 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8372 (exit $ac_status); }; } &&
8373 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008374 { (case "(($ac_try" in
8375 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8376 *) ac_try_echo=$ac_try;;
8377esac
8378eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8379 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008380 ac_status=$?
8381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8382 (exit $ac_status); }; }; then
8383 ac_lo=0 ac_mid=0
8384 while :; do
8385 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008386/* confdefs.h. */
8387_ACEOF
8388cat confdefs.h >>conftest.$ac_ext
8389cat >>conftest.$ac_ext <<_ACEOF
8390/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008391$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00008392 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008393int
8394main ()
8395{
Thomas Wouters477c8d52006-05-27 19:21:47 +00008396static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008397test_array [0] = 0
8398
8399 ;
8400 return 0;
8401}
8402_ACEOF
8403rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008404if { (ac_try="$ac_compile"
8405case "(($ac_try" in
8406 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8407 *) ac_try_echo=$ac_try;;
8408esac
8409eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8410 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008411 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008412 grep -v '^ *+' conftest.er1 >conftest.err
8413 rm -f conftest.er1
8414 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8416 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008417 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
8418 { (case "(($ac_try" in
8419 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8420 *) ac_try_echo=$ac_try;;
8421esac
8422eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8423 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008424 ac_status=$?
8425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8426 (exit $ac_status); }; } &&
8427 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008428 { (case "(($ac_try" in
8429 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8430 *) ac_try_echo=$ac_try;;
8431esac
8432eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8433 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008434 ac_status=$?
8435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8436 (exit $ac_status); }; }; then
8437 ac_hi=$ac_mid; break
8438else
8439 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008440sed 's/^/| /' conftest.$ac_ext >&5
8441
Thomas Wouters477c8d52006-05-27 19:21:47 +00008442 ac_lo=`expr $ac_mid + 1`
8443 if test $ac_lo -le $ac_mid; then
8444 ac_lo= ac_hi=
8445 break
8446 fi
8447 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008448fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00008449
Skip Montanarof0d5f792004-08-15 14:08:23 +00008450rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008451 done
8452else
8453 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008454sed 's/^/| /' conftest.$ac_ext >&5
8455
Thomas Wouters477c8d52006-05-27 19:21:47 +00008456 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008457/* confdefs.h. */
8458_ACEOF
8459cat confdefs.h >>conftest.$ac_ext
8460cat >>conftest.$ac_ext <<_ACEOF
8461/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008462$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00008463 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008464int
8465main ()
8466{
Thomas Wouters477c8d52006-05-27 19:21:47 +00008467static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008468test_array [0] = 0
8469
8470 ;
8471 return 0;
8472}
8473_ACEOF
8474rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008475if { (ac_try="$ac_compile"
8476case "(($ac_try" in
8477 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8478 *) ac_try_echo=$ac_try;;
8479esac
8480eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8481 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008482 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008483 grep -v '^ *+' conftest.er1 >conftest.err
8484 rm -f conftest.er1
8485 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8487 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008488 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
8489 { (case "(($ac_try" in
8490 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8491 *) ac_try_echo=$ac_try;;
8492esac
8493eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8494 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008495 ac_status=$?
8496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8497 (exit $ac_status); }; } &&
8498 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008499 { (case "(($ac_try" in
8500 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8501 *) ac_try_echo=$ac_try;;
8502esac
8503eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8504 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008505 ac_status=$?
8506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8507 (exit $ac_status); }; }; then
8508 ac_hi=-1 ac_mid=-1
8509 while :; do
8510 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008511/* confdefs.h. */
8512_ACEOF
8513cat confdefs.h >>conftest.$ac_ext
8514cat >>conftest.$ac_ext <<_ACEOF
8515/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008516$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00008517 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008518int
8519main ()
8520{
Thomas Wouters477c8d52006-05-27 19:21:47 +00008521static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008522test_array [0] = 0
8523
8524 ;
8525 return 0;
8526}
8527_ACEOF
8528rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008529if { (ac_try="$ac_compile"
8530case "(($ac_try" in
8531 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8532 *) ac_try_echo=$ac_try;;
8533esac
8534eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8535 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008536 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008537 grep -v '^ *+' conftest.er1 >conftest.err
8538 rm -f conftest.er1
8539 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8541 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008542 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
8543 { (case "(($ac_try" in
8544 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8545 *) ac_try_echo=$ac_try;;
8546esac
8547eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8548 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008549 ac_status=$?
8550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8551 (exit $ac_status); }; } &&
8552 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008553 { (case "(($ac_try" in
8554 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8555 *) ac_try_echo=$ac_try;;
8556esac
8557eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8558 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008559 ac_status=$?
8560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8561 (exit $ac_status); }; }; then
8562 ac_lo=$ac_mid; break
8563else
8564 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008565sed 's/^/| /' conftest.$ac_ext >&5
8566
Thomas Wouters477c8d52006-05-27 19:21:47 +00008567 ac_hi=`expr '(' $ac_mid ')' - 1`
8568 if test $ac_mid -le $ac_hi; then
8569 ac_lo= ac_hi=
8570 break
8571 fi
8572 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008573fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00008574
Skip Montanarof0d5f792004-08-15 14:08:23 +00008575rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008576 done
8577else
8578 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008579sed 's/^/| /' conftest.$ac_ext >&5
8580
Thomas Wouters477c8d52006-05-27 19:21:47 +00008581 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008582fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00008583
Skip Montanarof0d5f792004-08-15 14:08:23 +00008584rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008585fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00008586
Skip Montanarof0d5f792004-08-15 14:08:23 +00008587rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008588# Binary search between lo and hi bounds.
8589while test "x$ac_lo" != "x$ac_hi"; do
8590 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8591 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008592/* confdefs.h. */
8593_ACEOF
8594cat confdefs.h >>conftest.$ac_ext
8595cat >>conftest.$ac_ext <<_ACEOF
8596/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008597$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00008598 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008599int
8600main ()
8601{
Thomas Wouters477c8d52006-05-27 19:21:47 +00008602static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008603test_array [0] = 0
8604
8605 ;
8606 return 0;
8607}
8608_ACEOF
8609rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008610if { (ac_try="$ac_compile"
8611case "(($ac_try" in
8612 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8613 *) ac_try_echo=$ac_try;;
8614esac
8615eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8616 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008617 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008618 grep -v '^ *+' conftest.er1 >conftest.err
8619 rm -f conftest.er1
8620 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8622 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008623 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
8624 { (case "(($ac_try" in
8625 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8626 *) ac_try_echo=$ac_try;;
8627esac
8628eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8629 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008630 ac_status=$?
8631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8632 (exit $ac_status); }; } &&
8633 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008634 { (case "(($ac_try" in
8635 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8636 *) ac_try_echo=$ac_try;;
8637esac
8638eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8639 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008640 ac_status=$?
8641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8642 (exit $ac_status); }; }; then
8643 ac_hi=$ac_mid
8644else
8645 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008646sed 's/^/| /' conftest.$ac_ext >&5
8647
Thomas Wouters477c8d52006-05-27 19:21:47 +00008648 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008649fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00008650
Skip Montanarof0d5f792004-08-15 14:08:23 +00008651rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008652done
8653case $ac_lo in
8654?*) ac_cv_sizeof_void_p=$ac_lo;;
Thomas Wouters477c8d52006-05-27 19:21:47 +00008655'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008656See \`config.log' for more details." >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +00008657echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008658See \`config.log' for more details." >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +00008659 { (exit 77); exit 77; }; } ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008660esac
Guido van Rossumad678af1998-10-02 14:42:15 +00008661else
Martin v. Löwis11437992002-04-12 09:54:03 +00008662 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008663/* confdefs.h. */
8664_ACEOF
8665cat confdefs.h >>conftest.$ac_ext
8666cat >>conftest.$ac_ext <<_ACEOF
8667/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008668$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00008669 typedef void * ac__type_sizeof_;
8670static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8671static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008672#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008673#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008674int
8675main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00008676{
Martin v. Löwis11437992002-04-12 09:54:03 +00008677
8678 FILE *f = fopen ("conftest.val", "w");
8679 if (! f)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008680 return 1;
8681 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008682 {
Thomas Wouters477c8d52006-05-27 19:21:47 +00008683 long int i = longval ();
8684 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8685 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008686 fprintf (f, "%ld\n", i);
8687 }
8688 else
8689 {
Thomas Wouters477c8d52006-05-27 19:21:47 +00008690 unsigned long int i = ulongval ();
8691 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8692 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008693 fprintf (f, "%lu\n", i);
8694 }
Thomas Wouters477c8d52006-05-27 19:21:47 +00008695 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008696
8697 ;
8698 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00008699}
Martin v. Löwis11437992002-04-12 09:54:03 +00008700_ACEOF
8701rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008702if { (ac_try="$ac_link"
8703case "(($ac_try" in
8704 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8705 *) ac_try_echo=$ac_try;;
8706esac
8707eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8708 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008709 ac_status=$?
8710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8711 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008712 { (case "(($ac_try" in
8713 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8714 *) ac_try_echo=$ac_try;;
8715esac
8716eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8717 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008718 ac_status=$?
8719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8720 (exit $ac_status); }; }; then
8721 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00008722else
Martin v. Löwis11437992002-04-12 09:54:03 +00008723 echo "$as_me: program exited with status $ac_status" >&5
8724echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008725sed 's/^/| /' conftest.$ac_ext >&5
8726
Martin v. Löwis11437992002-04-12 09:54:03 +00008727( exit $ac_status )
Thomas Wouters477c8d52006-05-27 19:21:47 +00008728{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008729See \`config.log' for more details." >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +00008730echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008731See \`config.log' for more details." >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +00008732 { (exit 77); exit 77; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008733fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00008734rm -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 +00008735fi
8736rm -f conftest.val
8737else
Guido van Rossumad678af1998-10-02 14:42:15 +00008738 ac_cv_sizeof_void_p=0
8739fi
Guido van Rossumad678af1998-10-02 14:42:15 +00008740fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00008741{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
8742echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008743cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008744#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008745_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008746
8747
Thomas Wouters477c8d52006-05-27 19:21:47 +00008748{ echo "$as_me:$LINENO: checking for short" >&5
8749echo $ECHO_N "checking for short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008750if test "${ac_cv_type_short+set}" = set; then
8751 echo $ECHO_N "(cached) $ECHO_C" >&6
8752else
8753 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008754/* confdefs.h. */
8755_ACEOF
8756cat confdefs.h >>conftest.$ac_ext
8757cat >>conftest.$ac_ext <<_ACEOF
8758/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008759$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00008760typedef short ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008761int
8762main ()
8763{
Thomas Wouters477c8d52006-05-27 19:21:47 +00008764if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008765 return 0;
Thomas Wouters477c8d52006-05-27 19:21:47 +00008766if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00008767 return 0;
8768 ;
8769 return 0;
8770}
8771_ACEOF
8772rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008773if { (ac_try="$ac_compile"
8774case "(($ac_try" in
8775 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8776 *) ac_try_echo=$ac_try;;
8777esac
8778eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8779 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008780 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008781 grep -v '^ *+' conftest.er1 >conftest.err
8782 rm -f conftest.er1
8783 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8785 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008786 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
8787 { (case "(($ac_try" in
8788 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8789 *) ac_try_echo=$ac_try;;
8790esac
8791eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8792 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008793 ac_status=$?
8794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8795 (exit $ac_status); }; } &&
8796 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008797 { (case "(($ac_try" in
8798 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8799 *) ac_try_echo=$ac_try;;
8800esac
8801eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8802 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008803 ac_status=$?
8804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8805 (exit $ac_status); }; }; then
8806 ac_cv_type_short=yes
8807else
8808 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008809sed 's/^/| /' conftest.$ac_ext >&5
8810
Thomas Wouters477c8d52006-05-27 19:21:47 +00008811 ac_cv_type_short=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008812fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00008813
Skip Montanarof0d5f792004-08-15 14:08:23 +00008814rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008815fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00008816{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
8817echo "${ECHO_T}$ac_cv_type_short" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008818
Thomas Wouters477c8d52006-05-27 19:21:47 +00008819{ echo "$as_me:$LINENO: checking size of short" >&5
8820echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008821if test "${ac_cv_sizeof_short+set}" = set; then
8822 echo $ECHO_N "(cached) $ECHO_C" >&6
8823else
8824 if test "$ac_cv_type_short" = yes; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00008825 # The cast to long int works around a bug in the HP C Compiler
Martin v. Löwis11437992002-04-12 09:54:03 +00008826 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8827 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8828 # This bug is HP SR number 8606223364.
8829 if test "$cross_compiling" = yes; then
8830 # Depending upon the size, compute the lo and hi bounds.
8831cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008832/* confdefs.h. */
8833_ACEOF
8834cat confdefs.h >>conftest.$ac_ext
8835cat >>conftest.$ac_ext <<_ACEOF
8836/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008837$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00008838 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008839int
8840main ()
8841{
Thomas Wouters477c8d52006-05-27 19:21:47 +00008842static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008843test_array [0] = 0
8844
8845 ;
8846 return 0;
8847}
8848_ACEOF
8849rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008850if { (ac_try="$ac_compile"
8851case "(($ac_try" in
8852 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8853 *) ac_try_echo=$ac_try;;
8854esac
8855eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8856 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008857 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008858 grep -v '^ *+' conftest.er1 >conftest.err
8859 rm -f conftest.er1
8860 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8862 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008863 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
8864 { (case "(($ac_try" in
8865 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8866 *) ac_try_echo=$ac_try;;
8867esac
8868eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8869 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008870 ac_status=$?
8871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8872 (exit $ac_status); }; } &&
8873 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008874 { (case "(($ac_try" in
8875 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8876 *) ac_try_echo=$ac_try;;
8877esac
8878eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8879 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008880 ac_status=$?
8881 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8882 (exit $ac_status); }; }; then
8883 ac_lo=0 ac_mid=0
8884 while :; do
8885 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008886/* confdefs.h. */
8887_ACEOF
8888cat confdefs.h >>conftest.$ac_ext
8889cat >>conftest.$ac_ext <<_ACEOF
8890/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008891$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00008892 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008893int
8894main ()
8895{
Thomas Wouters477c8d52006-05-27 19:21:47 +00008896static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008897test_array [0] = 0
8898
8899 ;
8900 return 0;
8901}
8902_ACEOF
8903rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008904if { (ac_try="$ac_compile"
8905case "(($ac_try" in
8906 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8907 *) ac_try_echo=$ac_try;;
8908esac
8909eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8910 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008911 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008912 grep -v '^ *+' conftest.er1 >conftest.err
8913 rm -f conftest.er1
8914 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8916 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008917 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
8918 { (case "(($ac_try" in
8919 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8920 *) ac_try_echo=$ac_try;;
8921esac
8922eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8923 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008924 ac_status=$?
8925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8926 (exit $ac_status); }; } &&
8927 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008928 { (case "(($ac_try" in
8929 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8930 *) ac_try_echo=$ac_try;;
8931esac
8932eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8933 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008934 ac_status=$?
8935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8936 (exit $ac_status); }; }; then
8937 ac_hi=$ac_mid; break
8938else
8939 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008940sed 's/^/| /' conftest.$ac_ext >&5
8941
Thomas Wouters477c8d52006-05-27 19:21:47 +00008942 ac_lo=`expr $ac_mid + 1`
8943 if test $ac_lo -le $ac_mid; then
8944 ac_lo= ac_hi=
8945 break
8946 fi
8947 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008948fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00008949
Skip Montanarof0d5f792004-08-15 14:08:23 +00008950rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008951 done
8952else
8953 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008954sed 's/^/| /' conftest.$ac_ext >&5
8955
Thomas Wouters477c8d52006-05-27 19:21:47 +00008956 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008957/* confdefs.h. */
8958_ACEOF
8959cat confdefs.h >>conftest.$ac_ext
8960cat >>conftest.$ac_ext <<_ACEOF
8961/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008962$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00008963 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008964int
8965main ()
8966{
Thomas Wouters477c8d52006-05-27 19:21:47 +00008967static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008968test_array [0] = 0
8969
8970 ;
8971 return 0;
8972}
8973_ACEOF
8974rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008975if { (ac_try="$ac_compile"
8976case "(($ac_try" in
8977 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8978 *) ac_try_echo=$ac_try;;
8979esac
8980eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8981 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008982 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008983 grep -v '^ *+' conftest.er1 >conftest.err
8984 rm -f conftest.er1
8985 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8987 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008988 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
8989 { (case "(($ac_try" in
8990 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8991 *) ac_try_echo=$ac_try;;
8992esac
8993eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8994 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008995 ac_status=$?
8996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8997 (exit $ac_status); }; } &&
8998 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008999 { (case "(($ac_try" in
9000 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9001 *) ac_try_echo=$ac_try;;
9002esac
9003eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9004 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009005 ac_status=$?
9006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9007 (exit $ac_status); }; }; then
9008 ac_hi=-1 ac_mid=-1
9009 while :; do
9010 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009011/* confdefs.h. */
9012_ACEOF
9013cat confdefs.h >>conftest.$ac_ext
9014cat >>conftest.$ac_ext <<_ACEOF
9015/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009016$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00009017 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009018int
9019main ()
9020{
Thomas Wouters477c8d52006-05-27 19:21:47 +00009021static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009022test_array [0] = 0
9023
9024 ;
9025 return 0;
9026}
9027_ACEOF
9028rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009029if { (ac_try="$ac_compile"
9030case "(($ac_try" in
9031 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9032 *) ac_try_echo=$ac_try;;
9033esac
9034eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9035 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009036 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009037 grep -v '^ *+' conftest.er1 >conftest.err
9038 rm -f conftest.er1
9039 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9041 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009042 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
9043 { (case "(($ac_try" in
9044 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9045 *) ac_try_echo=$ac_try;;
9046esac
9047eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9048 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009049 ac_status=$?
9050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9051 (exit $ac_status); }; } &&
9052 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009053 { (case "(($ac_try" in
9054 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9055 *) ac_try_echo=$ac_try;;
9056esac
9057eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9058 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009059 ac_status=$?
9060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9061 (exit $ac_status); }; }; then
9062 ac_lo=$ac_mid; break
9063else
9064 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009065sed 's/^/| /' conftest.$ac_ext >&5
9066
Thomas Wouters477c8d52006-05-27 19:21:47 +00009067 ac_hi=`expr '(' $ac_mid ')' - 1`
9068 if test $ac_mid -le $ac_hi; then
9069 ac_lo= ac_hi=
9070 break
9071 fi
9072 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009073fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00009074
Skip Montanarof0d5f792004-08-15 14:08:23 +00009075rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009076 done
9077else
9078 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009079sed 's/^/| /' conftest.$ac_ext >&5
9080
Thomas Wouters477c8d52006-05-27 19:21:47 +00009081 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009082fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00009083
Skip Montanarof0d5f792004-08-15 14:08:23 +00009084rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009085fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00009086
Skip Montanarof0d5f792004-08-15 14:08:23 +00009087rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009088# Binary search between lo and hi bounds.
9089while test "x$ac_lo" != "x$ac_hi"; do
9090 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9091 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009092/* confdefs.h. */
9093_ACEOF
9094cat confdefs.h >>conftest.$ac_ext
9095cat >>conftest.$ac_ext <<_ACEOF
9096/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009097$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00009098 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009099int
9100main ()
9101{
Thomas Wouters477c8d52006-05-27 19:21:47 +00009102static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009103test_array [0] = 0
9104
9105 ;
9106 return 0;
9107}
9108_ACEOF
9109rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009110if { (ac_try="$ac_compile"
9111case "(($ac_try" in
9112 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9113 *) ac_try_echo=$ac_try;;
9114esac
9115eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9116 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009117 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009118 grep -v '^ *+' conftest.er1 >conftest.err
9119 rm -f conftest.er1
9120 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9122 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009123 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
9124 { (case "(($ac_try" in
9125 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9126 *) ac_try_echo=$ac_try;;
9127esac
9128eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9129 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009130 ac_status=$?
9131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9132 (exit $ac_status); }; } &&
9133 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009134 { (case "(($ac_try" in
9135 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9136 *) ac_try_echo=$ac_try;;
9137esac
9138eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9139 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009140 ac_status=$?
9141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9142 (exit $ac_status); }; }; then
9143 ac_hi=$ac_mid
9144else
9145 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009146sed 's/^/| /' conftest.$ac_ext >&5
9147
Thomas Wouters477c8d52006-05-27 19:21:47 +00009148 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009149fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00009150
Skip Montanarof0d5f792004-08-15 14:08:23 +00009151rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009152done
9153case $ac_lo in
9154?*) ac_cv_sizeof_short=$ac_lo;;
Thomas Wouters477c8d52006-05-27 19:21:47 +00009155'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009156See \`config.log' for more details." >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +00009157echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009158See \`config.log' for more details." >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +00009159 { (exit 77); exit 77; }; } ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009160esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009161else
Martin v. Löwis11437992002-04-12 09:54:03 +00009162 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009163/* confdefs.h. */
9164_ACEOF
9165cat confdefs.h >>conftest.$ac_ext
9166cat >>conftest.$ac_ext <<_ACEOF
9167/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009168$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00009169 typedef short ac__type_sizeof_;
9170static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9171static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009172#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009173#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009174int
9175main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009176{
Martin v. Löwis11437992002-04-12 09:54:03 +00009177
9178 FILE *f = fopen ("conftest.val", "w");
9179 if (! f)
Thomas Wouters477c8d52006-05-27 19:21:47 +00009180 return 1;
9181 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009182 {
Thomas Wouters477c8d52006-05-27 19:21:47 +00009183 long int i = longval ();
9184 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9185 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009186 fprintf (f, "%ld\n", i);
9187 }
9188 else
9189 {
Thomas Wouters477c8d52006-05-27 19:21:47 +00009190 unsigned long int i = ulongval ();
9191 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9192 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009193 fprintf (f, "%lu\n", i);
9194 }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009195 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009196
9197 ;
9198 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009199}
Martin v. Löwis11437992002-04-12 09:54:03 +00009200_ACEOF
9201rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009202if { (ac_try="$ac_link"
9203case "(($ac_try" in
9204 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9205 *) ac_try_echo=$ac_try;;
9206esac
9207eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9208 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009209 ac_status=$?
9210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9211 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009212 { (case "(($ac_try" in
9213 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9214 *) ac_try_echo=$ac_try;;
9215esac
9216eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9217 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009218 ac_status=$?
9219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9220 (exit $ac_status); }; }; then
9221 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009222else
Martin v. Löwis11437992002-04-12 09:54:03 +00009223 echo "$as_me: program exited with status $ac_status" >&5
9224echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009225sed 's/^/| /' conftest.$ac_ext >&5
9226
Martin v. Löwis11437992002-04-12 09:54:03 +00009227( exit $ac_status )
Thomas Wouters477c8d52006-05-27 19:21:47 +00009228{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009229See \`config.log' for more details." >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +00009230echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009231See \`config.log' for more details." >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +00009232 { (exit 77); exit 77; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009233fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00009234rm -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 +00009235fi
9236rm -f conftest.val
9237else
Guido van Rossumef2255b2000-03-10 22:30:29 +00009238 ac_cv_sizeof_short=0
9239fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00009240fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00009241{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
9242echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009243cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009244#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00009245_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009246
9247
Thomas Wouters477c8d52006-05-27 19:21:47 +00009248{ echo "$as_me:$LINENO: checking for float" >&5
9249echo $ECHO_N "checking for float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009250if test "${ac_cv_type_float+set}" = set; then
9251 echo $ECHO_N "(cached) $ECHO_C" >&6
9252else
9253 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009254/* confdefs.h. */
9255_ACEOF
9256cat confdefs.h >>conftest.$ac_ext
9257cat >>conftest.$ac_ext <<_ACEOF
9258/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009259$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00009260typedef float ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009261int
9262main ()
9263{
Thomas Wouters477c8d52006-05-27 19:21:47 +00009264if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009265 return 0;
Thomas Wouters477c8d52006-05-27 19:21:47 +00009266if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00009267 return 0;
9268 ;
9269 return 0;
9270}
9271_ACEOF
9272rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009273if { (ac_try="$ac_compile"
9274case "(($ac_try" in
9275 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9276 *) ac_try_echo=$ac_try;;
9277esac
9278eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9279 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009280 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009281 grep -v '^ *+' conftest.er1 >conftest.err
9282 rm -f conftest.er1
9283 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9285 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009286 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
9287 { (case "(($ac_try" in
9288 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9289 *) ac_try_echo=$ac_try;;
9290esac
9291eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9292 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009293 ac_status=$?
9294 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9295 (exit $ac_status); }; } &&
9296 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009297 { (case "(($ac_try" in
9298 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9299 *) ac_try_echo=$ac_try;;
9300esac
9301eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9302 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009303 ac_status=$?
9304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9305 (exit $ac_status); }; }; then
9306 ac_cv_type_float=yes
9307else
9308 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009309sed 's/^/| /' conftest.$ac_ext >&5
9310
Thomas Wouters477c8d52006-05-27 19:21:47 +00009311 ac_cv_type_float=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009312fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00009313
Skip Montanarof0d5f792004-08-15 14:08:23 +00009314rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009315fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00009316{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
9317echo "${ECHO_T}$ac_cv_type_float" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009318
Thomas Wouters477c8d52006-05-27 19:21:47 +00009319{ echo "$as_me:$LINENO: checking size of float" >&5
9320echo $ECHO_N "checking size of float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009321if test "${ac_cv_sizeof_float+set}" = set; then
9322 echo $ECHO_N "(cached) $ECHO_C" >&6
9323else
9324 if test "$ac_cv_type_float" = yes; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00009325 # The cast to long int works around a bug in the HP C Compiler
Martin v. Löwis11437992002-04-12 09:54:03 +00009326 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9327 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9328 # This bug is HP SR number 8606223364.
9329 if test "$cross_compiling" = yes; then
9330 # Depending upon the size, compute the lo and hi bounds.
9331cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009332/* confdefs.h. */
9333_ACEOF
9334cat confdefs.h >>conftest.$ac_ext
9335cat >>conftest.$ac_ext <<_ACEOF
9336/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009337$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00009338 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009339int
9340main ()
9341{
Thomas Wouters477c8d52006-05-27 19:21:47 +00009342static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009343test_array [0] = 0
9344
9345 ;
9346 return 0;
9347}
9348_ACEOF
9349rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009350if { (ac_try="$ac_compile"
9351case "(($ac_try" in
9352 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9353 *) ac_try_echo=$ac_try;;
9354esac
9355eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9356 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009357 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009358 grep -v '^ *+' conftest.er1 >conftest.err
9359 rm -f conftest.er1
9360 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9362 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009363 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
9364 { (case "(($ac_try" in
9365 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9366 *) ac_try_echo=$ac_try;;
9367esac
9368eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9369 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009370 ac_status=$?
9371 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9372 (exit $ac_status); }; } &&
9373 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009374 { (case "(($ac_try" in
9375 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9376 *) ac_try_echo=$ac_try;;
9377esac
9378eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9379 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009380 ac_status=$?
9381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9382 (exit $ac_status); }; }; then
9383 ac_lo=0 ac_mid=0
9384 while :; do
9385 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009386/* confdefs.h. */
9387_ACEOF
9388cat confdefs.h >>conftest.$ac_ext
9389cat >>conftest.$ac_ext <<_ACEOF
9390/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009391$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00009392 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009393int
9394main ()
9395{
Thomas Wouters477c8d52006-05-27 19:21:47 +00009396static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009397test_array [0] = 0
9398
9399 ;
9400 return 0;
9401}
9402_ACEOF
9403rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009404if { (ac_try="$ac_compile"
9405case "(($ac_try" in
9406 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9407 *) ac_try_echo=$ac_try;;
9408esac
9409eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9410 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009411 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009412 grep -v '^ *+' conftest.er1 >conftest.err
9413 rm -f conftest.er1
9414 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9416 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009417 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
9418 { (case "(($ac_try" in
9419 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9420 *) ac_try_echo=$ac_try;;
9421esac
9422eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9423 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009424 ac_status=$?
9425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9426 (exit $ac_status); }; } &&
9427 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009428 { (case "(($ac_try" in
9429 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9430 *) ac_try_echo=$ac_try;;
9431esac
9432eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9433 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009434 ac_status=$?
9435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9436 (exit $ac_status); }; }; then
9437 ac_hi=$ac_mid; break
9438else
9439 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009440sed 's/^/| /' conftest.$ac_ext >&5
9441
Thomas Wouters477c8d52006-05-27 19:21:47 +00009442 ac_lo=`expr $ac_mid + 1`
9443 if test $ac_lo -le $ac_mid; then
9444 ac_lo= ac_hi=
9445 break
9446 fi
9447 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009448fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00009449
Skip Montanarof0d5f792004-08-15 14:08:23 +00009450rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009451 done
9452else
9453 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009454sed 's/^/| /' conftest.$ac_ext >&5
9455
Thomas Wouters477c8d52006-05-27 19:21:47 +00009456 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009457/* confdefs.h. */
9458_ACEOF
9459cat confdefs.h >>conftest.$ac_ext
9460cat >>conftest.$ac_ext <<_ACEOF
9461/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009462$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00009463 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009464int
9465main ()
9466{
Thomas Wouters477c8d52006-05-27 19:21:47 +00009467static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009468test_array [0] = 0
9469
9470 ;
9471 return 0;
9472}
9473_ACEOF
9474rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009475if { (ac_try="$ac_compile"
9476case "(($ac_try" in
9477 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9478 *) ac_try_echo=$ac_try;;
9479esac
9480eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9481 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009482 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009483 grep -v '^ *+' conftest.er1 >conftest.err
9484 rm -f conftest.er1
9485 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9487 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009488 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
9489 { (case "(($ac_try" in
9490 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9491 *) ac_try_echo=$ac_try;;
9492esac
9493eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9494 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009495 ac_status=$?
9496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9497 (exit $ac_status); }; } &&
9498 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009499 { (case "(($ac_try" in
9500 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9501 *) ac_try_echo=$ac_try;;
9502esac
9503eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9504 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009505 ac_status=$?
9506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9507 (exit $ac_status); }; }; then
9508 ac_hi=-1 ac_mid=-1
9509 while :; do
9510 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009511/* confdefs.h. */
9512_ACEOF
9513cat confdefs.h >>conftest.$ac_ext
9514cat >>conftest.$ac_ext <<_ACEOF
9515/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009516$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00009517 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009518int
9519main ()
9520{
Thomas Wouters477c8d52006-05-27 19:21:47 +00009521static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009522test_array [0] = 0
9523
9524 ;
9525 return 0;
9526}
9527_ACEOF
9528rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009529if { (ac_try="$ac_compile"
9530case "(($ac_try" in
9531 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9532 *) ac_try_echo=$ac_try;;
9533esac
9534eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9535 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009536 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009537 grep -v '^ *+' conftest.er1 >conftest.err
9538 rm -f conftest.er1
9539 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9541 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009542 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
9543 { (case "(($ac_try" in
9544 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9545 *) ac_try_echo=$ac_try;;
9546esac
9547eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9548 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009549 ac_status=$?
9550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9551 (exit $ac_status); }; } &&
9552 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009553 { (case "(($ac_try" in
9554 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9555 *) ac_try_echo=$ac_try;;
9556esac
9557eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9558 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009559 ac_status=$?
9560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9561 (exit $ac_status); }; }; then
9562 ac_lo=$ac_mid; break
9563else
9564 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009565sed 's/^/| /' conftest.$ac_ext >&5
9566
Thomas Wouters477c8d52006-05-27 19:21:47 +00009567 ac_hi=`expr '(' $ac_mid ')' - 1`
9568 if test $ac_mid -le $ac_hi; then
9569 ac_lo= ac_hi=
9570 break
9571 fi
9572 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009573fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00009574
Skip Montanarof0d5f792004-08-15 14:08:23 +00009575rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009576 done
9577else
9578 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009579sed 's/^/| /' conftest.$ac_ext >&5
9580
Thomas Wouters477c8d52006-05-27 19:21:47 +00009581 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009582fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00009583
Skip Montanarof0d5f792004-08-15 14:08:23 +00009584rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009585fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00009586
Skip Montanarof0d5f792004-08-15 14:08:23 +00009587rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009588# Binary search between lo and hi bounds.
9589while test "x$ac_lo" != "x$ac_hi"; do
9590 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9591 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009592/* confdefs.h. */
9593_ACEOF
9594cat confdefs.h >>conftest.$ac_ext
9595cat >>conftest.$ac_ext <<_ACEOF
9596/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009597$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00009598 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009599int
9600main ()
9601{
Thomas Wouters477c8d52006-05-27 19:21:47 +00009602static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009603test_array [0] = 0
9604
9605 ;
9606 return 0;
9607}
9608_ACEOF
9609rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009610if { (ac_try="$ac_compile"
9611case "(($ac_try" in
9612 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9613 *) ac_try_echo=$ac_try;;
9614esac
9615eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9616 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009617 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009618 grep -v '^ *+' conftest.er1 >conftest.err
9619 rm -f conftest.er1
9620 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9622 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009623 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
9624 { (case "(($ac_try" in
9625 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9626 *) ac_try_echo=$ac_try;;
9627esac
9628eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9629 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009630 ac_status=$?
9631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9632 (exit $ac_status); }; } &&
9633 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009634 { (case "(($ac_try" in
9635 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9636 *) ac_try_echo=$ac_try;;
9637esac
9638eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9639 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009640 ac_status=$?
9641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9642 (exit $ac_status); }; }; then
9643 ac_hi=$ac_mid
9644else
9645 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009646sed 's/^/| /' conftest.$ac_ext >&5
9647
Thomas Wouters477c8d52006-05-27 19:21:47 +00009648 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009649fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00009650
Skip Montanarof0d5f792004-08-15 14:08:23 +00009651rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009652done
9653case $ac_lo in
9654?*) ac_cv_sizeof_float=$ac_lo;;
Thomas Wouters477c8d52006-05-27 19:21:47 +00009655'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009656See \`config.log' for more details." >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +00009657echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009658See \`config.log' for more details." >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +00009659 { (exit 77); exit 77; }; } ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009660esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009661else
Martin v. Löwis11437992002-04-12 09:54:03 +00009662 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009663/* confdefs.h. */
9664_ACEOF
9665cat confdefs.h >>conftest.$ac_ext
9666cat >>conftest.$ac_ext <<_ACEOF
9667/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009668$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00009669 typedef float ac__type_sizeof_;
9670static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9671static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009672#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009673#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009674int
9675main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009676{
Martin v. Löwis11437992002-04-12 09:54:03 +00009677
9678 FILE *f = fopen ("conftest.val", "w");
9679 if (! f)
Thomas Wouters477c8d52006-05-27 19:21:47 +00009680 return 1;
9681 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009682 {
Thomas Wouters477c8d52006-05-27 19:21:47 +00009683 long int i = longval ();
9684 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9685 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009686 fprintf (f, "%ld\n", i);
9687 }
9688 else
9689 {
Thomas Wouters477c8d52006-05-27 19:21:47 +00009690 unsigned long int i = ulongval ();
9691 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9692 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009693 fprintf (f, "%lu\n", i);
9694 }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009695 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009696
9697 ;
9698 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009699}
Martin v. Löwis11437992002-04-12 09:54:03 +00009700_ACEOF
9701rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009702if { (ac_try="$ac_link"
9703case "(($ac_try" in
9704 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9705 *) ac_try_echo=$ac_try;;
9706esac
9707eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9708 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009709 ac_status=$?
9710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9711 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009712 { (case "(($ac_try" in
9713 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9714 *) ac_try_echo=$ac_try;;
9715esac
9716eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9717 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009718 ac_status=$?
9719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9720 (exit $ac_status); }; }; then
9721 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009722else
Martin v. Löwis11437992002-04-12 09:54:03 +00009723 echo "$as_me: program exited with status $ac_status" >&5
9724echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009725sed 's/^/| /' conftest.$ac_ext >&5
9726
Martin v. Löwis11437992002-04-12 09:54:03 +00009727( exit $ac_status )
Thomas Wouters477c8d52006-05-27 19:21:47 +00009728{ { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009729See \`config.log' for more details." >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +00009730echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009731See \`config.log' for more details." >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +00009732 { (exit 77); exit 77; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009733fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00009734rm -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 +00009735fi
9736rm -f conftest.val
9737else
Guido van Rossumef2255b2000-03-10 22:30:29 +00009738 ac_cv_sizeof_float=0
9739fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00009740fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00009741{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
9742echo "${ECHO_T}$ac_cv_sizeof_float" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009743cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009744#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00009745_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009746
9747
Thomas Wouters477c8d52006-05-27 19:21:47 +00009748{ echo "$as_me:$LINENO: checking for double" >&5
9749echo $ECHO_N "checking for double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009750if test "${ac_cv_type_double+set}" = set; then
9751 echo $ECHO_N "(cached) $ECHO_C" >&6
9752else
9753 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009754/* confdefs.h. */
9755_ACEOF
9756cat confdefs.h >>conftest.$ac_ext
9757cat >>conftest.$ac_ext <<_ACEOF
9758/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009759$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00009760typedef double ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009761int
9762main ()
9763{
Thomas Wouters477c8d52006-05-27 19:21:47 +00009764if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009765 return 0;
Thomas Wouters477c8d52006-05-27 19:21:47 +00009766if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00009767 return 0;
9768 ;
9769 return 0;
9770}
9771_ACEOF
9772rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009773if { (ac_try="$ac_compile"
9774case "(($ac_try" in
9775 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9776 *) ac_try_echo=$ac_try;;
9777esac
9778eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9779 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009780 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009781 grep -v '^ *+' conftest.er1 >conftest.err
9782 rm -f conftest.er1
9783 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9785 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009786 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
9787 { (case "(($ac_try" in
9788 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9789 *) ac_try_echo=$ac_try;;
9790esac
9791eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9792 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009793 ac_status=$?
9794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9795 (exit $ac_status); }; } &&
9796 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009797 { (case "(($ac_try" in
9798 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9799 *) ac_try_echo=$ac_try;;
9800esac
9801eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9802 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009803 ac_status=$?
9804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9805 (exit $ac_status); }; }; then
9806 ac_cv_type_double=yes
9807else
9808 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009809sed 's/^/| /' conftest.$ac_ext >&5
9810
Thomas Wouters477c8d52006-05-27 19:21:47 +00009811 ac_cv_type_double=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009812fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00009813
Skip Montanarof0d5f792004-08-15 14:08:23 +00009814rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009815fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00009816{ echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
9817echo "${ECHO_T}$ac_cv_type_double" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009818
Thomas Wouters477c8d52006-05-27 19:21:47 +00009819{ echo "$as_me:$LINENO: checking size of double" >&5
9820echo $ECHO_N "checking size of double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009821if test "${ac_cv_sizeof_double+set}" = set; then
9822 echo $ECHO_N "(cached) $ECHO_C" >&6
9823else
9824 if test "$ac_cv_type_double" = yes; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00009825 # The cast to long int works around a bug in the HP C Compiler
Martin v. Löwis11437992002-04-12 09:54:03 +00009826 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9827 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9828 # This bug is HP SR number 8606223364.
9829 if test "$cross_compiling" = yes; then
9830 # Depending upon the size, compute the lo and hi bounds.
9831cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009832/* confdefs.h. */
9833_ACEOF
9834cat confdefs.h >>conftest.$ac_ext
9835cat >>conftest.$ac_ext <<_ACEOF
9836/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009837$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00009838 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009839int
9840main ()
9841{
Thomas Wouters477c8d52006-05-27 19:21:47 +00009842static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009843test_array [0] = 0
9844
9845 ;
9846 return 0;
9847}
9848_ACEOF
9849rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009850if { (ac_try="$ac_compile"
9851case "(($ac_try" in
9852 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9853 *) ac_try_echo=$ac_try;;
9854esac
9855eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9856 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009857 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009858 grep -v '^ *+' conftest.er1 >conftest.err
9859 rm -f conftest.er1
9860 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9862 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009863 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
9864 { (case "(($ac_try" in
9865 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9866 *) ac_try_echo=$ac_try;;
9867esac
9868eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9869 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009870 ac_status=$?
9871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9872 (exit $ac_status); }; } &&
9873 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009874 { (case "(($ac_try" in
9875 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9876 *) ac_try_echo=$ac_try;;
9877esac
9878eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9879 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009880 ac_status=$?
9881 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9882 (exit $ac_status); }; }; then
9883 ac_lo=0 ac_mid=0
9884 while :; do
9885 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009886/* confdefs.h. */
9887_ACEOF
9888cat confdefs.h >>conftest.$ac_ext
9889cat >>conftest.$ac_ext <<_ACEOF
9890/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009891$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00009892 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009893int
9894main ()
9895{
Thomas Wouters477c8d52006-05-27 19:21:47 +00009896static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009897test_array [0] = 0
9898
9899 ;
9900 return 0;
9901}
9902_ACEOF
9903rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009904if { (ac_try="$ac_compile"
9905case "(($ac_try" in
9906 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9907 *) ac_try_echo=$ac_try;;
9908esac
9909eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9910 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009911 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009912 grep -v '^ *+' conftest.er1 >conftest.err
9913 rm -f conftest.er1
9914 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9916 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009917 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
9918 { (case "(($ac_try" in
9919 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9920 *) ac_try_echo=$ac_try;;
9921esac
9922eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9923 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009924 ac_status=$?
9925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9926 (exit $ac_status); }; } &&
9927 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009928 { (case "(($ac_try" in
9929 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9930 *) ac_try_echo=$ac_try;;
9931esac
9932eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9933 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009934 ac_status=$?
9935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9936 (exit $ac_status); }; }; then
9937 ac_hi=$ac_mid; break
9938else
9939 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009940sed 's/^/| /' conftest.$ac_ext >&5
9941
Thomas Wouters477c8d52006-05-27 19:21:47 +00009942 ac_lo=`expr $ac_mid + 1`
9943 if test $ac_lo -le $ac_mid; then
9944 ac_lo= ac_hi=
9945 break
9946 fi
9947 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009948fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00009949
Skip Montanarof0d5f792004-08-15 14:08:23 +00009950rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009951 done
9952else
9953 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009954sed 's/^/| /' conftest.$ac_ext >&5
9955
Thomas Wouters477c8d52006-05-27 19:21:47 +00009956 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009957/* confdefs.h. */
9958_ACEOF
9959cat confdefs.h >>conftest.$ac_ext
9960cat >>conftest.$ac_ext <<_ACEOF
9961/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009962$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00009963 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009964int
9965main ()
9966{
Thomas Wouters477c8d52006-05-27 19:21:47 +00009967static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009968test_array [0] = 0
9969
9970 ;
9971 return 0;
9972}
9973_ACEOF
9974rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009975if { (ac_try="$ac_compile"
9976case "(($ac_try" in
9977 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9978 *) ac_try_echo=$ac_try;;
9979esac
9980eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9981 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009982 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009983 grep -v '^ *+' conftest.er1 >conftest.err
9984 rm -f conftest.er1
9985 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9987 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009988 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
9989 { (case "(($ac_try" in
9990 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9991 *) ac_try_echo=$ac_try;;
9992esac
9993eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9994 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009995 ac_status=$?
9996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9997 (exit $ac_status); }; } &&
9998 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009999 { (case "(($ac_try" in
10000 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10001 *) ac_try_echo=$ac_try;;
10002esac
10003eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10004 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010005 ac_status=$?
10006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10007 (exit $ac_status); }; }; then
10008 ac_hi=-1 ac_mid=-1
10009 while :; do
10010 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010011/* confdefs.h. */
10012_ACEOF
10013cat confdefs.h >>conftest.$ac_ext
10014cat >>conftest.$ac_ext <<_ACEOF
10015/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010016$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +000010017 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010018int
10019main ()
10020{
Thomas Wouters477c8d52006-05-27 19:21:47 +000010021static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010022test_array [0] = 0
10023
10024 ;
10025 return 0;
10026}
10027_ACEOF
10028rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010029if { (ac_try="$ac_compile"
10030case "(($ac_try" in
10031 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10032 *) ac_try_echo=$ac_try;;
10033esac
10034eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10035 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010036 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010037 grep -v '^ *+' conftest.er1 >conftest.err
10038 rm -f conftest.er1
10039 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10041 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010042 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
10043 { (case "(($ac_try" in
10044 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10045 *) ac_try_echo=$ac_try;;
10046esac
10047eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10048 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010049 ac_status=$?
10050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10051 (exit $ac_status); }; } &&
10052 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010053 { (case "(($ac_try" in
10054 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10055 *) ac_try_echo=$ac_try;;
10056esac
10057eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10058 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010059 ac_status=$?
10060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10061 (exit $ac_status); }; }; then
10062 ac_lo=$ac_mid; break
10063else
10064 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010065sed 's/^/| /' conftest.$ac_ext >&5
10066
Thomas Wouters477c8d52006-05-27 19:21:47 +000010067 ac_hi=`expr '(' $ac_mid ')' - 1`
10068 if test $ac_mid -le $ac_hi; then
10069 ac_lo= ac_hi=
10070 break
10071 fi
10072 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010073fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000010074
Skip Montanarof0d5f792004-08-15 14:08:23 +000010075rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010076 done
10077else
10078 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010079sed 's/^/| /' conftest.$ac_ext >&5
10080
Thomas Wouters477c8d52006-05-27 19:21:47 +000010081 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010082fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000010083
Skip Montanarof0d5f792004-08-15 14:08:23 +000010084rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010085fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000010086
Skip Montanarof0d5f792004-08-15 14:08:23 +000010087rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010088# Binary search between lo and hi bounds.
10089while test "x$ac_lo" != "x$ac_hi"; do
10090 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10091 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010092/* confdefs.h. */
10093_ACEOF
10094cat confdefs.h >>conftest.$ac_ext
10095cat >>conftest.$ac_ext <<_ACEOF
10096/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010097$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +000010098 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010099int
10100main ()
10101{
Thomas Wouters477c8d52006-05-27 19:21:47 +000010102static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010103test_array [0] = 0
10104
10105 ;
10106 return 0;
10107}
10108_ACEOF
10109rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010110if { (ac_try="$ac_compile"
10111case "(($ac_try" in
10112 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10113 *) ac_try_echo=$ac_try;;
10114esac
10115eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10116 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010117 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010118 grep -v '^ *+' conftest.er1 >conftest.err
10119 rm -f conftest.er1
10120 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10122 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010123 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
10124 { (case "(($ac_try" in
10125 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10126 *) ac_try_echo=$ac_try;;
10127esac
10128eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10129 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010130 ac_status=$?
10131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10132 (exit $ac_status); }; } &&
10133 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010134 { (case "(($ac_try" in
10135 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10136 *) ac_try_echo=$ac_try;;
10137esac
10138eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10139 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010140 ac_status=$?
10141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10142 (exit $ac_status); }; }; then
10143 ac_hi=$ac_mid
10144else
10145 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010146sed 's/^/| /' conftest.$ac_ext >&5
10147
Thomas Wouters477c8d52006-05-27 19:21:47 +000010148 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010149fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000010150
Skip Montanarof0d5f792004-08-15 14:08:23 +000010151rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010152done
10153case $ac_lo in
10154?*) ac_cv_sizeof_double=$ac_lo;;
Thomas Wouters477c8d52006-05-27 19:21:47 +000010155'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +000010156See \`config.log' for more details." >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000010157echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +000010158See \`config.log' for more details." >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +000010159 { (exit 77); exit 77; }; } ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010160esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000010161else
Martin v. Löwis11437992002-04-12 09:54:03 +000010162 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010163/* confdefs.h. */
10164_ACEOF
10165cat confdefs.h >>conftest.$ac_ext
10166cat >>conftest.$ac_ext <<_ACEOF
10167/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010168$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +000010169 typedef double ac__type_sizeof_;
10170static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10171static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010172#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010173#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010174int
10175main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +000010176{
Martin v. Löwis11437992002-04-12 09:54:03 +000010177
10178 FILE *f = fopen ("conftest.val", "w");
10179 if (! f)
Thomas Wouters477c8d52006-05-27 19:21:47 +000010180 return 1;
10181 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010182 {
Thomas Wouters477c8d52006-05-27 19:21:47 +000010183 long int i = longval ();
10184 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10185 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000010186 fprintf (f, "%ld\n", i);
10187 }
10188 else
10189 {
Thomas Wouters477c8d52006-05-27 19:21:47 +000010190 unsigned long int i = ulongval ();
10191 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10192 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000010193 fprintf (f, "%lu\n", i);
10194 }
Thomas Wouters477c8d52006-05-27 19:21:47 +000010195 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010196
10197 ;
10198 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000010199}
Martin v. Löwis11437992002-04-12 09:54:03 +000010200_ACEOF
10201rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010202if { (ac_try="$ac_link"
10203case "(($ac_try" in
10204 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10205 *) ac_try_echo=$ac_try;;
10206esac
10207eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10208 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010209 ac_status=$?
10210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10211 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010212 { (case "(($ac_try" in
10213 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10214 *) ac_try_echo=$ac_try;;
10215esac
10216eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10217 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010218 ac_status=$?
10219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10220 (exit $ac_status); }; }; then
10221 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000010222else
Martin v. Löwis11437992002-04-12 09:54:03 +000010223 echo "$as_me: program exited with status $ac_status" >&5
10224echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010225sed 's/^/| /' conftest.$ac_ext >&5
10226
Martin v. Löwis11437992002-04-12 09:54:03 +000010227( exit $ac_status )
Thomas Wouters477c8d52006-05-27 19:21:47 +000010228{ { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +000010229See \`config.log' for more details." >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000010230echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +000010231See \`config.log' for more details." >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +000010232 { (exit 77); exit 77; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010233fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000010234rm -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 +000010235fi
10236rm -f conftest.val
10237else
Guido van Rossumef2255b2000-03-10 22:30:29 +000010238 ac_cv_sizeof_double=0
10239fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000010240fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000010241{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
10242echo "${ECHO_T}$ac_cv_sizeof_double" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010243cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000010244#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +000010245_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000010246
10247
Thomas Wouters477c8d52006-05-27 19:21:47 +000010248{ echo "$as_me:$LINENO: checking for fpos_t" >&5
10249echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010250if test "${ac_cv_type_fpos_t+set}" = set; then
10251 echo $ECHO_N "(cached) $ECHO_C" >&6
10252else
10253 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010254/* confdefs.h. */
10255_ACEOF
10256cat confdefs.h >>conftest.$ac_ext
10257cat >>conftest.$ac_ext <<_ACEOF
10258/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010259$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +000010260typedef fpos_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010261int
10262main ()
10263{
Thomas Wouters477c8d52006-05-27 19:21:47 +000010264if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010265 return 0;
Thomas Wouters477c8d52006-05-27 19:21:47 +000010266if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000010267 return 0;
10268 ;
10269 return 0;
10270}
10271_ACEOF
10272rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010273if { (ac_try="$ac_compile"
10274case "(($ac_try" in
10275 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10276 *) ac_try_echo=$ac_try;;
10277esac
10278eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10279 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010280 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010281 grep -v '^ *+' conftest.er1 >conftest.err
10282 rm -f conftest.er1
10283 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10285 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010286 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
10287 { (case "(($ac_try" in
10288 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10289 *) ac_try_echo=$ac_try;;
10290esac
10291eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10292 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010293 ac_status=$?
10294 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10295 (exit $ac_status); }; } &&
10296 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010297 { (case "(($ac_try" in
10298 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10299 *) ac_try_echo=$ac_try;;
10300esac
10301eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10302 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010303 ac_status=$?
10304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10305 (exit $ac_status); }; }; then
10306 ac_cv_type_fpos_t=yes
10307else
10308 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010309sed 's/^/| /' conftest.$ac_ext >&5
10310
Thomas Wouters477c8d52006-05-27 19:21:47 +000010311 ac_cv_type_fpos_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010312fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000010313
Skip Montanarof0d5f792004-08-15 14:08:23 +000010314rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010315fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000010316{ echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
10317echo "${ECHO_T}$ac_cv_type_fpos_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010318
Thomas Wouters477c8d52006-05-27 19:21:47 +000010319{ echo "$as_me:$LINENO: checking size of fpos_t" >&5
10320echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010321if test "${ac_cv_sizeof_fpos_t+set}" = set; then
10322 echo $ECHO_N "(cached) $ECHO_C" >&6
10323else
10324 if test "$ac_cv_type_fpos_t" = yes; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000010325 # The cast to long int works around a bug in the HP C Compiler
Martin v. Löwis11437992002-04-12 09:54:03 +000010326 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10327 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10328 # This bug is HP SR number 8606223364.
10329 if test "$cross_compiling" = yes; then
10330 # Depending upon the size, compute the lo and hi bounds.
10331cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010332/* confdefs.h. */
10333_ACEOF
10334cat confdefs.h >>conftest.$ac_ext
10335cat >>conftest.$ac_ext <<_ACEOF
10336/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010337$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +000010338 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010339int
10340main ()
10341{
Thomas Wouters477c8d52006-05-27 19:21:47 +000010342static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010343test_array [0] = 0
10344
10345 ;
10346 return 0;
10347}
10348_ACEOF
10349rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010350if { (ac_try="$ac_compile"
10351case "(($ac_try" in
10352 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10353 *) ac_try_echo=$ac_try;;
10354esac
10355eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10356 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010357 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010358 grep -v '^ *+' conftest.er1 >conftest.err
10359 rm -f conftest.er1
10360 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10362 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010363 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
10364 { (case "(($ac_try" in
10365 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10366 *) ac_try_echo=$ac_try;;
10367esac
10368eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10369 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010370 ac_status=$?
10371 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10372 (exit $ac_status); }; } &&
10373 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010374 { (case "(($ac_try" in
10375 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10376 *) ac_try_echo=$ac_try;;
10377esac
10378eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10379 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010380 ac_status=$?
10381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10382 (exit $ac_status); }; }; then
10383 ac_lo=0 ac_mid=0
10384 while :; do
10385 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010386/* confdefs.h. */
10387_ACEOF
10388cat confdefs.h >>conftest.$ac_ext
10389cat >>conftest.$ac_ext <<_ACEOF
10390/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010391$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +000010392 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010393int
10394main ()
10395{
Thomas Wouters477c8d52006-05-27 19:21:47 +000010396static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010397test_array [0] = 0
10398
10399 ;
10400 return 0;
10401}
10402_ACEOF
10403rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010404if { (ac_try="$ac_compile"
10405case "(($ac_try" in
10406 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10407 *) ac_try_echo=$ac_try;;
10408esac
10409eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10410 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010411 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010412 grep -v '^ *+' conftest.er1 >conftest.err
10413 rm -f conftest.er1
10414 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10416 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010417 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
10418 { (case "(($ac_try" in
10419 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10420 *) ac_try_echo=$ac_try;;
10421esac
10422eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10423 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010424 ac_status=$?
10425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10426 (exit $ac_status); }; } &&
10427 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010428 { (case "(($ac_try" in
10429 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10430 *) ac_try_echo=$ac_try;;
10431esac
10432eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10433 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010434 ac_status=$?
10435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10436 (exit $ac_status); }; }; then
10437 ac_hi=$ac_mid; break
10438else
10439 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010440sed 's/^/| /' conftest.$ac_ext >&5
10441
Thomas Wouters477c8d52006-05-27 19:21:47 +000010442 ac_lo=`expr $ac_mid + 1`
10443 if test $ac_lo -le $ac_mid; then
10444 ac_lo= ac_hi=
10445 break
10446 fi
10447 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010448fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000010449
Skip Montanarof0d5f792004-08-15 14:08:23 +000010450rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010451 done
10452else
10453 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010454sed 's/^/| /' conftest.$ac_ext >&5
10455
Thomas Wouters477c8d52006-05-27 19:21:47 +000010456 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010457/* confdefs.h. */
10458_ACEOF
10459cat confdefs.h >>conftest.$ac_ext
10460cat >>conftest.$ac_ext <<_ACEOF
10461/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010462$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +000010463 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010464int
10465main ()
10466{
Thomas Wouters477c8d52006-05-27 19:21:47 +000010467static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010468test_array [0] = 0
10469
10470 ;
10471 return 0;
10472}
10473_ACEOF
10474rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010475if { (ac_try="$ac_compile"
10476case "(($ac_try" in
10477 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10478 *) ac_try_echo=$ac_try;;
10479esac
10480eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10481 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010482 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010483 grep -v '^ *+' conftest.er1 >conftest.err
10484 rm -f conftest.er1
10485 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10487 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010488 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
10489 { (case "(($ac_try" in
10490 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10491 *) ac_try_echo=$ac_try;;
10492esac
10493eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10494 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010495 ac_status=$?
10496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10497 (exit $ac_status); }; } &&
10498 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010499 { (case "(($ac_try" in
10500 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10501 *) ac_try_echo=$ac_try;;
10502esac
10503eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10504 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010505 ac_status=$?
10506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10507 (exit $ac_status); }; }; then
10508 ac_hi=-1 ac_mid=-1
10509 while :; do
10510 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010511/* confdefs.h. */
10512_ACEOF
10513cat confdefs.h >>conftest.$ac_ext
10514cat >>conftest.$ac_ext <<_ACEOF
10515/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010516$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +000010517 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010518int
10519main ()
10520{
Thomas Wouters477c8d52006-05-27 19:21:47 +000010521static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010522test_array [0] = 0
10523
10524 ;
10525 return 0;
10526}
10527_ACEOF
10528rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010529if { (ac_try="$ac_compile"
10530case "(($ac_try" in
10531 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10532 *) ac_try_echo=$ac_try;;
10533esac
10534eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10535 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010536 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010537 grep -v '^ *+' conftest.er1 >conftest.err
10538 rm -f conftest.er1
10539 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10541 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010542 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
10543 { (case "(($ac_try" in
10544 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10545 *) ac_try_echo=$ac_try;;
10546esac
10547eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10548 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010549 ac_status=$?
10550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10551 (exit $ac_status); }; } &&
10552 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010553 { (case "(($ac_try" in
10554 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10555 *) ac_try_echo=$ac_try;;
10556esac
10557eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10558 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010559 ac_status=$?
10560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10561 (exit $ac_status); }; }; then
10562 ac_lo=$ac_mid; break
10563else
10564 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010565sed 's/^/| /' conftest.$ac_ext >&5
10566
Thomas Wouters477c8d52006-05-27 19:21:47 +000010567 ac_hi=`expr '(' $ac_mid ')' - 1`
10568 if test $ac_mid -le $ac_hi; then
10569 ac_lo= ac_hi=
10570 break
10571 fi
10572 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010573fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000010574
Skip Montanarof0d5f792004-08-15 14:08:23 +000010575rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010576 done
10577else
10578 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010579sed 's/^/| /' conftest.$ac_ext >&5
10580
Thomas Wouters477c8d52006-05-27 19:21:47 +000010581 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010582fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000010583
Skip Montanarof0d5f792004-08-15 14:08:23 +000010584rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010585fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000010586
Skip Montanarof0d5f792004-08-15 14:08:23 +000010587rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010588# Binary search between lo and hi bounds.
10589while test "x$ac_lo" != "x$ac_hi"; do
10590 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10591 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010592/* confdefs.h. */
10593_ACEOF
10594cat confdefs.h >>conftest.$ac_ext
10595cat >>conftest.$ac_ext <<_ACEOF
10596/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010597$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +000010598 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010599int
10600main ()
10601{
Thomas Wouters477c8d52006-05-27 19:21:47 +000010602static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010603test_array [0] = 0
10604
10605 ;
10606 return 0;
10607}
10608_ACEOF
10609rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010610if { (ac_try="$ac_compile"
10611case "(($ac_try" in
10612 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10613 *) ac_try_echo=$ac_try;;
10614esac
10615eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10616 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010617 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010618 grep -v '^ *+' conftest.er1 >conftest.err
10619 rm -f conftest.er1
10620 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10622 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010623 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
10624 { (case "(($ac_try" in
10625 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10626 *) ac_try_echo=$ac_try;;
10627esac
10628eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10629 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010630 ac_status=$?
10631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10632 (exit $ac_status); }; } &&
10633 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010634 { (case "(($ac_try" in
10635 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10636 *) ac_try_echo=$ac_try;;
10637esac
10638eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10639 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010640 ac_status=$?
10641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10642 (exit $ac_status); }; }; then
10643 ac_hi=$ac_mid
10644else
10645 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010646sed 's/^/| /' conftest.$ac_ext >&5
10647
Thomas Wouters477c8d52006-05-27 19:21:47 +000010648 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010649fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000010650
Skip Montanarof0d5f792004-08-15 14:08:23 +000010651rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010652done
10653case $ac_lo in
10654?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Thomas Wouters477c8d52006-05-27 19:21:47 +000010655'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010656See \`config.log' for more details." >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000010657echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010658See \`config.log' for more details." >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +000010659 { (exit 77); exit 77; }; } ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010660esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010661else
Martin v. Löwis11437992002-04-12 09:54:03 +000010662 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010663/* confdefs.h. */
10664_ACEOF
10665cat confdefs.h >>conftest.$ac_ext
10666cat >>conftest.$ac_ext <<_ACEOF
10667/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010668$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +000010669 typedef fpos_t ac__type_sizeof_;
10670static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10671static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010672#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010673#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010674int
10675main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010676{
Martin v. Löwis11437992002-04-12 09:54:03 +000010677
10678 FILE *f = fopen ("conftest.val", "w");
10679 if (! f)
Thomas Wouters477c8d52006-05-27 19:21:47 +000010680 return 1;
10681 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010682 {
Thomas Wouters477c8d52006-05-27 19:21:47 +000010683 long int i = longval ();
10684 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10685 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000010686 fprintf (f, "%ld\n", i);
10687 }
10688 else
10689 {
Thomas Wouters477c8d52006-05-27 19:21:47 +000010690 unsigned long int i = ulongval ();
10691 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10692 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000010693 fprintf (f, "%lu\n", i);
10694 }
Thomas Wouters477c8d52006-05-27 19:21:47 +000010695 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010696
10697 ;
10698 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010699}
Martin v. Löwis11437992002-04-12 09:54:03 +000010700_ACEOF
10701rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010702if { (ac_try="$ac_link"
10703case "(($ac_try" in
10704 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10705 *) ac_try_echo=$ac_try;;
10706esac
10707eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10708 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010709 ac_status=$?
10710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10711 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010712 { (case "(($ac_try" in
10713 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10714 *) ac_try_echo=$ac_try;;
10715esac
10716eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10717 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010718 ac_status=$?
10719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10720 (exit $ac_status); }; }; then
10721 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010722else
Martin v. Löwis11437992002-04-12 09:54:03 +000010723 echo "$as_me: program exited with status $ac_status" >&5
10724echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010725sed 's/^/| /' conftest.$ac_ext >&5
10726
Martin v. Löwis11437992002-04-12 09:54:03 +000010727( exit $ac_status )
Thomas Wouters477c8d52006-05-27 19:21:47 +000010728{ { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010729See \`config.log' for more details." >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000010730echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010731See \`config.log' for more details." >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +000010732 { (exit 77); exit 77; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010733fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000010734rm -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 +000010735fi
10736rm -f conftest.val
10737else
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010738 ac_cv_sizeof_fpos_t=0
10739fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010740fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000010741{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
10742echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010743cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010744#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010745_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010746
Michael W. Hudson54241132001-12-07 15:38:26 +000010747
Thomas Wouters477c8d52006-05-27 19:21:47 +000010748{ echo "$as_me:$LINENO: checking for size_t" >&5
10749echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010750if test "${ac_cv_type_size_t+set}" = set; then
10751 echo $ECHO_N "(cached) $ECHO_C" >&6
10752else
10753 cat >conftest.$ac_ext <<_ACEOF
10754/* confdefs.h. */
10755_ACEOF
10756cat confdefs.h >>conftest.$ac_ext
10757cat >>conftest.$ac_ext <<_ACEOF
10758/* end confdefs.h. */
10759$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +000010760typedef size_t ac__type_new_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010761int
10762main ()
10763{
Thomas Wouters477c8d52006-05-27 19:21:47 +000010764if ((ac__type_new_ *) 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010765 return 0;
Thomas Wouters477c8d52006-05-27 19:21:47 +000010766if (sizeof (ac__type_new_))
Martin v. Löwis18e16552006-02-15 17:27:45 +000010767 return 0;
10768 ;
10769 return 0;
10770}
10771_ACEOF
10772rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010773if { (ac_try="$ac_compile"
10774case "(($ac_try" in
10775 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10776 *) ac_try_echo=$ac_try;;
10777esac
10778eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10779 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010780 ac_status=$?
10781 grep -v '^ *+' conftest.er1 >conftest.err
10782 rm -f conftest.er1
10783 cat conftest.err >&5
10784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10785 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010786 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
10787 { (case "(($ac_try" in
10788 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10789 *) ac_try_echo=$ac_try;;
10790esac
10791eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10792 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010793 ac_status=$?
10794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10795 (exit $ac_status); }; } &&
10796 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010797 { (case "(($ac_try" in
10798 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10799 *) ac_try_echo=$ac_try;;
10800esac
10801eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10802 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010803 ac_status=$?
10804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10805 (exit $ac_status); }; }; then
10806 ac_cv_type_size_t=yes
10807else
10808 echo "$as_me: failed program was:" >&5
10809sed 's/^/| /' conftest.$ac_ext >&5
10810
Thomas Wouters477c8d52006-05-27 19:21:47 +000010811 ac_cv_type_size_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +000010812fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000010813
Martin v. Löwis18e16552006-02-15 17:27:45 +000010814rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10815fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000010816{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
10817echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010818
Thomas Wouters477c8d52006-05-27 19:21:47 +000010819{ echo "$as_me:$LINENO: checking size of size_t" >&5
10820echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010821if test "${ac_cv_sizeof_size_t+set}" = set; then
10822 echo $ECHO_N "(cached) $ECHO_C" >&6
10823else
10824 if test "$ac_cv_type_size_t" = yes; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000010825 # The cast to long int works around a bug in the HP C Compiler
Martin v. Löwis18e16552006-02-15 17:27:45 +000010826 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10827 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10828 # This bug is HP SR number 8606223364.
10829 if test "$cross_compiling" = yes; then
10830 # Depending upon the size, compute the lo and hi bounds.
10831cat >conftest.$ac_ext <<_ACEOF
10832/* confdefs.h. */
10833_ACEOF
10834cat confdefs.h >>conftest.$ac_ext
10835cat >>conftest.$ac_ext <<_ACEOF
10836/* end confdefs.h. */
10837$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +000010838 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010839int
10840main ()
10841{
Thomas Wouters477c8d52006-05-27 19:21:47 +000010842static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010843test_array [0] = 0
10844
10845 ;
10846 return 0;
10847}
10848_ACEOF
10849rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010850if { (ac_try="$ac_compile"
10851case "(($ac_try" in
10852 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10853 *) ac_try_echo=$ac_try;;
10854esac
10855eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10856 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010857 ac_status=$?
10858 grep -v '^ *+' conftest.er1 >conftest.err
10859 rm -f conftest.er1
10860 cat conftest.err >&5
10861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10862 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010863 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
10864 { (case "(($ac_try" in
10865 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10866 *) ac_try_echo=$ac_try;;
10867esac
10868eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10869 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010870 ac_status=$?
10871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10872 (exit $ac_status); }; } &&
10873 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010874 { (case "(($ac_try" in
10875 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10876 *) ac_try_echo=$ac_try;;
10877esac
10878eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10879 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010880 ac_status=$?
10881 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10882 (exit $ac_status); }; }; then
10883 ac_lo=0 ac_mid=0
10884 while :; do
10885 cat >conftest.$ac_ext <<_ACEOF
10886/* confdefs.h. */
10887_ACEOF
10888cat confdefs.h >>conftest.$ac_ext
10889cat >>conftest.$ac_ext <<_ACEOF
10890/* end confdefs.h. */
10891$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +000010892 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010893int
10894main ()
10895{
Thomas Wouters477c8d52006-05-27 19:21:47 +000010896static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010897test_array [0] = 0
10898
10899 ;
10900 return 0;
10901}
10902_ACEOF
10903rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010904if { (ac_try="$ac_compile"
10905case "(($ac_try" in
10906 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10907 *) ac_try_echo=$ac_try;;
10908esac
10909eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10910 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010911 ac_status=$?
10912 grep -v '^ *+' conftest.er1 >conftest.err
10913 rm -f conftest.er1
10914 cat conftest.err >&5
10915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10916 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010917 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
10918 { (case "(($ac_try" in
10919 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10920 *) ac_try_echo=$ac_try;;
10921esac
10922eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10923 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010924 ac_status=$?
10925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10926 (exit $ac_status); }; } &&
10927 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010928 { (case "(($ac_try" in
10929 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10930 *) ac_try_echo=$ac_try;;
10931esac
10932eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10933 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010934 ac_status=$?
10935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10936 (exit $ac_status); }; }; then
10937 ac_hi=$ac_mid; break
10938else
10939 echo "$as_me: failed program was:" >&5
10940sed 's/^/| /' conftest.$ac_ext >&5
10941
Thomas Wouters477c8d52006-05-27 19:21:47 +000010942 ac_lo=`expr $ac_mid + 1`
10943 if test $ac_lo -le $ac_mid; then
10944 ac_lo= ac_hi=
10945 break
10946 fi
10947 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010948fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000010949
Martin v. Löwis18e16552006-02-15 17:27:45 +000010950rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10951 done
10952else
10953 echo "$as_me: failed program was:" >&5
10954sed 's/^/| /' conftest.$ac_ext >&5
10955
Thomas Wouters477c8d52006-05-27 19:21:47 +000010956 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +000010957/* confdefs.h. */
10958_ACEOF
10959cat confdefs.h >>conftest.$ac_ext
10960cat >>conftest.$ac_ext <<_ACEOF
10961/* end confdefs.h. */
10962$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +000010963 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010964int
10965main ()
10966{
Thomas Wouters477c8d52006-05-27 19:21:47 +000010967static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010968test_array [0] = 0
10969
10970 ;
10971 return 0;
10972}
10973_ACEOF
10974rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010975if { (ac_try="$ac_compile"
10976case "(($ac_try" in
10977 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10978 *) ac_try_echo=$ac_try;;
10979esac
10980eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10981 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010982 ac_status=$?
10983 grep -v '^ *+' conftest.er1 >conftest.err
10984 rm -f conftest.er1
10985 cat conftest.err >&5
10986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10987 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010988 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
10989 { (case "(($ac_try" in
10990 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10991 *) ac_try_echo=$ac_try;;
10992esac
10993eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10994 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010995 ac_status=$?
10996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10997 (exit $ac_status); }; } &&
10998 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010999 { (case "(($ac_try" in
11000 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11001 *) ac_try_echo=$ac_try;;
11002esac
11003eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11004 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000011005 ac_status=$?
11006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11007 (exit $ac_status); }; }; then
11008 ac_hi=-1 ac_mid=-1
11009 while :; do
11010 cat >conftest.$ac_ext <<_ACEOF
11011/* confdefs.h. */
11012_ACEOF
11013cat confdefs.h >>conftest.$ac_ext
11014cat >>conftest.$ac_ext <<_ACEOF
11015/* end confdefs.h. */
11016$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +000011017 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000011018int
11019main ()
11020{
Thomas Wouters477c8d52006-05-27 19:21:47 +000011021static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000011022test_array [0] = 0
11023
11024 ;
11025 return 0;
11026}
11027_ACEOF
11028rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011029if { (ac_try="$ac_compile"
11030case "(($ac_try" in
11031 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11032 *) ac_try_echo=$ac_try;;
11033esac
11034eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11035 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000011036 ac_status=$?
11037 grep -v '^ *+' conftest.er1 >conftest.err
11038 rm -f conftest.er1
11039 cat conftest.err >&5
11040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11041 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011042 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
11043 { (case "(($ac_try" in
11044 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11045 *) ac_try_echo=$ac_try;;
11046esac
11047eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11048 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000011049 ac_status=$?
11050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11051 (exit $ac_status); }; } &&
11052 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011053 { (case "(($ac_try" in
11054 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11055 *) ac_try_echo=$ac_try;;
11056esac
11057eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11058 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000011059 ac_status=$?
11060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11061 (exit $ac_status); }; }; then
11062 ac_lo=$ac_mid; break
11063else
11064 echo "$as_me: failed program was:" >&5
11065sed 's/^/| /' conftest.$ac_ext >&5
11066
Thomas Wouters477c8d52006-05-27 19:21:47 +000011067 ac_hi=`expr '(' $ac_mid ')' - 1`
11068 if test $ac_mid -le $ac_hi; then
11069 ac_lo= ac_hi=
11070 break
11071 fi
11072 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +000011073fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000011074
Martin v. Löwis18e16552006-02-15 17:27:45 +000011075rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11076 done
11077else
11078 echo "$as_me: failed program was:" >&5
11079sed 's/^/| /' conftest.$ac_ext >&5
11080
Thomas Wouters477c8d52006-05-27 19:21:47 +000011081 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +000011082fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000011083
Martin v. Löwis18e16552006-02-15 17:27:45 +000011084rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11085fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000011086
Martin v. Löwis18e16552006-02-15 17:27:45 +000011087rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11088# Binary search between lo and hi bounds.
11089while test "x$ac_lo" != "x$ac_hi"; do
11090 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11091 cat >conftest.$ac_ext <<_ACEOF
11092/* confdefs.h. */
11093_ACEOF
11094cat confdefs.h >>conftest.$ac_ext
11095cat >>conftest.$ac_ext <<_ACEOF
11096/* end confdefs.h. */
11097$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +000011098 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000011099int
11100main ()
11101{
Thomas Wouters477c8d52006-05-27 19:21:47 +000011102static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000011103test_array [0] = 0
11104
11105 ;
11106 return 0;
11107}
11108_ACEOF
11109rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011110if { (ac_try="$ac_compile"
11111case "(($ac_try" in
11112 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11113 *) ac_try_echo=$ac_try;;
11114esac
11115eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11116 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000011117 ac_status=$?
11118 grep -v '^ *+' conftest.er1 >conftest.err
11119 rm -f conftest.er1
11120 cat conftest.err >&5
11121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11122 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011123 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
11124 { (case "(($ac_try" in
11125 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11126 *) ac_try_echo=$ac_try;;
11127esac
11128eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11129 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000011130 ac_status=$?
11131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11132 (exit $ac_status); }; } &&
11133 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011134 { (case "(($ac_try" in
11135 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11136 *) ac_try_echo=$ac_try;;
11137esac
11138eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11139 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000011140 ac_status=$?
11141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11142 (exit $ac_status); }; }; then
11143 ac_hi=$ac_mid
11144else
11145 echo "$as_me: failed program was:" >&5
11146sed 's/^/| /' conftest.$ac_ext >&5
11147
Thomas Wouters477c8d52006-05-27 19:21:47 +000011148 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000011149fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000011150
Martin v. Löwis18e16552006-02-15 17:27:45 +000011151rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11152done
11153case $ac_lo in
11154?*) ac_cv_sizeof_size_t=$ac_lo;;
Thomas Wouters477c8d52006-05-27 19:21:47 +000011155'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000011156See \`config.log' for more details." >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000011157echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000011158See \`config.log' for more details." >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +000011159 { (exit 77); exit 77; }; } ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000011160esac
11161else
Martin v. Löwis18e16552006-02-15 17:27:45 +000011162 cat >conftest.$ac_ext <<_ACEOF
11163/* confdefs.h. */
11164_ACEOF
11165cat confdefs.h >>conftest.$ac_ext
11166cat >>conftest.$ac_ext <<_ACEOF
11167/* end confdefs.h. */
11168$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +000011169 typedef size_t ac__type_sizeof_;
11170static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11171static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000011172#include <stdio.h>
11173#include <stdlib.h>
11174int
11175main ()
11176{
11177
11178 FILE *f = fopen ("conftest.val", "w");
11179 if (! f)
Thomas Wouters477c8d52006-05-27 19:21:47 +000011180 return 1;
11181 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000011182 {
Thomas Wouters477c8d52006-05-27 19:21:47 +000011183 long int i = longval ();
11184 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11185 return 1;
Martin v. Löwis18e16552006-02-15 17:27:45 +000011186 fprintf (f, "%ld\n", i);
11187 }
11188 else
11189 {
Thomas Wouters477c8d52006-05-27 19:21:47 +000011190 unsigned long int i = ulongval ();
11191 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11192 return 1;
Martin v. Löwis18e16552006-02-15 17:27:45 +000011193 fprintf (f, "%lu\n", i);
11194 }
Thomas Wouters477c8d52006-05-27 19:21:47 +000011195 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000011196
11197 ;
11198 return 0;
11199}
11200_ACEOF
11201rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011202if { (ac_try="$ac_link"
11203case "(($ac_try" in
11204 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11205 *) ac_try_echo=$ac_try;;
11206esac
11207eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11208 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000011209 ac_status=$?
11210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11211 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011212 { (case "(($ac_try" in
11213 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11214 *) ac_try_echo=$ac_try;;
11215esac
11216eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11217 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000011218 ac_status=$?
11219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11220 (exit $ac_status); }; }; then
11221 ac_cv_sizeof_size_t=`cat conftest.val`
11222else
11223 echo "$as_me: program exited with status $ac_status" >&5
11224echo "$as_me: failed program was:" >&5
11225sed 's/^/| /' conftest.$ac_ext >&5
11226
11227( exit $ac_status )
Thomas Wouters477c8d52006-05-27 19:21:47 +000011228{ { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000011229See \`config.log' for more details." >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000011230echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000011231See \`config.log' for more details." >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +000011232 { (exit 77); exit 77; }; }
Martin v. Löwis18e16552006-02-15 17:27:45 +000011233fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000011234rm -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 +000011235fi
11236rm -f conftest.val
11237else
11238 ac_cv_sizeof_size_t=0
11239fi
11240fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000011241{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
11242echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +000011243cat >>confdefs.h <<_ACEOF
11244#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
11245_ACEOF
11246
11247
Michael W. Hudson54241132001-12-07 15:38:26 +000011248
Thomas Wouters477c8d52006-05-27 19:21:47 +000011249{ echo "$as_me:$LINENO: checking for long long support" >&5
11250echo $ECHO_N "checking for long long support... $ECHO_C" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011251have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011252cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011253/* confdefs.h. */
11254_ACEOF
11255cat confdefs.h >>conftest.$ac_ext
11256cat >>conftest.$ac_ext <<_ACEOF
11257/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011258
Martin v. Löwis11437992002-04-12 09:54:03 +000011259int
11260main ()
11261{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011262long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011263 ;
11264 return 0;
11265}
11266_ACEOF
11267rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011268if { (ac_try="$ac_compile"
11269case "(($ac_try" in
11270 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11271 *) ac_try_echo=$ac_try;;
11272esac
11273eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11274 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011275 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011276 grep -v '^ *+' conftest.er1 >conftest.err
11277 rm -f conftest.er1
11278 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11280 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011281 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
11282 { (case "(($ac_try" in
11283 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11284 *) ac_try_echo=$ac_try;;
11285esac
11286eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11287 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011288 ac_status=$?
11289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11290 (exit $ac_status); }; } &&
11291 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011292 { (case "(($ac_try" in
11293 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11294 *) ac_try_echo=$ac_try;;
11295esac
11296eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11297 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011298 ac_status=$?
11299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11300 (exit $ac_status); }; }; then
11301
11302
11303cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011304#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011305_ACEOF
11306
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011307 have_long_long=yes
11308
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011309else
Martin v. Löwis11437992002-04-12 09:54:03 +000011310 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011311sed 's/^/| /' conftest.$ac_ext >&5
11312
Thomas Wouters477c8d52006-05-27 19:21:47 +000011313
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011314fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000011315
Skip Montanarof0d5f792004-08-15 14:08:23 +000011316rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000011317{ echo "$as_me:$LINENO: result: $have_long_long" >&5
11318echo "${ECHO_T}$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000011319if test "$have_long_long" = yes ; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000011320{ echo "$as_me:$LINENO: checking for long long" >&5
11321echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011322if test "${ac_cv_type_long_long+set}" = set; then
11323 echo $ECHO_N "(cached) $ECHO_C" >&6
11324else
11325 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011326/* confdefs.h. */
11327_ACEOF
11328cat confdefs.h >>conftest.$ac_ext
11329cat >>conftest.$ac_ext <<_ACEOF
11330/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011331$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +000011332typedef long long ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011333int
11334main ()
11335{
Thomas Wouters477c8d52006-05-27 19:21:47 +000011336if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011337 return 0;
Thomas Wouters477c8d52006-05-27 19:21:47 +000011338if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000011339 return 0;
11340 ;
11341 return 0;
11342}
11343_ACEOF
11344rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011345if { (ac_try="$ac_compile"
11346case "(($ac_try" in
11347 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11348 *) ac_try_echo=$ac_try;;
11349esac
11350eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11351 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011352 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011353 grep -v '^ *+' conftest.er1 >conftest.err
11354 rm -f conftest.er1
11355 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11357 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011358 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
11359 { (case "(($ac_try" in
11360 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11361 *) ac_try_echo=$ac_try;;
11362esac
11363eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11364 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011365 ac_status=$?
11366 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11367 (exit $ac_status); }; } &&
11368 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011369 { (case "(($ac_try" in
11370 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11371 *) ac_try_echo=$ac_try;;
11372esac
11373eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11374 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011375 ac_status=$?
11376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11377 (exit $ac_status); }; }; then
11378 ac_cv_type_long_long=yes
11379else
11380 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011381sed 's/^/| /' conftest.$ac_ext >&5
11382
Thomas Wouters477c8d52006-05-27 19:21:47 +000011383 ac_cv_type_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011384fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000011385
Skip Montanarof0d5f792004-08-15 14:08:23 +000011386rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011387fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000011388{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
11389echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011390
Thomas Wouters477c8d52006-05-27 19:21:47 +000011391{ echo "$as_me:$LINENO: checking size of long long" >&5
11392echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011393if test "${ac_cv_sizeof_long_long+set}" = set; then
11394 echo $ECHO_N "(cached) $ECHO_C" >&6
11395else
11396 if test "$ac_cv_type_long_long" = yes; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000011397 # The cast to long int works around a bug in the HP C Compiler
Martin v. Löwis11437992002-04-12 09:54:03 +000011398 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11399 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11400 # This bug is HP SR number 8606223364.
11401 if test "$cross_compiling" = yes; then
11402 # Depending upon the size, compute the lo and hi bounds.
11403cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011404/* confdefs.h. */
11405_ACEOF
11406cat confdefs.h >>conftest.$ac_ext
11407cat >>conftest.$ac_ext <<_ACEOF
11408/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011409$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +000011410 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011411int
11412main ()
11413{
Thomas Wouters477c8d52006-05-27 19:21:47 +000011414static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011415test_array [0] = 0
11416
11417 ;
11418 return 0;
11419}
11420_ACEOF
11421rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011422if { (ac_try="$ac_compile"
11423case "(($ac_try" in
11424 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11425 *) ac_try_echo=$ac_try;;
11426esac
11427eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11428 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011429 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011430 grep -v '^ *+' conftest.er1 >conftest.err
11431 rm -f conftest.er1
11432 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11434 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011435 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
11436 { (case "(($ac_try" in
11437 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11438 *) ac_try_echo=$ac_try;;
11439esac
11440eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11441 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011442 ac_status=$?
11443 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11444 (exit $ac_status); }; } &&
11445 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011446 { (case "(($ac_try" in
11447 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11448 *) ac_try_echo=$ac_try;;
11449esac
11450eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11451 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011452 ac_status=$?
11453 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11454 (exit $ac_status); }; }; then
11455 ac_lo=0 ac_mid=0
11456 while :; do
11457 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011458/* confdefs.h. */
11459_ACEOF
11460cat confdefs.h >>conftest.$ac_ext
11461cat >>conftest.$ac_ext <<_ACEOF
11462/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011463$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +000011464 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011465int
11466main ()
11467{
Thomas Wouters477c8d52006-05-27 19:21:47 +000011468static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011469test_array [0] = 0
11470
11471 ;
11472 return 0;
11473}
11474_ACEOF
11475rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011476if { (ac_try="$ac_compile"
11477case "(($ac_try" in
11478 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11479 *) ac_try_echo=$ac_try;;
11480esac
11481eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11482 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011483 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011484 grep -v '^ *+' conftest.er1 >conftest.err
11485 rm -f conftest.er1
11486 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11488 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011489 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
11490 { (case "(($ac_try" in
11491 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11492 *) ac_try_echo=$ac_try;;
11493esac
11494eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11495 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011496 ac_status=$?
11497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11498 (exit $ac_status); }; } &&
11499 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011500 { (case "(($ac_try" in
11501 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11502 *) ac_try_echo=$ac_try;;
11503esac
11504eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11505 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011506 ac_status=$?
11507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11508 (exit $ac_status); }; }; then
11509 ac_hi=$ac_mid; break
11510else
11511 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011512sed 's/^/| /' conftest.$ac_ext >&5
11513
Thomas Wouters477c8d52006-05-27 19:21:47 +000011514 ac_lo=`expr $ac_mid + 1`
11515 if test $ac_lo -le $ac_mid; then
11516 ac_lo= ac_hi=
11517 break
11518 fi
11519 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011520fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000011521
Skip Montanarof0d5f792004-08-15 14:08:23 +000011522rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011523 done
11524else
11525 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011526sed 's/^/| /' conftest.$ac_ext >&5
11527
Thomas Wouters477c8d52006-05-27 19:21:47 +000011528 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011529/* confdefs.h. */
11530_ACEOF
11531cat confdefs.h >>conftest.$ac_ext
11532cat >>conftest.$ac_ext <<_ACEOF
11533/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011534$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +000011535 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011536int
11537main ()
11538{
Thomas Wouters477c8d52006-05-27 19:21:47 +000011539static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011540test_array [0] = 0
11541
11542 ;
11543 return 0;
11544}
11545_ACEOF
11546rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011547if { (ac_try="$ac_compile"
11548case "(($ac_try" in
11549 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11550 *) ac_try_echo=$ac_try;;
11551esac
11552eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11553 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011554 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011555 grep -v '^ *+' conftest.er1 >conftest.err
11556 rm -f conftest.er1
11557 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11559 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011560 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
11561 { (case "(($ac_try" in
11562 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11563 *) ac_try_echo=$ac_try;;
11564esac
11565eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11566 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011567 ac_status=$?
11568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11569 (exit $ac_status); }; } &&
11570 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011571 { (case "(($ac_try" in
11572 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11573 *) ac_try_echo=$ac_try;;
11574esac
11575eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11576 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011577 ac_status=$?
11578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11579 (exit $ac_status); }; }; then
11580 ac_hi=-1 ac_mid=-1
11581 while :; do
11582 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011583/* confdefs.h. */
11584_ACEOF
11585cat confdefs.h >>conftest.$ac_ext
11586cat >>conftest.$ac_ext <<_ACEOF
11587/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011588$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +000011589 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011590int
11591main ()
11592{
Thomas Wouters477c8d52006-05-27 19:21:47 +000011593static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011594test_array [0] = 0
11595
11596 ;
11597 return 0;
11598}
11599_ACEOF
11600rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011601if { (ac_try="$ac_compile"
11602case "(($ac_try" in
11603 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11604 *) ac_try_echo=$ac_try;;
11605esac
11606eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11607 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011608 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011609 grep -v '^ *+' conftest.er1 >conftest.err
11610 rm -f conftest.er1
11611 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11613 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011614 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
11615 { (case "(($ac_try" in
11616 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11617 *) ac_try_echo=$ac_try;;
11618esac
11619eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11620 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011621 ac_status=$?
11622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11623 (exit $ac_status); }; } &&
11624 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011625 { (case "(($ac_try" in
11626 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11627 *) ac_try_echo=$ac_try;;
11628esac
11629eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11630 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011631 ac_status=$?
11632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11633 (exit $ac_status); }; }; then
11634 ac_lo=$ac_mid; break
11635else
11636 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011637sed 's/^/| /' conftest.$ac_ext >&5
11638
Thomas Wouters477c8d52006-05-27 19:21:47 +000011639 ac_hi=`expr '(' $ac_mid ')' - 1`
11640 if test $ac_mid -le $ac_hi; then
11641 ac_lo= ac_hi=
11642 break
11643 fi
11644 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000011645fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000011646
Skip Montanarof0d5f792004-08-15 14:08:23 +000011647rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011648 done
11649else
11650 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011651sed 's/^/| /' conftest.$ac_ext >&5
11652
Thomas Wouters477c8d52006-05-27 19:21:47 +000011653 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000011654fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000011655
Skip Montanarof0d5f792004-08-15 14:08:23 +000011656rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011657fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000011658
Skip Montanarof0d5f792004-08-15 14:08:23 +000011659rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011660# Binary search between lo and hi bounds.
11661while test "x$ac_lo" != "x$ac_hi"; do
11662 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11663 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011664/* confdefs.h. */
11665_ACEOF
11666cat confdefs.h >>conftest.$ac_ext
11667cat >>conftest.$ac_ext <<_ACEOF
11668/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011669$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +000011670 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011671int
11672main ()
11673{
Thomas Wouters477c8d52006-05-27 19:21:47 +000011674static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011675test_array [0] = 0
11676
11677 ;
11678 return 0;
11679}
11680_ACEOF
11681rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011682if { (ac_try="$ac_compile"
11683case "(($ac_try" in
11684 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11685 *) ac_try_echo=$ac_try;;
11686esac
11687eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11688 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011689 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011690 grep -v '^ *+' conftest.er1 >conftest.err
11691 rm -f conftest.er1
11692 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11694 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011695 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
11696 { (case "(($ac_try" in
11697 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11698 *) ac_try_echo=$ac_try;;
11699esac
11700eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11701 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011702 ac_status=$?
11703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11704 (exit $ac_status); }; } &&
11705 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011706 { (case "(($ac_try" in
11707 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11708 *) ac_try_echo=$ac_try;;
11709esac
11710eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11711 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011712 ac_status=$?
11713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11714 (exit $ac_status); }; }; then
11715 ac_hi=$ac_mid
11716else
11717 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011718sed 's/^/| /' conftest.$ac_ext >&5
11719
Thomas Wouters477c8d52006-05-27 19:21:47 +000011720 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011721fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000011722
Skip Montanarof0d5f792004-08-15 14:08:23 +000011723rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011724done
11725case $ac_lo in
11726?*) ac_cv_sizeof_long_long=$ac_lo;;
Thomas Wouters477c8d52006-05-27 19:21:47 +000011727'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011728See \`config.log' for more details." >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000011729echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011730See \`config.log' for more details." >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +000011731 { (exit 77); exit 77; }; } ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011732esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011733else
Martin v. Löwis11437992002-04-12 09:54:03 +000011734 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011735/* confdefs.h. */
11736_ACEOF
11737cat confdefs.h >>conftest.$ac_ext
11738cat >>conftest.$ac_ext <<_ACEOF
11739/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011740$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +000011741 typedef long long ac__type_sizeof_;
11742static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11743static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011744#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011745#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011746int
11747main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011748{
Martin v. Löwis11437992002-04-12 09:54:03 +000011749
11750 FILE *f = fopen ("conftest.val", "w");
11751 if (! f)
Thomas Wouters477c8d52006-05-27 19:21:47 +000011752 return 1;
11753 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011754 {
Thomas Wouters477c8d52006-05-27 19:21:47 +000011755 long int i = longval ();
11756 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11757 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000011758 fprintf (f, "%ld\n", i);
11759 }
11760 else
11761 {
Thomas Wouters477c8d52006-05-27 19:21:47 +000011762 unsigned long int i = ulongval ();
11763 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11764 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000011765 fprintf (f, "%lu\n", i);
11766 }
Thomas Wouters477c8d52006-05-27 19:21:47 +000011767 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011768
11769 ;
11770 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011771}
Martin v. Löwis11437992002-04-12 09:54:03 +000011772_ACEOF
11773rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011774if { (ac_try="$ac_link"
11775case "(($ac_try" in
11776 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11777 *) ac_try_echo=$ac_try;;
11778esac
11779eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11780 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011781 ac_status=$?
11782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11783 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011784 { (case "(($ac_try" in
11785 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11786 *) ac_try_echo=$ac_try;;
11787esac
11788eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11789 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011790 ac_status=$?
11791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11792 (exit $ac_status); }; }; then
11793 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011794else
Martin v. Löwis11437992002-04-12 09:54:03 +000011795 echo "$as_me: program exited with status $ac_status" >&5
11796echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011797sed 's/^/| /' conftest.$ac_ext >&5
11798
Martin v. Löwis11437992002-04-12 09:54:03 +000011799( exit $ac_status )
Thomas Wouters477c8d52006-05-27 19:21:47 +000011800{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011801See \`config.log' for more details." >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000011802echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011803See \`config.log' for more details." >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +000011804 { (exit 77); exit 77; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011805fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000011806rm -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 +000011807fi
11808rm -f conftest.val
11809else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011810 ac_cv_sizeof_long_long=0
11811fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011812fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000011813{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
11814echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011815cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011816#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000011817_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011818
Michael W. Hudson54241132001-12-07 15:38:26 +000011819
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011820fi
11821
Thomas Wouters477c8d52006-05-27 19:21:47 +000011822{ echo "$as_me:$LINENO: checking for uintptr_t support" >&5
11823echo $ECHO_N "checking for uintptr_t support... $ECHO_C" >&6; }
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011824have_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011825cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011826/* confdefs.h. */
11827_ACEOF
11828cat confdefs.h >>conftest.$ac_ext
11829cat >>conftest.$ac_ext <<_ACEOF
11830/* end confdefs.h. */
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011831
Martin v. Löwis11437992002-04-12 09:54:03 +000011832int
11833main ()
11834{
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011835uintptr_t x; x = (uintptr_t)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011836 ;
11837 return 0;
11838}
11839_ACEOF
11840rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011841if { (ac_try="$ac_compile"
11842case "(($ac_try" in
11843 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11844 *) ac_try_echo=$ac_try;;
11845esac
11846eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11847 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011848 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011849 grep -v '^ *+' conftest.er1 >conftest.err
11850 rm -f conftest.er1
11851 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11853 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011854 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
11855 { (case "(($ac_try" in
11856 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11857 *) ac_try_echo=$ac_try;;
11858esac
11859eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11860 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011861 ac_status=$?
11862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11863 (exit $ac_status); }; } &&
11864 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011865 { (case "(($ac_try" in
11866 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11867 *) ac_try_echo=$ac_try;;
11868esac
11869eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11870 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011871 ac_status=$?
11872 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11873 (exit $ac_status); }; }; then
11874
11875
11876cat >>confdefs.h <<\_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011877#define HAVE_UINTPTR_T 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011878_ACEOF
11879
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011880 have_uintptr_t=yes
11881
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011882else
Martin v. Löwis11437992002-04-12 09:54:03 +000011883 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011884sed 's/^/| /' conftest.$ac_ext >&5
11885
Thomas Wouters477c8d52006-05-27 19:21:47 +000011886
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011887fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000011888
Skip Montanarof0d5f792004-08-15 14:08:23 +000011889rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000011890{ echo "$as_me:$LINENO: result: $have_uintptr_t" >&5
11891echo "${ECHO_T}$have_uintptr_t" >&6; }
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011892if test "$have_uintptr_t" = yes ; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000011893{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
11894echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011895if test "${ac_cv_type_uintptr_t+set}" = set; then
11896 echo $ECHO_N "(cached) $ECHO_C" >&6
11897else
11898 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011899/* confdefs.h. */
11900_ACEOF
11901cat confdefs.h >>conftest.$ac_ext
11902cat >>conftest.$ac_ext <<_ACEOF
11903/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011904$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +000011905typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011906int
11907main ()
11908{
Thomas Wouters477c8d52006-05-27 19:21:47 +000011909if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011910 return 0;
Thomas Wouters477c8d52006-05-27 19:21:47 +000011911if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000011912 return 0;
11913 ;
11914 return 0;
11915}
11916_ACEOF
11917rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011918if { (ac_try="$ac_compile"
11919case "(($ac_try" in
11920 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11921 *) ac_try_echo=$ac_try;;
11922esac
11923eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11924 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011925 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011926 grep -v '^ *+' conftest.er1 >conftest.err
11927 rm -f conftest.er1
11928 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11930 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011931 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
11932 { (case "(($ac_try" in
11933 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11934 *) ac_try_echo=$ac_try;;
11935esac
11936eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11937 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011938 ac_status=$?
11939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11940 (exit $ac_status); }; } &&
11941 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011942 { (case "(($ac_try" in
11943 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11944 *) ac_try_echo=$ac_try;;
11945esac
11946eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11947 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011948 ac_status=$?
11949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11950 (exit $ac_status); }; }; then
11951 ac_cv_type_uintptr_t=yes
11952else
11953 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011954sed 's/^/| /' conftest.$ac_ext >&5
11955
Thomas Wouters477c8d52006-05-27 19:21:47 +000011956 ac_cv_type_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011957fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000011958
Skip Montanarof0d5f792004-08-15 14:08:23 +000011959rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011960fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000011961{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
11962echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011963
Thomas Wouters477c8d52006-05-27 19:21:47 +000011964{ echo "$as_me:$LINENO: checking size of uintptr_t" >&5
11965echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011966if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
11967 echo $ECHO_N "(cached) $ECHO_C" >&6
11968else
11969 if test "$ac_cv_type_uintptr_t" = yes; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000011970 # The cast to long int works around a bug in the HP C Compiler
Martin v. Löwis11437992002-04-12 09:54:03 +000011971 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11972 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11973 # This bug is HP SR number 8606223364.
11974 if test "$cross_compiling" = yes; then
11975 # Depending upon the size, compute the lo and hi bounds.
11976cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011977/* confdefs.h. */
11978_ACEOF
11979cat confdefs.h >>conftest.$ac_ext
11980cat >>conftest.$ac_ext <<_ACEOF
11981/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011982$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +000011983 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011984int
11985main ()
11986{
Thomas Wouters477c8d52006-05-27 19:21:47 +000011987static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011988test_array [0] = 0
11989
11990 ;
11991 return 0;
11992}
11993_ACEOF
11994rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011995if { (ac_try="$ac_compile"
11996case "(($ac_try" in
11997 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11998 *) ac_try_echo=$ac_try;;
11999esac
12000eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12001 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012002 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012003 grep -v '^ *+' conftest.er1 >conftest.err
12004 rm -f conftest.er1
12005 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12007 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000012008 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
12009 { (case "(($ac_try" in
12010 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12011 *) ac_try_echo=$ac_try;;
12012esac
12013eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12014 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012015 ac_status=$?
12016 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12017 (exit $ac_status); }; } &&
12018 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000012019 { (case "(($ac_try" in
12020 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12021 *) ac_try_echo=$ac_try;;
12022esac
12023eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12024 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012025 ac_status=$?
12026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12027 (exit $ac_status); }; }; then
12028 ac_lo=0 ac_mid=0
12029 while :; do
12030 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012031/* confdefs.h. */
12032_ACEOF
12033cat confdefs.h >>conftest.$ac_ext
12034cat >>conftest.$ac_ext <<_ACEOF
12035/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012036$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +000012037 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012038int
12039main ()
12040{
Thomas Wouters477c8d52006-05-27 19:21:47 +000012041static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012042test_array [0] = 0
12043
12044 ;
12045 return 0;
12046}
12047_ACEOF
12048rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000012049if { (ac_try="$ac_compile"
12050case "(($ac_try" in
12051 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12052 *) ac_try_echo=$ac_try;;
12053esac
12054eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12055 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012056 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012057 grep -v '^ *+' conftest.er1 >conftest.err
12058 rm -f conftest.er1
12059 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12061 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000012062 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
12063 { (case "(($ac_try" in
12064 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12065 *) ac_try_echo=$ac_try;;
12066esac
12067eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12068 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012069 ac_status=$?
12070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12071 (exit $ac_status); }; } &&
12072 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000012073 { (case "(($ac_try" in
12074 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12075 *) ac_try_echo=$ac_try;;
12076esac
12077eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12078 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012079 ac_status=$?
12080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12081 (exit $ac_status); }; }; then
12082 ac_hi=$ac_mid; break
12083else
12084 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012085sed 's/^/| /' conftest.$ac_ext >&5
12086
Thomas Wouters477c8d52006-05-27 19:21:47 +000012087 ac_lo=`expr $ac_mid + 1`
12088 if test $ac_lo -le $ac_mid; then
12089 ac_lo= ac_hi=
12090 break
12091 fi
12092 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012093fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000012094
Skip Montanarof0d5f792004-08-15 14:08:23 +000012095rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012096 done
12097else
12098 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012099sed 's/^/| /' conftest.$ac_ext >&5
12100
Thomas Wouters477c8d52006-05-27 19:21:47 +000012101 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012102/* confdefs.h. */
12103_ACEOF
12104cat confdefs.h >>conftest.$ac_ext
12105cat >>conftest.$ac_ext <<_ACEOF
12106/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012107$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +000012108 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012109int
12110main ()
12111{
Thomas Wouters477c8d52006-05-27 19:21:47 +000012112static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012113test_array [0] = 0
12114
12115 ;
12116 return 0;
12117}
12118_ACEOF
12119rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000012120if { (ac_try="$ac_compile"
12121case "(($ac_try" in
12122 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12123 *) ac_try_echo=$ac_try;;
12124esac
12125eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12126 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012127 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012128 grep -v '^ *+' conftest.er1 >conftest.err
12129 rm -f conftest.er1
12130 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12132 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000012133 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
12134 { (case "(($ac_try" in
12135 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12136 *) ac_try_echo=$ac_try;;
12137esac
12138eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12139 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012140 ac_status=$?
12141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12142 (exit $ac_status); }; } &&
12143 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000012144 { (case "(($ac_try" in
12145 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12146 *) ac_try_echo=$ac_try;;
12147esac
12148eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12149 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012150 ac_status=$?
12151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12152 (exit $ac_status); }; }; then
12153 ac_hi=-1 ac_mid=-1
12154 while :; do
12155 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012156/* confdefs.h. */
12157_ACEOF
12158cat confdefs.h >>conftest.$ac_ext
12159cat >>conftest.$ac_ext <<_ACEOF
12160/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012161$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +000012162 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012163int
12164main ()
12165{
Thomas Wouters477c8d52006-05-27 19:21:47 +000012166static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012167test_array [0] = 0
12168
12169 ;
12170 return 0;
12171}
12172_ACEOF
12173rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000012174if { (ac_try="$ac_compile"
12175case "(($ac_try" in
12176 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12177 *) ac_try_echo=$ac_try;;
12178esac
12179eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12180 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012181 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012182 grep -v '^ *+' conftest.er1 >conftest.err
12183 rm -f conftest.er1
12184 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12186 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000012187 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
12188 { (case "(($ac_try" in
12189 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12190 *) ac_try_echo=$ac_try;;
12191esac
12192eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12193 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012194 ac_status=$?
12195 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12196 (exit $ac_status); }; } &&
12197 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000012198 { (case "(($ac_try" in
12199 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12200 *) ac_try_echo=$ac_try;;
12201esac
12202eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12203 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012204 ac_status=$?
12205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12206 (exit $ac_status); }; }; then
12207 ac_lo=$ac_mid; break
12208else
12209 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012210sed 's/^/| /' conftest.$ac_ext >&5
12211
Thomas Wouters477c8d52006-05-27 19:21:47 +000012212 ac_hi=`expr '(' $ac_mid ')' - 1`
12213 if test $ac_mid -le $ac_hi; then
12214 ac_lo= ac_hi=
12215 break
12216 fi
12217 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000012218fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000012219
Skip Montanarof0d5f792004-08-15 14:08:23 +000012220rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012221 done
12222else
12223 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012224sed 's/^/| /' conftest.$ac_ext >&5
12225
Thomas Wouters477c8d52006-05-27 19:21:47 +000012226 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000012227fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000012228
Skip Montanarof0d5f792004-08-15 14:08:23 +000012229rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012230fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000012231
Skip Montanarof0d5f792004-08-15 14:08:23 +000012232rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012233# Binary search between lo and hi bounds.
12234while test "x$ac_lo" != "x$ac_hi"; do
12235 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12236 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012237/* confdefs.h. */
12238_ACEOF
12239cat confdefs.h >>conftest.$ac_ext
12240cat >>conftest.$ac_ext <<_ACEOF
12241/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012242$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +000012243 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012244int
12245main ()
12246{
Thomas Wouters477c8d52006-05-27 19:21:47 +000012247static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012248test_array [0] = 0
12249
12250 ;
12251 return 0;
12252}
12253_ACEOF
12254rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000012255if { (ac_try="$ac_compile"
12256case "(($ac_try" in
12257 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12258 *) ac_try_echo=$ac_try;;
12259esac
12260eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12261 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012262 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012263 grep -v '^ *+' conftest.er1 >conftest.err
12264 rm -f conftest.er1
12265 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12267 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000012268 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
12269 { (case "(($ac_try" in
12270 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12271 *) ac_try_echo=$ac_try;;
12272esac
12273eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12274 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012275 ac_status=$?
12276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12277 (exit $ac_status); }; } &&
12278 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000012279 { (case "(($ac_try" in
12280 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12281 *) ac_try_echo=$ac_try;;
12282esac
12283eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12284 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012285 ac_status=$?
12286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12287 (exit $ac_status); }; }; then
12288 ac_hi=$ac_mid
12289else
12290 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012291sed 's/^/| /' conftest.$ac_ext >&5
12292
Thomas Wouters477c8d52006-05-27 19:21:47 +000012293 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012294fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000012295
Skip Montanarof0d5f792004-08-15 14:08:23 +000012296rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012297done
12298case $ac_lo in
12299?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Thomas Wouters477c8d52006-05-27 19:21:47 +000012300'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012301See \`config.log' for more details." >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000012302echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012303See \`config.log' for more details." >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +000012304 { (exit 77); exit 77; }; } ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012305esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012306else
Martin v. Löwis11437992002-04-12 09:54:03 +000012307 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012308/* confdefs.h. */
12309_ACEOF
12310cat confdefs.h >>conftest.$ac_ext
12311cat >>conftest.$ac_ext <<_ACEOF
12312/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012313$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +000012314 typedef uintptr_t ac__type_sizeof_;
12315static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12316static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000012317#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012318#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012319int
12320main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012321{
Martin v. Löwis11437992002-04-12 09:54:03 +000012322
12323 FILE *f = fopen ("conftest.val", "w");
12324 if (! f)
Thomas Wouters477c8d52006-05-27 19:21:47 +000012325 return 1;
12326 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000012327 {
Thomas Wouters477c8d52006-05-27 19:21:47 +000012328 long int i = longval ();
12329 if (i != ((long int) (sizeof (ac__type_sizeof_))))
12330 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000012331 fprintf (f, "%ld\n", i);
12332 }
12333 else
12334 {
Thomas Wouters477c8d52006-05-27 19:21:47 +000012335 unsigned long int i = ulongval ();
12336 if (i != ((long int) (sizeof (ac__type_sizeof_))))
12337 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000012338 fprintf (f, "%lu\n", i);
12339 }
Thomas Wouters477c8d52006-05-27 19:21:47 +000012340 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012341
12342 ;
12343 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012344}
Martin v. Löwis11437992002-04-12 09:54:03 +000012345_ACEOF
12346rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000012347if { (ac_try="$ac_link"
12348case "(($ac_try" in
12349 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12350 *) ac_try_echo=$ac_try;;
12351esac
12352eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12353 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012354 ac_status=$?
12355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12356 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000012357 { (case "(($ac_try" in
12358 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12359 *) ac_try_echo=$ac_try;;
12360esac
12361eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12362 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012363 ac_status=$?
12364 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12365 (exit $ac_status); }; }; then
12366 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012367else
Martin v. Löwis11437992002-04-12 09:54:03 +000012368 echo "$as_me: program exited with status $ac_status" >&5
12369echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012370sed 's/^/| /' conftest.$ac_ext >&5
12371
Martin v. Löwis11437992002-04-12 09:54:03 +000012372( exit $ac_status )
Thomas Wouters477c8d52006-05-27 19:21:47 +000012373{ { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012374See \`config.log' for more details." >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000012375echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012376See \`config.log' for more details." >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +000012377 { (exit 77); exit 77; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012378fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000012379rm -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 +000012380fi
12381rm -f conftest.val
12382else
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012383 ac_cv_sizeof_uintptr_t=0
12384fi
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012385fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000012386{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
12387echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012388cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012389#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012390_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012391
Michael W. Hudson54241132001-12-07 15:38:26 +000012392
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012393fi
12394
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012395# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Thomas Wouters477c8d52006-05-27 19:21:47 +000012396{ echo "$as_me:$LINENO: checking size of off_t" >&5
12397echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012398if test "${ac_cv_sizeof_off_t+set}" = set; then
12399 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012400else
12401 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000012402 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012403else
Martin v. Löwis11437992002-04-12 09:54:03 +000012404 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012405/* confdefs.h. */
12406_ACEOF
12407cat confdefs.h >>conftest.$ac_ext
12408cat >>conftest.$ac_ext <<_ACEOF
12409/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012410#include <stdio.h>
12411#include <sys/types.h>
12412main()
12413{
12414 FILE *f=fopen("conftestval", "w");
12415 if (!f) exit(1);
12416 fprintf(f, "%d\n", sizeof(off_t));
12417 exit(0);
12418}
Martin v. Löwis11437992002-04-12 09:54:03 +000012419_ACEOF
12420rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000012421if { (ac_try="$ac_link"
12422case "(($ac_try" in
12423 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12424 *) ac_try_echo=$ac_try;;
12425esac
12426eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12427 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012428 ac_status=$?
12429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12430 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000012431 { (case "(($ac_try" in
12432 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12433 *) ac_try_echo=$ac_try;;
12434esac
12435eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12436 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012437 ac_status=$?
12438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12439 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012440 ac_cv_sizeof_off_t=`cat conftestval`
12441else
Martin v. Löwis11437992002-04-12 09:54:03 +000012442 echo "$as_me: program exited with status $ac_status" >&5
12443echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012444sed 's/^/| /' conftest.$ac_ext >&5
12445
Martin v. Löwis11437992002-04-12 09:54:03 +000012446( exit $ac_status )
12447ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012448fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000012449rm -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 +000012450fi
12451
Thomas Wouters477c8d52006-05-27 19:21:47 +000012452
12453
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012454fi
12455
Thomas Wouters477c8d52006-05-27 19:21:47 +000012456{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
12457echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012458
12459cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012460#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012461_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012462
Michael W. Hudson54241132001-12-07 15:38:26 +000012463
Thomas Wouters477c8d52006-05-27 19:21:47 +000012464{ echo "$as_me:$LINENO: checking whether to enable large file support" >&5
12465echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000012466if test "$have_long_long" = yes -a \
12467 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
12468 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012469
Martin v. Löwis11437992002-04-12 09:54:03 +000012470cat >>confdefs.h <<\_ACEOF
12471#define HAVE_LARGEFILE_SUPPORT 1
12472_ACEOF
12473
Thomas Wouters477c8d52006-05-27 19:21:47 +000012474 { echo "$as_me:$LINENO: result: yes" >&5
12475echo "${ECHO_T}yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012476else
Thomas Wouters477c8d52006-05-27 19:21:47 +000012477 { echo "$as_me:$LINENO: result: no" >&5
12478echo "${ECHO_T}no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012479fi
12480
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012481# AC_CHECK_SIZEOF() doesn't include <time.h>.
Thomas Wouters477c8d52006-05-27 19:21:47 +000012482{ echo "$as_me:$LINENO: checking size of time_t" >&5
12483echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012484if test "${ac_cv_sizeof_time_t+set}" = set; then
12485 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012486else
12487 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000012488 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012489else
Martin v. Löwis11437992002-04-12 09:54:03 +000012490 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012491/* confdefs.h. */
12492_ACEOF
12493cat confdefs.h >>conftest.$ac_ext
12494cat >>conftest.$ac_ext <<_ACEOF
12495/* end confdefs.h. */
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012496#include <stdio.h>
12497#include <time.h>
12498main()
12499{
12500 FILE *f=fopen("conftestval", "w");
12501 if (!f) exit(1);
12502 fprintf(f, "%d\n", sizeof(time_t));
12503 exit(0);
12504}
Martin v. Löwis11437992002-04-12 09:54:03 +000012505_ACEOF
12506rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000012507if { (ac_try="$ac_link"
12508case "(($ac_try" in
12509 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12510 *) ac_try_echo=$ac_try;;
12511esac
12512eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12513 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012514 ac_status=$?
12515 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12516 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000012517 { (case "(($ac_try" in
12518 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12519 *) ac_try_echo=$ac_try;;
12520esac
12521eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12522 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012523 ac_status=$?
12524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12525 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012526 ac_cv_sizeof_time_t=`cat conftestval`
12527else
Martin v. Löwis11437992002-04-12 09:54:03 +000012528 echo "$as_me: program exited with status $ac_status" >&5
12529echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012530sed 's/^/| /' conftest.$ac_ext >&5
12531
Martin v. Löwis11437992002-04-12 09:54:03 +000012532( exit $ac_status )
12533ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012534fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000012535rm -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 +000012536fi
12537
Thomas Wouters477c8d52006-05-27 19:21:47 +000012538
12539
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012540fi
12541
Thomas Wouters477c8d52006-05-27 19:21:47 +000012542{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
12543echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012544
12545cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012546#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012547_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012548
Michael W. Hudson54241132001-12-07 15:38:26 +000012549
12550
Trent Mick635f6fb2000-08-23 21:33:05 +000012551# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000012552ac_save_cc="$CC"
12553if test "$ac_cv_kpthread" = "yes"
12554then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000012555elif test "$ac_cv_kthread" = "yes"
12556then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012557elif test "$ac_cv_pthread" = "yes"
12558then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000012559fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000012560{ echo "$as_me:$LINENO: checking for pthread_t" >&5
12561echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000012562have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012563cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012564/* confdefs.h. */
12565_ACEOF
12566cat confdefs.h >>conftest.$ac_ext
12567cat >>conftest.$ac_ext <<_ACEOF
12568/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000012569#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012570int
12571main ()
12572{
Guido van Rossum12580492000-09-24 16:47:19 +000012573pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012574 ;
12575 return 0;
12576}
12577_ACEOF
12578rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000012579if { (ac_try="$ac_compile"
12580case "(($ac_try" in
12581 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12582 *) ac_try_echo=$ac_try;;
12583esac
12584eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12585 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012586 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012587 grep -v '^ *+' conftest.er1 >conftest.err
12588 rm -f conftest.er1
12589 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12591 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000012592 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
12593 { (case "(($ac_try" in
12594 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12595 *) ac_try_echo=$ac_try;;
12596esac
12597eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12598 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012599 ac_status=$?
12600 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12601 (exit $ac_status); }; } &&
12602 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000012603 { (case "(($ac_try" in
12604 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12605 *) ac_try_echo=$ac_try;;
12606esac
12607eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12608 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012609 ac_status=$?
12610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12611 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +000012612 have_pthread_t=yes
12613else
Martin v. Löwis11437992002-04-12 09:54:03 +000012614 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012615sed 's/^/| /' conftest.$ac_ext >&5
12616
Thomas Wouters477c8d52006-05-27 19:21:47 +000012617
Trent Mick635f6fb2000-08-23 21:33:05 +000012618fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000012619
Skip Montanarof0d5f792004-08-15 14:08:23 +000012620rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000012621{ echo "$as_me:$LINENO: result: $have_pthread_t" >&5
12622echo "${ECHO_T}$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000012623if test "$have_pthread_t" = yes ; then
12624 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Thomas Wouters477c8d52006-05-27 19:21:47 +000012625 { echo "$as_me:$LINENO: checking size of pthread_t" >&5
12626echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012627 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
12628 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000012629else
12630 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000012631 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +000012632else
Martin v. Löwis11437992002-04-12 09:54:03 +000012633 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012634/* confdefs.h. */
12635_ACEOF
12636cat confdefs.h >>conftest.$ac_ext
12637cat >>conftest.$ac_ext <<_ACEOF
12638/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000012639#include <stdio.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012640#include <pthread.h>
Trent Mick635f6fb2000-08-23 21:33:05 +000012641 main()
12642 {
12643 FILE *f=fopen("conftestval", "w");
12644 if (!f) exit(1);
12645 fprintf(f, "%d\n", sizeof(pthread_t));
12646 exit(0);
12647 }
Martin v. Löwis11437992002-04-12 09:54:03 +000012648_ACEOF
12649rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000012650if { (ac_try="$ac_link"
12651case "(($ac_try" in
12652 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12653 *) ac_try_echo=$ac_try;;
12654esac
12655eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12656 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012657 ac_status=$?
12658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12659 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000012660 { (case "(($ac_try" in
12661 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12662 *) ac_try_echo=$ac_try;;
12663esac
12664eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12665 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012666 ac_status=$?
12667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12668 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +000012669 ac_cv_sizeof_pthread_t=`cat conftestval`
12670else
Martin v. Löwis11437992002-04-12 09:54:03 +000012671 echo "$as_me: program exited with status $ac_status" >&5
12672echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012673sed 's/^/| /' conftest.$ac_ext >&5
12674
Martin v. Löwis11437992002-04-12 09:54:03 +000012675( exit $ac_status )
12676ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +000012677fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000012678rm -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 +000012679fi
12680
Thomas Wouters477c8d52006-05-27 19:21:47 +000012681
12682
Trent Mick635f6fb2000-08-23 21:33:05 +000012683fi
12684
Thomas Wouters477c8d52006-05-27 19:21:47 +000012685 { echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
12686echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012687
12688cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000012689#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012690_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000012691
12692fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000012693CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000012694
Thomas Wouters477c8d52006-05-27 19:21:47 +000012695{ echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
12696echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6; }
12697# Check whether --enable-toolbox-glue was given.
Jack Jansene578a632001-08-15 01:27:14 +000012698if test "${enable_toolbox_glue+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000012699 enableval=$enable_toolbox_glue;
12700fi
Jack Jansene578a632001-08-15 01:27:14 +000012701
12702
12703if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +000012704then
Jack Jansene578a632001-08-15 01:27:14 +000012705 case $ac_sys_system/$ac_sys_release in
12706 Darwin/*)
12707 enable_toolbox_glue="yes";;
12708 *)
12709 enable_toolbox_glue="no";;
12710 esac
12711fi
12712case "$enable_toolbox_glue" in
12713yes)
Jack Jansene578a632001-08-15 01:27:14 +000012714 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000012715 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +000012716
12717cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000012718#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012719_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000012720
12721 ;;
12722*)
Jack Jansene578a632001-08-15 01:27:14 +000012723 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +000012724 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +000012725 ;;
12726esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000012727{ echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
12728echo "${ECHO_T}$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012729
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012730
12731case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012732 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000012733 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
12734 ;;
12735 Darwin/*)
12736 OTHER_LIBTOOL_OPT=""
12737 ;;
12738esac
12739
12740
12741case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012742 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +000012743 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
12744 if test "${enable_universalsdk}"; then
12745 :
12746 else
12747 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`"
12748 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000012749 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000012750 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000012751 Darwin/*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000012752 gcc_version=`gcc -v 2>&1 | grep version | cut -d\ -f3`
12753 if test ${gcc_version} '<' 4.0
12754 then
12755 LIBTOOL_CRUFT="-lcc_dynamic"
12756 else
12757 LIBTOOL_CRUFT=""
12758 fi
Jack Jansen39fd2312006-02-23 15:12:19 +000012759 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only `arch`"
Jack Jansenb36687a2004-07-16 08:43:47 +000012760 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000012761 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012762esac
12763
Thomas Wouters477c8d52006-05-27 19:21:47 +000012764{ echo "$as_me:$LINENO: checking for --enable-framework" >&5
12765echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000012766if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012767then
Skip Montanarodecc6a42003-01-01 20:07:49 +000012768 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000012769 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000012770 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012771
Martin v. Löwis11437992002-04-12 09:54:03 +000012772cat >>confdefs.h <<\_ACEOF
12773#define WITH_NEXT_FRAMEWORK 1
12774_ACEOF
12775
Thomas Wouters477c8d52006-05-27 19:21:47 +000012776 { echo "$as_me:$LINENO: result: yes" >&5
12777echo "${ECHO_T}yes" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012778else
Thomas Wouters477c8d52006-05-27 19:21:47 +000012779 { echo "$as_me:$LINENO: result: no" >&5
12780echo "${ECHO_T}no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012781fi
12782
Thomas Wouters477c8d52006-05-27 19:21:47 +000012783{ echo "$as_me:$LINENO: checking for dyld" >&5
12784echo $ECHO_N "checking for dyld... $ECHO_C" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012785case $ac_sys_system/$ac_sys_release in
12786 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012787
Martin v. Löwis11437992002-04-12 09:54:03 +000012788cat >>confdefs.h <<\_ACEOF
12789#define WITH_DYLD 1
12790_ACEOF
12791
Thomas Wouters477c8d52006-05-27 19:21:47 +000012792 { echo "$as_me:$LINENO: result: always on for Darwin" >&5
12793echo "${ECHO_T}always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012794 ;;
12795 *)
Thomas Wouters477c8d52006-05-27 19:21:47 +000012796 { echo "$as_me:$LINENO: result: no" >&5
12797echo "${ECHO_T}no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000012798 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012799esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012800
Guido van Rossum0a516c91994-09-12 10:58:40 +000012801# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000012802
Michael W. Hudson54241132001-12-07 15:38:26 +000012803
12804
12805
12806
Guido van Rossum0a516c91994-09-12 10:58:40 +000012807# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000012808# -- usually .so, .sl on HP-UX, .dll on Cygwin
Thomas Wouters477c8d52006-05-27 19:21:47 +000012809{ echo "$as_me:$LINENO: checking SO" >&5
12810echo $ECHO_N "checking SO... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012811if test -z "$SO"
12812then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012813 case $ac_sys_system in
Thomas Wouters477c8d52006-05-27 19:21:47 +000012814 hp*|HP*)
12815 case `uname -m` in
12816 ia64) SO=.so;;
12817 *) SO=.sl;;
12818 esac
12819 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000012820 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000012821 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000012822 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000012823else
12824 # this might also be a termcap variable, see #610332
12825 echo
12826 echo '====================================================================='
12827 echo '+ +'
12828 echo '+ WARNING: You have set SO in your environment. +'
12829 echo '+ Do you really mean to change the extension for shared libraries? +'
12830 echo '+ Continuing in 10 seconds to let you to ponder. +'
12831 echo '+ +'
12832 echo '====================================================================='
12833 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000012834fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000012835{ echo "$as_me:$LINENO: result: $SO" >&5
12836echo "${ECHO_T}$SO" >&6; }
12837
12838cat >>confdefs.h <<_ACEOF
12839#define SHLIB_EXT "$SO"
12840_ACEOF
12841
Guido van Rossum0a516c91994-09-12 10:58:40 +000012842# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000012843# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012844# (Shared libraries in this instance are shared modules to be loaded into
12845# Python, as opposed to building Python itself as a shared library.)
Thomas Wouters477c8d52006-05-27 19:21:47 +000012846{ echo "$as_me:$LINENO: checking LDSHARED" >&5
12847echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012848if test -z "$LDSHARED"
12849then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012850 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000012851 AIX*)
12852 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000012853 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000012854 ;;
12855 BeOS*)
12856 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +000012857 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000012858 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000012859 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000012860 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000012861 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +000012862 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000012863 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000012864 else LDSHARED='$(CC) -G';
Greg Ward57c9a6632000-05-26 12:22:54 +000012865 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000012866 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +000012867 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000012868 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000012869 LDSHARED='$(CC) $(LDFLAGS) -bundle'
12870 if test "$enable_framework" ; then
12871 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000012872 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
12873 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000012874 else
12875 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000012876 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000012877 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000012878 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000012879 LDSHARED='$(CC) $(LDFLAGS) -bundle'
12880 if test "$enable_framework" ; then
12881 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000012882 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
12883 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000012884 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000012885 # No framework, use the Python app as bundle-loader
12886 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000012887 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012888 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000012889 Darwin/*)
12890 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
12891 # This allows an extension to be used in any Python
Jack Jansenbe954622004-12-26 23:07:48 +000012892 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
Thomas Wouters477c8d52006-05-27 19:21:47 +000012893 if test ${cur_target} '>' 10.2; then
12894 cur_target=10.3
12895 fi
Jack Jansenc110f862005-01-07 10:49:32 +000012896 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Thomas Wouters477c8d52006-05-27 19:21:47 +000012897 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
Jack Jansenbe954622004-12-26 23:07:48 +000012898 if test ${MACOSX_DEPLOYMENT_TARGET-${cur_target}} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000012899 then
Thomas Wouters477c8d52006-05-27 19:21:47 +000012900 if test "${enable_universalsdk}"; then
12901 LDFLAGS="-arch i386 -arch ppc -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
12902 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000012903 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
12904 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000012905 else
12906 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 Jansen6b08a402004-06-03 12:41:45 +000012911 else
12912 # No framework, use the Python app as bundle-loader
12913 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
12914 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
12915 fi
12916 fi
12917 ;;
Martin v. Löwis3cba5c02002-09-16 17:50:59 +000012918 Linux*|GNU*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000012919 BSD/OS*/4*) LDSHARED="gcc -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000012920 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000012921 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000012922 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000012923 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000012924 else
12925 LDSHARED="ld -Bshareable ${LDFLAGS}"
12926 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000012927 OpenBSD*)
12928 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
12929 then
12930 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
12931 else
12932 case `uname -r` in
12933 [01].* | 2.[0-7] | 2.[0-7].*)
12934 LDSHARED="ld -Bshareable ${LDFLAGS}"
12935 ;;
12936 *)
12937 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
12938 ;;
12939 esac
12940 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000012941 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000012942 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000012943 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000012944 then LDSHARED='$(CC) -shared'
12945 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000012946 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000012947 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Trent Mick635f6fb2000-08-23 21:33:05 +000012948 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +000012949 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012950 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000012951 *) LDSHARED="ld";;
12952 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000012953fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000012954{ echo "$as_me:$LINENO: result: $LDSHARED" >&5
12955echo "${ECHO_T}$LDSHARED" >&6; }
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000012956BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000012957# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012958# library (module) -- this is only needed for a few systems
Thomas Wouters477c8d52006-05-27 19:21:47 +000012959{ echo "$as_me:$LINENO: checking CCSHARED" >&5
12960echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012961if test -z "$CCSHARED"
12962then
Guido van Rossum07397971997-04-29 21:49:50 +000012963 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000012964 SunOS*) if test "$GCC" = yes;
12965 then CCSHARED="-fPIC";
Martin v. Löwisd5845ec2005-12-30 12:31:38 +000012966 else CCSHARED="-xcode=pic32";
Neil Schemenauerc761fc82001-02-19 04:50:49 +000012967 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000012968 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000012969 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000012970 else CCSHARED="+z";
12971 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012972 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000012973 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000012974 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000012975 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000012976 if test "$GCC" = "yes"
12977 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000012978 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000012979 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000012980 SCO_SV*)
12981 if test "$GCC" = "yes"
12982 then CCSHARED="-fPIC"
12983 else CCSHARED="-Kpic -belf"
12984 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +000012985 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000012986 IRIX*/6*) case $CC in
12987 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000012988 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000012989 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012990 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000012991 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000012992fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000012993{ echo "$as_me:$LINENO: result: $CCSHARED" >&5
12994echo "${ECHO_T}$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012995# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012996# the python executable -- this is only needed for a few systems
Thomas Wouters477c8d52006-05-27 19:21:47 +000012997{ echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
12998echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012999if test -z "$LINKFORSHARED"
13000then
Guido van Rossum07397971997-04-29 21:49:50 +000013001 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013002 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000013003 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000013004 LINKFORSHARED="-Wl,-E -Wl,+s";;
13005# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000013006 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013007 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013008 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000013009 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000013010 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
13011 # which is
Jack Jansene578a632001-08-15 01:27:14 +000013012 # not used by the core itself but which needs to be in the core so
13013 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +000013014 # -prebind is no longer used, because it actually seems to give a
13015 # slowdown in stead of a speedup, maybe due to the large number of
13016 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000013017
13018 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +000013019 if test "$enable_framework"
13020 then
Jack Jansenda49e192005-01-07 13:08:22 +000013021 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000013022 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000013023 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013024 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000013025 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000013026 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013027 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000013028 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
13029 then
13030 LINKFORSHARED="-Wl,--export-dynamic"
13031 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013032 SunOS/5*) case $CC in
13033 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000013034 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000013035 then
13036 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013037 fi;;
13038 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000013039 CYGWIN*)
13040 if test $enable_shared = "no"
13041 then
13042 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
13043 fi;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013044 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013045fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000013046{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
13047echo "${ECHO_T}$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013048
Michael W. Hudson54241132001-12-07 15:38:26 +000013049
Thomas Wouters477c8d52006-05-27 19:21:47 +000013050{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
13051echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013052if test ! "$LIBRARY" = "$LDLIBRARY"
13053then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000013054 case $ac_sys_system in
13055 CYGWIN*)
13056 # Cygwin needs CCSHARED when building extension DLLs
13057 # but not when building the interpreter DLL.
13058 CFLAGSFORSHARED='';;
13059 *)
13060 CFLAGSFORSHARED='$(CCSHARED)'
13061 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013062fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000013063{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
13064echo "${ECHO_T}$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013065
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013066# SHLIBS are libraries (except -lc and -lm) to link to the python shared
13067# library (with --enable-shared).
13068# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000013069# symbols, this must be set to $(LIBS) (expanded by make). We do this even
13070# if it is not required, since it creates a dependency of the shared library
13071# to LIBS. This, in turn, means that applications linking the shared libpython
13072# don't need to link LIBS explicitly. The default should be only changed
13073# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013074
Thomas Wouters477c8d52006-05-27 19:21:47 +000013075{ echo "$as_me:$LINENO: checking SHLIBS" >&5
13076echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013077case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013078 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000013079 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013080esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000013081{ echo "$as_me:$LINENO: result: $SHLIBS" >&5
13082echo "${ECHO_T}$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013083
13084
Guido van Rossum627b2d71993-12-24 10:39:16 +000013085# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000013086
Thomas Wouters477c8d52006-05-27 19:21:47 +000013087{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
13088echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013089if test "${ac_cv_lib_dl_dlopen+set}" = set; then
13090 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013091else
Martin v. Löwis11437992002-04-12 09:54:03 +000013092 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013093LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013094cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013095/* confdefs.h. */
13096_ACEOF
13097cat confdefs.h >>conftest.$ac_ext
13098cat >>conftest.$ac_ext <<_ACEOF
13099/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013100
Thomas Wouters477c8d52006-05-27 19:21:47 +000013101/* Override any GCC internal prototype to avoid an error.
13102 Use char because int might match the return type of a GCC
13103 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013104#ifdef __cplusplus
13105extern "C"
13106#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013107char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013108int
13109main ()
13110{
Thomas Wouters477c8d52006-05-27 19:21:47 +000013111return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013112 ;
13113 return 0;
13114}
13115_ACEOF
13116rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013117if { (ac_try="$ac_link"
13118case "(($ac_try" in
13119 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13120 *) ac_try_echo=$ac_try;;
13121esac
13122eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13123 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013124 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013125 grep -v '^ *+' conftest.er1 >conftest.err
13126 rm -f conftest.er1
13127 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13129 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013130 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
13131 { (case "(($ac_try" in
13132 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13133 *) ac_try_echo=$ac_try;;
13134esac
13135eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13136 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013137 ac_status=$?
13138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13139 (exit $ac_status); }; } &&
13140 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013141 { (case "(($ac_try" in
13142 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13143 *) ac_try_echo=$ac_try;;
13144esac
13145eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13146 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013147 ac_status=$?
13148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13149 (exit $ac_status); }; }; then
13150 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013151else
Martin v. Löwis11437992002-04-12 09:54:03 +000013152 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013153sed 's/^/| /' conftest.$ac_ext >&5
13154
Thomas Wouters477c8d52006-05-27 19:21:47 +000013155 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013156fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000013157
Skip Montanarof0d5f792004-08-15 14:08:23 +000013158rm -f conftest.err conftest.$ac_objext \
13159 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013160LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000013161fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000013162{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
13163echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013164if test $ac_cv_lib_dl_dlopen = yes; then
13165 cat >>confdefs.h <<_ACEOF
13166#define HAVE_LIBDL 1
13167_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013168
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013169 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013170
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013171fi
13172 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000013173
Thomas Wouters477c8d52006-05-27 19:21:47 +000013174{ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
13175echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013176if test "${ac_cv_lib_dld_shl_load+set}" = set; then
13177 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013178else
Martin v. Löwis11437992002-04-12 09:54:03 +000013179 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013180LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013181cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013182/* confdefs.h. */
13183_ACEOF
13184cat confdefs.h >>conftest.$ac_ext
13185cat >>conftest.$ac_ext <<_ACEOF
13186/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013187
Thomas Wouters477c8d52006-05-27 19:21:47 +000013188/* Override any GCC internal prototype to avoid an error.
13189 Use char because int might match the return type of a GCC
13190 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013191#ifdef __cplusplus
13192extern "C"
13193#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013194char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013195int
13196main ()
13197{
Thomas Wouters477c8d52006-05-27 19:21:47 +000013198return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013199 ;
13200 return 0;
13201}
13202_ACEOF
13203rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013204if { (ac_try="$ac_link"
13205case "(($ac_try" in
13206 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13207 *) ac_try_echo=$ac_try;;
13208esac
13209eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13210 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013211 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013212 grep -v '^ *+' conftest.er1 >conftest.err
13213 rm -f conftest.er1
13214 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13216 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013217 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
13218 { (case "(($ac_try" in
13219 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13220 *) ac_try_echo=$ac_try;;
13221esac
13222eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13223 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013224 ac_status=$?
13225 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13226 (exit $ac_status); }; } &&
13227 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013228 { (case "(($ac_try" in
13229 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13230 *) ac_try_echo=$ac_try;;
13231esac
13232eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13233 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013234 ac_status=$?
13235 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13236 (exit $ac_status); }; }; then
13237 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013238else
Martin v. Löwis11437992002-04-12 09:54:03 +000013239 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013240sed 's/^/| /' conftest.$ac_ext >&5
13241
Thomas Wouters477c8d52006-05-27 19:21:47 +000013242 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013243fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000013244
Skip Montanarof0d5f792004-08-15 14:08:23 +000013245rm -f conftest.err conftest.$ac_objext \
13246 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013247LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000013248fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000013249{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
13250echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013251if test $ac_cv_lib_dld_shl_load = yes; then
13252 cat >>confdefs.h <<_ACEOF
13253#define HAVE_LIBDLD 1
13254_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013255
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013256 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013257
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013258fi
13259 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000013260
13261# only check for sem_ini if thread support is requested
13262if test "$with_threads" = "yes" -o -z "$with_threads"; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000013263 { echo "$as_me:$LINENO: checking for library containing sem_init" >&5
13264echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013265if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013266 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000013267else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013268 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000013269cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013270/* confdefs.h. */
13271_ACEOF
13272cat confdefs.h >>conftest.$ac_ext
13273cat >>conftest.$ac_ext <<_ACEOF
13274/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013275
Thomas Wouters477c8d52006-05-27 19:21:47 +000013276/* Override any GCC internal prototype to avoid an error.
13277 Use char because int might match the return type of a GCC
13278 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013279#ifdef __cplusplus
13280extern "C"
13281#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013282char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013283int
13284main ()
13285{
Thomas Wouters477c8d52006-05-27 19:21:47 +000013286return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013287 ;
13288 return 0;
13289}
13290_ACEOF
Thomas Wouters477c8d52006-05-27 19:21:47 +000013291for ac_lib in '' pthread rt posix4; do
13292 if test -z "$ac_lib"; then
13293 ac_res="none required"
13294 else
13295 ac_res=-l$ac_lib
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013296 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters477c8d52006-05-27 19:21:47 +000013297 fi
13298 rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013299if { (ac_try="$ac_link"
13300case "(($ac_try" in
13301 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13302 *) ac_try_echo=$ac_try;;
13303esac
13304eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13305 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013306 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013307 grep -v '^ *+' conftest.er1 >conftest.err
13308 rm -f conftest.er1
13309 cat conftest.err >&5
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13311 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013312 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
13313 { (case "(($ac_try" in
13314 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13315 *) ac_try_echo=$ac_try;;
13316esac
13317eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13318 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013319 ac_status=$?
13320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13321 (exit $ac_status); }; } &&
13322 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013323 { (case "(($ac_try" in
13324 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13325 *) ac_try_echo=$ac_try;;
13326esac
13327eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13328 (eval "$ac_try") 2>&5
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013329 ac_status=$?
13330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13331 (exit $ac_status); }; }; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000013332 ac_cv_search_sem_init=$ac_res
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013333else
13334 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013335sed 's/^/| /' conftest.$ac_ext >&5
13336
Thomas Wouters477c8d52006-05-27 19:21:47 +000013337
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013338fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000013339
Skip Montanarof0d5f792004-08-15 14:08:23 +000013340rm -f conftest.err conftest.$ac_objext \
Thomas Wouters477c8d52006-05-27 19:21:47 +000013341 conftest$ac_exeext
13342 if test "${ac_cv_search_sem_init+set}" = set; then
13343 break
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013344fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000013345done
13346if test "${ac_cv_search_sem_init+set}" = set; then
13347 :
13348else
13349 ac_cv_search_sem_init=no
13350fi
13351rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013352LIBS=$ac_func_search_save_LIBS
13353fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000013354{ echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
13355echo "${ECHO_T}$ac_cv_search_sem_init" >&6; }
13356ac_res=$ac_cv_search_sem_init
13357if test "$ac_res" != no; then
13358 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000013359
Martin v. Löwis41933dd2002-03-21 15:10:58 +000013360fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000013361 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000013362 # posix4 on Solaris 2.6
13363 # pthread (first!) on Linux
13364fi
13365
Martin v. Löwis19d17342003-06-14 21:03:05 +000013366# check if we need libintl for locale functions
Thomas Wouters477c8d52006-05-27 19:21:47 +000013367{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
13368echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000013369if test "${ac_cv_lib_intl_textdomain+set}" = set; then
13370 echo $ECHO_N "(cached) $ECHO_C" >&6
13371else
13372 ac_check_lib_save_LIBS=$LIBS
13373LIBS="-lintl $LIBS"
13374cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013375/* confdefs.h. */
13376_ACEOF
13377cat confdefs.h >>conftest.$ac_ext
13378cat >>conftest.$ac_ext <<_ACEOF
13379/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000013380
Thomas Wouters477c8d52006-05-27 19:21:47 +000013381/* Override any GCC internal prototype to avoid an error.
13382 Use char because int might match the return type of a GCC
13383 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000013384#ifdef __cplusplus
13385extern "C"
13386#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000013387char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000013388int
13389main ()
13390{
Thomas Wouters477c8d52006-05-27 19:21:47 +000013391return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000013392 ;
13393 return 0;
13394}
13395_ACEOF
13396rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013397if { (ac_try="$ac_link"
13398case "(($ac_try" in
13399 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13400 *) ac_try_echo=$ac_try;;
13401esac
13402eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13403 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000013404 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013405 grep -v '^ *+' conftest.er1 >conftest.err
13406 rm -f conftest.er1
13407 cat conftest.err >&5
Martin v. Löwis19d17342003-06-14 21:03:05 +000013408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13409 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013410 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
13411 { (case "(($ac_try" in
13412 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13413 *) ac_try_echo=$ac_try;;
13414esac
13415eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13416 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013417 ac_status=$?
13418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13419 (exit $ac_status); }; } &&
13420 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013421 { (case "(($ac_try" in
13422 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13423 *) ac_try_echo=$ac_try;;
13424esac
13425eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13426 (eval "$ac_try") 2>&5
Martin v. Löwis19d17342003-06-14 21:03:05 +000013427 ac_status=$?
13428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13429 (exit $ac_status); }; }; then
13430 ac_cv_lib_intl_textdomain=yes
13431else
13432 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013433sed 's/^/| /' conftest.$ac_ext >&5
13434
Thomas Wouters477c8d52006-05-27 19:21:47 +000013435 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000013436fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000013437
Skip Montanarof0d5f792004-08-15 14:08:23 +000013438rm -f conftest.err conftest.$ac_objext \
13439 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000013440LIBS=$ac_check_lib_save_LIBS
13441fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000013442{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
13443echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000013444if test $ac_cv_lib_intl_textdomain = yes; then
13445
13446cat >>confdefs.h <<\_ACEOF
13447#define WITH_LIBINTL 1
13448_ACEOF
13449
13450fi
13451
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013452
13453# checks for system dependent C++ extensions support
13454case "$ac_sys_system" in
Thomas Wouters477c8d52006-05-27 19:21:47 +000013455 AIX*) { echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
13456echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013457 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013458/* confdefs.h. */
13459_ACEOF
13460cat confdefs.h >>conftest.$ac_ext
13461cat >>conftest.$ac_ext <<_ACEOF
13462/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013463#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013464int
13465main ()
13466{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013467loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000013468 ;
13469 return 0;
13470}
13471_ACEOF
13472rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013473if { (ac_try="$ac_link"
13474case "(($ac_try" in
13475 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13476 *) ac_try_echo=$ac_try;;
13477esac
13478eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13479 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013480 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013481 grep -v '^ *+' conftest.er1 >conftest.err
13482 rm -f conftest.er1
13483 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13485 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013486 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
13487 { (case "(($ac_try" in
13488 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13489 *) ac_try_echo=$ac_try;;
13490esac
13491eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13492 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013493 ac_status=$?
13494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13495 (exit $ac_status); }; } &&
13496 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013497 { (case "(($ac_try" in
13498 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13499 *) ac_try_echo=$ac_try;;
13500esac
13501eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13502 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013503 ac_status=$?
13504 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13505 (exit $ac_status); }; }; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013506
Martin v. Löwis11437992002-04-12 09:54:03 +000013507cat >>confdefs.h <<\_ACEOF
13508#define AIX_GENUINE_CPLUSPLUS 1
13509_ACEOF
13510
Thomas Wouters477c8d52006-05-27 19:21:47 +000013511 { echo "$as_me:$LINENO: result: yes" >&5
13512echo "${ECHO_T}yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013513else
Martin v. Löwis11437992002-04-12 09:54:03 +000013514 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013515sed 's/^/| /' conftest.$ac_ext >&5
13516
Thomas Wouters477c8d52006-05-27 19:21:47 +000013517 { echo "$as_me:$LINENO: result: no" >&5
13518echo "${ECHO_T}no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013519fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000013520
Skip Montanarof0d5f792004-08-15 14:08:23 +000013521rm -f conftest.err conftest.$ac_objext \
13522 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013523 *) ;;
13524esac
13525
Guido van Rossum70c7f481998-03-26 18:44:10 +000013526# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013527# BeOS' sockets are stashed in libnet.
Thomas Wouters477c8d52006-05-27 19:21:47 +000013528{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
13529echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013530if test "${ac_cv_lib_nsl_t_open+set}" = set; then
13531 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013532else
Martin v. Löwis11437992002-04-12 09:54:03 +000013533 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013534LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013535cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013536/* confdefs.h. */
13537_ACEOF
13538cat confdefs.h >>conftest.$ac_ext
13539cat >>conftest.$ac_ext <<_ACEOF
13540/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013541
Thomas Wouters477c8d52006-05-27 19:21:47 +000013542/* Override any GCC internal prototype to avoid an error.
13543 Use char because int might match the return type of a GCC
13544 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013545#ifdef __cplusplus
13546extern "C"
13547#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013548char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013549int
13550main ()
13551{
Thomas Wouters477c8d52006-05-27 19:21:47 +000013552return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013553 ;
13554 return 0;
13555}
13556_ACEOF
13557rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013558if { (ac_try="$ac_link"
13559case "(($ac_try" in
13560 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13561 *) ac_try_echo=$ac_try;;
13562esac
13563eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13564 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013565 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013566 grep -v '^ *+' conftest.er1 >conftest.err
13567 rm -f conftest.er1
13568 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13570 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013571 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
13572 { (case "(($ac_try" in
13573 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13574 *) ac_try_echo=$ac_try;;
13575esac
13576eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13577 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013578 ac_status=$?
13579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13580 (exit $ac_status); }; } &&
13581 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013582 { (case "(($ac_try" in
13583 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13584 *) ac_try_echo=$ac_try;;
13585esac
13586eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13587 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013588 ac_status=$?
13589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13590 (exit $ac_status); }; }; then
13591 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013592else
Martin v. Löwis11437992002-04-12 09:54:03 +000013593 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013594sed 's/^/| /' conftest.$ac_ext >&5
13595
Thomas Wouters477c8d52006-05-27 19:21:47 +000013596 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013597fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000013598
Skip Montanarof0d5f792004-08-15 14:08:23 +000013599rm -f conftest.err conftest.$ac_objext \
13600 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013601LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013602fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000013603{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
13604echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013605if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013606 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013607fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000013608 # SVR4
Thomas Wouters477c8d52006-05-27 19:21:47 +000013609{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
13610echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013611if test "${ac_cv_lib_socket_socket+set}" = set; then
13612 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013613else
Martin v. Löwis11437992002-04-12 09:54:03 +000013614 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013615LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013616cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013617/* confdefs.h. */
13618_ACEOF
13619cat confdefs.h >>conftest.$ac_ext
13620cat >>conftest.$ac_ext <<_ACEOF
13621/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013622
Thomas Wouters477c8d52006-05-27 19:21:47 +000013623/* Override any GCC internal prototype to avoid an error.
13624 Use char because int might match the return type of a GCC
13625 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013626#ifdef __cplusplus
13627extern "C"
13628#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013629char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013630int
13631main ()
13632{
Thomas Wouters477c8d52006-05-27 19:21:47 +000013633return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013634 ;
13635 return 0;
13636}
13637_ACEOF
13638rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013639if { (ac_try="$ac_link"
13640case "(($ac_try" in
13641 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13642 *) ac_try_echo=$ac_try;;
13643esac
13644eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13645 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013646 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013647 grep -v '^ *+' conftest.er1 >conftest.err
13648 rm -f conftest.er1
13649 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13651 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013652 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
13653 { (case "(($ac_try" in
13654 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13655 *) ac_try_echo=$ac_try;;
13656esac
13657eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13658 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013659 ac_status=$?
13660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13661 (exit $ac_status); }; } &&
13662 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013663 { (case "(($ac_try" in
13664 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13665 *) ac_try_echo=$ac_try;;
13666esac
13667eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13668 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013669 ac_status=$?
13670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13671 (exit $ac_status); }; }; then
13672 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013673else
Martin v. Löwis11437992002-04-12 09:54:03 +000013674 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013675sed 's/^/| /' conftest.$ac_ext >&5
13676
Thomas Wouters477c8d52006-05-27 19:21:47 +000013677 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013678fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000013679
Skip Montanarof0d5f792004-08-15 14:08:23 +000013680rm -f conftest.err conftest.$ac_objext \
13681 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013682LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013683fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000013684{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
13685echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013686if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000013687 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000013688fi
13689 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000013690
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000013691case "$ac_sys_system" in
13692BeOS*)
Thomas Wouters477c8d52006-05-27 19:21:47 +000013693{ echo "$as_me:$LINENO: checking for socket in -lnet" >&5
13694echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013695if test "${ac_cv_lib_net_socket+set}" = set; then
13696 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000013697else
Martin v. Löwis11437992002-04-12 09:54:03 +000013698 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000013699LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013700cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013701/* confdefs.h. */
13702_ACEOF
13703cat confdefs.h >>conftest.$ac_ext
13704cat >>conftest.$ac_ext <<_ACEOF
13705/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013706
Thomas Wouters477c8d52006-05-27 19:21:47 +000013707/* Override any GCC internal prototype to avoid an error.
13708 Use char because int might match the return type of a GCC
13709 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013710#ifdef __cplusplus
13711extern "C"
13712#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013713char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013714int
13715main ()
13716{
Thomas Wouters477c8d52006-05-27 19:21:47 +000013717return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013718 ;
13719 return 0;
13720}
13721_ACEOF
13722rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013723if { (ac_try="$ac_link"
13724case "(($ac_try" in
13725 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13726 *) ac_try_echo=$ac_try;;
13727esac
13728eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13729 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013730 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013731 grep -v '^ *+' conftest.er1 >conftest.err
13732 rm -f conftest.er1
13733 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13735 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013736 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
13737 { (case "(($ac_try" in
13738 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13739 *) ac_try_echo=$ac_try;;
13740esac
13741eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13742 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013743 ac_status=$?
13744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13745 (exit $ac_status); }; } &&
13746 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013747 { (case "(($ac_try" in
13748 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13749 *) ac_try_echo=$ac_try;;
13750esac
13751eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13752 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013753 ac_status=$?
13754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13755 (exit $ac_status); }; }; then
13756 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000013757else
Martin v. Löwis11437992002-04-12 09:54:03 +000013758 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013759sed 's/^/| /' conftest.$ac_ext >&5
13760
Thomas Wouters477c8d52006-05-27 19:21:47 +000013761 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000013762fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000013763
Skip Montanarof0d5f792004-08-15 14:08:23 +000013764rm -f conftest.err conftest.$ac_objext \
13765 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013766LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000013767fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000013768{ echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
13769echo "${ECHO_T}$ac_cv_lib_net_socket" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013770if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013771 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013772fi
13773 # BeOS
13774;;
13775esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000013776
Thomas Wouters477c8d52006-05-27 19:21:47 +000013777{ echo "$as_me:$LINENO: checking for --with-libs" >&5
13778echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013779
Thomas Wouters477c8d52006-05-27 19:21:47 +000013780# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000013781if test "${with_libs+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000013782 withval=$with_libs;
13783{ echo "$as_me:$LINENO: result: $withval" >&5
13784echo "${ECHO_T}$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000013785LIBS="$withval $LIBS"
13786
13787else
Thomas Wouters477c8d52006-05-27 19:21:47 +000013788 { echo "$as_me:$LINENO: result: no" >&5
13789echo "${ECHO_T}no" >&6; }
13790fi
13791
Guido van Rossum7f43da71994-08-01 12:15:30 +000013792
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013793# Check for use of the system libffi library
Thomas Wouters477c8d52006-05-27 19:21:47 +000013794{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
13795echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013796
Thomas Wouters477c8d52006-05-27 19:21:47 +000013797# Check whether --with-system_ffi was given.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013798if test "${with_system_ffi+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000013799 withval=$with_system_ffi;
13800fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013801
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013802
13803if test -z "$with_system_ffi"
13804then with_system_ffi="no"
13805fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000013806{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5
13807echo "${ECHO_T}$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013808
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000013809# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013810
13811
Thomas Wouters477c8d52006-05-27 19:21:47 +000013812{ echo "$as_me:$LINENO: checking for --with-signal-module" >&5
13813echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013814
Thomas Wouters477c8d52006-05-27 19:21:47 +000013815# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013816if test "${with_signal_module+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000013817 withval=$with_signal_module;
13818fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013819
13820
13821if test -z "$with_signal_module"
13822then with_signal_module="yes"
13823fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000013824{ echo "$as_me:$LINENO: result: $with_signal_module" >&5
13825echo "${ECHO_T}$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013826
13827if test "${with_signal_module}" = "yes"; then
13828 USE_SIGNAL_MODULE=""
13829 SIGNAL_OBJS=""
13830else
13831 USE_SIGNAL_MODULE="#"
13832 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
13833fi
13834
Guido van Rossum3d15bd82001-01-10 18:53:48 +000013835# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000013836
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000013837USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000013838
Thomas Wouters477c8d52006-05-27 19:21:47 +000013839{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
13840echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013841
Guido van Rossumec2f0731997-01-22 20:54:01 +000013842
Thomas Wouters477c8d52006-05-27 19:21:47 +000013843# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000013844if test "${with_dec_threads+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000013845 withval=$with_dec_threads;
13846{ echo "$as_me:$LINENO: result: $withval" >&5
13847echo "${ECHO_T}$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000013848LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000013849if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000013850 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000013851fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000013852else
Thomas Wouters477c8d52006-05-27 19:21:47 +000013853 { echo "$as_me:$LINENO: result: no" >&5
13854echo "${ECHO_T}no" >&6; }
13855fi
13856
Martin v. Löwis11437992002-04-12 09:54:03 +000013857
13858# Templates for things AC_DEFINEd more than once.
13859# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000013860
13861
Martin v. Löwis11437992002-04-12 09:54:03 +000013862
13863
13864
13865
13866
Thomas Wouters477c8d52006-05-27 19:21:47 +000013867{ echo "$as_me:$LINENO: checking for --with-threads" >&5
13868echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013869
Thomas Wouters477c8d52006-05-27 19:21:47 +000013870# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000013871if test "${with_threads+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000013872 withval=$with_threads;
13873fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000013874
13875
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000013876# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000013877
Thomas Wouters477c8d52006-05-27 19:21:47 +000013878# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013879if test "${with_thread+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000013880 withval=$with_thread; with_threads=$with_thread
13881fi
13882
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000013883
13884if test -z "$with_threads"
13885then with_threads="yes"
13886fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000013887{ echo "$as_me:$LINENO: result: $with_threads" >&5
13888echo "${ECHO_T}$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000013889
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013890
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000013891if test "$with_threads" = "no"
13892then
13893 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013894elif test "$ac_cv_pthread_is_default" = yes
13895then
Martin v. Löwis11437992002-04-12 09:54:03 +000013896 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013897#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013898_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013899
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013900 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000013901 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013902#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013903_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013904
13905 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000013906 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000013907elif test "$ac_cv_kpthread" = "yes"
13908then
13909 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000013910 if test "$ac_cv_cxx_thread" = "yes"; then
13911 CXX="$CXX -Kpthread"
13912 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013913 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000013914#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013915_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000013916
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013917 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013918 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013919elif test "$ac_cv_kthread" = "yes"
13920then
13921 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000013922 if test "$ac_cv_cxx_thread" = "yes"; then
13923 CXX="$CXX -Kthread"
13924 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013925 cat >>confdefs.h <<\_ACEOF
13926#define WITH_THREAD 1
13927_ACEOF
13928
13929 posix_threads=yes
13930 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013931elif test "$ac_cv_pthread" = "yes"
13932then
13933 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000013934 if test "$ac_cv_cxx_thread" = "yes"; then
13935 CXX="$CXX -pthread"
13936 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013937 cat >>confdefs.h <<\_ACEOF
13938#define WITH_THREAD 1
13939_ACEOF
13940
13941 posix_threads=yes
13942 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000013943else
13944 if test ! -z "$with_threads" -a -d "$with_threads"
13945 then LDFLAGS="$LDFLAGS -L$with_threads"
13946 fi
13947 if test ! -z "$withval" -a -d "$withval"
13948 then LDFLAGS="$LDFLAGS -L$withval"
13949 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013950
13951 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000013952 # define _POSIX_THREADS in unistd.h. Some apparently don't
13953 # (e.g. gnu pth with pthread emulation)
Thomas Wouters477c8d52006-05-27 19:21:47 +000013954 { echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
13955echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013956 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013957/* confdefs.h. */
13958_ACEOF
13959cat confdefs.h >>conftest.$ac_ext
13960cat >>conftest.$ac_ext <<_ACEOF
13961/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013962
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013963#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013964#ifdef _POSIX_THREADS
13965yes
13966#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013967
13968_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013969if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000013970 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013971 unistd_defines_pthreads=yes
13972else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013973 unistd_defines_pthreads=no
13974fi
13975rm -f conftest*
13976
Thomas Wouters477c8d52006-05-27 19:21:47 +000013977 { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
13978echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013979
Martin v. Löwis11437992002-04-12 09:54:03 +000013980 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000013981#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013982_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000013983
Martin v. Löwis11437992002-04-12 09:54:03 +000013984 if test "${ac_cv_header_cthreads_h+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000013985 { echo "$as_me:$LINENO: checking for cthreads.h" >&5
13986echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013987if test "${ac_cv_header_cthreads_h+set}" = set; then
13988 echo $ECHO_N "(cached) $ECHO_C" >&6
13989fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000013990{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
13991echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013992else
Martin v. Löwis11437992002-04-12 09:54:03 +000013993 # Is the header compilable?
Thomas Wouters477c8d52006-05-27 19:21:47 +000013994{ echo "$as_me:$LINENO: checking cthreads.h usability" >&5
13995echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013996cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013997/* confdefs.h. */
13998_ACEOF
13999cat confdefs.h >>conftest.$ac_ext
14000cat >>conftest.$ac_ext <<_ACEOF
14001/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014002$ac_includes_default
14003#include <cthreads.h>
14004_ACEOF
14005rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014006if { (ac_try="$ac_compile"
14007case "(($ac_try" in
14008 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14009 *) ac_try_echo=$ac_try;;
14010esac
14011eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14012 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014013 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014014 grep -v '^ *+' conftest.er1 >conftest.err
14015 rm -f conftest.er1
14016 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14018 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014019 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
14020 { (case "(($ac_try" in
14021 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14022 *) ac_try_echo=$ac_try;;
14023esac
14024eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14025 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014026 ac_status=$?
14027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14028 (exit $ac_status); }; } &&
14029 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014030 { (case "(($ac_try" in
14031 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14032 *) ac_try_echo=$ac_try;;
14033esac
14034eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14035 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014036 ac_status=$?
14037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14038 (exit $ac_status); }; }; then
14039 ac_header_compiler=yes
14040else
14041 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014042sed 's/^/| /' conftest.$ac_ext >&5
14043
Thomas Wouters477c8d52006-05-27 19:21:47 +000014044 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014045fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000014046
Skip Montanarof0d5f792004-08-15 14:08:23 +000014047rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000014048{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14049echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014050
14051# Is the header present?
Thomas Wouters477c8d52006-05-27 19:21:47 +000014052{ echo "$as_me:$LINENO: checking cthreads.h presence" >&5
14053echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014054cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014055/* confdefs.h. */
14056_ACEOF
14057cat confdefs.h >>conftest.$ac_ext
14058cat >>conftest.$ac_ext <<_ACEOF
14059/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014060#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014061_ACEOF
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014062if { (ac_try="$ac_cpp conftest.$ac_ext"
14063case "(($ac_try" in
14064 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14065 *) ac_try_echo=$ac_try;;
14066esac
14067eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14068 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014069 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014070 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000014071 rm -f conftest.er1
14072 cat conftest.err >&5
14073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14074 (exit $ac_status); } >/dev/null; then
14075 if test -s conftest.err; then
14076 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000014077 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +000014078 else
14079 ac_cpp_err=
14080 fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014081else
Martin v. Löwis11437992002-04-12 09:54:03 +000014082 ac_cpp_err=yes
14083fi
14084if test -z "$ac_cpp_err"; then
14085 ac_header_preproc=yes
14086else
14087 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014088sed 's/^/| /' conftest.$ac_ext >&5
14089
Martin v. Löwis11437992002-04-12 09:54:03 +000014090 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014091fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000014092
Martin v. Löwis11437992002-04-12 09:54:03 +000014093rm -f conftest.err conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000014094{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14095echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014096
14097# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014098case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14099 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000014100 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
14101echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014102 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
14103echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
14104 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014105 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014106 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014107 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
14108echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014109 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
14110echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
14111 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
14112echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
14113 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
14114echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014115 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
14116echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014117 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
14118echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +000014119 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000014120## ------------------------------------------------ ##
14121## Report this to http://www.python.org/python-bugs ##
14122## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014123_ASBOX
Thomas Wouters477c8d52006-05-27 19:21:47 +000014124 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014125 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014126esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000014127{ echo "$as_me:$LINENO: checking for cthreads.h" >&5
14128echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014129if test "${ac_cv_header_cthreads_h+set}" = set; then
14130 echo $ECHO_N "(cached) $ECHO_C" >&6
14131else
14132 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014133fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000014134{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
14135echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014136
14137fi
14138if test $ac_cv_header_cthreads_h = yes; then
14139 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014140#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014141_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014142
Martin v. Löwis11437992002-04-12 09:54:03 +000014143 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014144#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014145_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014146
Martin v. Löwis11437992002-04-12 09:54:03 +000014147
14148cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014149#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014150_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014151
14152 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014153 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014154else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014155
Martin v. Löwis11437992002-04-12 09:54:03 +000014156 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000014157 { echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
14158echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014159if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
14160 echo $ECHO_N "(cached) $ECHO_C" >&6
14161fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000014162{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
14163echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014164else
Martin v. Löwis11437992002-04-12 09:54:03 +000014165 # Is the header compilable?
Thomas Wouters477c8d52006-05-27 19:21:47 +000014166{ echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
14167echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014168cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014169/* confdefs.h. */
14170_ACEOF
14171cat confdefs.h >>conftest.$ac_ext
14172cat >>conftest.$ac_ext <<_ACEOF
14173/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014174$ac_includes_default
14175#include <mach/cthreads.h>
14176_ACEOF
14177rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014178if { (ac_try="$ac_compile"
14179case "(($ac_try" in
14180 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14181 *) ac_try_echo=$ac_try;;
14182esac
14183eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14184 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014185 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014186 grep -v '^ *+' conftest.er1 >conftest.err
14187 rm -f conftest.er1
14188 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014189 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14190 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014191 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
14192 { (case "(($ac_try" in
14193 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14194 *) ac_try_echo=$ac_try;;
14195esac
14196eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14197 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014198 ac_status=$?
14199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14200 (exit $ac_status); }; } &&
14201 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014202 { (case "(($ac_try" in
14203 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14204 *) ac_try_echo=$ac_try;;
14205esac
14206eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14207 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014208 ac_status=$?
14209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14210 (exit $ac_status); }; }; then
14211 ac_header_compiler=yes
14212else
14213 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014214sed 's/^/| /' conftest.$ac_ext >&5
14215
Thomas Wouters477c8d52006-05-27 19:21:47 +000014216 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014217fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000014218
Skip Montanarof0d5f792004-08-15 14:08:23 +000014219rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000014220{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14221echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014222
14223# Is the header present?
Thomas Wouters477c8d52006-05-27 19:21:47 +000014224{ echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
14225echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014226cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014227/* confdefs.h. */
14228_ACEOF
14229cat confdefs.h >>conftest.$ac_ext
14230cat >>conftest.$ac_ext <<_ACEOF
14231/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014232#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014233_ACEOF
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014234if { (ac_try="$ac_cpp conftest.$ac_ext"
14235case "(($ac_try" in
14236 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14237 *) ac_try_echo=$ac_try;;
14238esac
14239eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14240 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014241 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014242 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000014243 rm -f conftest.er1
14244 cat conftest.err >&5
14245 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14246 (exit $ac_status); } >/dev/null; then
14247 if test -s conftest.err; then
14248 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000014249 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +000014250 else
14251 ac_cpp_err=
14252 fi
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014253else
Martin v. Löwis11437992002-04-12 09:54:03 +000014254 ac_cpp_err=yes
14255fi
14256if test -z "$ac_cpp_err"; then
14257 ac_header_preproc=yes
14258else
14259 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014260sed 's/^/| /' conftest.$ac_ext >&5
14261
Martin v. Löwis11437992002-04-12 09:54:03 +000014262 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014263fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000014264
Martin v. Löwis11437992002-04-12 09:54:03 +000014265rm -f conftest.err conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000014266{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14267echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014268
14269# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014270case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14271 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000014272 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
14273echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014274 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
14275echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
14276 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014277 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014278 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014279 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
14280echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014281 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
14282echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
14283 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
14284echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
14285 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
14286echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014287 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
14288echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014289 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
14290echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +000014291 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000014292## ------------------------------------------------ ##
14293## Report this to http://www.python.org/python-bugs ##
14294## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014295_ASBOX
Thomas Wouters477c8d52006-05-27 19:21:47 +000014296 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014297 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014298esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000014299{ echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
14300echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014301if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
14302 echo $ECHO_N "(cached) $ECHO_C" >&6
14303else
14304 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014305fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000014306{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
14307echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014308
14309fi
14310if test $ac_cv_header_mach_cthreads_h = yes; then
14311 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014312#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014313_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014314
Martin v. Löwis11437992002-04-12 09:54:03 +000014315 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014316#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014317_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014318
Martin v. Löwis11437992002-04-12 09:54:03 +000014319
14320cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014321#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014322_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014323
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014324 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014325else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014326
Thomas Wouters477c8d52006-05-27 19:21:47 +000014327 { echo "$as_me:$LINENO: checking for --with-pth" >&5
14328echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014329
Thomas Wouters477c8d52006-05-27 19:21:47 +000014330# Check whether --with-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014331if test "${with_pth+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000014332 withval=$with_pth; { echo "$as_me:$LINENO: result: $withval" >&5
14333echo "${ECHO_T}$withval" >&6; }
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000014334 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014335#define WITH_THREAD 1
14336_ACEOF
14337
14338
14339cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014340#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014341_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014342
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000014343 LIBS="-lpth $LIBS"
14344 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014345else
Thomas Wouters477c8d52006-05-27 19:21:47 +000014346 { echo "$as_me:$LINENO: result: no" >&5
14347echo "${ECHO_T}no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014348
14349 # Just looking for pthread_create in libpthread is not enough:
14350 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
14351 # So we really have to include pthread.h, and then link.
14352 _libs=$LIBS
14353 LIBS="$LIBS -lpthread"
Thomas Wouters477c8d52006-05-27 19:21:47 +000014354 { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
14355echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014356 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014357/* confdefs.h. */
14358_ACEOF
14359cat confdefs.h >>conftest.$ac_ext
14360cat >>conftest.$ac_ext <<_ACEOF
14361/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014362#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000014363
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014364void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000014365int
14366main ()
14367{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014368
14369pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000014370 ;
14371 return 0;
14372}
14373_ACEOF
14374rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014375if { (ac_try="$ac_link"
14376case "(($ac_try" in
14377 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14378 *) ac_try_echo=$ac_try;;
14379esac
14380eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14381 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014382 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014383 grep -v '^ *+' conftest.er1 >conftest.err
14384 rm -f conftest.er1
14385 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014386 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14387 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014388 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
14389 { (case "(($ac_try" in
14390 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14391 *) ac_try_echo=$ac_try;;
14392esac
14393eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14394 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014395 ac_status=$?
14396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14397 (exit $ac_status); }; } &&
14398 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014399 { (case "(($ac_try" in
14400 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14401 *) ac_try_echo=$ac_try;;
14402esac
14403eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14404 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014405 ac_status=$?
14406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14407 (exit $ac_status); }; }; then
14408
Thomas Wouters477c8d52006-05-27 19:21:47 +000014409 { echo "$as_me:$LINENO: result: yes" >&5
14410echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014411 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000014412#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014413_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000014414
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014415 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014416 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000014417else
Martin v. Löwis11437992002-04-12 09:54:03 +000014418 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014419sed 's/^/| /' conftest.$ac_ext >&5
14420
Martin v. Löwis11437992002-04-12 09:54:03 +000014421
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014422 LIBS=$_libs
Thomas Wouters477c8d52006-05-27 19:21:47 +000014423 { echo "$as_me:$LINENO: checking for pthread_detach" >&5
14424echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014425if test "${ac_cv_func_pthread_detach+set}" = set; then
14426 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000014427else
Martin v. Löwis11437992002-04-12 09:54:03 +000014428 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014429/* confdefs.h. */
14430_ACEOF
14431cat confdefs.h >>conftest.$ac_ext
14432cat >>conftest.$ac_ext <<_ACEOF
14433/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014434/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
14435 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14436#define pthread_detach innocuous_pthread_detach
14437
Guido van Rossumad678af1998-10-02 14:42:15 +000014438/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014439 which can conflict with char pthread_detach (); below.
14440 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014441 <limits.h> exists even on freestanding compilers. */
14442
14443#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000014444# include <limits.h>
14445#else
14446# include <assert.h>
14447#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014448
14449#undef pthread_detach
14450
Thomas Wouters477c8d52006-05-27 19:21:47 +000014451/* Override any GCC internal prototype to avoid an error.
14452 Use char because int might match the return type of a GCC
14453 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014454#ifdef __cplusplus
14455extern "C"
14456#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014457char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000014458/* The GNU C library defines this for functions which it implements
14459 to always fail with ENOSYS. Some functions are actually named
14460 something starting with __ and the normal name is an alias. */
Thomas Wouters477c8d52006-05-27 19:21:47 +000014461#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000014462choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000014463#endif
14464
Skip Montanaro6dead952003-09-25 14:50:04 +000014465int
14466main ()
14467{
Thomas Wouters477c8d52006-05-27 19:21:47 +000014468return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014469 ;
14470 return 0;
14471}
14472_ACEOF
14473rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014474if { (ac_try="$ac_link"
14475case "(($ac_try" in
14476 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14477 *) ac_try_echo=$ac_try;;
14478esac
14479eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14480 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014481 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014482 grep -v '^ *+' conftest.er1 >conftest.err
14483 rm -f conftest.er1
14484 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14486 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014487 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
14488 { (case "(($ac_try" in
14489 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14490 *) ac_try_echo=$ac_try;;
14491esac
14492eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14493 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014494 ac_status=$?
14495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14496 (exit $ac_status); }; } &&
14497 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014498 { (case "(($ac_try" in
14499 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14500 *) ac_try_echo=$ac_try;;
14501esac
14502eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14503 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014504 ac_status=$?
14505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14506 (exit $ac_status); }; }; then
14507 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000014508else
Martin v. Löwis11437992002-04-12 09:54:03 +000014509 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014510sed 's/^/| /' conftest.$ac_ext >&5
14511
Thomas Wouters477c8d52006-05-27 19:21:47 +000014512 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000014513fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000014514
Skip Montanarof0d5f792004-08-15 14:08:23 +000014515rm -f conftest.err conftest.$ac_objext \
14516 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000014517fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000014518{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
14519echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014520if test $ac_cv_func_pthread_detach = yes; then
14521 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000014522#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014523_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000014524
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014525 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014526 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000014527else
Guido van Rossumad678af1998-10-02 14:42:15 +000014528
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014529 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000014530 { echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
14531echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014532if test "${ac_cv_header_atheos_threads_h+set}" = set; then
14533 echo $ECHO_N "(cached) $ECHO_C" >&6
14534fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000014535{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
14536echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014537else
14538 # Is the header compilable?
Thomas Wouters477c8d52006-05-27 19:21:47 +000014539{ echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
14540echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014541cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014542/* confdefs.h. */
14543_ACEOF
14544cat confdefs.h >>conftest.$ac_ext
14545cat >>conftest.$ac_ext <<_ACEOF
14546/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014547$ac_includes_default
14548#include <atheos/threads.h>
14549_ACEOF
14550rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014551if { (ac_try="$ac_compile"
14552case "(($ac_try" in
14553 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14554 *) ac_try_echo=$ac_try;;
14555esac
14556eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14557 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014558 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014559 grep -v '^ *+' conftest.er1 >conftest.err
14560 rm -f conftest.er1
14561 cat conftest.err >&5
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14563 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014564 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
14565 { (case "(($ac_try" in
14566 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14567 *) ac_try_echo=$ac_try;;
14568esac
14569eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14570 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014571 ac_status=$?
14572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14573 (exit $ac_status); }; } &&
14574 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014575 { (case "(($ac_try" in
14576 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14577 *) ac_try_echo=$ac_try;;
14578esac
14579eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14580 (eval "$ac_try") 2>&5
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014581 ac_status=$?
14582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14583 (exit $ac_status); }; }; then
14584 ac_header_compiler=yes
14585else
14586 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014587sed 's/^/| /' conftest.$ac_ext >&5
14588
Thomas Wouters477c8d52006-05-27 19:21:47 +000014589 ac_header_compiler=no
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014590fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000014591
Skip Montanarof0d5f792004-08-15 14:08:23 +000014592rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000014593{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14594echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014595
14596# Is the header present?
Thomas Wouters477c8d52006-05-27 19:21:47 +000014597{ echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
14598echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014599cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014600/* confdefs.h. */
14601_ACEOF
14602cat confdefs.h >>conftest.$ac_ext
14603cat >>conftest.$ac_ext <<_ACEOF
14604/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014605#include <atheos/threads.h>
14606_ACEOF
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014607if { (ac_try="$ac_cpp conftest.$ac_ext"
14608case "(($ac_try" in
14609 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14610 *) ac_try_echo=$ac_try;;
14611esac
14612eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14613 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014614 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014615 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014616 rm -f conftest.er1
14617 cat conftest.err >&5
14618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14619 (exit $ac_status); } >/dev/null; then
14620 if test -s conftest.err; then
14621 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000014622 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014623 else
14624 ac_cpp_err=
14625 fi
14626else
14627 ac_cpp_err=yes
14628fi
14629if test -z "$ac_cpp_err"; then
14630 ac_header_preproc=yes
14631else
14632 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014633sed 's/^/| /' conftest.$ac_ext >&5
14634
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014635 ac_header_preproc=no
14636fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000014637
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014638rm -f conftest.err conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000014639{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14640echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014641
14642# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014643case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14644 yes:no: )
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014645 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
14646echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014647 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
14648echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
14649 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014650 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014651 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014652 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
14653echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014654 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
14655echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
14656 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
14657echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
14658 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5
14659echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014660 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
14661echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014662 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
14663echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +000014664 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000014665## ------------------------------------------------ ##
14666## Report this to http://www.python.org/python-bugs ##
14667## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014668_ASBOX
Thomas Wouters477c8d52006-05-27 19:21:47 +000014669 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014670 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014671esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000014672{ echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
14673echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014674if test "${ac_cv_header_atheos_threads_h+set}" = set; then
14675 echo $ECHO_N "(cached) $ECHO_C" >&6
14676else
14677 ac_cv_header_atheos_threads_h=$ac_header_preproc
14678fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000014679{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
14680echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014681
14682fi
14683if test $ac_cv_header_atheos_threads_h = yes; then
14684 cat >>confdefs.h <<\_ACEOF
14685#define WITH_THREAD 1
14686_ACEOF
14687
14688
14689cat >>confdefs.h <<\_ACEOF
14690#define ATHEOS_THREADS 1
14691_ACEOF
14692
14693 THREADOBJ="Python/thread.o"
14694else
14695
Martin v. Löwis11437992002-04-12 09:54:03 +000014696 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000014697 { echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
14698echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014699if test "${ac_cv_header_kernel_OS_h+set}" = set; then
14700 echo $ECHO_N "(cached) $ECHO_C" >&6
14701fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000014702{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
14703echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014704else
Martin v. Löwis11437992002-04-12 09:54:03 +000014705 # Is the header compilable?
Thomas Wouters477c8d52006-05-27 19:21:47 +000014706{ echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
14707echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014708cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014709/* confdefs.h. */
14710_ACEOF
14711cat confdefs.h >>conftest.$ac_ext
14712cat >>conftest.$ac_ext <<_ACEOF
14713/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014714$ac_includes_default
14715#include <kernel/OS.h>
14716_ACEOF
14717rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014718if { (ac_try="$ac_compile"
14719case "(($ac_try" in
14720 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14721 *) ac_try_echo=$ac_try;;
14722esac
14723eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14724 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014725 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014726 grep -v '^ *+' conftest.er1 >conftest.err
14727 rm -f conftest.er1
14728 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14730 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014731 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
14732 { (case "(($ac_try" in
14733 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14734 *) ac_try_echo=$ac_try;;
14735esac
14736eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14737 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014738 ac_status=$?
14739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14740 (exit $ac_status); }; } &&
14741 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014742 { (case "(($ac_try" in
14743 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14744 *) ac_try_echo=$ac_try;;
14745esac
14746eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14747 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014748 ac_status=$?
14749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14750 (exit $ac_status); }; }; then
14751 ac_header_compiler=yes
14752else
14753 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014754sed 's/^/| /' conftest.$ac_ext >&5
14755
Thomas Wouters477c8d52006-05-27 19:21:47 +000014756 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014757fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000014758
Skip Montanarof0d5f792004-08-15 14:08:23 +000014759rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000014760{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14761echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014762
14763# Is the header present?
Thomas Wouters477c8d52006-05-27 19:21:47 +000014764{ echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
14765echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014766cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014767/* confdefs.h. */
14768_ACEOF
14769cat confdefs.h >>conftest.$ac_ext
14770cat >>conftest.$ac_ext <<_ACEOF
14771/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014772#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014773_ACEOF
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014774if { (ac_try="$ac_cpp conftest.$ac_ext"
14775case "(($ac_try" in
14776 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14777 *) ac_try_echo=$ac_try;;
14778esac
14779eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14780 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014781 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014782 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000014783 rm -f conftest.er1
14784 cat conftest.err >&5
14785 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14786 (exit $ac_status); } >/dev/null; then
14787 if test -s conftest.err; then
14788 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000014789 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +000014790 else
14791 ac_cpp_err=
14792 fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014793else
Martin v. Löwis11437992002-04-12 09:54:03 +000014794 ac_cpp_err=yes
14795fi
14796if test -z "$ac_cpp_err"; then
14797 ac_header_preproc=yes
14798else
14799 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014800sed 's/^/| /' conftest.$ac_ext >&5
14801
Martin v. Löwis11437992002-04-12 09:54:03 +000014802 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014803fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000014804
Martin v. Löwis11437992002-04-12 09:54:03 +000014805rm -f conftest.err conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000014806{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14807echo "${ECHO_T}$ac_header_preproc" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014808
Martin v. Löwis11437992002-04-12 09:54:03 +000014809# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014810case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14811 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000014812 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
14813echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014814 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the compiler's result" >&5
14815echo "$as_me: WARNING: kernel/OS.h: proceeding with the compiler's result" >&2;}
14816 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014817 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014818 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014819 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
14820echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014821 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
14822echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
14823 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: see the Autoconf documentation" >&5
14824echo "$as_me: WARNING: kernel/OS.h: see the Autoconf documentation" >&2;}
14825 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&5
14826echo "$as_me: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014827 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
14828echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014829 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&5
14830echo "$as_me: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +000014831 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000014832## ------------------------------------------------ ##
14833## Report this to http://www.python.org/python-bugs ##
14834## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014835_ASBOX
Thomas Wouters477c8d52006-05-27 19:21:47 +000014836 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014837 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014838esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000014839{ echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
14840echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014841if test "${ac_cv_header_kernel_OS_h+set}" = set; then
14842 echo $ECHO_N "(cached) $ECHO_C" >&6
14843else
14844 ac_cv_header_kernel_OS_h=$ac_header_preproc
14845fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000014846{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
14847echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014848
14849fi
14850if test $ac_cv_header_kernel_OS_h = yes; then
14851 cat >>confdefs.h <<\_ACEOF
14852#define WITH_THREAD 1
14853_ACEOF
14854
14855
14856cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014857#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014858_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014859
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014860 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014861else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014862
Thomas Wouters477c8d52006-05-27 19:21:47 +000014863 { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
14864echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014865if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
14866 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014867else
Martin v. Löwis11437992002-04-12 09:54:03 +000014868 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014869LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014870cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014871/* confdefs.h. */
14872_ACEOF
14873cat confdefs.h >>conftest.$ac_ext
14874cat >>conftest.$ac_ext <<_ACEOF
14875/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014876
Thomas Wouters477c8d52006-05-27 19:21:47 +000014877/* Override any GCC internal prototype to avoid an error.
14878 Use char because int might match the return type of a GCC
14879 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014880#ifdef __cplusplus
14881extern "C"
14882#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014883char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014884int
14885main ()
14886{
Thomas Wouters477c8d52006-05-27 19:21:47 +000014887return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014888 ;
14889 return 0;
14890}
14891_ACEOF
14892rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014893if { (ac_try="$ac_link"
14894case "(($ac_try" in
14895 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14896 *) ac_try_echo=$ac_try;;
14897esac
14898eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14899 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014900 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014901 grep -v '^ *+' conftest.er1 >conftest.err
14902 rm -f conftest.er1
14903 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14905 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014906 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
14907 { (case "(($ac_try" in
14908 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14909 *) ac_try_echo=$ac_try;;
14910esac
14911eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14912 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014913 ac_status=$?
14914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14915 (exit $ac_status); }; } &&
14916 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014917 { (case "(($ac_try" in
14918 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14919 *) ac_try_echo=$ac_try;;
14920esac
14921eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14922 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014923 ac_status=$?
14924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14925 (exit $ac_status); }; }; then
14926 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000014927else
Martin v. Löwis11437992002-04-12 09:54:03 +000014928 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014929sed 's/^/| /' conftest.$ac_ext >&5
14930
Thomas Wouters477c8d52006-05-27 19:21:47 +000014931 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000014932fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000014933
Skip Montanarof0d5f792004-08-15 14:08:23 +000014934rm -f conftest.err conftest.$ac_objext \
14935 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014936LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000014937fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000014938{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
14939echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014940if test $ac_cv_lib_pthreads_pthread_create = yes; then
14941 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000014942#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014943_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000014944
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014945 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000014946 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014947 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000014948else
Greg Steinadf63d62000-07-05 10:38:09 +000014949
Thomas Wouters477c8d52006-05-27 19:21:47 +000014950 { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
14951echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014952if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
14953 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000014954else
Martin v. Löwis11437992002-04-12 09:54:03 +000014955 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000014956LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014957cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014958/* confdefs.h. */
14959_ACEOF
14960cat confdefs.h >>conftest.$ac_ext
14961cat >>conftest.$ac_ext <<_ACEOF
14962/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014963
Thomas Wouters477c8d52006-05-27 19:21:47 +000014964/* Override any GCC internal prototype to avoid an error.
14965 Use char because int might match the return type of a GCC
14966 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014967#ifdef __cplusplus
14968extern "C"
14969#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014970char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014971int
14972main ()
14973{
Thomas Wouters477c8d52006-05-27 19:21:47 +000014974return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014975 ;
14976 return 0;
14977}
14978_ACEOF
14979rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014980if { (ac_try="$ac_link"
14981case "(($ac_try" in
14982 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14983 *) ac_try_echo=$ac_try;;
14984esac
14985eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14986 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014987 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014988 grep -v '^ *+' conftest.er1 >conftest.err
14989 rm -f conftest.er1
14990 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14992 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014993 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
14994 { (case "(($ac_try" in
14995 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14996 *) ac_try_echo=$ac_try;;
14997esac
14998eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14999 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015000 ac_status=$?
15001 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15002 (exit $ac_status); }; } &&
15003 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015004 { (case "(($ac_try" in
15005 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15006 *) ac_try_echo=$ac_try;;
15007esac
15008eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15009 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015010 ac_status=$?
15011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15012 (exit $ac_status); }; }; then
15013 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000015014else
Martin v. Löwis11437992002-04-12 09:54:03 +000015015 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015016sed 's/^/| /' conftest.$ac_ext >&5
15017
Thomas Wouters477c8d52006-05-27 19:21:47 +000015018 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000015019fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000015020
Skip Montanarof0d5f792004-08-15 14:08:23 +000015021rm -f conftest.err conftest.$ac_objext \
15022 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015023LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000015024fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000015025{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
15026echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015027if test $ac_cv_lib_c_r_pthread_create = yes; then
15028 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000015029#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015030_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000015031
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015032 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015033 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015034 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000015035else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000015036
Thomas Wouters477c8d52006-05-27 19:21:47 +000015037 { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
15038echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015039if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
15040 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015041else
Martin v. Löwis11437992002-04-12 09:54:03 +000015042 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015043LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015044cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015045/* confdefs.h. */
15046_ACEOF
15047cat confdefs.h >>conftest.$ac_ext
15048cat >>conftest.$ac_ext <<_ACEOF
15049/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015050
Thomas Wouters477c8d52006-05-27 19:21:47 +000015051/* Override any GCC internal prototype to avoid an error.
15052 Use char because int might match the return type of a GCC
15053 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015054#ifdef __cplusplus
15055extern "C"
15056#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015057char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015058int
15059main ()
15060{
Thomas Wouters477c8d52006-05-27 19:21:47 +000015061return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015062 ;
15063 return 0;
15064}
15065_ACEOF
15066rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015067if { (ac_try="$ac_link"
15068case "(($ac_try" in
15069 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15070 *) ac_try_echo=$ac_try;;
15071esac
15072eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15073 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015074 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015075 grep -v '^ *+' conftest.er1 >conftest.err
15076 rm -f conftest.er1
15077 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15079 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015080 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
15081 { (case "(($ac_try" in
15082 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15083 *) ac_try_echo=$ac_try;;
15084esac
15085eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15086 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015087 ac_status=$?
15088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15089 (exit $ac_status); }; } &&
15090 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015091 { (case "(($ac_try" in
15092 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15093 *) ac_try_echo=$ac_try;;
15094esac
15095eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15096 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015097 ac_status=$?
15098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15099 (exit $ac_status); }; }; then
15100 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015101else
Martin v. Löwis11437992002-04-12 09:54:03 +000015102 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015103sed 's/^/| /' conftest.$ac_ext >&5
15104
Thomas Wouters477c8d52006-05-27 19:21:47 +000015105 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015106fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000015107
Skip Montanarof0d5f792004-08-15 14:08:23 +000015108rm -f conftest.err conftest.$ac_objext \
15109 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015110LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015111fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000015112{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
15113echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015114if test $ac_cv_lib_pthread___pthread_create_system = yes; then
15115 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015116#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015117_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015118
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015119 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015120 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015121 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015122else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015123
Thomas Wouters477c8d52006-05-27 19:21:47 +000015124 { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
15125echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015126if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
15127 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000015128else
Martin v. Löwis11437992002-04-12 09:54:03 +000015129 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000015130LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015131cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015132/* confdefs.h. */
15133_ACEOF
15134cat confdefs.h >>conftest.$ac_ext
15135cat >>conftest.$ac_ext <<_ACEOF
15136/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015137
Thomas Wouters477c8d52006-05-27 19:21:47 +000015138/* Override any GCC internal prototype to avoid an error.
15139 Use char because int might match the return type of a GCC
15140 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015141#ifdef __cplusplus
15142extern "C"
15143#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015144char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015145int
15146main ()
15147{
Thomas Wouters477c8d52006-05-27 19:21:47 +000015148return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015149 ;
15150 return 0;
15151}
15152_ACEOF
15153rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015154if { (ac_try="$ac_link"
15155case "(($ac_try" in
15156 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15157 *) ac_try_echo=$ac_try;;
15158esac
15159eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15160 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015161 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015162 grep -v '^ *+' conftest.er1 >conftest.err
15163 rm -f conftest.er1
15164 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15166 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015167 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
15168 { (case "(($ac_try" in
15169 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15170 *) ac_try_echo=$ac_try;;
15171esac
15172eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15173 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015174 ac_status=$?
15175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15176 (exit $ac_status); }; } &&
15177 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015178 { (case "(($ac_try" in
15179 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15180 *) ac_try_echo=$ac_try;;
15181esac
15182eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15183 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015184 ac_status=$?
15185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15186 (exit $ac_status); }; }; then
15187 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000015188else
Martin v. Löwis11437992002-04-12 09:54:03 +000015189 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015190sed 's/^/| /' conftest.$ac_ext >&5
15191
Thomas Wouters477c8d52006-05-27 19:21:47 +000015192 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000015193fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000015194
Skip Montanarof0d5f792004-08-15 14:08:23 +000015195rm -f conftest.err conftest.$ac_objext \
15196 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015197LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000015198fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000015199{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
15200echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015201if test $ac_cv_lib_cma_pthread_create = yes; then
15202 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000015203#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015204_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000015205
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015206 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015207 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015208 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000015209else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000015210
Martin v. Löwis130fb172001-07-19 11:00:41 +000015211 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000015212fi
15213
Guido van Rossum627b2d71993-12-24 10:39:16 +000015214
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015215fi
15216
Guido van Rossum0be3e491997-05-22 20:33:33 +000015217fi
15218
Guido van Rossum49545951997-12-02 19:28:29 +000015219fi
15220
Guido van Rossumb93a8621998-05-07 13:27:32 +000015221fi
15222
Guido van Rossum07bd90e2000-05-08 13:41:38 +000015223
Michael W. Hudson54241132001-12-07 15:38:26 +000015224fi
15225
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015226
15227fi
15228
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015229fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000015230
Skip Montanarof0d5f792004-08-15 14:08:23 +000015231rm -f conftest.err conftest.$ac_objext \
15232 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000015233fi
15234
Martin v. Löwis11437992002-04-12 09:54:03 +000015235fi
15236
15237
15238fi
15239
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015240
Michael W. Hudson54241132001-12-07 15:38:26 +000015241
Thomas Wouters477c8d52006-05-27 19:21:47 +000015242 { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
15243echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015244if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
15245 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015246else
Martin v. Löwis11437992002-04-12 09:54:03 +000015247 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015248LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015249cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015250/* confdefs.h. */
15251_ACEOF
15252cat confdefs.h >>conftest.$ac_ext
15253cat >>conftest.$ac_ext <<_ACEOF
15254/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015255
Thomas Wouters477c8d52006-05-27 19:21:47 +000015256/* Override any GCC internal prototype to avoid an error.
15257 Use char because int might match the return type of a GCC
15258 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015259#ifdef __cplusplus
15260extern "C"
15261#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015262char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015263int
15264main ()
15265{
Thomas Wouters477c8d52006-05-27 19:21:47 +000015266return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015267 ;
15268 return 0;
15269}
15270_ACEOF
15271rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015272if { (ac_try="$ac_link"
15273case "(($ac_try" in
15274 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15275 *) ac_try_echo=$ac_try;;
15276esac
15277eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15278 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015279 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015280 grep -v '^ *+' conftest.er1 >conftest.err
15281 rm -f conftest.er1
15282 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15284 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015285 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
15286 { (case "(($ac_try" in
15287 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15288 *) ac_try_echo=$ac_try;;
15289esac
15290eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15291 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015292 ac_status=$?
15293 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15294 (exit $ac_status); }; } &&
15295 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015296 { (case "(($ac_try" in
15297 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15298 *) ac_try_echo=$ac_try;;
15299esac
15300eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15301 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015302 ac_status=$?
15303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15304 (exit $ac_status); }; }; then
15305 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015306else
Martin v. Löwis11437992002-04-12 09:54:03 +000015307 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015308sed 's/^/| /' conftest.$ac_ext >&5
15309
Thomas Wouters477c8d52006-05-27 19:21:47 +000015310 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015311fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000015312
Skip Montanarof0d5f792004-08-15 14:08:23 +000015313rm -f conftest.err conftest.$ac_objext \
15314 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015315LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015316fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000015317{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
15318echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015319if test $ac_cv_lib_mpc_usconfig = yes; then
15320 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015321#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015322_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015323
Martin v. Löwis130fb172001-07-19 11:00:41 +000015324 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015325 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015326 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000015327fi
15328
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015329
Neal Norwitza978ab02002-11-02 16:58:05 +000015330 if test "$posix_threads" != "yes"; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000015331 { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
15332echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015333if test "${ac_cv_lib_thread_thr_create+set}" = set; then
15334 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015335else
Martin v. Löwis11437992002-04-12 09:54:03 +000015336 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015337LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015338cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015339/* confdefs.h. */
15340_ACEOF
15341cat confdefs.h >>conftest.$ac_ext
15342cat >>conftest.$ac_ext <<_ACEOF
15343/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015344
Thomas Wouters477c8d52006-05-27 19:21:47 +000015345/* Override any GCC internal prototype to avoid an error.
15346 Use char because int might match the return type of a GCC
15347 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015348#ifdef __cplusplus
15349extern "C"
15350#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015351char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015352int
15353main ()
15354{
Thomas Wouters477c8d52006-05-27 19:21:47 +000015355return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015356 ;
15357 return 0;
15358}
15359_ACEOF
15360rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015361if { (ac_try="$ac_link"
15362case "(($ac_try" in
15363 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15364 *) ac_try_echo=$ac_try;;
15365esac
15366eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15367 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015368 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015369 grep -v '^ *+' conftest.er1 >conftest.err
15370 rm -f conftest.er1
15371 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015372 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15373 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015374 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
15375 { (case "(($ac_try" in
15376 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15377 *) ac_try_echo=$ac_try;;
15378esac
15379eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15380 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015381 ac_status=$?
15382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15383 (exit $ac_status); }; } &&
15384 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015385 { (case "(($ac_try" in
15386 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15387 *) ac_try_echo=$ac_try;;
15388esac
15389eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15390 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015391 ac_status=$?
15392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15393 (exit $ac_status); }; }; then
15394 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015395else
Martin v. Löwis11437992002-04-12 09:54:03 +000015396 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015397sed 's/^/| /' conftest.$ac_ext >&5
15398
Thomas Wouters477c8d52006-05-27 19:21:47 +000015399 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015400fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000015401
Skip Montanarof0d5f792004-08-15 14:08:23 +000015402rm -f conftest.err conftest.$ac_objext \
15403 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015404LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015405fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000015406{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
15407echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015408if test $ac_cv_lib_thread_thr_create = yes; then
15409 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015410#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015411_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015412
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015413 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015414 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015415 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000015416fi
15417
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015418 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015419
Martin v. Löwis130fb172001-07-19 11:00:41 +000015420 if test "$USE_THREAD_MODULE" != "#"
15421 then
15422 # If the above checks didn't disable threads, (at least) OSF1
15423 # needs this '-threads' argument during linking.
15424 case $ac_sys_system in
15425 OSF1) LDLAST=-threads;;
15426 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000015427 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015428fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015429
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015430if test "$posix_threads" = "yes"; then
15431 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015432
15433cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015434#define _POSIX_THREADS 1
15435_ACEOF
15436
15437 fi
15438
15439 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
15440 case $ac_sys_system/$ac_sys_release in
15441 SunOS/5.6)
15442cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015443#define HAVE_PTHREAD_DESTRUCTOR 1
15444_ACEOF
15445
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015446 ;;
15447 SunOS/5.8)
15448cat >>confdefs.h <<\_ACEOF
15449#define HAVE_BROKEN_POSIX_SEMAPHORES 1
15450_ACEOF
15451
15452 ;;
15453 esac
15454
Thomas Wouters477c8d52006-05-27 19:21:47 +000015455 { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
15456echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015457 if test "${ac_cv_pthread_system_supported+set}" = set; then
15458 echo $ECHO_N "(cached) $ECHO_C" >&6
15459else
15460 if test "$cross_compiling" = yes; then
15461 ac_cv_pthread_system_supported=no
15462else
15463 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015464/* confdefs.h. */
15465_ACEOF
15466cat confdefs.h >>conftest.$ac_ext
15467cat >>conftest.$ac_ext <<_ACEOF
15468/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015469#include <pthread.h>
15470 void *foo(void *parm) {
15471 return NULL;
15472 }
15473 main() {
15474 pthread_attr_t attr;
15475 pthread_t id;
15476 if (pthread_attr_init(&attr)) exit(-1);
15477 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
15478 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
15479 exit(0);
15480 }
15481_ACEOF
15482rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015483if { (ac_try="$ac_link"
15484case "(($ac_try" in
15485 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15486 *) ac_try_echo=$ac_try;;
15487esac
15488eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15489 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015490 ac_status=$?
15491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15492 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015493 { (case "(($ac_try" in
15494 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15495 *) ac_try_echo=$ac_try;;
15496esac
15497eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15498 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015499 ac_status=$?
15500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15501 (exit $ac_status); }; }; then
15502 ac_cv_pthread_system_supported=yes
15503else
15504 echo "$as_me: program exited with status $ac_status" >&5
15505echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015506sed 's/^/| /' conftest.$ac_ext >&5
15507
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015508( exit $ac_status )
15509ac_cv_pthread_system_supported=no
15510fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000015511rm -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 +000015512fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015513
Thomas Wouters477c8d52006-05-27 19:21:47 +000015514
15515
Guido van Rossum627b2d71993-12-24 10:39:16 +000015516fi
15517
Thomas Wouters477c8d52006-05-27 19:21:47 +000015518 { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
15519echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015520 if test "$ac_cv_pthread_system_supported" = "yes"; then
15521
15522cat >>confdefs.h <<\_ACEOF
15523#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
15524_ACEOF
15525
15526 fi
15527
15528for ac_func in pthread_sigmask
15529do
15530as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Thomas Wouters477c8d52006-05-27 19:21:47 +000015531{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15532echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15533if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015534 echo $ECHO_N "(cached) $ECHO_C" >&6
15535else
15536 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015537/* confdefs.h. */
15538_ACEOF
15539cat confdefs.h >>conftest.$ac_ext
15540cat >>conftest.$ac_ext <<_ACEOF
15541/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015542/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15543 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15544#define $ac_func innocuous_$ac_func
15545
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015546/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015547 which can conflict with char $ac_func (); below.
15548 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015549 <limits.h> exists even on freestanding compilers. */
15550
15551#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015552# include <limits.h>
15553#else
15554# include <assert.h>
15555#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015556
15557#undef $ac_func
15558
Thomas Wouters477c8d52006-05-27 19:21:47 +000015559/* Override any GCC internal prototype to avoid an error.
15560 Use char because int might match the return type of a GCC
15561 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015562#ifdef __cplusplus
15563extern "C"
15564#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015565char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015566/* The GNU C library defines this for functions which it implements
15567 to always fail with ENOSYS. Some functions are actually named
15568 something starting with __ and the normal name is an alias. */
Thomas Wouters477c8d52006-05-27 19:21:47 +000015569#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015570choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015571#endif
15572
Skip Montanaro6dead952003-09-25 14:50:04 +000015573int
15574main ()
15575{
Thomas Wouters477c8d52006-05-27 19:21:47 +000015576return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015577 ;
15578 return 0;
15579}
15580_ACEOF
15581rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015582if { (ac_try="$ac_link"
15583case "(($ac_try" in
15584 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15585 *) ac_try_echo=$ac_try;;
15586esac
15587eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15588 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015589 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015590 grep -v '^ *+' conftest.er1 >conftest.err
15591 rm -f conftest.er1
15592 cat conftest.err >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15594 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015595 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
15596 { (case "(($ac_try" in
15597 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15598 *) ac_try_echo=$ac_try;;
15599esac
15600eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15601 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015602 ac_status=$?
15603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15604 (exit $ac_status); }; } &&
15605 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015606 { (case "(($ac_try" in
15607 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15608 *) ac_try_echo=$ac_try;;
15609esac
15610eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15611 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015612 ac_status=$?
15613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15614 (exit $ac_status); }; }; then
15615 eval "$as_ac_var=yes"
15616else
15617 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015618sed 's/^/| /' conftest.$ac_ext >&5
15619
Thomas Wouters477c8d52006-05-27 19:21:47 +000015620 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015621fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000015622
Skip Montanarof0d5f792004-08-15 14:08:23 +000015623rm -f conftest.err conftest.$ac_objext \
15624 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015625fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000015626ac_res=`eval echo '${'$as_ac_var'}'`
15627 { echo "$as_me:$LINENO: result: $ac_res" >&5
15628echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015629if test `eval echo '${'$as_ac_var'}'` = yes; then
15630 cat >>confdefs.h <<_ACEOF
15631#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15632_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000015633 case $ac_sys_system in
15634 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015635
Jason Tishlerfac083d2003-07-22 15:20:49 +000015636cat >>confdefs.h <<\_ACEOF
15637#define HAVE_BROKEN_PTHREAD_SIGMASK 1
15638_ACEOF
15639
15640 ;;
15641 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015642fi
15643done
15644
15645fi
15646
15647
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015648# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000015649
15650
Thomas Wouters477c8d52006-05-27 19:21:47 +000015651{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
15652echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
15653# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015654if test "${enable_ipv6+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000015655 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015656 no)
Thomas Wouters477c8d52006-05-27 19:21:47 +000015657 { echo "$as_me:$LINENO: result: no" >&5
15658echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015659 ipv6=no
15660 ;;
Thomas Wouters477c8d52006-05-27 19:21:47 +000015661 *) { echo "$as_me:$LINENO: result: yes" >&5
15662echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015663 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015664#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015665_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015666
15667 ipv6=yes
15668 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015669 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015670else
Martin v. Löwis11437992002-04-12 09:54:03 +000015671
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015672 if test "$cross_compiling" = yes; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000015673 { echo "$as_me:$LINENO: result: no" >&5
15674echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015675 ipv6=no
15676
15677else
Martin v. Löwis11437992002-04-12 09:54:03 +000015678 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015679/* confdefs.h. */
15680_ACEOF
15681cat confdefs.h >>conftest.$ac_ext
15682cat >>conftest.$ac_ext <<_ACEOF
15683/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015684 /* AF_INET6 available check */
15685#include <sys/types.h>
15686#include <sys/socket.h>
15687main()
15688{
15689 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
15690 exit(1);
15691 else
15692 exit(0);
15693}
15694
Martin v. Löwis11437992002-04-12 09:54:03 +000015695_ACEOF
15696rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015697if { (ac_try="$ac_link"
15698case "(($ac_try" in
15699 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15700 *) ac_try_echo=$ac_try;;
15701esac
15702eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15703 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015704 ac_status=$?
15705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15706 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015707 { (case "(($ac_try" in
15708 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15709 *) ac_try_echo=$ac_try;;
15710esac
15711eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15712 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015713 ac_status=$?
15714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15715 (exit $ac_status); }; }; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000015716 { echo "$as_me:$LINENO: result: yes" >&5
15717echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015718 ipv6=yes
15719else
Martin v. Löwis11437992002-04-12 09:54:03 +000015720 echo "$as_me: program exited with status $ac_status" >&5
15721echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015722sed 's/^/| /' conftest.$ac_ext >&5
15723
Martin v. Löwis11437992002-04-12 09:54:03 +000015724( exit $ac_status )
Thomas Wouters477c8d52006-05-27 19:21:47 +000015725{ echo "$as_me:$LINENO: result: no" >&5
15726echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015727 ipv6=no
15728fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000015729rm -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 +000015730fi
15731
Thomas Wouters477c8d52006-05-27 19:21:47 +000015732
15733
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015734if test "$ipv6" = "yes"; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000015735 { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
15736echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015737 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015738/* confdefs.h. */
15739_ACEOF
15740cat confdefs.h >>conftest.$ac_ext
15741cat >>conftest.$ac_ext <<_ACEOF
15742/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015743#include <sys/types.h>
15744#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015745int
15746main ()
15747{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015748struct sockaddr_in6 x;
15749x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000015750 ;
15751 return 0;
15752}
15753_ACEOF
15754rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015755if { (ac_try="$ac_compile"
15756case "(($ac_try" in
15757 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15758 *) ac_try_echo=$ac_try;;
15759esac
15760eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15761 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015762 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015763 grep -v '^ *+' conftest.er1 >conftest.err
15764 rm -f conftest.er1
15765 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015766 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15767 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015768 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
15769 { (case "(($ac_try" in
15770 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15771 *) ac_try_echo=$ac_try;;
15772esac
15773eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15774 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015775 ac_status=$?
15776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15777 (exit $ac_status); }; } &&
15778 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015779 { (case "(($ac_try" in
15780 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15781 *) ac_try_echo=$ac_try;;
15782esac
15783eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15784 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015785 ac_status=$?
15786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15787 (exit $ac_status); }; }; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000015788 { echo "$as_me:$LINENO: result: yes" >&5
15789echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015790 ipv6=yes
15791else
Martin v. Löwis11437992002-04-12 09:54:03 +000015792 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015793sed 's/^/| /' conftest.$ac_ext >&5
15794
Thomas Wouters477c8d52006-05-27 19:21:47 +000015795 { echo "$as_me:$LINENO: result: no" >&5
15796echo "${ECHO_T}no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015797 ipv6=no
15798fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000015799
Skip Montanarof0d5f792004-08-15 14:08:23 +000015800rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015801fi
15802
15803if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015804 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015805#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015806_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015807
15808fi
15809
Thomas Wouters477c8d52006-05-27 19:21:47 +000015810fi
15811
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015812
15813ipv6type=unknown
15814ipv6lib=none
15815ipv6trylibc=no
15816
15817if test "$ipv6" = "yes"; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000015818 { echo "$as_me:$LINENO: checking ipv6 stack type" >&5
15819echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000015820 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
15821 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015822 case $i in
15823 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000015824 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015825/* confdefs.h. */
15826_ACEOF
15827cat confdefs.h >>conftest.$ac_ext
15828cat >>conftest.$ac_ext <<_ACEOF
15829/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015830
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015831#include <netinet/in.h>
15832#ifdef IPV6_INRIA_VERSION
15833yes
15834#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015835_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015836if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015837 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000015838 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015839fi
15840rm -f conftest*
15841
15842 ;;
15843 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000015844 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015845/* confdefs.h. */
15846_ACEOF
15847cat confdefs.h >>conftest.$ac_ext
15848cat >>conftest.$ac_ext <<_ACEOF
15849/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015850
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015851#include <netinet/in.h>
15852#ifdef __KAME__
15853yes
15854#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015855_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015856if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015857 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015858 ipv6type=$i;
15859 ipv6lib=inet6
15860 ipv6libdir=/usr/local/v6/lib
15861 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015862fi
15863rm -f conftest*
15864
15865 ;;
15866 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000015867 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015868/* confdefs.h. */
15869_ACEOF
15870cat confdefs.h >>conftest.$ac_ext
15871cat >>conftest.$ac_ext <<_ACEOF
15872/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015873
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015874#include <features.h>
15875#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
15876yes
15877#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015878_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015879if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015880 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015881 ipv6type=$i;
15882 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015883fi
15884rm -f conftest*
15885
15886 ;;
15887 linux-inet6)
15888 if test -d /usr/inet6; then
15889 ipv6type=$i
15890 ipv6lib=inet6
15891 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000015892 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015893 fi
15894 ;;
15895 solaris)
15896 if test -f /etc/netconfig; then
15897 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
15898 ipv6type=$i
15899 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015900 fi
15901 fi
15902 ;;
15903 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000015904 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015905/* confdefs.h. */
15906_ACEOF
15907cat confdefs.h >>conftest.$ac_ext
15908cat >>conftest.$ac_ext <<_ACEOF
15909/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015910
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015911#include <sys/param.h>
15912#ifdef _TOSHIBA_INET6
15913yes
15914#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015915_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015916if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015917 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015918 ipv6type=$i;
15919 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000015920 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015921fi
15922rm -f conftest*
15923
15924 ;;
15925 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000015926 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015927/* confdefs.h. */
15928_ACEOF
15929cat confdefs.h >>conftest.$ac_ext
15930cat >>conftest.$ac_ext <<_ACEOF
15931/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015932
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015933#include </usr/local/v6/include/sys/v6config.h>
15934#ifdef __V6D__
15935yes
15936#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015937_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015938if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015939 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015940 ipv6type=$i;
15941 ipv6lib=v6;
15942 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000015943 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015944fi
15945rm -f conftest*
15946
15947 ;;
15948 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000015949 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015950/* confdefs.h. */
15951_ACEOF
15952cat confdefs.h >>conftest.$ac_ext
15953cat >>conftest.$ac_ext <<_ACEOF
15954/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015955
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015956#include <sys/param.h>
15957#ifdef _ZETA_MINAMI_INET6
15958yes
15959#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015960_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015961if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015962 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015963 ipv6type=$i;
15964 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000015965 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015966fi
15967rm -f conftest*
15968
15969 ;;
15970 esac
15971 if test "$ipv6type" != "unknown"; then
15972 break
15973 fi
15974 done
Thomas Wouters477c8d52006-05-27 19:21:47 +000015975 { echo "$as_me:$LINENO: result: $ipv6type" >&5
15976echo "${ECHO_T}$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015977fi
15978
15979if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
15980 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
15981 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
15982 echo "using lib$ipv6lib"
15983 else
15984 if test $ipv6trylibc = "yes"; then
15985 echo "using libc"
15986 else
15987 echo 'Fatal: no $ipv6lib library found. cannot continue.'
15988 echo "You need to fetch lib$ipv6lib.a from appropriate"
15989 echo 'ipv6 kit and compile beforehand.'
15990 exit 1
15991 fi
15992 fi
15993fi
15994
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015995# Check for --with-doc-strings
Thomas Wouters477c8d52006-05-27 19:21:47 +000015996{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
15997echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015998
Thomas Wouters477c8d52006-05-27 19:21:47 +000015999# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016000if test "${with_doc_strings+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000016001 withval=$with_doc_strings;
16002fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016003
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016004
16005if test -z "$with_doc_strings"
16006then with_doc_strings="yes"
16007fi
16008if test "$with_doc_strings" != "no"
16009then
16010
16011cat >>confdefs.h <<\_ACEOF
16012#define WITH_DOC_STRINGS 1
16013_ACEOF
16014
16015fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000016016{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
16017echo "${ECHO_T}$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016018
Neil Schemenauera35c6882001-02-27 04:45:05 +000016019# Check for Python-specific malloc support
Thomas Wouters477c8d52006-05-27 19:21:47 +000016020{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
16021echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016022
Thomas Wouters477c8d52006-05-27 19:21:47 +000016023# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016024if test "${with_tsc+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000016025 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016026if test "$withval" != no
16027then
16028
16029cat >>confdefs.h <<\_ACEOF
16030#define WITH_TSC 1
16031_ACEOF
16032
Thomas Wouters477c8d52006-05-27 19:21:47 +000016033 { echo "$as_me:$LINENO: result: yes" >&5
16034echo "${ECHO_T}yes" >&6; }
16035else { echo "$as_me:$LINENO: result: no" >&5
16036echo "${ECHO_T}no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016037fi
16038else
Thomas Wouters477c8d52006-05-27 19:21:47 +000016039 { echo "$as_me:$LINENO: result: no" >&5
16040echo "${ECHO_T}no" >&6; }
16041fi
16042
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016043
16044# Check for Python-specific malloc support
Thomas Wouters477c8d52006-05-27 19:21:47 +000016045{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
16046echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016047
Thomas Wouters477c8d52006-05-27 19:21:47 +000016048# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000016049if test "${with_pymalloc+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000016050 withval=$with_pymalloc;
16051fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016052
Neil Schemenauera35c6882001-02-27 04:45:05 +000016053
Neil Schemenauer16c22972002-03-22 15:34:49 +000016054if test -z "$with_pymalloc"
16055then with_pymalloc="yes"
16056fi
16057if test "$with_pymalloc" != "no"
16058then
Martin v. Löwis11437992002-04-12 09:54:03 +000016059
16060cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000016061#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016062_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000016063
16064fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000016065{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
16066echo "${ECHO_T}$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000016067
Barry Warsawef82cd72000-06-30 16:21:01 +000016068# Check for --with-wctype-functions
Thomas Wouters477c8d52006-05-27 19:21:47 +000016069{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
16070echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016071
Thomas Wouters477c8d52006-05-27 19:21:47 +000016072# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000016073if test "${with_wctype_functions+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000016074 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000016075if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000016076then
16077
16078cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000016079#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016080_ACEOF
16081
Thomas Wouters477c8d52006-05-27 19:21:47 +000016082 { echo "$as_me:$LINENO: result: yes" >&5
16083echo "${ECHO_T}yes" >&6; }
16084else { echo "$as_me:$LINENO: result: no" >&5
16085echo "${ECHO_T}no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000016086fi
16087else
Thomas Wouters477c8d52006-05-27 19:21:47 +000016088 { echo "$as_me:$LINENO: result: no" >&5
16089echo "${ECHO_T}no" >&6; }
16090fi
16091
Barry Warsawef82cd72000-06-30 16:21:01 +000016092
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016093# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000016094
Guido van Rossum98935bf2001-09-05 19:13:16 +000016095DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000016096
Guido van Rossume97ee181999-12-20 21:27:22 +000016097# the dlopen() function means we might want to use dynload_shlib.o. some
16098# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000016099
Thomas Wouters3a584202000-08-05 23:28:51 +000016100for ac_func in dlopen
16101do
Martin v. Löwis11437992002-04-12 09:54:03 +000016102as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Thomas Wouters477c8d52006-05-27 19:21:47 +000016103{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16104echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16105if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016106 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000016107else
Martin v. Löwis11437992002-04-12 09:54:03 +000016108 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016109/* confdefs.h. */
16110_ACEOF
16111cat confdefs.h >>conftest.$ac_ext
16112cat >>conftest.$ac_ext <<_ACEOF
16113/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016114/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16115 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16116#define $ac_func innocuous_$ac_func
16117
Guido van Rossume97ee181999-12-20 21:27:22 +000016118/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016119 which can conflict with char $ac_func (); below.
16120 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016121 <limits.h> exists even on freestanding compilers. */
16122
16123#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016124# include <limits.h>
16125#else
16126# include <assert.h>
16127#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016128
16129#undef $ac_func
16130
Thomas Wouters477c8d52006-05-27 19:21:47 +000016131/* Override any GCC internal prototype to avoid an error.
16132 Use char because int might match the return type of a GCC
16133 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016134#ifdef __cplusplus
16135extern "C"
16136#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016137char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000016138/* The GNU C library defines this for functions which it implements
16139 to always fail with ENOSYS. Some functions are actually named
16140 something starting with __ and the normal name is an alias. */
Thomas Wouters477c8d52006-05-27 19:21:47 +000016141#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000016142choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000016143#endif
16144
Skip Montanaro6dead952003-09-25 14:50:04 +000016145int
16146main ()
16147{
Thomas Wouters477c8d52006-05-27 19:21:47 +000016148return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016149 ;
16150 return 0;
16151}
16152_ACEOF
16153rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016154if { (ac_try="$ac_link"
16155case "(($ac_try" in
16156 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16157 *) ac_try_echo=$ac_try;;
16158esac
16159eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16160 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016161 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016162 grep -v '^ *+' conftest.er1 >conftest.err
16163 rm -f conftest.er1
16164 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16166 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016167 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
16168 { (case "(($ac_try" in
16169 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16170 *) ac_try_echo=$ac_try;;
16171esac
16172eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16173 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016174 ac_status=$?
16175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16176 (exit $ac_status); }; } &&
16177 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016178 { (case "(($ac_try" in
16179 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16180 *) ac_try_echo=$ac_try;;
16181esac
16182eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16183 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016184 ac_status=$?
16185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16186 (exit $ac_status); }; }; then
16187 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016188else
Martin v. Löwis11437992002-04-12 09:54:03 +000016189 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016190sed 's/^/| /' conftest.$ac_ext >&5
16191
Thomas Wouters477c8d52006-05-27 19:21:47 +000016192 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016193fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000016194
Skip Montanarof0d5f792004-08-15 14:08:23 +000016195rm -f conftest.err conftest.$ac_objext \
16196 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016197fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000016198ac_res=`eval echo '${'$as_ac_var'}'`
16199 { echo "$as_me:$LINENO: result: $ac_res" >&5
16200echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016201if test `eval echo '${'$as_ac_var'}'` = yes; then
16202 cat >>confdefs.h <<_ACEOF
16203#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16204_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016205
Guido van Rossume97ee181999-12-20 21:27:22 +000016206fi
Thomas Wouters3a584202000-08-05 23:28:51 +000016207done
Guido van Rossume97ee181999-12-20 21:27:22 +000016208
Michael W. Hudson54241132001-12-07 15:38:26 +000016209
Guido van Rossume97ee181999-12-20 21:27:22 +000016210# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
16211# loading of modules.
16212
Thomas Wouters477c8d52006-05-27 19:21:47 +000016213{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
16214echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000016215if test -z "$DYNLOADFILE"
16216then
16217 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000016218 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
16219 if test "$ac_cv_func_dlopen" = yes
16220 then DYNLOADFILE="dynload_shlib.o"
16221 else DYNLOADFILE="dynload_aix.o"
16222 fi
16223 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000016224 BeOS*) DYNLOADFILE="dynload_beos.o";;
16225 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016226 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
16227 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016228 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000016229 *)
16230 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
16231 # out any dynamic loading
16232 if test "$ac_cv_func_dlopen" = yes
16233 then DYNLOADFILE="dynload_shlib.o"
16234 else DYNLOADFILE="dynload_stub.o"
16235 fi
16236 ;;
16237 esac
16238fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000016239{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
16240echo "${ECHO_T}$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000016241if test "$DYNLOADFILE" != "dynload_stub.o"
16242then
Martin v. Löwis11437992002-04-12 09:54:03 +000016243
16244cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016245#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016246_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016247
16248fi
16249
Neil Schemenauer4e425612001-06-19 15:44:15 +000016250# MACHDEP_OBJS can be set to platform-specific object files needed by Python
16251
Michael W. Hudson54241132001-12-07 15:38:26 +000016252
Thomas Wouters477c8d52006-05-27 19:21:47 +000016253{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
16254echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000016255if test -z "$MACHDEP_OBJS"
16256then
Jack Jansene578a632001-08-15 01:27:14 +000016257 MACHDEP_OBJS=$extra_machdep_objs
16258else
16259 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000016260fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000016261{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
16262echo "${ECHO_T}MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000016263
Guido van Rossum627b2d71993-12-24 10:39:16 +000016264# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000016265
16266
16267
16268
16269
16270
16271
16272
16273
16274
16275
16276
16277
16278
16279
16280
16281
16282
16283
16284
16285
16286
16287
16288
16289
16290
16291
16292
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
Martin v. Löwisd6320502004-08-12 13:45:08 +000016336
Martin v. Löwisc3001752005-01-23 09:27:24 +000016337
16338
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016339
16340
Martin v. Löwisd6320502004-08-12 13:45:08 +000016341for ac_func in alarm bind_textdomain_codeset chown clock confstr ctermid \
16342 execv fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000016343 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwisc3001752005-01-23 09:27:24 +000016344 getpriority getpwent getspnam getspent getsid getwd \
Martin v. Löwise9416172003-05-03 10:12:45 +000016345 kill killpg lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000016346 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000016347 putenv readlink realpath \
Martin v. Löwisd5843682002-11-21 20:41:28 +000016348 select setegid seteuid setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000016349 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000016350 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000016351 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016352 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000016353do
Martin v. Löwis11437992002-04-12 09:54:03 +000016354as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Thomas Wouters477c8d52006-05-27 19:21:47 +000016355{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16356echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16357if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016358 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016359else
Martin v. Löwis11437992002-04-12 09:54:03 +000016360 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016361/* confdefs.h. */
16362_ACEOF
16363cat confdefs.h >>conftest.$ac_ext
16364cat >>conftest.$ac_ext <<_ACEOF
16365/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016366/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16367 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16368#define $ac_func innocuous_$ac_func
16369
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016370/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016371 which can conflict with char $ac_func (); below.
16372 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016373 <limits.h> exists even on freestanding compilers. */
16374
16375#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016376# include <limits.h>
16377#else
16378# include <assert.h>
16379#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016380
16381#undef $ac_func
16382
Thomas Wouters477c8d52006-05-27 19:21:47 +000016383/* Override any GCC internal prototype to avoid an error.
16384 Use char because int might match the return type of a GCC
16385 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016386#ifdef __cplusplus
16387extern "C"
16388#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016389char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000016390/* The GNU C library defines this for functions which it implements
16391 to always fail with ENOSYS. Some functions are actually named
16392 something starting with __ and the normal name is an alias. */
Thomas Wouters477c8d52006-05-27 19:21:47 +000016393#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000016394choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000016395#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016396
Skip Montanaro6dead952003-09-25 14:50:04 +000016397int
16398main ()
16399{
Thomas Wouters477c8d52006-05-27 19:21:47 +000016400return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016401 ;
16402 return 0;
16403}
16404_ACEOF
16405rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016406if { (ac_try="$ac_link"
16407case "(($ac_try" in
16408 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16409 *) ac_try_echo=$ac_try;;
16410esac
16411eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16412 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016413 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016414 grep -v '^ *+' conftest.er1 >conftest.err
16415 rm -f conftest.er1
16416 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16418 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016419 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
16420 { (case "(($ac_try" in
16421 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16422 *) ac_try_echo=$ac_try;;
16423esac
16424eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16425 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016426 ac_status=$?
16427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16428 (exit $ac_status); }; } &&
16429 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016430 { (case "(($ac_try" in
16431 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16432 *) ac_try_echo=$ac_try;;
16433esac
16434eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16435 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016436 ac_status=$?
16437 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16438 (exit $ac_status); }; }; then
16439 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016440else
Martin v. Löwis11437992002-04-12 09:54:03 +000016441 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016442sed 's/^/| /' conftest.$ac_ext >&5
16443
Thomas Wouters477c8d52006-05-27 19:21:47 +000016444 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016445fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000016446
Skip Montanarof0d5f792004-08-15 14:08:23 +000016447rm -f conftest.err conftest.$ac_objext \
16448 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016449fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000016450ac_res=`eval echo '${'$as_ac_var'}'`
16451 { echo "$as_me:$LINENO: result: $ac_res" >&5
16452echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016453if test `eval echo '${'$as_ac_var'}'` = yes; then
16454 cat >>confdefs.h <<_ACEOF
16455#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16456_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000016457
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016458fi
16459done
16460
Michael W. Hudson54241132001-12-07 15:38:26 +000016461
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016462# For some functions, having a definition is not sufficient, since
16463# we want to take their address.
Thomas Wouters477c8d52006-05-27 19:21:47 +000016464{ echo "$as_me:$LINENO: checking for chroot" >&5
16465echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016466cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016467/* confdefs.h. */
16468_ACEOF
16469cat confdefs.h >>conftest.$ac_ext
16470cat >>conftest.$ac_ext <<_ACEOF
16471/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016472#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016473int
16474main ()
16475{
16476void *x=chroot
16477 ;
16478 return 0;
16479}
16480_ACEOF
16481rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016482if { (ac_try="$ac_compile"
16483case "(($ac_try" in
16484 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16485 *) ac_try_echo=$ac_try;;
16486esac
16487eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16488 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016489 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016490 grep -v '^ *+' conftest.er1 >conftest.err
16491 rm -f conftest.er1
16492 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016493 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16494 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016495 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
16496 { (case "(($ac_try" in
16497 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16498 *) ac_try_echo=$ac_try;;
16499esac
16500eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16501 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016502 ac_status=$?
16503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16504 (exit $ac_status); }; } &&
16505 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016506 { (case "(($ac_try" in
16507 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16508 *) ac_try_echo=$ac_try;;
16509esac
16510eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16511 (eval "$ac_try") 2>&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016512 ac_status=$?
16513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16514 (exit $ac_status); }; }; then
16515
16516cat >>confdefs.h <<\_ACEOF
16517#define HAVE_CHROOT 1
16518_ACEOF
16519
Thomas Wouters477c8d52006-05-27 19:21:47 +000016520 { echo "$as_me:$LINENO: result: yes" >&5
16521echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016522else
16523 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016524sed 's/^/| /' conftest.$ac_ext >&5
16525
Thomas Wouters477c8d52006-05-27 19:21:47 +000016526 { echo "$as_me:$LINENO: result: no" >&5
16527echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016528
16529fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000016530
Skip Montanarof0d5f792004-08-15 14:08:23 +000016531rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016532{ echo "$as_me:$LINENO: checking for link" >&5
16533echo $ECHO_N "checking for link... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016534cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016535/* confdefs.h. */
16536_ACEOF
16537cat confdefs.h >>conftest.$ac_ext
16538cat >>conftest.$ac_ext <<_ACEOF
16539/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016540#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016541int
16542main ()
16543{
16544void *x=link
16545 ;
16546 return 0;
16547}
16548_ACEOF
16549rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016550if { (ac_try="$ac_compile"
16551case "(($ac_try" in
16552 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16553 *) ac_try_echo=$ac_try;;
16554esac
16555eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16556 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016557 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016558 grep -v '^ *+' conftest.er1 >conftest.err
16559 rm -f conftest.er1
16560 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16562 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016563 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
16564 { (case "(($ac_try" in
16565 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16566 *) ac_try_echo=$ac_try;;
16567esac
16568eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16569 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016570 ac_status=$?
16571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16572 (exit $ac_status); }; } &&
16573 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016574 { (case "(($ac_try" in
16575 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16576 *) ac_try_echo=$ac_try;;
16577esac
16578eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16579 (eval "$ac_try") 2>&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016580 ac_status=$?
16581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16582 (exit $ac_status); }; }; then
16583
16584cat >>confdefs.h <<\_ACEOF
16585#define HAVE_LINK 1
16586_ACEOF
16587
Thomas Wouters477c8d52006-05-27 19:21:47 +000016588 { echo "$as_me:$LINENO: result: yes" >&5
16589echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016590else
16591 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016592sed 's/^/| /' conftest.$ac_ext >&5
16593
Thomas Wouters477c8d52006-05-27 19:21:47 +000016594 { echo "$as_me:$LINENO: result: no" >&5
16595echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016596
16597fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000016598
Skip Montanarof0d5f792004-08-15 14:08:23 +000016599rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016600{ echo "$as_me:$LINENO: checking for symlink" >&5
16601echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016602cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016603/* confdefs.h. */
16604_ACEOF
16605cat confdefs.h >>conftest.$ac_ext
16606cat >>conftest.$ac_ext <<_ACEOF
16607/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016608#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016609int
16610main ()
16611{
16612void *x=symlink
16613 ;
16614 return 0;
16615}
16616_ACEOF
16617rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016618if { (ac_try="$ac_compile"
16619case "(($ac_try" in
16620 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16621 *) ac_try_echo=$ac_try;;
16622esac
16623eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16624 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016625 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016626 grep -v '^ *+' conftest.er1 >conftest.err
16627 rm -f conftest.er1
16628 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16630 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016631 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
16632 { (case "(($ac_try" in
16633 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16634 *) ac_try_echo=$ac_try;;
16635esac
16636eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16637 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016638 ac_status=$?
16639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16640 (exit $ac_status); }; } &&
16641 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016642 { (case "(($ac_try" in
16643 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16644 *) ac_try_echo=$ac_try;;
16645esac
16646eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16647 (eval "$ac_try") 2>&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016648 ac_status=$?
16649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16650 (exit $ac_status); }; }; then
16651
16652cat >>confdefs.h <<\_ACEOF
16653#define HAVE_SYMLINK 1
16654_ACEOF
16655
Thomas Wouters477c8d52006-05-27 19:21:47 +000016656 { echo "$as_me:$LINENO: result: yes" >&5
16657echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016658else
16659 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016660sed 's/^/| /' conftest.$ac_ext >&5
16661
Thomas Wouters477c8d52006-05-27 19:21:47 +000016662 { echo "$as_me:$LINENO: result: no" >&5
16663echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016664
16665fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000016666
Skip Montanarof0d5f792004-08-15 14:08:23 +000016667rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016668{ echo "$as_me:$LINENO: checking for fchdir" >&5
16669echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016670cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016671/* confdefs.h. */
16672_ACEOF
16673cat confdefs.h >>conftest.$ac_ext
16674cat >>conftest.$ac_ext <<_ACEOF
16675/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016676#include <unistd.h>
16677int
16678main ()
16679{
16680void *x=fchdir
16681 ;
16682 return 0;
16683}
16684_ACEOF
16685rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016686if { (ac_try="$ac_compile"
16687case "(($ac_try" in
16688 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16689 *) ac_try_echo=$ac_try;;
16690esac
16691eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16692 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016693 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016694 grep -v '^ *+' conftest.er1 >conftest.err
16695 rm -f conftest.er1
16696 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16698 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016699 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
16700 { (case "(($ac_try" in
16701 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16702 *) ac_try_echo=$ac_try;;
16703esac
16704eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16705 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016706 ac_status=$?
16707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16708 (exit $ac_status); }; } &&
16709 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016710 { (case "(($ac_try" in
16711 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16712 *) ac_try_echo=$ac_try;;
16713esac
16714eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16715 (eval "$ac_try") 2>&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016716 ac_status=$?
16717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16718 (exit $ac_status); }; }; then
16719
16720cat >>confdefs.h <<\_ACEOF
16721#define HAVE_FCHDIR 1
16722_ACEOF
16723
Thomas Wouters477c8d52006-05-27 19:21:47 +000016724 { echo "$as_me:$LINENO: result: yes" >&5
16725echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016726else
16727 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016728sed 's/^/| /' conftest.$ac_ext >&5
16729
Thomas Wouters477c8d52006-05-27 19:21:47 +000016730 { echo "$as_me:$LINENO: result: no" >&5
16731echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016732
16733fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000016734
Skip Montanarof0d5f792004-08-15 14:08:23 +000016735rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016736{ echo "$as_me:$LINENO: checking for fsync" >&5
16737echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016738cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016739/* confdefs.h. */
16740_ACEOF
16741cat confdefs.h >>conftest.$ac_ext
16742cat >>conftest.$ac_ext <<_ACEOF
16743/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016744#include <unistd.h>
16745int
16746main ()
16747{
16748void *x=fsync
16749 ;
16750 return 0;
16751}
16752_ACEOF
16753rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016754if { (ac_try="$ac_compile"
16755case "(($ac_try" in
16756 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16757 *) ac_try_echo=$ac_try;;
16758esac
16759eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16760 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016761 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016762 grep -v '^ *+' conftest.er1 >conftest.err
16763 rm -f conftest.er1
16764 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16766 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016767 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
16768 { (case "(($ac_try" in
16769 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16770 *) ac_try_echo=$ac_try;;
16771esac
16772eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16773 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016774 ac_status=$?
16775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16776 (exit $ac_status); }; } &&
16777 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016778 { (case "(($ac_try" in
16779 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16780 *) ac_try_echo=$ac_try;;
16781esac
16782eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16783 (eval "$ac_try") 2>&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016784 ac_status=$?
16785 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16786 (exit $ac_status); }; }; then
16787
16788cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016789#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016790_ACEOF
16791
Thomas Wouters477c8d52006-05-27 19:21:47 +000016792 { echo "$as_me:$LINENO: result: yes" >&5
16793echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016794else
16795 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016796sed 's/^/| /' conftest.$ac_ext >&5
16797
Thomas Wouters477c8d52006-05-27 19:21:47 +000016798 { echo "$as_me:$LINENO: result: no" >&5
16799echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016800
16801fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000016802
Skip Montanarof0d5f792004-08-15 14:08:23 +000016803rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016804{ echo "$as_me:$LINENO: checking for fdatasync" >&5
16805echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016806cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016807/* confdefs.h. */
16808_ACEOF
16809cat confdefs.h >>conftest.$ac_ext
16810cat >>conftest.$ac_ext <<_ACEOF
16811/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016812#include <unistd.h>
16813int
16814main ()
16815{
16816void *x=fdatasync
16817 ;
16818 return 0;
16819}
16820_ACEOF
16821rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016822if { (ac_try="$ac_compile"
16823case "(($ac_try" in
16824 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16825 *) ac_try_echo=$ac_try;;
16826esac
16827eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16828 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016829 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016830 grep -v '^ *+' conftest.er1 >conftest.err
16831 rm -f conftest.er1
16832 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16834 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016835 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
16836 { (case "(($ac_try" in
16837 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16838 *) ac_try_echo=$ac_try;;
16839esac
16840eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16841 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016842 ac_status=$?
16843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16844 (exit $ac_status); }; } &&
16845 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016846 { (case "(($ac_try" in
16847 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16848 *) ac_try_echo=$ac_try;;
16849esac
16850eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16851 (eval "$ac_try") 2>&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016852 ac_status=$?
16853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16854 (exit $ac_status); }; }; then
16855
16856cat >>confdefs.h <<\_ACEOF
16857#define HAVE_FDATASYNC 1
16858_ACEOF
16859
Thomas Wouters477c8d52006-05-27 19:21:47 +000016860 { echo "$as_me:$LINENO: result: yes" >&5
16861echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016862else
16863 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016864sed 's/^/| /' conftest.$ac_ext >&5
16865
Thomas Wouters477c8d52006-05-27 19:21:47 +000016866 { echo "$as_me:$LINENO: result: no" >&5
16867echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016868
16869fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000016870
Skip Montanarof0d5f792004-08-15 14:08:23 +000016871rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016872
Martin v. Löwisd5843682002-11-21 20:41:28 +000016873# On some systems (eg. FreeBSD 5), we would find a definition of the
16874# functions ctermid_r, setgroups in the library, but no prototype
16875# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
16876# address to avoid compiler warnings and potential miscompilations
16877# because of the missing prototypes.
16878
Thomas Wouters477c8d52006-05-27 19:21:47 +000016879{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
16880echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016881cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016882/* confdefs.h. */
16883_ACEOF
16884cat confdefs.h >>conftest.$ac_ext
16885cat >>conftest.$ac_ext <<_ACEOF
16886/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000016887
16888#include "confdefs.h"
16889#include <stdio.h>
16890
Martin v. Löwisd5843682002-11-21 20:41:28 +000016891int
16892main ()
16893{
16894void* p = ctermid_r
16895 ;
16896 return 0;
16897}
16898_ACEOF
16899rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016900if { (ac_try="$ac_compile"
16901case "(($ac_try" in
16902 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16903 *) ac_try_echo=$ac_try;;
16904esac
16905eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16906 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000016907 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016908 grep -v '^ *+' conftest.er1 >conftest.err
16909 rm -f conftest.er1
16910 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000016911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16912 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016913 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
16914 { (case "(($ac_try" in
16915 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16916 *) ac_try_echo=$ac_try;;
16917esac
16918eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16919 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016920 ac_status=$?
16921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16922 (exit $ac_status); }; } &&
16923 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016924 { (case "(($ac_try" in
16925 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16926 *) ac_try_echo=$ac_try;;
16927esac
16928eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16929 (eval "$ac_try") 2>&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000016930 ac_status=$?
16931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16932 (exit $ac_status); }; }; then
16933
16934cat >>confdefs.h <<\_ACEOF
16935#define HAVE_CTERMID_R 1
16936_ACEOF
16937
Thomas Wouters477c8d52006-05-27 19:21:47 +000016938 { echo "$as_me:$LINENO: result: yes" >&5
16939echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016940else
16941 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016942sed 's/^/| /' conftest.$ac_ext >&5
16943
Thomas Wouters477c8d52006-05-27 19:21:47 +000016944 { echo "$as_me:$LINENO: result: no" >&5
16945echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016946
16947fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000016948
Skip Montanarof0d5f792004-08-15 14:08:23 +000016949rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000016950
Thomas Wouters477c8d52006-05-27 19:21:47 +000016951{ echo "$as_me:$LINENO: checking for flock" >&5
16952echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016953cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016954/* confdefs.h. */
16955_ACEOF
16956cat confdefs.h >>conftest.$ac_ext
16957cat >>conftest.$ac_ext <<_ACEOF
16958/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016959
16960#include "confdefs.h"
16961#include <sys/file.h>
16962
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016963int
16964main ()
16965{
16966void* p = flock
16967 ;
16968 return 0;
16969}
16970_ACEOF
16971rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016972if { (ac_try="$ac_compile"
16973case "(($ac_try" in
16974 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16975 *) ac_try_echo=$ac_try;;
16976esac
16977eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16978 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016979 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016980 grep -v '^ *+' conftest.er1 >conftest.err
16981 rm -f conftest.er1
16982 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16984 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016985 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
16986 { (case "(($ac_try" in
16987 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16988 *) ac_try_echo=$ac_try;;
16989esac
16990eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16991 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016992 ac_status=$?
16993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16994 (exit $ac_status); }; } &&
16995 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016996 { (case "(($ac_try" in
16997 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16998 *) ac_try_echo=$ac_try;;
16999esac
17000eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17001 (eval "$ac_try") 2>&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017002 ac_status=$?
17003 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17004 (exit $ac_status); }; }; then
17005
17006cat >>confdefs.h <<\_ACEOF
17007#define HAVE_FLOCK 1
17008_ACEOF
17009
Thomas Wouters477c8d52006-05-27 19:21:47 +000017010 { echo "$as_me:$LINENO: result: yes" >&5
17011echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017012else
17013 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017014sed 's/^/| /' conftest.$ac_ext >&5
17015
Thomas Wouters477c8d52006-05-27 19:21:47 +000017016 { echo "$as_me:$LINENO: result: no" >&5
17017echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017018
17019fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017020
Skip Montanarof0d5f792004-08-15 14:08:23 +000017021rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017022
Thomas Wouters477c8d52006-05-27 19:21:47 +000017023{ echo "$as_me:$LINENO: checking for getpagesize" >&5
17024echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017025cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017026/* confdefs.h. */
17027_ACEOF
17028cat confdefs.h >>conftest.$ac_ext
17029cat >>conftest.$ac_ext <<_ACEOF
17030/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017031
17032#include "confdefs.h"
17033#include <unistd.h>
17034
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017035int
17036main ()
17037{
17038void* p = getpagesize
17039 ;
17040 return 0;
17041}
17042_ACEOF
17043rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017044if { (ac_try="$ac_compile"
17045case "(($ac_try" in
17046 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17047 *) ac_try_echo=$ac_try;;
17048esac
17049eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17050 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017051 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017052 grep -v '^ *+' conftest.er1 >conftest.err
17053 rm -f conftest.er1
17054 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17056 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017057 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
17058 { (case "(($ac_try" in
17059 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17060 *) ac_try_echo=$ac_try;;
17061esac
17062eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17063 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017064 ac_status=$?
17065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17066 (exit $ac_status); }; } &&
17067 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017068 { (case "(($ac_try" in
17069 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17070 *) ac_try_echo=$ac_try;;
17071esac
17072eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17073 (eval "$ac_try") 2>&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017074 ac_status=$?
17075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17076 (exit $ac_status); }; }; then
17077
17078cat >>confdefs.h <<\_ACEOF
17079#define HAVE_GETPAGESIZE 1
17080_ACEOF
17081
Thomas Wouters477c8d52006-05-27 19:21:47 +000017082 { echo "$as_me:$LINENO: result: yes" >&5
17083echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017084else
17085 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017086sed 's/^/| /' conftest.$ac_ext >&5
17087
Thomas Wouters477c8d52006-05-27 19:21:47 +000017088 { echo "$as_me:$LINENO: result: no" >&5
17089echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017090
17091fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017092
Skip Montanarof0d5f792004-08-15 14:08:23 +000017093rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017094
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017095for ac_prog in true
17096do
17097 # Extract the first word of "$ac_prog", so it can be a program name with args.
17098set dummy $ac_prog; ac_word=$2
Thomas Wouters477c8d52006-05-27 19:21:47 +000017099{ echo "$as_me:$LINENO: checking for $ac_word" >&5
17100echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017101if test "${ac_cv_prog_TRUE+set}" = set; then
17102 echo $ECHO_N "(cached) $ECHO_C" >&6
17103else
17104 if test -n "$TRUE"; then
17105 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
17106else
17107as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17108for as_dir in $PATH
17109do
17110 IFS=$as_save_IFS
17111 test -z "$as_dir" && as_dir=.
17112 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters477c8d52006-05-27 19:21:47 +000017113 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 +000017114 ac_cv_prog_TRUE="$ac_prog"
17115 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
17116 break 2
17117 fi
17118done
17119done
Thomas Wouters477c8d52006-05-27 19:21:47 +000017120IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017121
17122fi
17123fi
17124TRUE=$ac_cv_prog_TRUE
17125if test -n "$TRUE"; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000017126 { echo "$as_me:$LINENO: result: $TRUE" >&5
17127echo "${ECHO_T}$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017128else
Thomas Wouters477c8d52006-05-27 19:21:47 +000017129 { echo "$as_me:$LINENO: result: no" >&5
17130echo "${ECHO_T}no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017131fi
17132
Thomas Wouters477c8d52006-05-27 19:21:47 +000017133
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017134 test -n "$TRUE" && break
17135done
17136test -n "$TRUE" || TRUE="/bin/true"
17137
17138
Thomas Wouters477c8d52006-05-27 19:21:47 +000017139{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
17140echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017141if test "${ac_cv_lib_c_inet_aton+set}" = set; then
17142 echo $ECHO_N "(cached) $ECHO_C" >&6
17143else
17144 ac_check_lib_save_LIBS=$LIBS
17145LIBS="-lc $LIBS"
17146cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017147/* confdefs.h. */
17148_ACEOF
17149cat confdefs.h >>conftest.$ac_ext
17150cat >>conftest.$ac_ext <<_ACEOF
17151/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017152
Thomas Wouters477c8d52006-05-27 19:21:47 +000017153/* Override any GCC internal prototype to avoid an error.
17154 Use char because int might match the return type of a GCC
17155 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017156#ifdef __cplusplus
17157extern "C"
17158#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017159char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017160int
17161main ()
17162{
Thomas Wouters477c8d52006-05-27 19:21:47 +000017163return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017164 ;
17165 return 0;
17166}
17167_ACEOF
17168rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017169if { (ac_try="$ac_link"
17170case "(($ac_try" in
17171 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17172 *) ac_try_echo=$ac_try;;
17173esac
17174eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17175 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017176 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017177 grep -v '^ *+' conftest.er1 >conftest.err
17178 rm -f conftest.er1
17179 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17181 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017182 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
17183 { (case "(($ac_try" in
17184 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17185 *) ac_try_echo=$ac_try;;
17186esac
17187eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17188 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017189 ac_status=$?
17190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17191 (exit $ac_status); }; } &&
17192 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017193 { (case "(($ac_try" in
17194 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17195 *) ac_try_echo=$ac_try;;
17196esac
17197eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17198 (eval "$ac_try") 2>&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017199 ac_status=$?
17200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17201 (exit $ac_status); }; }; then
17202 ac_cv_lib_c_inet_aton=yes
17203else
17204 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017205sed 's/^/| /' conftest.$ac_ext >&5
17206
Thomas Wouters477c8d52006-05-27 19:21:47 +000017207 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017208fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017209
Skip Montanarof0d5f792004-08-15 14:08:23 +000017210rm -f conftest.err conftest.$ac_objext \
17211 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017212LIBS=$ac_check_lib_save_LIBS
17213fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017214{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
17215echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017216if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017217 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017218else
17219
Thomas Wouters477c8d52006-05-27 19:21:47 +000017220{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
17221echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017222if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
17223 echo $ECHO_N "(cached) $ECHO_C" >&6
17224else
17225 ac_check_lib_save_LIBS=$LIBS
17226LIBS="-lresolv $LIBS"
17227cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017228/* confdefs.h. */
17229_ACEOF
17230cat confdefs.h >>conftest.$ac_ext
17231cat >>conftest.$ac_ext <<_ACEOF
17232/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017233
Thomas Wouters477c8d52006-05-27 19:21:47 +000017234/* Override any GCC internal prototype to avoid an error.
17235 Use char because int might match the return type of a GCC
17236 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017237#ifdef __cplusplus
17238extern "C"
17239#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017240char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017241int
17242main ()
17243{
Thomas Wouters477c8d52006-05-27 19:21:47 +000017244return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017245 ;
17246 return 0;
17247}
17248_ACEOF
17249rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017250if { (ac_try="$ac_link"
17251case "(($ac_try" in
17252 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17253 *) ac_try_echo=$ac_try;;
17254esac
17255eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17256 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017257 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017258 grep -v '^ *+' conftest.er1 >conftest.err
17259 rm -f conftest.er1
17260 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17262 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017263 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
17264 { (case "(($ac_try" in
17265 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17266 *) ac_try_echo=$ac_try;;
17267esac
17268eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17269 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017270 ac_status=$?
17271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17272 (exit $ac_status); }; } &&
17273 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017274 { (case "(($ac_try" in
17275 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17276 *) ac_try_echo=$ac_try;;
17277esac
17278eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17279 (eval "$ac_try") 2>&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017280 ac_status=$?
17281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17282 (exit $ac_status); }; }; then
17283 ac_cv_lib_resolv_inet_aton=yes
17284else
17285 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017286sed 's/^/| /' conftest.$ac_ext >&5
17287
Thomas Wouters477c8d52006-05-27 19:21:47 +000017288 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017289fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017290
Skip Montanarof0d5f792004-08-15 14:08:23 +000017291rm -f conftest.err conftest.$ac_objext \
17292 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017293LIBS=$ac_check_lib_save_LIBS
17294fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017295{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
17296echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017297if test $ac_cv_lib_resolv_inet_aton = yes; then
17298 cat >>confdefs.h <<_ACEOF
17299#define HAVE_LIBRESOLV 1
17300_ACEOF
17301
17302 LIBS="-lresolv $LIBS"
17303
17304fi
17305
17306
17307fi
17308
17309
Thomas Wouters477c8d52006-05-27 19:21:47 +000017310{ echo "$as_me:$LINENO: checking for hstrerror" >&5
17311echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017312cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017313/* confdefs.h. */
17314_ACEOF
17315cat confdefs.h >>conftest.$ac_ext
17316cat >>conftest.$ac_ext <<_ACEOF
17317/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000017318
17319#include "confdefs.h"
17320#include <netdb.h>
17321
Martin v. Löwise9416172003-05-03 10:12:45 +000017322int
17323main ()
17324{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017325void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000017326 ;
17327 return 0;
17328}
17329_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017330rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017331if { (ac_try="$ac_link"
17332case "(($ac_try" in
17333 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17334 *) ac_try_echo=$ac_try;;
17335esac
17336eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17337 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000017338 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017339 grep -v '^ *+' conftest.er1 >conftest.err
17340 rm -f conftest.er1
17341 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000017342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17343 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017344 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
17345 { (case "(($ac_try" in
17346 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17347 *) ac_try_echo=$ac_try;;
17348esac
17349eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17350 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017351 ac_status=$?
17352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17353 (exit $ac_status); }; } &&
17354 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017355 { (case "(($ac_try" in
17356 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17357 *) ac_try_echo=$ac_try;;
17358esac
17359eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17360 (eval "$ac_try") 2>&5
Martin v. Löwise9416172003-05-03 10:12:45 +000017361 ac_status=$?
17362 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17363 (exit $ac_status); }; }; then
17364
17365cat >>confdefs.h <<\_ACEOF
17366#define HAVE_HSTRERROR 1
17367_ACEOF
17368
Thomas Wouters477c8d52006-05-27 19:21:47 +000017369 { echo "$as_me:$LINENO: result: yes" >&5
17370echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017371else
17372 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017373sed 's/^/| /' conftest.$ac_ext >&5
17374
Thomas Wouters477c8d52006-05-27 19:21:47 +000017375 { echo "$as_me:$LINENO: result: no" >&5
17376echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017377
17378fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017379
Skip Montanarof0d5f792004-08-15 14:08:23 +000017380rm -f conftest.err conftest.$ac_objext \
17381 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000017382
Thomas Wouters477c8d52006-05-27 19:21:47 +000017383{ echo "$as_me:$LINENO: checking for inet_aton" >&5
17384echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017385cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017386/* confdefs.h. */
17387_ACEOF
17388cat confdefs.h >>conftest.$ac_ext
17389cat >>conftest.$ac_ext <<_ACEOF
17390/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000017391
17392#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000017393#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000017394#include <sys/socket.h>
17395#include <netinet/in.h>
17396#include <arpa/inet.h>
17397
Martin v. Löwise9416172003-05-03 10:12:45 +000017398int
17399main ()
17400{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017401void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000017402 ;
17403 return 0;
17404}
17405_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017406rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017407if { (ac_try="$ac_link"
17408case "(($ac_try" in
17409 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17410 *) ac_try_echo=$ac_try;;
17411esac
17412eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17413 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000017414 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017415 grep -v '^ *+' conftest.er1 >conftest.err
17416 rm -f conftest.er1
17417 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000017418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17419 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017420 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
17421 { (case "(($ac_try" in
17422 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17423 *) ac_try_echo=$ac_try;;
17424esac
17425eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17426 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017427 ac_status=$?
17428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17429 (exit $ac_status); }; } &&
17430 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017431 { (case "(($ac_try" in
17432 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17433 *) ac_try_echo=$ac_try;;
17434esac
17435eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17436 (eval "$ac_try") 2>&5
Martin v. Löwise9416172003-05-03 10:12:45 +000017437 ac_status=$?
17438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17439 (exit $ac_status); }; }; then
17440
17441cat >>confdefs.h <<\_ACEOF
17442#define HAVE_INET_ATON 1
17443_ACEOF
17444
Thomas Wouters477c8d52006-05-27 19:21:47 +000017445 { echo "$as_me:$LINENO: result: yes" >&5
17446echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017447else
17448 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017449sed 's/^/| /' conftest.$ac_ext >&5
17450
Thomas Wouters477c8d52006-05-27 19:21:47 +000017451 { echo "$as_me:$LINENO: result: no" >&5
17452echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017453
17454fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017455
Skip Montanarof0d5f792004-08-15 14:08:23 +000017456rm -f conftest.err conftest.$ac_objext \
17457 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000017458
Thomas Wouters477c8d52006-05-27 19:21:47 +000017459{ echo "$as_me:$LINENO: checking for inet_pton" >&5
17460echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017461cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017462/* confdefs.h. */
17463_ACEOF
17464cat confdefs.h >>conftest.$ac_ext
17465cat >>conftest.$ac_ext <<_ACEOF
17466/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000017467
17468#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000017469#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000017470#include <sys/socket.h>
17471#include <netinet/in.h>
17472#include <arpa/inet.h>
17473
Martin v. Löwise9416172003-05-03 10:12:45 +000017474int
17475main ()
17476{
17477void* p = inet_pton
17478 ;
17479 return 0;
17480}
17481_ACEOF
17482rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017483if { (ac_try="$ac_compile"
17484case "(($ac_try" in
17485 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17486 *) ac_try_echo=$ac_try;;
17487esac
17488eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17489 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000017490 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017491 grep -v '^ *+' conftest.er1 >conftest.err
17492 rm -f conftest.er1
17493 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000017494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17495 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017496 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
17497 { (case "(($ac_try" in
17498 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17499 *) ac_try_echo=$ac_try;;
17500esac
17501eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17502 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017503 ac_status=$?
17504 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17505 (exit $ac_status); }; } &&
17506 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017507 { (case "(($ac_try" in
17508 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17509 *) ac_try_echo=$ac_try;;
17510esac
17511eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17512 (eval "$ac_try") 2>&5
Martin v. Löwise9416172003-05-03 10:12:45 +000017513 ac_status=$?
17514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17515 (exit $ac_status); }; }; then
17516
17517cat >>confdefs.h <<\_ACEOF
17518#define HAVE_INET_PTON 1
17519_ACEOF
17520
Thomas Wouters477c8d52006-05-27 19:21:47 +000017521 { echo "$as_me:$LINENO: result: yes" >&5
17522echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017523else
17524 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017525sed 's/^/| /' conftest.$ac_ext >&5
17526
Thomas Wouters477c8d52006-05-27 19:21:47 +000017527 { echo "$as_me:$LINENO: result: no" >&5
17528echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017529
17530fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017531
Skip Montanarof0d5f792004-08-15 14:08:23 +000017532rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000017533
Martin v. Löwisd6640d42003-07-06 09:29:52 +000017534# On some systems, setgroups is in unistd.h, on others, in grp.h
Thomas Wouters477c8d52006-05-27 19:21:47 +000017535{ echo "$as_me:$LINENO: checking for setgroups" >&5
17536echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017537cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017538/* confdefs.h. */
17539_ACEOF
17540cat confdefs.h >>conftest.$ac_ext
17541cat >>conftest.$ac_ext <<_ACEOF
17542/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000017543
17544#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000017545#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000017546#ifdef HAVE_GRP_H
17547#include <grp.h>
17548#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000017549
Martin v. Löwisd5843682002-11-21 20:41:28 +000017550int
17551main ()
17552{
17553void* p = setgroups
17554 ;
17555 return 0;
17556}
17557_ACEOF
17558rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017559if { (ac_try="$ac_compile"
17560case "(($ac_try" in
17561 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17562 *) ac_try_echo=$ac_try;;
17563esac
17564eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17565 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000017566 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017567 grep -v '^ *+' conftest.er1 >conftest.err
17568 rm -f conftest.er1
17569 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000017570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17571 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017572 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
17573 { (case "(($ac_try" in
17574 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17575 *) ac_try_echo=$ac_try;;
17576esac
17577eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17578 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017579 ac_status=$?
17580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17581 (exit $ac_status); }; } &&
17582 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017583 { (case "(($ac_try" in
17584 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17585 *) ac_try_echo=$ac_try;;
17586esac
17587eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17588 (eval "$ac_try") 2>&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000017589 ac_status=$?
17590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17591 (exit $ac_status); }; }; then
17592
17593cat >>confdefs.h <<\_ACEOF
17594#define HAVE_SETGROUPS 1
17595_ACEOF
17596
Thomas Wouters477c8d52006-05-27 19:21:47 +000017597 { echo "$as_me:$LINENO: result: yes" >&5
17598echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017599else
17600 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017601sed 's/^/| /' conftest.$ac_ext >&5
17602
Thomas Wouters477c8d52006-05-27 19:21:47 +000017603 { echo "$as_me:$LINENO: result: no" >&5
17604echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017605
17606fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017607
Skip Montanarof0d5f792004-08-15 14:08:23 +000017608rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000017609
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017610# check for openpty and forkpty
17611
Martin v. Löwis11437992002-04-12 09:54:03 +000017612
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017613for ac_func in openpty
17614do
Martin v. Löwis11437992002-04-12 09:54:03 +000017615as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Thomas Wouters477c8d52006-05-27 19:21:47 +000017616{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17617echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17618if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017619 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017620else
Martin v. Löwis11437992002-04-12 09:54:03 +000017621 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017622/* confdefs.h. */
17623_ACEOF
17624cat confdefs.h >>conftest.$ac_ext
17625cat >>conftest.$ac_ext <<_ACEOF
17626/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017627/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17628 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17629#define $ac_func innocuous_$ac_func
17630
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017631/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017632 which can conflict with char $ac_func (); below.
17633 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017634 <limits.h> exists even on freestanding compilers. */
17635
17636#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017637# include <limits.h>
17638#else
17639# include <assert.h>
17640#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017641
17642#undef $ac_func
17643
Thomas Wouters477c8d52006-05-27 19:21:47 +000017644/* Override any GCC internal prototype to avoid an error.
17645 Use char because int might match the return type of a GCC
17646 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017647#ifdef __cplusplus
17648extern "C"
17649#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017650char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017651/* The GNU C library defines this for functions which it implements
17652 to always fail with ENOSYS. Some functions are actually named
17653 something starting with __ and the normal name is an alias. */
Thomas Wouters477c8d52006-05-27 19:21:47 +000017654#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017655choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017656#endif
17657
Skip Montanaro6dead952003-09-25 14:50:04 +000017658int
17659main ()
17660{
Thomas Wouters477c8d52006-05-27 19:21:47 +000017661return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017662 ;
17663 return 0;
17664}
17665_ACEOF
17666rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017667if { (ac_try="$ac_link"
17668case "(($ac_try" in
17669 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17670 *) ac_try_echo=$ac_try;;
17671esac
17672eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17673 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017674 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017675 grep -v '^ *+' conftest.er1 >conftest.err
17676 rm -f conftest.er1
17677 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17679 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017680 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
17681 { (case "(($ac_try" in
17682 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17683 *) ac_try_echo=$ac_try;;
17684esac
17685eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17686 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017687 ac_status=$?
17688 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17689 (exit $ac_status); }; } &&
17690 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017691 { (case "(($ac_try" in
17692 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17693 *) ac_try_echo=$ac_try;;
17694esac
17695eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17696 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017697 ac_status=$?
17698 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17699 (exit $ac_status); }; }; then
17700 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017701else
Martin v. Löwis11437992002-04-12 09:54:03 +000017702 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017703sed 's/^/| /' conftest.$ac_ext >&5
17704
Thomas Wouters477c8d52006-05-27 19:21:47 +000017705 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017706fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017707
Skip Montanarof0d5f792004-08-15 14:08:23 +000017708rm -f conftest.err conftest.$ac_objext \
17709 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017710fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017711ac_res=`eval echo '${'$as_ac_var'}'`
17712 { echo "$as_me:$LINENO: result: $ac_res" >&5
17713echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017714if test `eval echo '${'$as_ac_var'}'` = yes; then
17715 cat >>confdefs.h <<_ACEOF
17716#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17717_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017718
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017719else
Thomas Wouters477c8d52006-05-27 19:21:47 +000017720 { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
17721echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017722if test "${ac_cv_lib_util_openpty+set}" = set; then
17723 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000017724else
Martin v. Löwis11437992002-04-12 09:54:03 +000017725 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000017726LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017727cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017728/* confdefs.h. */
17729_ACEOF
17730cat confdefs.h >>conftest.$ac_ext
17731cat >>conftest.$ac_ext <<_ACEOF
17732/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017733
Thomas Wouters477c8d52006-05-27 19:21:47 +000017734/* Override any GCC internal prototype to avoid an error.
17735 Use char because int might match the return type of a GCC
17736 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017737#ifdef __cplusplus
17738extern "C"
17739#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017740char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017741int
17742main ()
17743{
Thomas Wouters477c8d52006-05-27 19:21:47 +000017744return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017745 ;
17746 return 0;
17747}
17748_ACEOF
17749rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017750if { (ac_try="$ac_link"
17751case "(($ac_try" in
17752 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17753 *) ac_try_echo=$ac_try;;
17754esac
17755eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17756 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017757 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017758 grep -v '^ *+' conftest.er1 >conftest.err
17759 rm -f conftest.er1
17760 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17762 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017763 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
17764 { (case "(($ac_try" in
17765 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17766 *) ac_try_echo=$ac_try;;
17767esac
17768eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17769 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017770 ac_status=$?
17771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17772 (exit $ac_status); }; } &&
17773 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017774 { (case "(($ac_try" in
17775 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17776 *) ac_try_echo=$ac_try;;
17777esac
17778eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17779 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017780 ac_status=$?
17781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17782 (exit $ac_status); }; }; then
17783 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000017784else
Martin v. Löwis11437992002-04-12 09:54:03 +000017785 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017786sed 's/^/| /' conftest.$ac_ext >&5
17787
Thomas Wouters477c8d52006-05-27 19:21:47 +000017788 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000017789fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017790
Skip Montanarof0d5f792004-08-15 14:08:23 +000017791rm -f conftest.err conftest.$ac_objext \
17792 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017793LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000017794fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017795{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
17796echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017797if test $ac_cv_lib_util_openpty = yes; then
17798 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017799#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017800_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017801 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017802else
Thomas Wouters477c8d52006-05-27 19:21:47 +000017803 { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
17804echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017805if test "${ac_cv_lib_bsd_openpty+set}" = set; then
17806 echo $ECHO_N "(cached) $ECHO_C" >&6
17807else
17808 ac_check_lib_save_LIBS=$LIBS
17809LIBS="-lbsd $LIBS"
17810cat >conftest.$ac_ext <<_ACEOF
17811/* confdefs.h. */
17812_ACEOF
17813cat confdefs.h >>conftest.$ac_ext
17814cat >>conftest.$ac_ext <<_ACEOF
17815/* end confdefs.h. */
17816
Thomas Wouters477c8d52006-05-27 19:21:47 +000017817/* Override any GCC internal prototype to avoid an error.
17818 Use char because int might match the return type of a GCC
17819 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017820#ifdef __cplusplus
17821extern "C"
17822#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017823char openpty ();
17824int
17825main ()
17826{
Thomas Wouters477c8d52006-05-27 19:21:47 +000017827return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017828 ;
17829 return 0;
17830}
17831_ACEOF
17832rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017833if { (ac_try="$ac_link"
17834case "(($ac_try" in
17835 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17836 *) ac_try_echo=$ac_try;;
17837esac
17838eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17839 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017840 ac_status=$?
17841 grep -v '^ *+' conftest.er1 >conftest.err
17842 rm -f conftest.er1
17843 cat conftest.err >&5
17844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17845 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017846 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
17847 { (case "(($ac_try" in
17848 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17849 *) ac_try_echo=$ac_try;;
17850esac
17851eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17852 (eval "$ac_try") 2>&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017853 ac_status=$?
17854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17855 (exit $ac_status); }; } &&
17856 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017857 { (case "(($ac_try" in
17858 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17859 *) ac_try_echo=$ac_try;;
17860esac
17861eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17862 (eval "$ac_try") 2>&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017863 ac_status=$?
17864 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17865 (exit $ac_status); }; }; then
17866 ac_cv_lib_bsd_openpty=yes
17867else
17868 echo "$as_me: failed program was:" >&5
17869sed 's/^/| /' conftest.$ac_ext >&5
17870
Thomas Wouters477c8d52006-05-27 19:21:47 +000017871 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000017872fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017873
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017874rm -f conftest.err conftest.$ac_objext \
17875 conftest$ac_exeext conftest.$ac_ext
17876LIBS=$ac_check_lib_save_LIBS
17877fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017878{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
17879echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017880if test $ac_cv_lib_bsd_openpty = yes; then
17881 cat >>confdefs.h <<\_ACEOF
17882#define HAVE_OPENPTY 1
17883_ACEOF
17884 LIBS="$LIBS -lbsd"
17885fi
17886
17887
17888fi
17889
Fred Drake8cef4cf2000-06-28 16:40:38 +000017890
17891fi
17892done
17893
Martin v. Löwis11437992002-04-12 09:54:03 +000017894
Fred Drake8cef4cf2000-06-28 16:40:38 +000017895for ac_func in forkpty
17896do
Martin v. Löwis11437992002-04-12 09:54:03 +000017897as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Thomas Wouters477c8d52006-05-27 19:21:47 +000017898{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17899echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17900if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017901 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000017902else
Martin v. Löwis11437992002-04-12 09:54:03 +000017903 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017904/* confdefs.h. */
17905_ACEOF
17906cat confdefs.h >>conftest.$ac_ext
17907cat >>conftest.$ac_ext <<_ACEOF
17908/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017909/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17910 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17911#define $ac_func innocuous_$ac_func
17912
Fred Drake8cef4cf2000-06-28 16:40:38 +000017913/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017914 which can conflict with char $ac_func (); below.
17915 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017916 <limits.h> exists even on freestanding compilers. */
17917
17918#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017919# include <limits.h>
17920#else
17921# include <assert.h>
17922#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017923
17924#undef $ac_func
17925
Thomas Wouters477c8d52006-05-27 19:21:47 +000017926/* Override any GCC internal prototype to avoid an error.
17927 Use char because int might match the return type of a GCC
17928 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017929#ifdef __cplusplus
17930extern "C"
17931#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017932char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000017933/* The GNU C library defines this for functions which it implements
17934 to always fail with ENOSYS. Some functions are actually named
17935 something starting with __ and the normal name is an alias. */
Thomas Wouters477c8d52006-05-27 19:21:47 +000017936#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000017937choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000017938#endif
17939
Skip Montanaro6dead952003-09-25 14:50:04 +000017940int
17941main ()
17942{
Thomas Wouters477c8d52006-05-27 19:21:47 +000017943return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017944 ;
17945 return 0;
17946}
17947_ACEOF
17948rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017949if { (ac_try="$ac_link"
17950case "(($ac_try" in
17951 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17952 *) ac_try_echo=$ac_try;;
17953esac
17954eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17955 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017956 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017957 grep -v '^ *+' conftest.er1 >conftest.err
17958 rm -f conftest.er1
17959 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17961 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017962 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
17963 { (case "(($ac_try" in
17964 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17965 *) ac_try_echo=$ac_try;;
17966esac
17967eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17968 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017969 ac_status=$?
17970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17971 (exit $ac_status); }; } &&
17972 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017973 { (case "(($ac_try" in
17974 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17975 *) ac_try_echo=$ac_try;;
17976esac
17977eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17978 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017979 ac_status=$?
17980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17981 (exit $ac_status); }; }; then
17982 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017983else
Martin v. Löwis11437992002-04-12 09:54:03 +000017984 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017985sed 's/^/| /' conftest.$ac_ext >&5
17986
Thomas Wouters477c8d52006-05-27 19:21:47 +000017987 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017988fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017989
Skip Montanarof0d5f792004-08-15 14:08:23 +000017990rm -f conftest.err conftest.$ac_objext \
17991 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017992fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017993ac_res=`eval echo '${'$as_ac_var'}'`
17994 { echo "$as_me:$LINENO: result: $ac_res" >&5
17995echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017996if test `eval echo '${'$as_ac_var'}'` = yes; then
17997 cat >>confdefs.h <<_ACEOF
17998#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17999_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018000
Fred Drake8cef4cf2000-06-28 16:40:38 +000018001else
Thomas Wouters477c8d52006-05-27 19:21:47 +000018002 { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
18003echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018004if test "${ac_cv_lib_util_forkpty+set}" = set; then
18005 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000018006else
Martin v. Löwis11437992002-04-12 09:54:03 +000018007 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018008LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000018009cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018010/* confdefs.h. */
18011_ACEOF
18012cat confdefs.h >>conftest.$ac_ext
18013cat >>conftest.$ac_ext <<_ACEOF
18014/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018015
Thomas Wouters477c8d52006-05-27 19:21:47 +000018016/* Override any GCC internal prototype to avoid an error.
18017 Use char because int might match the return type of a GCC
18018 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018019#ifdef __cplusplus
18020extern "C"
18021#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018022char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018023int
18024main ()
18025{
Thomas Wouters477c8d52006-05-27 19:21:47 +000018026return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018027 ;
18028 return 0;
18029}
18030_ACEOF
18031rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018032if { (ac_try="$ac_link"
18033case "(($ac_try" in
18034 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18035 *) ac_try_echo=$ac_try;;
18036esac
18037eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18038 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018039 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018040 grep -v '^ *+' conftest.er1 >conftest.err
18041 rm -f conftest.er1
18042 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18044 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018045 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
18046 { (case "(($ac_try" in
18047 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18048 *) ac_try_echo=$ac_try;;
18049esac
18050eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18051 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018052 ac_status=$?
18053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18054 (exit $ac_status); }; } &&
18055 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018056 { (case "(($ac_try" in
18057 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18058 *) ac_try_echo=$ac_try;;
18059esac
18060eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18061 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018062 ac_status=$?
18063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18064 (exit $ac_status); }; }; then
18065 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000018066else
Martin v. Löwis11437992002-04-12 09:54:03 +000018067 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018068sed 's/^/| /' conftest.$ac_ext >&5
18069
Thomas Wouters477c8d52006-05-27 19:21:47 +000018070 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018071fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018072
Skip Montanarof0d5f792004-08-15 14:08:23 +000018073rm -f conftest.err conftest.$ac_objext \
18074 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018075LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018076fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018077{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
18078echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018079if test $ac_cv_lib_util_forkpty = yes; then
18080 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018081#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018082_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018083 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018084else
Thomas Wouters477c8d52006-05-27 19:21:47 +000018085 { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
18086echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018087if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
18088 echo $ECHO_N "(cached) $ECHO_C" >&6
18089else
18090 ac_check_lib_save_LIBS=$LIBS
18091LIBS="-lbsd $LIBS"
18092cat >conftest.$ac_ext <<_ACEOF
18093/* confdefs.h. */
18094_ACEOF
18095cat confdefs.h >>conftest.$ac_ext
18096cat >>conftest.$ac_ext <<_ACEOF
18097/* end confdefs.h. */
18098
Thomas Wouters477c8d52006-05-27 19:21:47 +000018099/* Override any GCC internal prototype to avoid an error.
18100 Use char because int might match the return type of a GCC
18101 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018102#ifdef __cplusplus
18103extern "C"
18104#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018105char forkpty ();
18106int
18107main ()
18108{
Thomas Wouters477c8d52006-05-27 19:21:47 +000018109return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018110 ;
18111 return 0;
18112}
18113_ACEOF
18114rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018115if { (ac_try="$ac_link"
18116case "(($ac_try" in
18117 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18118 *) ac_try_echo=$ac_try;;
18119esac
18120eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18121 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018122 ac_status=$?
18123 grep -v '^ *+' conftest.er1 >conftest.err
18124 rm -f conftest.er1
18125 cat conftest.err >&5
18126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18127 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018128 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
18129 { (case "(($ac_try" in
18130 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18131 *) ac_try_echo=$ac_try;;
18132esac
18133eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18134 (eval "$ac_try") 2>&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018135 ac_status=$?
18136 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18137 (exit $ac_status); }; } &&
18138 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018139 { (case "(($ac_try" in
18140 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18141 *) ac_try_echo=$ac_try;;
18142esac
18143eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18144 (eval "$ac_try") 2>&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018145 ac_status=$?
18146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18147 (exit $ac_status); }; }; then
18148 ac_cv_lib_bsd_forkpty=yes
18149else
18150 echo "$as_me: failed program was:" >&5
18151sed 's/^/| /' conftest.$ac_ext >&5
18152
Thomas Wouters477c8d52006-05-27 19:21:47 +000018153 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018154fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018155
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018156rm -f conftest.err conftest.$ac_objext \
18157 conftest$ac_exeext conftest.$ac_ext
18158LIBS=$ac_check_lib_save_LIBS
18159fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018160{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
18161echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018162if test $ac_cv_lib_bsd_forkpty = yes; then
18163 cat >>confdefs.h <<\_ACEOF
18164#define HAVE_FORKPTY 1
18165_ACEOF
18166 LIBS="$LIBS -lbsd"
18167fi
18168
18169
18170fi
18171
Fred Drake8cef4cf2000-06-28 16:40:38 +000018172
18173fi
18174done
18175
Jack Jansendd19cf82001-12-06 22:36:17 +000018176
Michael W. Hudson54241132001-12-07 15:38:26 +000018177# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000018178
18179
18180
18181
18182
18183
Fred Drake8cef4cf2000-06-28 16:40:38 +000018184for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
18185do
Martin v. Löwis11437992002-04-12 09:54:03 +000018186as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Thomas Wouters477c8d52006-05-27 19:21:47 +000018187{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18188echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18189if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018190 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018191else
Martin v. Löwis11437992002-04-12 09:54:03 +000018192 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018193/* confdefs.h. */
18194_ACEOF
18195cat confdefs.h >>conftest.$ac_ext
18196cat >>conftest.$ac_ext <<_ACEOF
18197/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018198/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18199 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18200#define $ac_func innocuous_$ac_func
18201
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018202/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018203 which can conflict with char $ac_func (); below.
18204 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018205 <limits.h> exists even on freestanding compilers. */
18206
18207#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018208# include <limits.h>
18209#else
18210# include <assert.h>
18211#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018212
18213#undef $ac_func
18214
Thomas Wouters477c8d52006-05-27 19:21:47 +000018215/* Override any GCC internal prototype to avoid an error.
18216 Use char because int might match the return type of a GCC
18217 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018218#ifdef __cplusplus
18219extern "C"
18220#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018221char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018222/* The GNU C library defines this for functions which it implements
18223 to always fail with ENOSYS. Some functions are actually named
18224 something starting with __ and the normal name is an alias. */
Thomas Wouters477c8d52006-05-27 19:21:47 +000018225#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018226choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018227#endif
18228
Skip Montanaro6dead952003-09-25 14:50:04 +000018229int
18230main ()
18231{
Thomas Wouters477c8d52006-05-27 19:21:47 +000018232return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018233 ;
18234 return 0;
18235}
18236_ACEOF
18237rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018238if { (ac_try="$ac_link"
18239case "(($ac_try" in
18240 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18241 *) ac_try_echo=$ac_try;;
18242esac
18243eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18244 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018245 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018246 grep -v '^ *+' conftest.er1 >conftest.err
18247 rm -f conftest.er1
18248 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018249 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18250 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018251 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
18252 { (case "(($ac_try" in
18253 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18254 *) ac_try_echo=$ac_try;;
18255esac
18256eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18257 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018258 ac_status=$?
18259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18260 (exit $ac_status); }; } &&
18261 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018262 { (case "(($ac_try" in
18263 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18264 *) ac_try_echo=$ac_try;;
18265esac
18266eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18267 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018268 ac_status=$?
18269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18270 (exit $ac_status); }; }; then
18271 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018272else
Martin v. Löwis11437992002-04-12 09:54:03 +000018273 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018274sed 's/^/| /' conftest.$ac_ext >&5
18275
Thomas Wouters477c8d52006-05-27 19:21:47 +000018276 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018277fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018278
Skip Montanarof0d5f792004-08-15 14:08:23 +000018279rm -f conftest.err conftest.$ac_objext \
18280 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018281fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018282ac_res=`eval echo '${'$as_ac_var'}'`
18283 { echo "$as_me:$LINENO: result: $ac_res" >&5
18284echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018285if test `eval echo '${'$as_ac_var'}'` = yes; then
18286 cat >>confdefs.h <<_ACEOF
18287#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18288_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000018289
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018290fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018291done
18292
Michael W. Hudson54241132001-12-07 15:38:26 +000018293
Martin v. Löwis11437992002-04-12 09:54:03 +000018294
18295
18296
18297
18298
Martin v. Löwis1142de32002-03-29 16:28:31 +000018299for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000018300do
Martin v. Löwis11437992002-04-12 09:54:03 +000018301as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Thomas Wouters477c8d52006-05-27 19:21:47 +000018302{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18303echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18304if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018305 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018306else
Martin v. Löwis11437992002-04-12 09:54:03 +000018307 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018308/* confdefs.h. */
18309_ACEOF
18310cat confdefs.h >>conftest.$ac_ext
18311cat >>conftest.$ac_ext <<_ACEOF
18312/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018313/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18314 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18315#define $ac_func innocuous_$ac_func
18316
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018317/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018318 which can conflict with char $ac_func (); below.
18319 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018320 <limits.h> exists even on freestanding compilers. */
18321
18322#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018323# include <limits.h>
18324#else
18325# include <assert.h>
18326#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018327
18328#undef $ac_func
18329
Thomas Wouters477c8d52006-05-27 19:21:47 +000018330/* Override any GCC internal prototype to avoid an error.
18331 Use char because int might match the return type of a GCC
18332 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018333#ifdef __cplusplus
18334extern "C"
18335#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018336char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000018337/* The GNU C library defines this for functions which it implements
18338 to always fail with ENOSYS. Some functions are actually named
18339 something starting with __ and the normal name is an alias. */
Thomas Wouters477c8d52006-05-27 19:21:47 +000018340#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000018341choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000018342#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018343
Skip Montanaro6dead952003-09-25 14:50:04 +000018344int
18345main ()
18346{
Thomas Wouters477c8d52006-05-27 19:21:47 +000018347return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018348 ;
18349 return 0;
18350}
18351_ACEOF
18352rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018353if { (ac_try="$ac_link"
18354case "(($ac_try" in
18355 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18356 *) ac_try_echo=$ac_try;;
18357esac
18358eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18359 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018360 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018361 grep -v '^ *+' conftest.er1 >conftest.err
18362 rm -f conftest.er1
18363 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018364 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18365 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018366 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
18367 { (case "(($ac_try" in
18368 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18369 *) ac_try_echo=$ac_try;;
18370esac
18371eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18372 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018373 ac_status=$?
18374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18375 (exit $ac_status); }; } &&
18376 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018377 { (case "(($ac_try" in
18378 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18379 *) ac_try_echo=$ac_try;;
18380esac
18381eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18382 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018383 ac_status=$?
18384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18385 (exit $ac_status); }; }; then
18386 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000018387else
Martin v. Löwis11437992002-04-12 09:54:03 +000018388 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018389sed 's/^/| /' conftest.$ac_ext >&5
18390
Thomas Wouters477c8d52006-05-27 19:21:47 +000018391 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000018392fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018393
Skip Montanarof0d5f792004-08-15 14:08:23 +000018394rm -f conftest.err conftest.$ac_objext \
18395 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000018396fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018397ac_res=`eval echo '${'$as_ac_var'}'`
18398 { echo "$as_me:$LINENO: result: $ac_res" >&5
18399echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018400if test `eval echo '${'$as_ac_var'}'` = yes; then
18401 cat >>confdefs.h <<_ACEOF
18402#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18403_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000018404
Martin v. Löwis1142de32002-03-29 16:28:31 +000018405else
Thomas Wouters477c8d52006-05-27 19:21:47 +000018406 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000018407 *" $ac_func.$ac_objext "* ) ;;
Thomas Wouters477c8d52006-05-27 19:21:47 +000018408 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
18409 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000018410esac
18411
Martin v. Löwis1142de32002-03-29 16:28:31 +000018412fi
18413done
18414
18415
Martin v. Löwis11437992002-04-12 09:54:03 +000018416
Martin v. Löwis1142de32002-03-29 16:28:31 +000018417for ac_func in getpgrp
18418do
Martin v. Löwis11437992002-04-12 09:54:03 +000018419as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Thomas Wouters477c8d52006-05-27 19:21:47 +000018420{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18421echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18422if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018423 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000018424else
Martin v. Löwis11437992002-04-12 09:54:03 +000018425 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018426/* confdefs.h. */
18427_ACEOF
18428cat confdefs.h >>conftest.$ac_ext
18429cat >>conftest.$ac_ext <<_ACEOF
18430/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018431/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18432 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18433#define $ac_func innocuous_$ac_func
18434
Martin v. Löwis1142de32002-03-29 16:28:31 +000018435/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018436 which can conflict with char $ac_func (); below.
18437 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018438 <limits.h> exists even on freestanding compilers. */
18439
18440#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018441# include <limits.h>
18442#else
18443# include <assert.h>
18444#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018445
18446#undef $ac_func
18447
Thomas Wouters477c8d52006-05-27 19:21:47 +000018448/* Override any GCC internal prototype to avoid an error.
18449 Use char because int might match the return type of a GCC
18450 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018451#ifdef __cplusplus
18452extern "C"
18453#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018454char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000018455/* The GNU C library defines this for functions which it implements
18456 to always fail with ENOSYS. Some functions are actually named
18457 something starting with __ and the normal name is an alias. */
Thomas Wouters477c8d52006-05-27 19:21:47 +000018458#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000018459choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000018460#endif
18461
Skip Montanaro6dead952003-09-25 14:50:04 +000018462int
18463main ()
18464{
Thomas Wouters477c8d52006-05-27 19:21:47 +000018465return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018466 ;
18467 return 0;
18468}
18469_ACEOF
18470rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018471if { (ac_try="$ac_link"
18472case "(($ac_try" in
18473 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18474 *) ac_try_echo=$ac_try;;
18475esac
18476eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18477 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018478 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018479 grep -v '^ *+' conftest.er1 >conftest.err
18480 rm -f conftest.er1
18481 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18483 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018484 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
18485 { (case "(($ac_try" in
18486 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18487 *) ac_try_echo=$ac_try;;
18488esac
18489eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18490 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018491 ac_status=$?
18492 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18493 (exit $ac_status); }; } &&
18494 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018495 { (case "(($ac_try" in
18496 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18497 *) ac_try_echo=$ac_try;;
18498esac
18499eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18500 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018501 ac_status=$?
18502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18503 (exit $ac_status); }; }; then
18504 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018505else
Martin v. Löwis11437992002-04-12 09:54:03 +000018506 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018507sed 's/^/| /' conftest.$ac_ext >&5
18508
Thomas Wouters477c8d52006-05-27 19:21:47 +000018509 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018510fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018511
Skip Montanarof0d5f792004-08-15 14:08:23 +000018512rm -f conftest.err conftest.$ac_objext \
18513 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018514fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018515ac_res=`eval echo '${'$as_ac_var'}'`
18516 { echo "$as_me:$LINENO: result: $ac_res" >&5
18517echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018518if test `eval echo '${'$as_ac_var'}'` = yes; then
18519 cat >>confdefs.h <<_ACEOF
18520#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18521_ACEOF
18522 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018523/* confdefs.h. */
18524_ACEOF
18525cat confdefs.h >>conftest.$ac_ext
18526cat >>conftest.$ac_ext <<_ACEOF
18527/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018528#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018529int
18530main ()
18531{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018532getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000018533 ;
18534 return 0;
18535}
18536_ACEOF
18537rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018538if { (ac_try="$ac_compile"
18539case "(($ac_try" in
18540 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18541 *) ac_try_echo=$ac_try;;
18542esac
18543eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18544 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018545 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018546 grep -v '^ *+' conftest.er1 >conftest.err
18547 rm -f conftest.er1
18548 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018549 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18550 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018551 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
18552 { (case "(($ac_try" in
18553 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18554 *) ac_try_echo=$ac_try;;
18555esac
18556eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18557 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018558 ac_status=$?
18559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18560 (exit $ac_status); }; } &&
18561 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018562 { (case "(($ac_try" in
18563 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18564 *) ac_try_echo=$ac_try;;
18565esac
18566eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18567 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018568 ac_status=$?
18569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18570 (exit $ac_status); }; }; then
18571
18572cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018573#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018574_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000018575
Martin v. Löwis11437992002-04-12 09:54:03 +000018576
Guido van Rossumf78abae1997-01-21 22:02:36 +000018577else
Martin v. Löwis11437992002-04-12 09:54:03 +000018578 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018579sed 's/^/| /' conftest.$ac_ext >&5
18580
Thomas Wouters477c8d52006-05-27 19:21:47 +000018581
Guido van Rossum627b2d71993-12-24 10:39:16 +000018582fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018583
Skip Montanarof0d5f792004-08-15 14:08:23 +000018584rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000018585
Guido van Rossum627b2d71993-12-24 10:39:16 +000018586fi
Thomas Wouters3a584202000-08-05 23:28:51 +000018587done
Guido van Rossum627b2d71993-12-24 10:39:16 +000018588
Jack Jansen150753c2003-03-29 22:07:47 +000018589
18590for ac_func in setpgrp
18591do
18592as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Thomas Wouters477c8d52006-05-27 19:21:47 +000018593{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18594echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18595if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018596 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018597else
Martin v. Löwis11437992002-04-12 09:54:03 +000018598 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018599/* confdefs.h. */
18600_ACEOF
18601cat confdefs.h >>conftest.$ac_ext
18602cat >>conftest.$ac_ext <<_ACEOF
18603/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018604/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18605 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18606#define $ac_func innocuous_$ac_func
18607
Jack Jansen150753c2003-03-29 22:07:47 +000018608/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018609 which can conflict with char $ac_func (); below.
18610 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018611 <limits.h> exists even on freestanding compilers. */
18612
18613#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018614# include <limits.h>
18615#else
18616# include <assert.h>
18617#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018618
18619#undef $ac_func
18620
Thomas Wouters477c8d52006-05-27 19:21:47 +000018621/* Override any GCC internal prototype to avoid an error.
18622 Use char because int might match the return type of a GCC
18623 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000018624#ifdef __cplusplus
18625extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000018626#endif
Jack Jansen150753c2003-03-29 22:07:47 +000018627char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000018628/* The GNU C library defines this for functions which it implements
18629 to always fail with ENOSYS. Some functions are actually named
18630 something starting with __ and the normal name is an alias. */
Thomas Wouters477c8d52006-05-27 19:21:47 +000018631#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000018632choke me
Jack Jansen150753c2003-03-29 22:07:47 +000018633#endif
18634
Skip Montanaro6dead952003-09-25 14:50:04 +000018635int
18636main ()
18637{
Thomas Wouters477c8d52006-05-27 19:21:47 +000018638return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018639 ;
18640 return 0;
18641}
18642_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000018643rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018644if { (ac_try="$ac_link"
18645case "(($ac_try" in
18646 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18647 *) ac_try_echo=$ac_try;;
18648esac
18649eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18650 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018651 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018652 grep -v '^ *+' conftest.er1 >conftest.err
18653 rm -f conftest.er1
18654 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Jack Jansen150753c2003-03-29 22:07:47 +000018656 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018657 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
18658 { (case "(($ac_try" in
18659 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18660 *) ac_try_echo=$ac_try;;
18661esac
18662eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18663 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018664 ac_status=$?
18665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18666 (exit $ac_status); }; } &&
18667 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018668 { (case "(($ac_try" in
18669 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18670 *) ac_try_echo=$ac_try;;
18671esac
18672eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18673 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018674 ac_status=$?
18675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18676 (exit $ac_status); }; }; then
Jack Jansen150753c2003-03-29 22:07:47 +000018677 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018678else
Jack Jansen150753c2003-03-29 22:07:47 +000018679 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018680sed 's/^/| /' conftest.$ac_ext >&5
18681
Thomas Wouters477c8d52006-05-27 19:21:47 +000018682 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018683fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018684
Skip Montanarof0d5f792004-08-15 14:08:23 +000018685rm -f conftest.err conftest.$ac_objext \
18686 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018687fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018688ac_res=`eval echo '${'$as_ac_var'}'`
18689 { echo "$as_me:$LINENO: result: $ac_res" >&5
18690echo "${ECHO_T}$ac_res" >&6; }
Jack Jansen150753c2003-03-29 22:07:47 +000018691if test `eval echo '${'$as_ac_var'}'` = yes; then
18692 cat >>confdefs.h <<_ACEOF
18693#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18694_ACEOF
18695 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018696/* confdefs.h. */
18697_ACEOF
18698cat confdefs.h >>conftest.$ac_ext
18699cat >>conftest.$ac_ext <<_ACEOF
18700/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000018701#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000018702int
18703main ()
18704{
18705setpgrp(0,0);
18706 ;
18707 return 0;
18708}
18709_ACEOF
18710rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018711if { (ac_try="$ac_compile"
18712case "(($ac_try" in
18713 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18714 *) ac_try_echo=$ac_try;;
18715esac
18716eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18717 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000018718 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018719 grep -v '^ *+' conftest.er1 >conftest.err
18720 rm -f conftest.er1
18721 cat conftest.err >&5
Jack Jansen150753c2003-03-29 22:07:47 +000018722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18723 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018724 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
18725 { (case "(($ac_try" in
18726 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18727 *) ac_try_echo=$ac_try;;
18728esac
18729eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18730 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018731 ac_status=$?
18732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18733 (exit $ac_status); }; } &&
18734 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018735 { (case "(($ac_try" in
18736 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18737 *) ac_try_echo=$ac_try;;
18738esac
18739eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18740 (eval "$ac_try") 2>&5
Jack Jansen150753c2003-03-29 22:07:47 +000018741 ac_status=$?
18742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18743 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018744
18745cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000018746#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018747_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000018748
Jack Jansen150753c2003-03-29 22:07:47 +000018749
18750else
18751 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018752sed 's/^/| /' conftest.$ac_ext >&5
18753
Thomas Wouters477c8d52006-05-27 19:21:47 +000018754
Guido van Rossum8eee56f1994-10-20 22:18:37 +000018755fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018756
Skip Montanarof0d5f792004-08-15 14:08:23 +000018757rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000018758
18759fi
18760done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000018761
Martin v. Löwis11437992002-04-12 09:54:03 +000018762
Thomas Wouters3a584202000-08-05 23:28:51 +000018763for ac_func in gettimeofday
18764do
Martin v. Löwis11437992002-04-12 09:54:03 +000018765as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Thomas Wouters477c8d52006-05-27 19:21:47 +000018766{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18767echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18768if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018769 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018770else
Martin v. Löwis11437992002-04-12 09:54:03 +000018771 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018772/* confdefs.h. */
18773_ACEOF
18774cat confdefs.h >>conftest.$ac_ext
18775cat >>conftest.$ac_ext <<_ACEOF
18776/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018777/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18778 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18779#define $ac_func innocuous_$ac_func
18780
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018781/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018782 which can conflict with char $ac_func (); below.
18783 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018784 <limits.h> exists even on freestanding compilers. */
18785
18786#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018787# include <limits.h>
18788#else
18789# include <assert.h>
18790#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018791
18792#undef $ac_func
18793
Thomas Wouters477c8d52006-05-27 19:21:47 +000018794/* Override any GCC internal prototype to avoid an error.
18795 Use char because int might match the return type of a GCC
18796 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018797#ifdef __cplusplus
18798extern "C"
18799#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018800char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018801/* The GNU C library defines this for functions which it implements
18802 to always fail with ENOSYS. Some functions are actually named
18803 something starting with __ and the normal name is an alias. */
Thomas Wouters477c8d52006-05-27 19:21:47 +000018804#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018805choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018806#endif
18807
Skip Montanaro6dead952003-09-25 14:50:04 +000018808int
18809main ()
18810{
Thomas Wouters477c8d52006-05-27 19:21:47 +000018811return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018812 ;
18813 return 0;
18814}
18815_ACEOF
18816rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018817if { (ac_try="$ac_link"
18818case "(($ac_try" in
18819 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18820 *) ac_try_echo=$ac_try;;
18821esac
18822eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18823 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018824 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018825 grep -v '^ *+' conftest.er1 >conftest.err
18826 rm -f conftest.er1
18827 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18829 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018830 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
18831 { (case "(($ac_try" in
18832 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18833 *) ac_try_echo=$ac_try;;
18834esac
18835eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18836 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018837 ac_status=$?
18838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18839 (exit $ac_status); }; } &&
18840 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018841 { (case "(($ac_try" in
18842 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18843 *) ac_try_echo=$ac_try;;
18844esac
18845eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18846 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018847 ac_status=$?
18848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18849 (exit $ac_status); }; }; then
18850 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018851else
Martin v. Löwis11437992002-04-12 09:54:03 +000018852 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018853sed 's/^/| /' conftest.$ac_ext >&5
18854
Thomas Wouters477c8d52006-05-27 19:21:47 +000018855 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018856fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018857
Skip Montanarof0d5f792004-08-15 14:08:23 +000018858rm -f conftest.err conftest.$ac_objext \
18859 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018860fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018861ac_res=`eval echo '${'$as_ac_var'}'`
18862 { echo "$as_me:$LINENO: result: $ac_res" >&5
18863echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018864if test `eval echo '${'$as_ac_var'}'` = yes; then
18865 cat >>confdefs.h <<_ACEOF
18866#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18867_ACEOF
18868 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018869/* confdefs.h. */
18870_ACEOF
18871cat confdefs.h >>conftest.$ac_ext
18872cat >>conftest.$ac_ext <<_ACEOF
18873/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000018874#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018875int
18876main ()
18877{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018878gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000018879 ;
18880 return 0;
18881}
18882_ACEOF
18883rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018884if { (ac_try="$ac_compile"
18885case "(($ac_try" in
18886 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18887 *) ac_try_echo=$ac_try;;
18888esac
18889eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18890 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018891 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018892 grep -v '^ *+' conftest.er1 >conftest.err
18893 rm -f conftest.er1
18894 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18896 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018897 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
18898 { (case "(($ac_try" in
18899 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18900 *) ac_try_echo=$ac_try;;
18901esac
18902eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18903 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018904 ac_status=$?
18905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18906 (exit $ac_status); }; } &&
18907 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018908 { (case "(($ac_try" in
18909 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18910 *) ac_try_echo=$ac_try;;
18911esac
18912eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18913 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018914 ac_status=$?
18915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18916 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000018917 :
18918else
Martin v. Löwis11437992002-04-12 09:54:03 +000018919 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018920sed 's/^/| /' conftest.$ac_ext >&5
18921
Martin v. Löwis11437992002-04-12 09:54:03 +000018922
18923cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018924#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018925_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000018926
Martin v. Löwis11437992002-04-12 09:54:03 +000018927
Guido van Rossum627b2d71993-12-24 10:39:16 +000018928fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018929
Skip Montanarof0d5f792004-08-15 14:08:23 +000018930rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000018931
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018932fi
Thomas Wouters3a584202000-08-05 23:28:51 +000018933done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018934
Michael W. Hudson54241132001-12-07 15:38:26 +000018935
Thomas Wouters477c8d52006-05-27 19:21:47 +000018936{ echo "$as_me:$LINENO: checking for major" >&5
18937echo $ECHO_N "checking for major... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018938cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018939/* confdefs.h. */
18940_ACEOF
18941cat confdefs.h >>conftest.$ac_ext
18942cat >>conftest.$ac_ext <<_ACEOF
18943/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018944
Neal Norwitz6eb37f02003-02-23 23:28:15 +000018945#if defined(MAJOR_IN_MKDEV)
18946#include <sys/mkdev.h>
18947#elif defined(MAJOR_IN_SYSMACROS)
18948#include <sys/sysmacros.h>
18949#else
18950#include <sys/types.h>
18951#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018952
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018953int
18954main ()
18955{
18956
18957 makedev(major(0),minor(0));
18958
18959 ;
18960 return 0;
18961}
18962_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000018963rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018964if { (ac_try="$ac_link"
18965case "(($ac_try" in
18966 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18967 *) ac_try_echo=$ac_try;;
18968esac
18969eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18970 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018971 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018972 grep -v '^ *+' conftest.er1 >conftest.err
18973 rm -f conftest.er1
18974 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018975 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18976 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018977 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
18978 { (case "(($ac_try" in
18979 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18980 *) ac_try_echo=$ac_try;;
18981esac
18982eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18983 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018984 ac_status=$?
18985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18986 (exit $ac_status); }; } &&
18987 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018988 { (case "(($ac_try" in
18989 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18990 *) ac_try_echo=$ac_try;;
18991esac
18992eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18993 (eval "$ac_try") 2>&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018994 ac_status=$?
18995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18996 (exit $ac_status); }; }; then
18997
18998
18999cat >>confdefs.h <<\_ACEOF
19000#define HAVE_DEVICE_MACROS 1
19001_ACEOF
19002
Thomas Wouters477c8d52006-05-27 19:21:47 +000019003 { echo "$as_me:$LINENO: result: yes" >&5
19004echo "${ECHO_T}yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019005
19006else
19007 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019008sed 's/^/| /' conftest.$ac_ext >&5
19009
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019010
Thomas Wouters477c8d52006-05-27 19:21:47 +000019011 { echo "$as_me:$LINENO: result: no" >&5
19012echo "${ECHO_T}no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019013
19014fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000019015
Skip Montanarof0d5f792004-08-15 14:08:23 +000019016rm -f conftest.err conftest.$ac_objext \
19017 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019018
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019019# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000019020# for [no]getaddrinfo in netdb.h.
Thomas Wouters477c8d52006-05-27 19:21:47 +000019021{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
19022echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019023cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019024/* confdefs.h. */
19025_ACEOF
19026cat confdefs.h >>conftest.$ac_ext
19027cat >>conftest.$ac_ext <<_ACEOF
19028/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019029
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000019030#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019031#include <sys/socket.h>
19032#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000019033#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019034
Martin v. Löwis11437992002-04-12 09:54:03 +000019035int
19036main ()
19037{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019038
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019039getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019040
Martin v. Löwis11437992002-04-12 09:54:03 +000019041 ;
19042 return 0;
19043}
19044_ACEOF
19045rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019046if { (ac_try="$ac_link"
19047case "(($ac_try" in
19048 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19049 *) ac_try_echo=$ac_try;;
19050esac
19051eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19052 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019053 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019054 grep -v '^ *+' conftest.er1 >conftest.err
19055 rm -f conftest.er1
19056 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19058 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019059 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
19060 { (case "(($ac_try" in
19061 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19062 *) ac_try_echo=$ac_try;;
19063esac
19064eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19065 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019066 ac_status=$?
19067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19068 (exit $ac_status); }; } &&
19069 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019070 { (case "(($ac_try" in
19071 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19072 *) ac_try_echo=$ac_try;;
19073esac
19074eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19075 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019076 ac_status=$?
19077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19078 (exit $ac_status); }; }; then
19079
Thomas Wouters477c8d52006-05-27 19:21:47 +000019080{ echo "$as_me:$LINENO: result: yes" >&5
19081echo "${ECHO_T}yes" >&6; }
19082{ echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
19083echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019084if test "$cross_compiling" = yes; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000019085 { echo "$as_me:$LINENO: result: buggy" >&5
19086echo "${ECHO_T}buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019087buggygetaddrinfo=yes
19088else
Martin v. Löwis11437992002-04-12 09:54:03 +000019089 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019090/* confdefs.h. */
19091_ACEOF
19092cat confdefs.h >>conftest.$ac_ext
19093cat >>conftest.$ac_ext <<_ACEOF
19094/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019095
19096#include <sys/types.h>
19097#include <netdb.h>
19098#include <string.h>
19099#include <sys/socket.h>
19100#include <netinet/in.h>
19101
19102main()
19103{
19104 int passive, gaierr, inet4 = 0, inet6 = 0;
19105 struct addrinfo hints, *ai, *aitop;
19106 char straddr[INET6_ADDRSTRLEN], strport[16];
19107
19108 for (passive = 0; passive <= 1; passive++) {
19109 memset(&hints, 0, sizeof(hints));
19110 hints.ai_family = AF_UNSPEC;
19111 hints.ai_flags = passive ? AI_PASSIVE : 0;
19112 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000019113 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019114 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
19115 (void)gai_strerror(gaierr);
19116 goto bad;
19117 }
19118 for (ai = aitop; ai; ai = ai->ai_next) {
19119 if (ai->ai_addr == NULL ||
19120 ai->ai_addrlen == 0 ||
19121 getnameinfo(ai->ai_addr, ai->ai_addrlen,
19122 straddr, sizeof(straddr), strport, sizeof(strport),
19123 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
19124 goto bad;
19125 }
19126 switch (ai->ai_family) {
19127 case AF_INET:
19128 if (strcmp(strport, "54321") != 0) {
19129 goto bad;
19130 }
19131 if (passive) {
19132 if (strcmp(straddr, "0.0.0.0") != 0) {
19133 goto bad;
19134 }
19135 } else {
19136 if (strcmp(straddr, "127.0.0.1") != 0) {
19137 goto bad;
19138 }
19139 }
19140 inet4++;
19141 break;
19142 case AF_INET6:
19143 if (strcmp(strport, "54321") != 0) {
19144 goto bad;
19145 }
19146 if (passive) {
19147 if (strcmp(straddr, "::") != 0) {
19148 goto bad;
19149 }
19150 } else {
19151 if (strcmp(straddr, "::1") != 0) {
19152 goto bad;
19153 }
19154 }
19155 inet6++;
19156 break;
19157 case AF_UNSPEC:
19158 goto bad;
19159 break;
19160 default:
19161 /* another family support? */
19162 break;
19163 }
19164 }
19165 }
19166
19167 if (!(inet4 == 0 || inet4 == 2))
19168 goto bad;
19169 if (!(inet6 == 0 || inet6 == 2))
19170 goto bad;
19171
19172 if (aitop)
19173 freeaddrinfo(aitop);
19174 exit(0);
19175
19176 bad:
19177 if (aitop)
19178 freeaddrinfo(aitop);
19179 exit(1);
19180}
19181
Martin v. Löwis11437992002-04-12 09:54:03 +000019182_ACEOF
19183rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019184if { (ac_try="$ac_link"
19185case "(($ac_try" in
19186 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19187 *) ac_try_echo=$ac_try;;
19188esac
19189eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19190 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019191 ac_status=$?
19192 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19193 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019194 { (case "(($ac_try" in
19195 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19196 *) ac_try_echo=$ac_try;;
19197esac
19198eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19199 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019200 ac_status=$?
19201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19202 (exit $ac_status); }; }; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000019203 { echo "$as_me:$LINENO: result: good" >&5
19204echo "${ECHO_T}good" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019205buggygetaddrinfo=no
19206else
Martin v. Löwis11437992002-04-12 09:54:03 +000019207 echo "$as_me: program exited with status $ac_status" >&5
19208echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019209sed 's/^/| /' conftest.$ac_ext >&5
19210
Martin v. Löwis11437992002-04-12 09:54:03 +000019211( exit $ac_status )
Thomas Wouters477c8d52006-05-27 19:21:47 +000019212{ echo "$as_me:$LINENO: result: buggy" >&5
19213echo "${ECHO_T}buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019214buggygetaddrinfo=yes
19215fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000019216rm -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 +000019217fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000019218
19219
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019220else
Martin v. Löwis11437992002-04-12 09:54:03 +000019221 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019222sed 's/^/| /' conftest.$ac_ext >&5
19223
Martin v. Löwis11437992002-04-12 09:54:03 +000019224
Thomas Wouters477c8d52006-05-27 19:21:47 +000019225{ echo "$as_me:$LINENO: result: no" >&5
19226echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019227buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019228
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019229fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000019230
Skip Montanarof0d5f792004-08-15 14:08:23 +000019231rm -f conftest.err conftest.$ac_objext \
19232 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019233
19234if test "$buggygetaddrinfo" = "yes"; then
19235 if test "$ipv6" = "yes"; then
19236 echo 'Fatal: You must get working getaddrinfo() function.'
19237 echo ' or you can specify "--disable-ipv6"'.
19238 exit 1
19239 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019240else
Martin v. Löwis11437992002-04-12 09:54:03 +000019241
19242cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019243#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019244_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019245
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019246fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019247
Jack Jansen9a66b6d2001-08-08 13:56:14 +000019248for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019249do
Martin v. Löwis11437992002-04-12 09:54:03 +000019250as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Thomas Wouters477c8d52006-05-27 19:21:47 +000019251{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19252echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
19253if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019254 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019255else
Martin v. Löwis11437992002-04-12 09:54:03 +000019256 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019257/* confdefs.h. */
19258_ACEOF
19259cat confdefs.h >>conftest.$ac_ext
19260cat >>conftest.$ac_ext <<_ACEOF
19261/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019262/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19263 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19264#define $ac_func innocuous_$ac_func
19265
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019266/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019267 which can conflict with char $ac_func (); below.
19268 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019269 <limits.h> exists even on freestanding compilers. */
19270
19271#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019272# include <limits.h>
19273#else
19274# include <assert.h>
19275#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019276
19277#undef $ac_func
19278
Thomas Wouters477c8d52006-05-27 19:21:47 +000019279/* Override any GCC internal prototype to avoid an error.
19280 Use char because int might match the return type of a GCC
19281 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019282#ifdef __cplusplus
19283extern "C"
19284#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019285char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019286/* The GNU C library defines this for functions which it implements
19287 to always fail with ENOSYS. Some functions are actually named
19288 something starting with __ and the normal name is an alias. */
Thomas Wouters477c8d52006-05-27 19:21:47 +000019289#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019290choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019291#endif
19292
Skip Montanaro6dead952003-09-25 14:50:04 +000019293int
19294main ()
19295{
Thomas Wouters477c8d52006-05-27 19:21:47 +000019296return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019297 ;
19298 return 0;
19299}
19300_ACEOF
19301rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019302if { (ac_try="$ac_link"
19303case "(($ac_try" in
19304 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19305 *) ac_try_echo=$ac_try;;
19306esac
19307eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19308 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019309 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019310 grep -v '^ *+' conftest.er1 >conftest.err
19311 rm -f conftest.er1
19312 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19314 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019315 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
19316 { (case "(($ac_try" in
19317 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19318 *) ac_try_echo=$ac_try;;
19319esac
19320eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19321 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019322 ac_status=$?
19323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19324 (exit $ac_status); }; } &&
19325 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019326 { (case "(($ac_try" in
19327 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19328 *) ac_try_echo=$ac_try;;
19329esac
19330eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19331 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019332 ac_status=$?
19333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19334 (exit $ac_status); }; }; then
19335 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019336else
Martin v. Löwis11437992002-04-12 09:54:03 +000019337 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019338sed 's/^/| /' conftest.$ac_ext >&5
19339
Thomas Wouters477c8d52006-05-27 19:21:47 +000019340 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019341fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000019342
Skip Montanarof0d5f792004-08-15 14:08:23 +000019343rm -f conftest.err conftest.$ac_objext \
19344 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019345fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000019346ac_res=`eval echo '${'$as_ac_var'}'`
19347 { echo "$as_me:$LINENO: result: $ac_res" >&5
19348echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019349if test `eval echo '${'$as_ac_var'}'` = yes; then
19350 cat >>confdefs.h <<_ACEOF
19351#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19352_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019353
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019354fi
19355done
19356
Michael W. Hudson54241132001-12-07 15:38:26 +000019357
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019358# checks for structures
Thomas Wouters477c8d52006-05-27 19:21:47 +000019359{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
19360echo $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 +000019361if test "${ac_cv_header_time+set}" = set; then
19362 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019363else
Martin v. Löwis11437992002-04-12 09:54:03 +000019364 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019365/* confdefs.h. */
19366_ACEOF
19367cat confdefs.h >>conftest.$ac_ext
19368cat >>conftest.$ac_ext <<_ACEOF
19369/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019370#include <sys/types.h>
19371#include <sys/time.h>
19372#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019373
Martin v. Löwis11437992002-04-12 09:54:03 +000019374int
19375main ()
19376{
19377if ((struct tm *) 0)
19378return 0;
19379 ;
19380 return 0;
19381}
19382_ACEOF
19383rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019384if { (ac_try="$ac_compile"
19385case "(($ac_try" in
19386 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19387 *) ac_try_echo=$ac_try;;
19388esac
19389eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19390 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019391 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019392 grep -v '^ *+' conftest.er1 >conftest.err
19393 rm -f conftest.er1
19394 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19396 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019397 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
19398 { (case "(($ac_try" in
19399 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19400 *) ac_try_echo=$ac_try;;
19401esac
19402eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19403 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019404 ac_status=$?
19405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19406 (exit $ac_status); }; } &&
19407 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019408 { (case "(($ac_try" in
19409 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19410 *) ac_try_echo=$ac_try;;
19411esac
19412eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19413 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019414 ac_status=$?
19415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19416 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019417 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000019418else
Martin v. Löwis11437992002-04-12 09:54:03 +000019419 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019420sed 's/^/| /' conftest.$ac_ext >&5
19421
Thomas Wouters477c8d52006-05-27 19:21:47 +000019422 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000019423fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000019424
Skip Montanarof0d5f792004-08-15 14:08:23 +000019425rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019426fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000019427{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
19428echo "${ECHO_T}$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019429if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019430
19431cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019432#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019433_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019434
19435fi
19436
Thomas Wouters477c8d52006-05-27 19:21:47 +000019437{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
19438echo $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 +000019439if test "${ac_cv_struct_tm+set}" = set; then
19440 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019441else
Martin v. Löwis11437992002-04-12 09:54:03 +000019442 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019443/* confdefs.h. */
19444_ACEOF
19445cat confdefs.h >>conftest.$ac_ext
19446cat >>conftest.$ac_ext <<_ACEOF
19447/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019448#include <sys/types.h>
19449#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019450
Martin v. Löwis11437992002-04-12 09:54:03 +000019451int
19452main ()
19453{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019454struct tm *tp; tp->tm_sec;
Martin v. Löwis11437992002-04-12 09:54:03 +000019455 ;
19456 return 0;
19457}
19458_ACEOF
19459rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019460if { (ac_try="$ac_compile"
19461case "(($ac_try" in
19462 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19463 *) ac_try_echo=$ac_try;;
19464esac
19465eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19466 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019467 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019468 grep -v '^ *+' conftest.er1 >conftest.err
19469 rm -f conftest.er1
19470 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19472 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019473 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
19474 { (case "(($ac_try" in
19475 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19476 *) ac_try_echo=$ac_try;;
19477esac
19478eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19479 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019480 ac_status=$?
19481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19482 (exit $ac_status); }; } &&
19483 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019484 { (case "(($ac_try" in
19485 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19486 *) ac_try_echo=$ac_try;;
19487esac
19488eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19489 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019490 ac_status=$?
19491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19492 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019493 ac_cv_struct_tm=time.h
19494else
Martin v. Löwis11437992002-04-12 09:54:03 +000019495 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019496sed 's/^/| /' conftest.$ac_ext >&5
19497
Thomas Wouters477c8d52006-05-27 19:21:47 +000019498 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019499fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000019500
Skip Montanarof0d5f792004-08-15 14:08:23 +000019501rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019502fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000019503{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
19504echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019505if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019506
19507cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019508#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019509_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019510
19511fi
19512
Thomas Wouters477c8d52006-05-27 19:21:47 +000019513{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
19514echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019515if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
19516 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019517else
Martin v. Löwis11437992002-04-12 09:54:03 +000019518 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019519/* confdefs.h. */
19520_ACEOF
19521cat confdefs.h >>conftest.$ac_ext
19522cat >>conftest.$ac_ext <<_ACEOF
19523/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019524#include <sys/types.h>
19525#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000019526
19527
Martin v. Löwis11437992002-04-12 09:54:03 +000019528int
19529main ()
19530{
19531static struct tm ac_aggr;
19532if (ac_aggr.tm_zone)
19533return 0;
19534 ;
19535 return 0;
19536}
19537_ACEOF
19538rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019539if { (ac_try="$ac_compile"
19540case "(($ac_try" in
19541 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19542 *) ac_try_echo=$ac_try;;
19543esac
19544eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19545 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019546 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019547 grep -v '^ *+' conftest.er1 >conftest.err
19548 rm -f conftest.er1
19549 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19551 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019552 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
19553 { (case "(($ac_try" in
19554 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19555 *) ac_try_echo=$ac_try;;
19556esac
19557eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19558 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019559 ac_status=$?
19560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19561 (exit $ac_status); }; } &&
19562 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019563 { (case "(($ac_try" in
19564 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19565 *) ac_try_echo=$ac_try;;
19566esac
19567eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19568 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019569 ac_status=$?
19570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19571 (exit $ac_status); }; }; then
19572 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000019573else
Martin v. Löwis11437992002-04-12 09:54:03 +000019574 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019575sed 's/^/| /' conftest.$ac_ext >&5
19576
Thomas Wouters477c8d52006-05-27 19:21:47 +000019577 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019578/* confdefs.h. */
19579_ACEOF
19580cat confdefs.h >>conftest.$ac_ext
19581cat >>conftest.$ac_ext <<_ACEOF
19582/* end confdefs.h. */
19583#include <sys/types.h>
19584#include <$ac_cv_struct_tm>
19585
19586
19587int
19588main ()
19589{
19590static struct tm ac_aggr;
19591if (sizeof ac_aggr.tm_zone)
19592return 0;
19593 ;
19594 return 0;
19595}
19596_ACEOF
19597rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019598if { (ac_try="$ac_compile"
19599case "(($ac_try" in
19600 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19601 *) ac_try_echo=$ac_try;;
19602esac
19603eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19604 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000019605 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019606 grep -v '^ *+' conftest.er1 >conftest.err
19607 rm -f conftest.er1
19608 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19610 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019611 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
19612 { (case "(($ac_try" in
19613 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19614 *) ac_try_echo=$ac_try;;
19615esac
19616eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19617 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019618 ac_status=$?
19619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19620 (exit $ac_status); }; } &&
19621 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019622 { (case "(($ac_try" in
19623 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19624 *) ac_try_echo=$ac_try;;
19625esac
19626eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19627 (eval "$ac_try") 2>&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019628 ac_status=$?
19629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19630 (exit $ac_status); }; }; then
19631 ac_cv_member_struct_tm_tm_zone=yes
19632else
19633 echo "$as_me: failed program was:" >&5
19634sed 's/^/| /' conftest.$ac_ext >&5
19635
Thomas Wouters477c8d52006-05-27 19:21:47 +000019636 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000019637fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000019638
Skip Montanarof0d5f792004-08-15 14:08:23 +000019639rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019640fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000019641
Skip Montanarof0d5f792004-08-15 14:08:23 +000019642rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000019643fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000019644{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
19645echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019646if test $ac_cv_member_struct_tm_tm_zone = yes; then
19647
19648cat >>confdefs.h <<_ACEOF
19649#define HAVE_STRUCT_TM_TM_ZONE 1
19650_ACEOF
19651
19652
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019653fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000019654
Martin v. Löwis11437992002-04-12 09:54:03 +000019655if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
19656
19657cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019658#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019659_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019660
19661else
Thomas Wouters477c8d52006-05-27 19:21:47 +000019662 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
19663echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
19664if test "${ac_cv_have_decl_tzname+set}" = set; then
19665 echo $ECHO_N "(cached) $ECHO_C" >&6
19666else
19667 cat >conftest.$ac_ext <<_ACEOF
19668/* confdefs.h. */
19669_ACEOF
19670cat confdefs.h >>conftest.$ac_ext
19671cat >>conftest.$ac_ext <<_ACEOF
19672/* end confdefs.h. */
19673#include <time.h>
19674
19675int
19676main ()
19677{
19678#ifndef tzname
19679 char *p = (char *) tzname;
19680 return !p;
19681#endif
19682
19683 ;
19684 return 0;
19685}
19686_ACEOF
19687rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019688if { (ac_try="$ac_compile"
19689case "(($ac_try" in
19690 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19691 *) ac_try_echo=$ac_try;;
19692esac
19693eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19694 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters477c8d52006-05-27 19:21:47 +000019695 ac_status=$?
19696 grep -v '^ *+' conftest.er1 >conftest.err
19697 rm -f conftest.er1
19698 cat conftest.err >&5
19699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19700 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019701 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
19702 { (case "(($ac_try" in
19703 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19704 *) ac_try_echo=$ac_try;;
19705esac
19706eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19707 (eval "$ac_try") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000019708 ac_status=$?
19709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19710 (exit $ac_status); }; } &&
19711 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019712 { (case "(($ac_try" in
19713 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19714 *) ac_try_echo=$ac_try;;
19715esac
19716eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19717 (eval "$ac_try") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000019718 ac_status=$?
19719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19720 (exit $ac_status); }; }; then
19721 ac_cv_have_decl_tzname=yes
19722else
19723 echo "$as_me: failed program was:" >&5
19724sed 's/^/| /' conftest.$ac_ext >&5
19725
19726 ac_cv_have_decl_tzname=no
19727fi
19728
19729rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19730fi
19731{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
19732echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
19733if test $ac_cv_have_decl_tzname = yes; then
19734
19735cat >>confdefs.h <<_ACEOF
19736#define HAVE_DECL_TZNAME 1
19737_ACEOF
19738
19739
19740else
19741 cat >>confdefs.h <<_ACEOF
19742#define HAVE_DECL_TZNAME 0
19743_ACEOF
19744
19745
19746fi
19747
19748
19749 { echo "$as_me:$LINENO: checking for tzname" >&5
19750echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019751if test "${ac_cv_var_tzname+set}" = set; then
19752 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019753else
Martin v. Löwis11437992002-04-12 09:54:03 +000019754 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019755/* confdefs.h. */
19756_ACEOF
19757cat confdefs.h >>conftest.$ac_ext
19758cat >>conftest.$ac_ext <<_ACEOF
19759/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000019760#include <time.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +000019761#if !HAVE_DECL_TZNAME
19762extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000019763#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019764
Martin v. Löwis11437992002-04-12 09:54:03 +000019765int
19766main ()
19767{
Thomas Wouters477c8d52006-05-27 19:21:47 +000019768return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000019769 ;
19770 return 0;
19771}
19772_ACEOF
19773rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019774if { (ac_try="$ac_link"
19775case "(($ac_try" in
19776 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19777 *) ac_try_echo=$ac_try;;
19778esac
19779eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19780 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019781 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019782 grep -v '^ *+' conftest.er1 >conftest.err
19783 rm -f conftest.er1
19784 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019785 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19786 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019787 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
19788 { (case "(($ac_try" in
19789 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19790 *) ac_try_echo=$ac_try;;
19791esac
19792eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19793 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019794 ac_status=$?
19795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19796 (exit $ac_status); }; } &&
19797 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019798 { (case "(($ac_try" in
19799 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19800 *) ac_try_echo=$ac_try;;
19801esac
19802eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19803 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019804 ac_status=$?
19805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19806 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019807 ac_cv_var_tzname=yes
19808else
Martin v. Löwis11437992002-04-12 09:54:03 +000019809 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019810sed 's/^/| /' conftest.$ac_ext >&5
19811
Thomas Wouters477c8d52006-05-27 19:21:47 +000019812 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000019813fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000019814
Skip Montanarof0d5f792004-08-15 14:08:23 +000019815rm -f conftest.err conftest.$ac_objext \
19816 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000019817fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000019818{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
19819echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019820 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019821
19822cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019823#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019824_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019825
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019826 fi
19827fi
19828
Thomas Wouters477c8d52006-05-27 19:21:47 +000019829{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
19830echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019831if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
19832 echo $ECHO_N "(cached) $ECHO_C" >&6
19833else
19834 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019835/* confdefs.h. */
19836_ACEOF
19837cat confdefs.h >>conftest.$ac_ext
19838cat >>conftest.$ac_ext <<_ACEOF
19839/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019840$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000019841int
19842main ()
19843{
19844static struct stat ac_aggr;
19845if (ac_aggr.st_rdev)
19846return 0;
19847 ;
19848 return 0;
19849}
19850_ACEOF
19851rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019852if { (ac_try="$ac_compile"
19853case "(($ac_try" in
19854 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19855 *) ac_try_echo=$ac_try;;
19856esac
19857eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19858 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019859 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019860 grep -v '^ *+' conftest.er1 >conftest.err
19861 rm -f conftest.er1
19862 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019863 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19864 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019865 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
19866 { (case "(($ac_try" in
19867 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19868 *) ac_try_echo=$ac_try;;
19869esac
19870eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19871 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019872 ac_status=$?
19873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19874 (exit $ac_status); }; } &&
19875 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019876 { (case "(($ac_try" in
19877 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19878 *) ac_try_echo=$ac_try;;
19879esac
19880eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19881 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019882 ac_status=$?
19883 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19884 (exit $ac_status); }; }; then
19885 ac_cv_member_struct_stat_st_rdev=yes
19886else
19887 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019888sed 's/^/| /' conftest.$ac_ext >&5
19889
Thomas Wouters477c8d52006-05-27 19:21:47 +000019890 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019891/* confdefs.h. */
19892_ACEOF
19893cat confdefs.h >>conftest.$ac_ext
19894cat >>conftest.$ac_ext <<_ACEOF
19895/* end confdefs.h. */
19896$ac_includes_default
19897int
19898main ()
19899{
19900static struct stat ac_aggr;
19901if (sizeof ac_aggr.st_rdev)
19902return 0;
19903 ;
19904 return 0;
19905}
19906_ACEOF
19907rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019908if { (ac_try="$ac_compile"
19909case "(($ac_try" in
19910 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19911 *) ac_try_echo=$ac_try;;
19912esac
19913eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19914 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000019915 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019916 grep -v '^ *+' conftest.er1 >conftest.err
19917 rm -f conftest.er1
19918 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19920 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019921 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
19922 { (case "(($ac_try" in
19923 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19924 *) ac_try_echo=$ac_try;;
19925esac
19926eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19927 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019928 ac_status=$?
19929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19930 (exit $ac_status); }; } &&
19931 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019932 { (case "(($ac_try" in
19933 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19934 *) ac_try_echo=$ac_try;;
19935esac
19936eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19937 (eval "$ac_try") 2>&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019938 ac_status=$?
19939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19940 (exit $ac_status); }; }; then
19941 ac_cv_member_struct_stat_st_rdev=yes
19942else
19943 echo "$as_me: failed program was:" >&5
19944sed 's/^/| /' conftest.$ac_ext >&5
19945
Thomas Wouters477c8d52006-05-27 19:21:47 +000019946 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000019947fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000019948
Skip Montanarof0d5f792004-08-15 14:08:23 +000019949rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019950fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000019951
Skip Montanarof0d5f792004-08-15 14:08:23 +000019952rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000019953fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000019954{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
19955echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019956if test $ac_cv_member_struct_stat_st_rdev = yes; then
19957
19958cat >>confdefs.h <<_ACEOF
19959#define HAVE_STRUCT_STAT_ST_RDEV 1
19960_ACEOF
19961
19962
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019963fi
19964
Thomas Wouters477c8d52006-05-27 19:21:47 +000019965{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
19966echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019967if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
19968 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019969else
Martin v. Löwis11437992002-04-12 09:54:03 +000019970 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019971/* confdefs.h. */
19972_ACEOF
19973cat confdefs.h >>conftest.$ac_ext
19974cat >>conftest.$ac_ext <<_ACEOF
19975/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019976$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000019977int
19978main ()
19979{
19980static struct stat ac_aggr;
19981if (ac_aggr.st_blksize)
19982return 0;
19983 ;
19984 return 0;
19985}
19986_ACEOF
19987rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019988if { (ac_try="$ac_compile"
19989case "(($ac_try" in
19990 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19991 *) ac_try_echo=$ac_try;;
19992esac
19993eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19994 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019995 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019996 grep -v '^ *+' conftest.er1 >conftest.err
19997 rm -f conftest.er1
19998 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20000 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020001 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
20002 { (case "(($ac_try" in
20003 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20004 *) ac_try_echo=$ac_try;;
20005esac
20006eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20007 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000020008 ac_status=$?
20009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20010 (exit $ac_status); }; } &&
20011 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020012 { (case "(($ac_try" in
20013 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20014 *) ac_try_echo=$ac_try;;
20015esac
20016eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20017 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020018 ac_status=$?
20019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20020 (exit $ac_status); }; }; then
20021 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000020022else
Martin v. Löwis11437992002-04-12 09:54:03 +000020023 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020024sed 's/^/| /' conftest.$ac_ext >&5
20025
Thomas Wouters477c8d52006-05-27 19:21:47 +000020026 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020027/* confdefs.h. */
20028_ACEOF
20029cat confdefs.h >>conftest.$ac_ext
20030cat >>conftest.$ac_ext <<_ACEOF
20031/* end confdefs.h. */
20032$ac_includes_default
20033int
20034main ()
20035{
20036static struct stat ac_aggr;
20037if (sizeof ac_aggr.st_blksize)
20038return 0;
20039 ;
20040 return 0;
20041}
20042_ACEOF
20043rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020044if { (ac_try="$ac_compile"
20045case "(($ac_try" in
20046 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20047 *) ac_try_echo=$ac_try;;
20048esac
20049eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20050 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020051 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020052 grep -v '^ *+' conftest.er1 >conftest.err
20053 rm -f conftest.er1
20054 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20056 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020057 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
20058 { (case "(($ac_try" in
20059 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20060 *) ac_try_echo=$ac_try;;
20061esac
20062eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20063 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000020064 ac_status=$?
20065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20066 (exit $ac_status); }; } &&
20067 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020068 { (case "(($ac_try" in
20069 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20070 *) ac_try_echo=$ac_try;;
20071esac
20072eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20073 (eval "$ac_try") 2>&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020074 ac_status=$?
20075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20076 (exit $ac_status); }; }; then
20077 ac_cv_member_struct_stat_st_blksize=yes
20078else
20079 echo "$as_me: failed program was:" >&5
20080sed 's/^/| /' conftest.$ac_ext >&5
20081
Thomas Wouters477c8d52006-05-27 19:21:47 +000020082 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000020083fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020084
Skip Montanarof0d5f792004-08-15 14:08:23 +000020085rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020086fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020087
Skip Montanarof0d5f792004-08-15 14:08:23 +000020088rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020089fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020090{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
20091echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020092if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000020093
Martin v. Löwis11437992002-04-12 09:54:03 +000020094cat >>confdefs.h <<_ACEOF
20095#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
20096_ACEOF
20097
20098
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020099fi
20100
Thomas Wouters477c8d52006-05-27 19:21:47 +000020101{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
20102echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020103if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
20104 echo $ECHO_N "(cached) $ECHO_C" >&6
20105else
20106 cat >conftest.$ac_ext <<_ACEOF
20107/* confdefs.h. */
20108_ACEOF
20109cat confdefs.h >>conftest.$ac_ext
20110cat >>conftest.$ac_ext <<_ACEOF
20111/* end confdefs.h. */
20112$ac_includes_default
20113int
20114main ()
20115{
20116static struct stat ac_aggr;
20117if (ac_aggr.st_flags)
20118return 0;
20119 ;
20120 return 0;
20121}
20122_ACEOF
20123rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020124if { (ac_try="$ac_compile"
20125case "(($ac_try" in
20126 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20127 *) ac_try_echo=$ac_try;;
20128esac
20129eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20130 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020131 ac_status=$?
20132 grep -v '^ *+' conftest.er1 >conftest.err
20133 rm -f conftest.er1
20134 cat conftest.err >&5
20135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20136 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020137 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
20138 { (case "(($ac_try" in
20139 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20140 *) ac_try_echo=$ac_try;;
20141esac
20142eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20143 (eval "$ac_try") 2>&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020144 ac_status=$?
20145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20146 (exit $ac_status); }; } &&
20147 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020148 { (case "(($ac_try" in
20149 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20150 *) ac_try_echo=$ac_try;;
20151esac
20152eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20153 (eval "$ac_try") 2>&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020154 ac_status=$?
20155 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20156 (exit $ac_status); }; }; then
20157 ac_cv_member_struct_stat_st_flags=yes
20158else
20159 echo "$as_me: failed program was:" >&5
20160sed 's/^/| /' conftest.$ac_ext >&5
20161
Thomas Wouters477c8d52006-05-27 19:21:47 +000020162 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020163/* confdefs.h. */
20164_ACEOF
20165cat confdefs.h >>conftest.$ac_ext
20166cat >>conftest.$ac_ext <<_ACEOF
20167/* end confdefs.h. */
20168$ac_includes_default
20169int
20170main ()
20171{
20172static struct stat ac_aggr;
20173if (sizeof ac_aggr.st_flags)
20174return 0;
20175 ;
20176 return 0;
20177}
20178_ACEOF
20179rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020180if { (ac_try="$ac_compile"
20181case "(($ac_try" in
20182 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20183 *) ac_try_echo=$ac_try;;
20184esac
20185eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20186 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020187 ac_status=$?
20188 grep -v '^ *+' conftest.er1 >conftest.err
20189 rm -f conftest.er1
20190 cat conftest.err >&5
20191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20192 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020193 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
20194 { (case "(($ac_try" in
20195 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20196 *) ac_try_echo=$ac_try;;
20197esac
20198eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20199 (eval "$ac_try") 2>&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020200 ac_status=$?
20201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20202 (exit $ac_status); }; } &&
20203 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020204 { (case "(($ac_try" in
20205 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20206 *) ac_try_echo=$ac_try;;
20207esac
20208eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20209 (eval "$ac_try") 2>&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020210 ac_status=$?
20211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20212 (exit $ac_status); }; }; then
20213 ac_cv_member_struct_stat_st_flags=yes
20214else
20215 echo "$as_me: failed program was:" >&5
20216sed 's/^/| /' conftest.$ac_ext >&5
20217
Thomas Wouters477c8d52006-05-27 19:21:47 +000020218 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020219fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020220
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020221rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20222fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020223
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020224rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20225fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020226{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
20227echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020228if test $ac_cv_member_struct_stat_st_flags = yes; then
20229
20230cat >>confdefs.h <<_ACEOF
20231#define HAVE_STRUCT_STAT_ST_FLAGS 1
20232_ACEOF
20233
20234
20235fi
20236
Thomas Wouters477c8d52006-05-27 19:21:47 +000020237{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
20238echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020239if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
20240 echo $ECHO_N "(cached) $ECHO_C" >&6
20241else
20242 cat >conftest.$ac_ext <<_ACEOF
20243/* confdefs.h. */
20244_ACEOF
20245cat confdefs.h >>conftest.$ac_ext
20246cat >>conftest.$ac_ext <<_ACEOF
20247/* end confdefs.h. */
20248$ac_includes_default
20249int
20250main ()
20251{
20252static struct stat ac_aggr;
20253if (ac_aggr.st_gen)
20254return 0;
20255 ;
20256 return 0;
20257}
20258_ACEOF
20259rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020260if { (ac_try="$ac_compile"
20261case "(($ac_try" in
20262 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20263 *) ac_try_echo=$ac_try;;
20264esac
20265eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20266 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020267 ac_status=$?
20268 grep -v '^ *+' conftest.er1 >conftest.err
20269 rm -f conftest.er1
20270 cat conftest.err >&5
20271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20272 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020273 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
20274 { (case "(($ac_try" in
20275 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20276 *) ac_try_echo=$ac_try;;
20277esac
20278eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20279 (eval "$ac_try") 2>&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020280 ac_status=$?
20281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20282 (exit $ac_status); }; } &&
20283 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020284 { (case "(($ac_try" in
20285 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20286 *) ac_try_echo=$ac_try;;
20287esac
20288eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20289 (eval "$ac_try") 2>&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020290 ac_status=$?
20291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20292 (exit $ac_status); }; }; then
20293 ac_cv_member_struct_stat_st_gen=yes
20294else
20295 echo "$as_me: failed program was:" >&5
20296sed 's/^/| /' conftest.$ac_ext >&5
20297
Thomas Wouters477c8d52006-05-27 19:21:47 +000020298 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020299/* confdefs.h. */
20300_ACEOF
20301cat confdefs.h >>conftest.$ac_ext
20302cat >>conftest.$ac_ext <<_ACEOF
20303/* end confdefs.h. */
20304$ac_includes_default
20305int
20306main ()
20307{
20308static struct stat ac_aggr;
20309if (sizeof ac_aggr.st_gen)
20310return 0;
20311 ;
20312 return 0;
20313}
20314_ACEOF
20315rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020316if { (ac_try="$ac_compile"
20317case "(($ac_try" in
20318 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20319 *) ac_try_echo=$ac_try;;
20320esac
20321eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20322 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020323 ac_status=$?
20324 grep -v '^ *+' conftest.er1 >conftest.err
20325 rm -f conftest.er1
20326 cat conftest.err >&5
20327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20328 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020329 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
20330 { (case "(($ac_try" in
20331 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20332 *) ac_try_echo=$ac_try;;
20333esac
20334eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20335 (eval "$ac_try") 2>&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020336 ac_status=$?
20337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20338 (exit $ac_status); }; } &&
20339 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020340 { (case "(($ac_try" in
20341 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20342 *) ac_try_echo=$ac_try;;
20343esac
20344eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20345 (eval "$ac_try") 2>&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020346 ac_status=$?
20347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20348 (exit $ac_status); }; }; then
20349 ac_cv_member_struct_stat_st_gen=yes
20350else
20351 echo "$as_me: failed program was:" >&5
20352sed 's/^/| /' conftest.$ac_ext >&5
20353
Thomas Wouters477c8d52006-05-27 19:21:47 +000020354 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020355fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020356
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020357rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20358fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020359
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020360rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20361fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020362{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
20363echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020364if test $ac_cv_member_struct_stat_st_gen = yes; then
20365
20366cat >>confdefs.h <<_ACEOF
20367#define HAVE_STRUCT_STAT_ST_GEN 1
20368_ACEOF
20369
20370
20371fi
20372
Thomas Wouters477c8d52006-05-27 19:21:47 +000020373{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
20374echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020375if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
20376 echo $ECHO_N "(cached) $ECHO_C" >&6
20377else
20378 cat >conftest.$ac_ext <<_ACEOF
20379/* confdefs.h. */
20380_ACEOF
20381cat confdefs.h >>conftest.$ac_ext
20382cat >>conftest.$ac_ext <<_ACEOF
20383/* end confdefs.h. */
20384$ac_includes_default
20385int
20386main ()
20387{
20388static struct stat ac_aggr;
20389if (ac_aggr.st_birthtime)
20390return 0;
20391 ;
20392 return 0;
20393}
20394_ACEOF
20395rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020396if { (ac_try="$ac_compile"
20397case "(($ac_try" in
20398 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20399 *) ac_try_echo=$ac_try;;
20400esac
20401eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20402 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020403 ac_status=$?
20404 grep -v '^ *+' conftest.er1 >conftest.err
20405 rm -f conftest.er1
20406 cat conftest.err >&5
20407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20408 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020409 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
20410 { (case "(($ac_try" in
20411 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20412 *) ac_try_echo=$ac_try;;
20413esac
20414eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20415 (eval "$ac_try") 2>&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020416 ac_status=$?
20417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20418 (exit $ac_status); }; } &&
20419 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020420 { (case "(($ac_try" in
20421 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20422 *) ac_try_echo=$ac_try;;
20423esac
20424eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20425 (eval "$ac_try") 2>&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020426 ac_status=$?
20427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20428 (exit $ac_status); }; }; then
20429 ac_cv_member_struct_stat_st_birthtime=yes
20430else
20431 echo "$as_me: failed program was:" >&5
20432sed 's/^/| /' conftest.$ac_ext >&5
20433
Thomas Wouters477c8d52006-05-27 19:21:47 +000020434 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020435/* confdefs.h. */
20436_ACEOF
20437cat confdefs.h >>conftest.$ac_ext
20438cat >>conftest.$ac_ext <<_ACEOF
20439/* end confdefs.h. */
20440$ac_includes_default
20441int
20442main ()
20443{
20444static struct stat ac_aggr;
20445if (sizeof ac_aggr.st_birthtime)
20446return 0;
20447 ;
20448 return 0;
20449}
20450_ACEOF
20451rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020452if { (ac_try="$ac_compile"
20453case "(($ac_try" in
20454 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20455 *) ac_try_echo=$ac_try;;
20456esac
20457eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20458 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020459 ac_status=$?
20460 grep -v '^ *+' conftest.er1 >conftest.err
20461 rm -f conftest.er1
20462 cat conftest.err >&5
20463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20464 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020465 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
20466 { (case "(($ac_try" in
20467 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20468 *) ac_try_echo=$ac_try;;
20469esac
20470eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20471 (eval "$ac_try") 2>&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020472 ac_status=$?
20473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20474 (exit $ac_status); }; } &&
20475 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020476 { (case "(($ac_try" in
20477 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20478 *) ac_try_echo=$ac_try;;
20479esac
20480eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20481 (eval "$ac_try") 2>&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020482 ac_status=$?
20483 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20484 (exit $ac_status); }; }; then
20485 ac_cv_member_struct_stat_st_birthtime=yes
20486else
20487 echo "$as_me: failed program was:" >&5
20488sed 's/^/| /' conftest.$ac_ext >&5
20489
Thomas Wouters477c8d52006-05-27 19:21:47 +000020490 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020491fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020492
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020493rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20494fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020495
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020496rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20497fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020498{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
20499echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020500if test $ac_cv_member_struct_stat_st_birthtime = yes; then
20501
20502cat >>confdefs.h <<_ACEOF
20503#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
20504_ACEOF
20505
20506
20507fi
20508
Thomas Wouters477c8d52006-05-27 19:21:47 +000020509{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
20510echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020511if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
20512 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020513else
Martin v. Löwis11437992002-04-12 09:54:03 +000020514 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020515/* confdefs.h. */
20516_ACEOF
20517cat confdefs.h >>conftest.$ac_ext
20518cat >>conftest.$ac_ext <<_ACEOF
20519/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020520$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020521int
20522main ()
20523{
20524static struct stat ac_aggr;
20525if (ac_aggr.st_blocks)
20526return 0;
20527 ;
20528 return 0;
20529}
20530_ACEOF
20531rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020532if { (ac_try="$ac_compile"
20533case "(($ac_try" in
20534 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20535 *) ac_try_echo=$ac_try;;
20536esac
20537eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20538 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020539 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020540 grep -v '^ *+' conftest.er1 >conftest.err
20541 rm -f conftest.er1
20542 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20544 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020545 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
20546 { (case "(($ac_try" in
20547 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20548 *) ac_try_echo=$ac_try;;
20549esac
20550eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20551 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000020552 ac_status=$?
20553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20554 (exit $ac_status); }; } &&
20555 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020556 { (case "(($ac_try" in
20557 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20558 *) ac_try_echo=$ac_try;;
20559esac
20560eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20561 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020562 ac_status=$?
20563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20564 (exit $ac_status); }; }; then
20565 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000020566else
Martin v. Löwis11437992002-04-12 09:54:03 +000020567 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020568sed 's/^/| /' conftest.$ac_ext >&5
20569
Thomas Wouters477c8d52006-05-27 19:21:47 +000020570 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020571/* confdefs.h. */
20572_ACEOF
20573cat confdefs.h >>conftest.$ac_ext
20574cat >>conftest.$ac_ext <<_ACEOF
20575/* end confdefs.h. */
20576$ac_includes_default
20577int
20578main ()
20579{
20580static struct stat ac_aggr;
20581if (sizeof ac_aggr.st_blocks)
20582return 0;
20583 ;
20584 return 0;
20585}
20586_ACEOF
20587rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020588if { (ac_try="$ac_compile"
20589case "(($ac_try" in
20590 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20591 *) ac_try_echo=$ac_try;;
20592esac
20593eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20594 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020595 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020596 grep -v '^ *+' conftest.er1 >conftest.err
20597 rm -f conftest.er1
20598 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020599 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20600 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020601 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
20602 { (case "(($ac_try" in
20603 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20604 *) ac_try_echo=$ac_try;;
20605esac
20606eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20607 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000020608 ac_status=$?
20609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20610 (exit $ac_status); }; } &&
20611 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020612 { (case "(($ac_try" in
20613 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20614 *) ac_try_echo=$ac_try;;
20615esac
20616eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20617 (eval "$ac_try") 2>&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020618 ac_status=$?
20619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20620 (exit $ac_status); }; }; then
20621 ac_cv_member_struct_stat_st_blocks=yes
20622else
20623 echo "$as_me: failed program was:" >&5
20624sed 's/^/| /' conftest.$ac_ext >&5
20625
Thomas Wouters477c8d52006-05-27 19:21:47 +000020626 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000020627fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020628
Skip Montanarof0d5f792004-08-15 14:08:23 +000020629rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020630fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020631
Skip Montanarof0d5f792004-08-15 14:08:23 +000020632rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020633fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020634{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
20635echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020636if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000020637
Martin v. Löwis11437992002-04-12 09:54:03 +000020638cat >>confdefs.h <<_ACEOF
20639#define HAVE_STRUCT_STAT_ST_BLOCKS 1
20640_ACEOF
20641
20642
20643cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020644#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020645_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020646
20647else
Thomas Wouters477c8d52006-05-27 19:21:47 +000020648 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000020649 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters477c8d52006-05-27 19:21:47 +000020650 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
20651 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000020652esac
20653
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020654fi
20655
Michael W. Hudson54241132001-12-07 15:38:26 +000020656
Martin v. Löwis11437992002-04-12 09:54:03 +000020657
Thomas Wouters477c8d52006-05-27 19:21:47 +000020658{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
20659echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020660if test "${ac_cv_header_time_altzone+set}" = set; then
20661 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020662else
Martin v. Löwis11437992002-04-12 09:54:03 +000020663 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020664/* confdefs.h. */
20665_ACEOF
20666cat confdefs.h >>conftest.$ac_ext
20667cat >>conftest.$ac_ext <<_ACEOF
20668/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020669#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020670int
20671main ()
20672{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020673return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000020674 ;
20675 return 0;
20676}
20677_ACEOF
20678rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020679if { (ac_try="$ac_compile"
20680case "(($ac_try" in
20681 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20682 *) ac_try_echo=$ac_try;;
20683esac
20684eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20685 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020686 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020687 grep -v '^ *+' conftest.er1 >conftest.err
20688 rm -f conftest.er1
20689 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20691 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020692 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
20693 { (case "(($ac_try" in
20694 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20695 *) ac_try_echo=$ac_try;;
20696esac
20697eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20698 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000020699 ac_status=$?
20700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20701 (exit $ac_status); }; } &&
20702 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020703 { (case "(($ac_try" in
20704 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20705 *) ac_try_echo=$ac_try;;
20706esac
20707eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20708 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020709 ac_status=$?
20710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20711 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020712 ac_cv_header_time_altzone=yes
20713else
Martin v. Löwis11437992002-04-12 09:54:03 +000020714 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020715sed 's/^/| /' conftest.$ac_ext >&5
20716
Thomas Wouters477c8d52006-05-27 19:21:47 +000020717 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000020718fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020719
Skip Montanarof0d5f792004-08-15 14:08:23 +000020720rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020721fi
20722
Thomas Wouters477c8d52006-05-27 19:21:47 +000020723{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
20724echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020725if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020726
20727cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020728#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020729_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020730
20731fi
20732
Guido van Rossumda88dad1995-01-26 00:46:29 +000020733was_it_defined=no
Thomas Wouters477c8d52006-05-27 19:21:47 +000020734{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
20735echo $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 +000020736cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020737/* confdefs.h. */
20738_ACEOF
20739cat confdefs.h >>conftest.$ac_ext
20740cat >>conftest.$ac_ext <<_ACEOF
20741/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020742
20743#include <sys/types.h>
20744#include <sys/select.h>
20745#include <sys/time.h>
20746
Martin v. Löwis11437992002-04-12 09:54:03 +000020747int
20748main ()
20749{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020750;
Martin v. Löwis11437992002-04-12 09:54:03 +000020751 ;
20752 return 0;
20753}
20754_ACEOF
20755rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020756if { (ac_try="$ac_compile"
20757case "(($ac_try" in
20758 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20759 *) ac_try_echo=$ac_try;;
20760esac
20761eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20762 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020763 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020764 grep -v '^ *+' conftest.er1 >conftest.err
20765 rm -f conftest.er1
20766 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20768 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020769 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
20770 { (case "(($ac_try" in
20771 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20772 *) ac_try_echo=$ac_try;;
20773esac
20774eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20775 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000020776 ac_status=$?
20777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20778 (exit $ac_status); }; } &&
20779 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020780 { (case "(($ac_try" in
20781 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20782 *) ac_try_echo=$ac_try;;
20783esac
20784eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20785 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020786 ac_status=$?
20787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20788 (exit $ac_status); }; }; then
20789
20790
20791cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020792#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020793_ACEOF
20794
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020795 was_it_defined=yes
20796
Guido van Rossumf78abae1997-01-21 22:02:36 +000020797else
Martin v. Löwis11437992002-04-12 09:54:03 +000020798 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020799sed 's/^/| /' conftest.$ac_ext >&5
20800
Guido van Rossum627b2d71993-12-24 10:39:16 +000020801
Thomas Wouters477c8d52006-05-27 19:21:47 +000020802fi
20803
20804rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20805{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
20806echo "${ECHO_T}$was_it_defined" >&6; }
20807
20808{ echo "$as_me:$LINENO: checking for addrinfo" >&5
20809echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020810if test "${ac_cv_struct_addrinfo+set}" = set; then
20811 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020812else
Martin v. Löwis11437992002-04-12 09:54:03 +000020813 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020814/* confdefs.h. */
20815_ACEOF
20816cat confdefs.h >>conftest.$ac_ext
20817cat >>conftest.$ac_ext <<_ACEOF
20818/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020819
20820# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020821int
20822main ()
20823{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020824struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000020825 ;
20826 return 0;
20827}
20828_ACEOF
20829rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020830if { (ac_try="$ac_compile"
20831case "(($ac_try" in
20832 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20833 *) ac_try_echo=$ac_try;;
20834esac
20835eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20836 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020837 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020838 grep -v '^ *+' conftest.er1 >conftest.err
20839 rm -f conftest.er1
20840 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20842 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020843 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
20844 { (case "(($ac_try" in
20845 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20846 *) ac_try_echo=$ac_try;;
20847esac
20848eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20849 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000020850 ac_status=$?
20851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20852 (exit $ac_status); }; } &&
20853 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020854 { (case "(($ac_try" in
20855 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20856 *) ac_try_echo=$ac_try;;
20857esac
20858eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20859 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020860 ac_status=$?
20861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20862 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020863 ac_cv_struct_addrinfo=yes
20864else
Martin v. Löwis11437992002-04-12 09:54:03 +000020865 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020866sed 's/^/| /' conftest.$ac_ext >&5
20867
Thomas Wouters477c8d52006-05-27 19:21:47 +000020868 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020869fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020870
Skip Montanarof0d5f792004-08-15 14:08:23 +000020871rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020872fi
20873
Thomas Wouters477c8d52006-05-27 19:21:47 +000020874{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
20875echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020876if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020877
20878cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020879#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020880_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020881
20882fi
20883
Thomas Wouters477c8d52006-05-27 19:21:47 +000020884{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
20885echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020886if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
20887 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020888else
Martin v. Löwis11437992002-04-12 09:54:03 +000020889 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020890/* confdefs.h. */
20891_ACEOF
20892cat confdefs.h >>conftest.$ac_ext
20893cat >>conftest.$ac_ext <<_ACEOF
20894/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020895
20896# include <sys/types.h>
20897# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020898int
20899main ()
20900{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020901struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000020902 ;
20903 return 0;
20904}
20905_ACEOF
20906rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020907if { (ac_try="$ac_compile"
20908case "(($ac_try" in
20909 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20910 *) ac_try_echo=$ac_try;;
20911esac
20912eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20913 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020914 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020915 grep -v '^ *+' conftest.er1 >conftest.err
20916 rm -f conftest.er1
20917 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20919 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020920 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
20921 { (case "(($ac_try" in
20922 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20923 *) ac_try_echo=$ac_try;;
20924esac
20925eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20926 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000020927 ac_status=$?
20928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20929 (exit $ac_status); }; } &&
20930 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020931 { (case "(($ac_try" in
20932 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20933 *) ac_try_echo=$ac_try;;
20934esac
20935eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20936 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020937 ac_status=$?
20938 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20939 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020940 ac_cv_struct_sockaddr_storage=yes
20941else
Martin v. Löwis11437992002-04-12 09:54:03 +000020942 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020943sed 's/^/| /' conftest.$ac_ext >&5
20944
Thomas Wouters477c8d52006-05-27 19:21:47 +000020945 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020946fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020947
Skip Montanarof0d5f792004-08-15 14:08:23 +000020948rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020949fi
20950
Thomas Wouters477c8d52006-05-27 19:21:47 +000020951{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
20952echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020953if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020954
20955cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020956#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020957_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020958
20959fi
20960
Guido van Rossum627b2d71993-12-24 10:39:16 +000020961# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000020962
Michael W. Hudson54241132001-12-07 15:38:26 +000020963
Thomas Wouters477c8d52006-05-27 19:21:47 +000020964{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
20965echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020966if test "${ac_cv_c_char_unsigned+set}" = set; then
20967 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000020968else
Martin v. Löwis11437992002-04-12 09:54:03 +000020969 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020970/* confdefs.h. */
20971_ACEOF
20972cat confdefs.h >>conftest.$ac_ext
20973cat >>conftest.$ac_ext <<_ACEOF
20974/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020975$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020976int
20977main ()
20978{
20979static int test_array [1 - 2 * !(((char) -1) < 0)];
20980test_array [0] = 0
20981
20982 ;
20983 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000020984}
Martin v. Löwis11437992002-04-12 09:54:03 +000020985_ACEOF
20986rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020987if { (ac_try="$ac_compile"
20988case "(($ac_try" in
20989 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20990 *) ac_try_echo=$ac_try;;
20991esac
20992eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20993 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020994 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020995 grep -v '^ *+' conftest.er1 >conftest.err
20996 rm -f conftest.er1
20997 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20999 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021000 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
21001 { (case "(($ac_try" in
21002 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21003 *) ac_try_echo=$ac_try;;
21004esac
21005eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21006 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000021007 ac_status=$?
21008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21009 (exit $ac_status); }; } &&
21010 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021011 { (case "(($ac_try" in
21012 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21013 *) ac_try_echo=$ac_try;;
21014esac
21015eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21016 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021017 ac_status=$?
21018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21019 (exit $ac_status); }; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +000021020 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000021021else
21022 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021023sed 's/^/| /' conftest.$ac_ext >&5
21024
Thomas Wouters477c8d52006-05-27 19:21:47 +000021025 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021026fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021027
Skip Montanarof0d5f792004-08-15 14:08:23 +000021028rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021029fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021030{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
21031echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021032if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021033 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021034#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021035_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021036
21037fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000021038
Thomas Wouters477c8d52006-05-27 19:21:47 +000021039{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
21040echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021041if test "${ac_cv_c_const+set}" = set; then
21042 echo $ECHO_N "(cached) $ECHO_C" >&6
21043else
21044 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021045/* confdefs.h. */
21046_ACEOF
21047cat confdefs.h >>conftest.$ac_ext
21048cat >>conftest.$ac_ext <<_ACEOF
21049/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021050
Martin v. Löwis11437992002-04-12 09:54:03 +000021051int
21052main ()
21053{
21054/* FIXME: Include the comments suggested by Paul. */
21055#ifndef __cplusplus
21056 /* Ultrix mips cc rejects this. */
21057 typedef int charset[2];
21058 const charset x;
21059 /* SunOS 4.1.1 cc rejects this. */
21060 char const *const *ccp;
21061 char **p;
21062 /* NEC SVR4.0.2 mips cc rejects this. */
21063 struct point {int x, y;};
21064 static struct point const zero = {0,0};
21065 /* AIX XL C 1.02.0.0 rejects this.
21066 It does not let you subtract one const X* pointer from another in
21067 an arm of an if-expression whose if-part is not a constant
21068 expression */
21069 const char *g = "string";
21070 ccp = &g + (g ? g-g : 0);
21071 /* HPUX 7.0 cc rejects these. */
21072 ++ccp;
21073 p = (char**) ccp;
21074 ccp = (char const *const *) p;
21075 { /* SCO 3.2v4 cc rejects this. */
21076 char *t;
21077 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021078
Martin v. Löwis11437992002-04-12 09:54:03 +000021079 *t++ = 0;
Thomas Wouters477c8d52006-05-27 19:21:47 +000021080 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021081 }
21082 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
21083 int x[] = {25, 17};
21084 const int *foo = &x[0];
21085 ++foo;
21086 }
21087 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
21088 typedef const int *iptr;
21089 iptr p = 0;
21090 ++p;
21091 }
21092 { /* AIX XL C 1.02.0.0 rejects this saying
21093 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
21094 struct s { int j; const int *ap[3]; };
21095 struct s *b; b->j = 5;
21096 }
21097 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
21098 const int foo = 10;
Thomas Wouters477c8d52006-05-27 19:21:47 +000021099 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021100 }
Thomas Wouters477c8d52006-05-27 19:21:47 +000021101 return !x[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000021102#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000021103
Martin v. Löwis11437992002-04-12 09:54:03 +000021104 ;
21105 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000021106}
Martin v. Löwis11437992002-04-12 09:54:03 +000021107_ACEOF
21108rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021109if { (ac_try="$ac_compile"
21110case "(($ac_try" in
21111 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21112 *) ac_try_echo=$ac_try;;
21113esac
21114eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21115 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021116 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021117 grep -v '^ *+' conftest.er1 >conftest.err
21118 rm -f conftest.er1
21119 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21121 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021122 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
21123 { (case "(($ac_try" in
21124 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21125 *) ac_try_echo=$ac_try;;
21126esac
21127eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21128 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000021129 ac_status=$?
21130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21131 (exit $ac_status); }; } &&
21132 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021133 { (case "(($ac_try" in
21134 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21135 *) ac_try_echo=$ac_try;;
21136esac
21137eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21138 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021139 ac_status=$?
21140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21141 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021142 ac_cv_c_const=yes
21143else
Martin v. Löwis11437992002-04-12 09:54:03 +000021144 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021145sed 's/^/| /' conftest.$ac_ext >&5
21146
Thomas Wouters477c8d52006-05-27 19:21:47 +000021147 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021148fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021149
Skip Montanarof0d5f792004-08-15 14:08:23 +000021150rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021151fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021152{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
21153echo "${ECHO_T}$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021154if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021155
21156cat >>confdefs.h <<\_ACEOF
21157#define const
21158_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021159
21160fi
21161
Michael W. Hudson54241132001-12-07 15:38:26 +000021162
Guido van Rossumda88dad1995-01-26 00:46:29 +000021163works=no
Thomas Wouters477c8d52006-05-27 19:21:47 +000021164{ echo "$as_me:$LINENO: checking for working volatile" >&5
21165echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021166cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021167/* confdefs.h. */
21168_ACEOF
21169cat confdefs.h >>conftest.$ac_ext
21170cat >>conftest.$ac_ext <<_ACEOF
21171/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000021172
Martin v. Löwis11437992002-04-12 09:54:03 +000021173int
21174main ()
21175{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021176volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021177 ;
21178 return 0;
21179}
21180_ACEOF
21181rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021182if { (ac_try="$ac_compile"
21183case "(($ac_try" in
21184 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21185 *) ac_try_echo=$ac_try;;
21186esac
21187eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21188 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021189 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021190 grep -v '^ *+' conftest.er1 >conftest.err
21191 rm -f conftest.er1
21192 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21194 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021195 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
21196 { (case "(($ac_try" in
21197 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21198 *) ac_try_echo=$ac_try;;
21199esac
21200eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21201 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000021202 ac_status=$?
21203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21204 (exit $ac_status); }; } &&
21205 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021206 { (case "(($ac_try" in
21207 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21208 *) ac_try_echo=$ac_try;;
21209esac
21210eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21211 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021212 ac_status=$?
21213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21214 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000021215 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000021216else
Martin v. Löwis11437992002-04-12 09:54:03 +000021217 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021218sed 's/^/| /' conftest.$ac_ext >&5
21219
Martin v. Löwis11437992002-04-12 09:54:03 +000021220
21221cat >>confdefs.h <<\_ACEOF
21222#define volatile
21223_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000021224
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021225
Guido van Rossum627b2d71993-12-24 10:39:16 +000021226fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021227
Skip Montanarof0d5f792004-08-15 14:08:23 +000021228rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000021229{ echo "$as_me:$LINENO: result: $works" >&5
21230echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021231
Guido van Rossumda88dad1995-01-26 00:46:29 +000021232works=no
Thomas Wouters477c8d52006-05-27 19:21:47 +000021233{ echo "$as_me:$LINENO: checking for working signed char" >&5
21234echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021235cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021236/* confdefs.h. */
21237_ACEOF
21238cat confdefs.h >>conftest.$ac_ext
21239cat >>conftest.$ac_ext <<_ACEOF
21240/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000021241
Martin v. Löwis11437992002-04-12 09:54:03 +000021242int
21243main ()
21244{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021245signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000021246 ;
21247 return 0;
21248}
21249_ACEOF
21250rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021251if { (ac_try="$ac_compile"
21252case "(($ac_try" in
21253 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21254 *) ac_try_echo=$ac_try;;
21255esac
21256eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21257 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021258 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021259 grep -v '^ *+' conftest.er1 >conftest.err
21260 rm -f conftest.er1
21261 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21263 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021264 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
21265 { (case "(($ac_try" in
21266 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21267 *) ac_try_echo=$ac_try;;
21268esac
21269eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21270 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000021271 ac_status=$?
21272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21273 (exit $ac_status); }; } &&
21274 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021275 { (case "(($ac_try" in
21276 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21277 *) ac_try_echo=$ac_try;;
21278esac
21279eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21280 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021281 ac_status=$?
21282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21283 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000021284 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000021285else
Martin v. Löwis11437992002-04-12 09:54:03 +000021286 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021287sed 's/^/| /' conftest.$ac_ext >&5
21288
Martin v. Löwis11437992002-04-12 09:54:03 +000021289
21290cat >>confdefs.h <<\_ACEOF
21291#define signed
21292_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000021293
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021294
Guido van Rossum7f43da71994-08-01 12:15:30 +000021295fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021296
Skip Montanarof0d5f792004-08-15 14:08:23 +000021297rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000021298{ echo "$as_me:$LINENO: result: $works" >&5
21299echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021300
Guido van Rossumda88dad1995-01-26 00:46:29 +000021301have_prototypes=no
Thomas Wouters477c8d52006-05-27 19:21:47 +000021302{ echo "$as_me:$LINENO: checking for prototypes" >&5
21303echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021304cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021305/* confdefs.h. */
21306_ACEOF
21307cat confdefs.h >>conftest.$ac_ext
21308cat >>conftest.$ac_ext <<_ACEOF
21309/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021310int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021311int
21312main ()
21313{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021314return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000021315 ;
21316 return 0;
21317}
21318_ACEOF
21319rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021320if { (ac_try="$ac_compile"
21321case "(($ac_try" in
21322 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21323 *) ac_try_echo=$ac_try;;
21324esac
21325eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21326 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021327 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021328 grep -v '^ *+' conftest.er1 >conftest.err
21329 rm -f conftest.er1
21330 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21332 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021333 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
21334 { (case "(($ac_try" in
21335 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21336 *) ac_try_echo=$ac_try;;
21337esac
21338eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21339 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000021340 ac_status=$?
21341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21342 (exit $ac_status); }; } &&
21343 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021344 { (case "(($ac_try" in
21345 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21346 *) ac_try_echo=$ac_try;;
21347esac
21348eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21349 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021350 ac_status=$?
21351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21352 (exit $ac_status); }; }; then
21353
21354
21355cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021356#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021357_ACEOF
21358
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021359 have_prototypes=yes
21360
Guido van Rossumf78abae1997-01-21 22:02:36 +000021361else
Martin v. Löwis11437992002-04-12 09:54:03 +000021362 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021363sed 's/^/| /' conftest.$ac_ext >&5
21364
Thomas Wouters477c8d52006-05-27 19:21:47 +000021365
Guido van Rossum7f43da71994-08-01 12:15:30 +000021366fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021367
Skip Montanarof0d5f792004-08-15 14:08:23 +000021368rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000021369{ echo "$as_me:$LINENO: result: $have_prototypes" >&5
21370echo "${ECHO_T}$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021371
Guido van Rossumda88dad1995-01-26 00:46:29 +000021372works=no
Thomas Wouters477c8d52006-05-27 19:21:47 +000021373{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
21374echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021375cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021376/* confdefs.h. */
21377_ACEOF
21378cat confdefs.h >>conftest.$ac_ext
21379cat >>conftest.$ac_ext <<_ACEOF
21380/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021381
21382#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000021383int foo(int x, ...) {
21384 va_list va;
21385 va_start(va, x);
21386 va_arg(va, int);
21387 va_arg(va, char *);
21388 va_arg(va, double);
21389 return 0;
21390}
Guido van Rossum7f43da71994-08-01 12:15:30 +000021391
Martin v. Löwis11437992002-04-12 09:54:03 +000021392int
21393main ()
21394{
Guido van Rossum90eea071996-08-30 20:58:57 +000021395return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000021396 ;
21397 return 0;
21398}
21399_ACEOF
21400rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021401if { (ac_try="$ac_compile"
21402case "(($ac_try" in
21403 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21404 *) ac_try_echo=$ac_try;;
21405esac
21406eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21407 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021408 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021409 grep -v '^ *+' conftest.er1 >conftest.err
21410 rm -f conftest.er1
21411 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21413 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021414 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
21415 { (case "(($ac_try" in
21416 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21417 *) ac_try_echo=$ac_try;;
21418esac
21419eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21420 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000021421 ac_status=$?
21422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21423 (exit $ac_status); }; } &&
21424 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021425 { (case "(($ac_try" in
21426 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21427 *) ac_try_echo=$ac_try;;
21428esac
21429eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21430 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021431 ac_status=$?
21432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21433 (exit $ac_status); }; }; then
21434
21435
21436cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021437#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021438_ACEOF
21439
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021440 works=yes
21441
Guido van Rossumf78abae1997-01-21 22:02:36 +000021442else
Martin v. Löwis11437992002-04-12 09:54:03 +000021443 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021444sed 's/^/| /' conftest.$ac_ext >&5
21445
Thomas Wouters477c8d52006-05-27 19:21:47 +000021446
Guido van Rossum627b2d71993-12-24 10:39:16 +000021447fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021448
Skip Montanarof0d5f792004-08-15 14:08:23 +000021449rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000021450{ echo "$as_me:$LINENO: result: $works" >&5
21451echo "${ECHO_T}$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021452
Martin v. Löwisd6320502004-08-12 13:45:08 +000021453# check for socketpair
Thomas Wouters477c8d52006-05-27 19:21:47 +000021454{ echo "$as_me:$LINENO: checking for socketpair" >&5
21455echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000021456cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000021457/* confdefs.h. */
21458_ACEOF
21459cat confdefs.h >>conftest.$ac_ext
21460cat >>conftest.$ac_ext <<_ACEOF
21461/* end confdefs.h. */
21462
21463#include <sys/types.h>
21464#include <sys/socket.h>
21465
21466int
21467main ()
21468{
21469void *x=socketpair
21470 ;
21471 return 0;
21472}
21473_ACEOF
21474rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021475if { (ac_try="$ac_compile"
21476case "(($ac_try" in
21477 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21478 *) ac_try_echo=$ac_try;;
21479esac
21480eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21481 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000021482 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021483 grep -v '^ *+' conftest.er1 >conftest.err
21484 rm -f conftest.er1
21485 cat conftest.err >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000021486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21487 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021488 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
21489 { (case "(($ac_try" in
21490 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21491 *) ac_try_echo=$ac_try;;
21492esac
21493eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21494 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000021495 ac_status=$?
21496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21497 (exit $ac_status); }; } &&
21498 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021499 { (case "(($ac_try" in
21500 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21501 *) ac_try_echo=$ac_try;;
21502esac
21503eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21504 (eval "$ac_try") 2>&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000021505 ac_status=$?
21506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21507 (exit $ac_status); }; }; then
21508
21509cat >>confdefs.h <<\_ACEOF
21510#define HAVE_SOCKETPAIR 1
21511_ACEOF
21512
Thomas Wouters477c8d52006-05-27 19:21:47 +000021513 { echo "$as_me:$LINENO: result: yes" >&5
21514echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000021515else
21516 echo "$as_me: failed program was:" >&5
21517sed 's/^/| /' conftest.$ac_ext >&5
21518
Thomas Wouters477c8d52006-05-27 19:21:47 +000021519 { echo "$as_me:$LINENO: result: no" >&5
21520echo "${ECHO_T}no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000021521
21522fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021523
Skip Montanarof0d5f792004-08-15 14:08:23 +000021524rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000021525
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021526# check if sockaddr has sa_len member
Thomas Wouters477c8d52006-05-27 19:21:47 +000021527{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
21528echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021529cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021530/* confdefs.h. */
21531_ACEOF
21532cat confdefs.h >>conftest.$ac_ext
21533cat >>conftest.$ac_ext <<_ACEOF
21534/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021535#include <sys/types.h>
21536#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021537int
21538main ()
21539{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021540struct sockaddr x;
21541x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021542 ;
21543 return 0;
21544}
21545_ACEOF
21546rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021547if { (ac_try="$ac_compile"
21548case "(($ac_try" in
21549 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21550 *) ac_try_echo=$ac_try;;
21551esac
21552eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21553 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021554 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021555 grep -v '^ *+' conftest.er1 >conftest.err
21556 rm -f conftest.er1
21557 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21559 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021560 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
21561 { (case "(($ac_try" in
21562 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21563 *) ac_try_echo=$ac_try;;
21564esac
21565eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21566 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000021567 ac_status=$?
21568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21569 (exit $ac_status); }; } &&
21570 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021571 { (case "(($ac_try" in
21572 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21573 *) ac_try_echo=$ac_try;;
21574esac
21575eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21576 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021577 ac_status=$?
21578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21579 (exit $ac_status); }; }; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000021580 { echo "$as_me:$LINENO: result: yes" >&5
21581echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021582
21583cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021584#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021585_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021586
21587else
Martin v. Löwis11437992002-04-12 09:54:03 +000021588 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021589sed 's/^/| /' conftest.$ac_ext >&5
21590
Thomas Wouters477c8d52006-05-27 19:21:47 +000021591 { echo "$as_me:$LINENO: result: no" >&5
21592echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021593fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021594
Skip Montanarof0d5f792004-08-15 14:08:23 +000021595rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021596
Guido van Rossumda88dad1995-01-26 00:46:29 +000021597va_list_is_array=no
Thomas Wouters477c8d52006-05-27 19:21:47 +000021598{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
21599echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021600cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021601/* confdefs.h. */
21602_ACEOF
21603cat confdefs.h >>conftest.$ac_ext
21604cat >>conftest.$ac_ext <<_ACEOF
21605/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021606
21607#ifdef HAVE_STDARG_PROTOTYPES
21608#include <stdarg.h>
21609#else
21610#include <varargs.h>
21611#endif
21612
Martin v. Löwis11437992002-04-12 09:54:03 +000021613int
21614main ()
21615{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021616va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000021617 ;
21618 return 0;
21619}
21620_ACEOF
21621rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021622if { (ac_try="$ac_compile"
21623case "(($ac_try" in
21624 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21625 *) ac_try_echo=$ac_try;;
21626esac
21627eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21628 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021629 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021630 grep -v '^ *+' conftest.er1 >conftest.err
21631 rm -f conftest.er1
21632 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21634 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021635 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
21636 { (case "(($ac_try" in
21637 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21638 *) ac_try_echo=$ac_try;;
21639esac
21640eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21641 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000021642 ac_status=$?
21643 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21644 (exit $ac_status); }; } &&
21645 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021646 { (case "(($ac_try" in
21647 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21648 *) ac_try_echo=$ac_try;;
21649esac
21650eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21651 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021652 ac_status=$?
21653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21654 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021655 :
21656else
Martin v. Löwis11437992002-04-12 09:54:03 +000021657 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021658sed 's/^/| /' conftest.$ac_ext >&5
21659
Martin v. Löwis11437992002-04-12 09:54:03 +000021660
21661
21662cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021663#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021664_ACEOF
21665
Guido van Rossumda88dad1995-01-26 00:46:29 +000021666 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021667
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021668fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021669
Skip Montanarof0d5f792004-08-15 14:08:23 +000021670rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000021671{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
21672echo "${ECHO_T}$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021673
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021674# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000021675
21676
21677
Thomas Wouters477c8d52006-05-27 19:21:47 +000021678{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
21679echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021680if test "${ac_cv_func_gethostbyname_r+set}" = set; then
21681 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021682else
Martin v. Löwis11437992002-04-12 09:54:03 +000021683 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021684/* confdefs.h. */
21685_ACEOF
21686cat confdefs.h >>conftest.$ac_ext
21687cat >>conftest.$ac_ext <<_ACEOF
21688/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021689/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
21690 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21691#define gethostbyname_r innocuous_gethostbyname_r
21692
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021693/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021694 which can conflict with char gethostbyname_r (); below.
21695 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021696 <limits.h> exists even on freestanding compilers. */
21697
21698#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021699# include <limits.h>
21700#else
21701# include <assert.h>
21702#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021703
21704#undef gethostbyname_r
21705
Thomas Wouters477c8d52006-05-27 19:21:47 +000021706/* Override any GCC internal prototype to avoid an error.
21707 Use char because int might match the return type of a GCC
21708 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021709#ifdef __cplusplus
21710extern "C"
21711#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021712char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021713/* The GNU C library defines this for functions which it implements
21714 to always fail with ENOSYS. Some functions are actually named
21715 something starting with __ and the normal name is an alias. */
Thomas Wouters477c8d52006-05-27 19:21:47 +000021716#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021717choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021718#endif
21719
Skip Montanaro6dead952003-09-25 14:50:04 +000021720int
21721main ()
21722{
Thomas Wouters477c8d52006-05-27 19:21:47 +000021723return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021724 ;
21725 return 0;
21726}
21727_ACEOF
21728rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021729if { (ac_try="$ac_link"
21730case "(($ac_try" in
21731 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21732 *) ac_try_echo=$ac_try;;
21733esac
21734eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21735 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021736 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021737 grep -v '^ *+' conftest.er1 >conftest.err
21738 rm -f conftest.er1
21739 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21741 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021742 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
21743 { (case "(($ac_try" in
21744 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21745 *) ac_try_echo=$ac_try;;
21746esac
21747eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21748 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000021749 ac_status=$?
21750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21751 (exit $ac_status); }; } &&
21752 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021753 { (case "(($ac_try" in
21754 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21755 *) ac_try_echo=$ac_try;;
21756esac
21757eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21758 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021759 ac_status=$?
21760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21761 (exit $ac_status); }; }; then
21762 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021763else
Martin v. Löwis11437992002-04-12 09:54:03 +000021764 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021765sed 's/^/| /' conftest.$ac_ext >&5
21766
Thomas Wouters477c8d52006-05-27 19:21:47 +000021767 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021768fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021769
Skip Montanarof0d5f792004-08-15 14:08:23 +000021770rm -f conftest.err conftest.$ac_objext \
21771 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021772fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021773{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
21774echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021775if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021776
Martin v. Löwis11437992002-04-12 09:54:03 +000021777 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021778#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021779_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021780
Thomas Wouters477c8d52006-05-27 19:21:47 +000021781 { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
21782echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021783 OLD_CFLAGS=$CFLAGS
21784 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000021785 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021786/* confdefs.h. */
21787_ACEOF
21788cat confdefs.h >>conftest.$ac_ext
21789cat >>conftest.$ac_ext <<_ACEOF
21790/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021791
21792# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021793
Martin v. Löwis11437992002-04-12 09:54:03 +000021794int
21795main ()
21796{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021797
21798 char *name;
21799 struct hostent *he, *res;
21800 char buffer[2048];
21801 int buflen = 2048;
21802 int h_errnop;
21803
21804 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000021805
21806 ;
21807 return 0;
21808}
21809_ACEOF
21810rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021811if { (ac_try="$ac_compile"
21812case "(($ac_try" in
21813 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21814 *) ac_try_echo=$ac_try;;
21815esac
21816eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21817 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021818 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021819 grep -v '^ *+' conftest.er1 >conftest.err
21820 rm -f conftest.er1
21821 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21823 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021824 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
21825 { (case "(($ac_try" in
21826 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21827 *) ac_try_echo=$ac_try;;
21828esac
21829eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21830 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000021831 ac_status=$?
21832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21833 (exit $ac_status); }; } &&
21834 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021835 { (case "(($ac_try" in
21836 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21837 *) ac_try_echo=$ac_try;;
21838esac
21839eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21840 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021841 ac_status=$?
21842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21843 (exit $ac_status); }; }; then
21844
21845 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021846#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021847_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021848
Martin v. Löwis11437992002-04-12 09:54:03 +000021849
21850cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021851#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021852_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021853
Thomas Wouters477c8d52006-05-27 19:21:47 +000021854 { echo "$as_me:$LINENO: result: yes" >&5
21855echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021856
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021857else
Martin v. Löwis11437992002-04-12 09:54:03 +000021858 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021859sed 's/^/| /' conftest.$ac_ext >&5
21860
Martin v. Löwis11437992002-04-12 09:54:03 +000021861
Thomas Wouters477c8d52006-05-27 19:21:47 +000021862 { echo "$as_me:$LINENO: result: no" >&5
21863echo "${ECHO_T}no" >&6; }
21864 { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
21865echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021866 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021867/* confdefs.h. */
21868_ACEOF
21869cat confdefs.h >>conftest.$ac_ext
21870cat >>conftest.$ac_ext <<_ACEOF
21871/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021872
21873# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021874
Martin v. Löwis11437992002-04-12 09:54:03 +000021875int
21876main ()
21877{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021878
21879 char *name;
21880 struct hostent *he;
21881 char buffer[2048];
21882 int buflen = 2048;
21883 int h_errnop;
21884
21885 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000021886
21887 ;
21888 return 0;
21889}
21890_ACEOF
21891rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021892if { (ac_try="$ac_compile"
21893case "(($ac_try" in
21894 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21895 *) ac_try_echo=$ac_try;;
21896esac
21897eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21898 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021899 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021900 grep -v '^ *+' conftest.er1 >conftest.err
21901 rm -f conftest.er1
21902 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21904 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021905 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
21906 { (case "(($ac_try" in
21907 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21908 *) ac_try_echo=$ac_try;;
21909esac
21910eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21911 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000021912 ac_status=$?
21913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21914 (exit $ac_status); }; } &&
21915 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021916 { (case "(($ac_try" in
21917 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21918 *) ac_try_echo=$ac_try;;
21919esac
21920eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21921 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021922 ac_status=$?
21923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21924 (exit $ac_status); }; }; then
21925
21926 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021927#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021928_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021929
Martin v. Löwis11437992002-04-12 09:54:03 +000021930
21931cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021932#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021933_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021934
Thomas Wouters477c8d52006-05-27 19:21:47 +000021935 { echo "$as_me:$LINENO: result: yes" >&5
21936echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021937
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021938else
Martin v. Löwis11437992002-04-12 09:54:03 +000021939 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021940sed 's/^/| /' conftest.$ac_ext >&5
21941
Martin v. Löwis11437992002-04-12 09:54:03 +000021942
Thomas Wouters477c8d52006-05-27 19:21:47 +000021943 { echo "$as_me:$LINENO: result: no" >&5
21944echo "${ECHO_T}no" >&6; }
21945 { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
21946echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021947 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021948/* confdefs.h. */
21949_ACEOF
21950cat confdefs.h >>conftest.$ac_ext
21951cat >>conftest.$ac_ext <<_ACEOF
21952/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021953
21954# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021955
Martin v. Löwis11437992002-04-12 09:54:03 +000021956int
21957main ()
21958{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021959
21960 char *name;
21961 struct hostent *he;
21962 struct hostent_data data;
21963
21964 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000021965
21966 ;
21967 return 0;
21968}
21969_ACEOF
21970rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021971if { (ac_try="$ac_compile"
21972case "(($ac_try" in
21973 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21974 *) ac_try_echo=$ac_try;;
21975esac
21976eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21977 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021978 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021979 grep -v '^ *+' conftest.er1 >conftest.err
21980 rm -f conftest.er1
21981 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21983 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021984 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
21985 { (case "(($ac_try" in
21986 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21987 *) ac_try_echo=$ac_try;;
21988esac
21989eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21990 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000021991 ac_status=$?
21992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21993 (exit $ac_status); }; } &&
21994 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021995 { (case "(($ac_try" in
21996 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21997 *) ac_try_echo=$ac_try;;
21998esac
21999eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22000 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022001 ac_status=$?
22002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22003 (exit $ac_status); }; }; then
22004
22005 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022006#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022007_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022008
Martin v. Löwis11437992002-04-12 09:54:03 +000022009
22010cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022011#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022012_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022013
Thomas Wouters477c8d52006-05-27 19:21:47 +000022014 { echo "$as_me:$LINENO: result: yes" >&5
22015echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022016
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022017else
Martin v. Löwis11437992002-04-12 09:54:03 +000022018 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022019sed 's/^/| /' conftest.$ac_ext >&5
22020
Martin v. Löwis11437992002-04-12 09:54:03 +000022021
Thomas Wouters477c8d52006-05-27 19:21:47 +000022022 { echo "$as_me:$LINENO: result: no" >&5
22023echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022024
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022025fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000022026
Skip Montanarof0d5f792004-08-15 14:08:23 +000022027rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022028
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022029fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000022030
Skip Montanarof0d5f792004-08-15 14:08:23 +000022031rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022032
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022033fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000022034
Skip Montanarof0d5f792004-08-15 14:08:23 +000022035rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022036 CFLAGS=$OLD_CFLAGS
22037
22038else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022039
Martin v. Löwis11437992002-04-12 09:54:03 +000022040
22041for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000022042do
Martin v. Löwis11437992002-04-12 09:54:03 +000022043as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Thomas Wouters477c8d52006-05-27 19:21:47 +000022044{ echo "$as_me:$LINENO: checking for $ac_func" >&5
22045echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
22046if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022047 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022048else
Martin v. Löwis11437992002-04-12 09:54:03 +000022049 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022050/* confdefs.h. */
22051_ACEOF
22052cat confdefs.h >>conftest.$ac_ext
22053cat >>conftest.$ac_ext <<_ACEOF
22054/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022055/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22056 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22057#define $ac_func innocuous_$ac_func
22058
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022059/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022060 which can conflict with char $ac_func (); below.
22061 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022062 <limits.h> exists even on freestanding compilers. */
22063
22064#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022065# include <limits.h>
22066#else
22067# include <assert.h>
22068#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022069
22070#undef $ac_func
22071
Thomas Wouters477c8d52006-05-27 19:21:47 +000022072/* Override any GCC internal prototype to avoid an error.
22073 Use char because int might match the return type of a GCC
22074 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022075#ifdef __cplusplus
22076extern "C"
22077#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022078char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022079/* The GNU C library defines this for functions which it implements
22080 to always fail with ENOSYS. Some functions are actually named
22081 something starting with __ and the normal name is an alias. */
Thomas Wouters477c8d52006-05-27 19:21:47 +000022082#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022083choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022084#endif
22085
Skip Montanaro6dead952003-09-25 14:50:04 +000022086int
22087main ()
22088{
Thomas Wouters477c8d52006-05-27 19:21:47 +000022089return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022090 ;
22091 return 0;
22092}
22093_ACEOF
22094rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000022095if { (ac_try="$ac_link"
22096case "(($ac_try" in
22097 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22098 *) ac_try_echo=$ac_try;;
22099esac
22100eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22101 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022102 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022103 grep -v '^ *+' conftest.er1 >conftest.err
22104 rm -f conftest.er1
22105 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022106 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22107 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000022108 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
22109 { (case "(($ac_try" in
22110 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22111 *) ac_try_echo=$ac_try;;
22112esac
22113eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22114 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000022115 ac_status=$?
22116 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22117 (exit $ac_status); }; } &&
22118 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000022119 { (case "(($ac_try" in
22120 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22121 *) ac_try_echo=$ac_try;;
22122esac
22123eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22124 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022125 ac_status=$?
22126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22127 (exit $ac_status); }; }; then
22128 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000022129else
Martin v. Löwis11437992002-04-12 09:54:03 +000022130 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022131sed 's/^/| /' conftest.$ac_ext >&5
22132
Thomas Wouters477c8d52006-05-27 19:21:47 +000022133 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000022134fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000022135
Skip Montanarof0d5f792004-08-15 14:08:23 +000022136rm -f conftest.err conftest.$ac_objext \
22137 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000022138fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000022139ac_res=`eval echo '${'$as_ac_var'}'`
22140 { echo "$as_me:$LINENO: result: $ac_res" >&5
22141echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022142if test `eval echo '${'$as_ac_var'}'` = yes; then
22143 cat >>confdefs.h <<_ACEOF
22144#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
22145_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022146
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022147fi
Thomas Wouters3a584202000-08-05 23:28:51 +000022148done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022149
Michael W. Hudson54241132001-12-07 15:38:26 +000022150
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022151fi
22152
Michael W. Hudson54241132001-12-07 15:38:26 +000022153
22154
22155
22156
22157
22158
Guido van Rossum627b2d71993-12-24 10:39:16 +000022159# checks for system services
22160# (none yet)
22161
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022162# Linux requires this for correct f.p. operations
Thomas Wouters477c8d52006-05-27 19:21:47 +000022163{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
22164echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022165if test "${ac_cv_func___fpu_control+set}" = set; then
22166 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022167else
Martin v. Löwis11437992002-04-12 09:54:03 +000022168 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022169/* confdefs.h. */
22170_ACEOF
22171cat confdefs.h >>conftest.$ac_ext
22172cat >>conftest.$ac_ext <<_ACEOF
22173/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022174/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
22175 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22176#define __fpu_control innocuous___fpu_control
22177
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022178/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022179 which can conflict with char __fpu_control (); below.
22180 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022181 <limits.h> exists even on freestanding compilers. */
22182
22183#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022184# include <limits.h>
22185#else
22186# include <assert.h>
22187#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022188
22189#undef __fpu_control
22190
Thomas Wouters477c8d52006-05-27 19:21:47 +000022191/* Override any GCC internal prototype to avoid an error.
22192 Use char because int might match the return type of a GCC
22193 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022194#ifdef __cplusplus
22195extern "C"
22196#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022197char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022198/* The GNU C library defines this for functions which it implements
22199 to always fail with ENOSYS. Some functions are actually named
22200 something starting with __ and the normal name is an alias. */
Thomas Wouters477c8d52006-05-27 19:21:47 +000022201#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022202choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022203#endif
22204
Skip Montanaro6dead952003-09-25 14:50:04 +000022205int
22206main ()
22207{
Thomas Wouters477c8d52006-05-27 19:21:47 +000022208return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022209 ;
22210 return 0;
22211}
22212_ACEOF
22213rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000022214if { (ac_try="$ac_link"
22215case "(($ac_try" in
22216 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22217 *) ac_try_echo=$ac_try;;
22218esac
22219eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22220 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022221 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022222 grep -v '^ *+' conftest.er1 >conftest.err
22223 rm -f conftest.er1
22224 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022225 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22226 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000022227 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
22228 { (case "(($ac_try" in
22229 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22230 *) ac_try_echo=$ac_try;;
22231esac
22232eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22233 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000022234 ac_status=$?
22235 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22236 (exit $ac_status); }; } &&
22237 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000022238 { (case "(($ac_try" in
22239 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22240 *) ac_try_echo=$ac_try;;
22241esac
22242eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22243 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022244 ac_status=$?
22245 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22246 (exit $ac_status); }; }; then
22247 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022248else
Martin v. Löwis11437992002-04-12 09:54:03 +000022249 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022250sed 's/^/| /' conftest.$ac_ext >&5
22251
Thomas Wouters477c8d52006-05-27 19:21:47 +000022252 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022253fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000022254
Skip Montanarof0d5f792004-08-15 14:08:23 +000022255rm -f conftest.err conftest.$ac_objext \
22256 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022257fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000022258{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
22259echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022260if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022261 :
22262else
Martin v. Löwis11437992002-04-12 09:54:03 +000022263
Thomas Wouters477c8d52006-05-27 19:21:47 +000022264{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
22265echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022266if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
22267 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022268else
Martin v. Löwis11437992002-04-12 09:54:03 +000022269 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000022270LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000022271cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022272/* confdefs.h. */
22273_ACEOF
22274cat confdefs.h >>conftest.$ac_ext
22275cat >>conftest.$ac_ext <<_ACEOF
22276/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022277
Thomas Wouters477c8d52006-05-27 19:21:47 +000022278/* Override any GCC internal prototype to avoid an error.
22279 Use char because int might match the return type of a GCC
22280 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022281#ifdef __cplusplus
22282extern "C"
22283#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022284char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022285int
22286main ()
22287{
Thomas Wouters477c8d52006-05-27 19:21:47 +000022288return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022289 ;
22290 return 0;
22291}
22292_ACEOF
22293rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000022294if { (ac_try="$ac_link"
22295case "(($ac_try" in
22296 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22297 *) ac_try_echo=$ac_try;;
22298esac
22299eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22300 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022301 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022302 grep -v '^ *+' conftest.er1 >conftest.err
22303 rm -f conftest.er1
22304 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022305 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22306 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000022307 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
22308 { (case "(($ac_try" in
22309 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22310 *) ac_try_echo=$ac_try;;
22311esac
22312eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22313 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000022314 ac_status=$?
22315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22316 (exit $ac_status); }; } &&
22317 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000022318 { (case "(($ac_try" in
22319 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22320 *) ac_try_echo=$ac_try;;
22321esac
22322eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22323 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022324 ac_status=$?
22325 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22326 (exit $ac_status); }; }; then
22327 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000022328else
Martin v. Löwis11437992002-04-12 09:54:03 +000022329 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022330sed 's/^/| /' conftest.$ac_ext >&5
22331
Thomas Wouters477c8d52006-05-27 19:21:47 +000022332 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000022333fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000022334
Skip Montanarof0d5f792004-08-15 14:08:23 +000022335rm -f conftest.err conftest.$ac_objext \
22336 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022337LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022338fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000022339{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
22340echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022341if test $ac_cv_lib_ieee___fpu_control = yes; then
22342 cat >>confdefs.h <<_ACEOF
22343#define HAVE_LIBIEEE 1
22344_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022345
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000022346 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022347
Guido van Rossum627b2d71993-12-24 10:39:16 +000022348fi
22349
Michael W. Hudson54241132001-12-07 15:38:26 +000022350
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022351fi
22352
Michael W. Hudson54241132001-12-07 15:38:26 +000022353
Guido van Rossum7f253911997-05-09 02:42:48 +000022354# Check for --with-fpectl
Thomas Wouters477c8d52006-05-27 19:21:47 +000022355{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
22356echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022357
Thomas Wouters477c8d52006-05-27 19:21:47 +000022358# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000022359if test "${with_fpectl+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000022360 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000022361if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000022362then
22363
22364cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000022365#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022366_ACEOF
22367
Thomas Wouters477c8d52006-05-27 19:21:47 +000022368 { echo "$as_me:$LINENO: result: yes" >&5
22369echo "${ECHO_T}yes" >&6; }
22370else { echo "$as_me:$LINENO: result: no" >&5
22371echo "${ECHO_T}no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000022372fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000022373else
Thomas Wouters477c8d52006-05-27 19:21:47 +000022374 { echo "$as_me:$LINENO: result: no" >&5
22375echo "${ECHO_T}no" >&6; }
22376fi
22377
Guido van Rossum7f253911997-05-09 02:42:48 +000022378
Guido van Rossum7f43da71994-08-01 12:15:30 +000022379# check for --with-libm=...
22380
Guido van Rossum563e7081996-09-10 18:20:48 +000022381case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000022382Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000022383BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000022384*) LIBM=-lm
22385esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000022386{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
22387echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022388
Thomas Wouters477c8d52006-05-27 19:21:47 +000022389# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000022390if test "${with_libm+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000022391 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000022392if test "$withval" = no
22393then LIBM=
Thomas Wouters477c8d52006-05-27 19:21:47 +000022394 { echo "$as_me:$LINENO: result: force LIBM empty" >&5
22395echo "${ECHO_T}force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000022396elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000022397then LIBM=$withval
Thomas Wouters477c8d52006-05-27 19:21:47 +000022398 { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
22399echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022400else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
22401echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
22402 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022403fi
Guido van Rossum7f253911997-05-09 02:42:48 +000022404else
Thomas Wouters477c8d52006-05-27 19:21:47 +000022405 { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
22406echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
22407fi
22408
Guido van Rossum7f43da71994-08-01 12:15:30 +000022409
22410# check for --with-libc=...
22411
Thomas Wouters477c8d52006-05-27 19:21:47 +000022412{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
22413echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022414
Thomas Wouters477c8d52006-05-27 19:21:47 +000022415# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000022416if test "${with_libc+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000022417 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000022418if test "$withval" = no
22419then LIBC=
Thomas Wouters477c8d52006-05-27 19:21:47 +000022420 { echo "$as_me:$LINENO: result: force LIBC empty" >&5
22421echo "${ECHO_T}force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000022422elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000022423then LIBC=$withval
Thomas Wouters477c8d52006-05-27 19:21:47 +000022424 { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
22425echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022426else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
22427echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
22428 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022429fi
Guido van Rossum7f253911997-05-09 02:42:48 +000022430else
Thomas Wouters477c8d52006-05-27 19:21:47 +000022431 { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
22432echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
22433fi
22434
Guido van Rossum7f43da71994-08-01 12:15:30 +000022435
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000022436# check for hypot() in math library
22437LIBS_SAVE=$LIBS
22438LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000022439
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000022440for ac_func in hypot
22441do
Martin v. Löwis11437992002-04-12 09:54:03 +000022442as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Thomas Wouters477c8d52006-05-27 19:21:47 +000022443{ echo "$as_me:$LINENO: checking for $ac_func" >&5
22444echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
22445if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022446 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000022447else
Martin v. Löwis11437992002-04-12 09:54:03 +000022448 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022449/* confdefs.h. */
22450_ACEOF
22451cat confdefs.h >>conftest.$ac_ext
22452cat >>conftest.$ac_ext <<_ACEOF
22453/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022454/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22455 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22456#define $ac_func innocuous_$ac_func
22457
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000022458/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022459 which can conflict with char $ac_func (); below.
22460 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022461 <limits.h> exists even on freestanding compilers. */
22462
22463#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022464# include <limits.h>
22465#else
22466# include <assert.h>
22467#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022468
22469#undef $ac_func
22470
Thomas Wouters477c8d52006-05-27 19:21:47 +000022471/* Override any GCC internal prototype to avoid an error.
22472 Use char because int might match the return type of a GCC
22473 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022474#ifdef __cplusplus
22475extern "C"
22476#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022477char $ac_func ();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000022478/* The GNU C library defines this for functions which it implements
22479 to always fail with ENOSYS. Some functions are actually named
22480 something starting with __ and the normal name is an alias. */
Thomas Wouters477c8d52006-05-27 19:21:47 +000022481#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000022482choke me
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000022483#endif
22484
Skip Montanaro6dead952003-09-25 14:50:04 +000022485int
22486main ()
22487{
Thomas Wouters477c8d52006-05-27 19:21:47 +000022488return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022489 ;
22490 return 0;
22491}
22492_ACEOF
22493rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000022494if { (ac_try="$ac_link"
22495case "(($ac_try" in
22496 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22497 *) ac_try_echo=$ac_try;;
22498esac
22499eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22500 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022501 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022502 grep -v '^ *+' conftest.er1 >conftest.err
22503 rm -f conftest.er1
22504 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22506 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000022507 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
22508 { (case "(($ac_try" in
22509 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22510 *) ac_try_echo=$ac_try;;
22511esac
22512eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22513 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000022514 ac_status=$?
22515 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22516 (exit $ac_status); }; } &&
22517 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000022518 { (case "(($ac_try" in
22519 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22520 *) ac_try_echo=$ac_try;;
22521esac
22522eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22523 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022524 ac_status=$?
22525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22526 (exit $ac_status); }; }; then
22527 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000022528else
Martin v. Löwis11437992002-04-12 09:54:03 +000022529 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022530sed 's/^/| /' conftest.$ac_ext >&5
22531
Thomas Wouters477c8d52006-05-27 19:21:47 +000022532 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000022533fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000022534
Skip Montanarof0d5f792004-08-15 14:08:23 +000022535rm -f conftest.err conftest.$ac_objext \
22536 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000022537fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000022538ac_res=`eval echo '${'$as_ac_var'}'`
22539 { echo "$as_me:$LINENO: result: $ac_res" >&5
22540echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022541if test `eval echo '${'$as_ac_var'}'` = yes; then
22542 cat >>confdefs.h <<_ACEOF
22543#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
22544_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000022545
Michael W. Hudson54241132001-12-07 15:38:26 +000022546else
Thomas Wouters477c8d52006-05-27 19:21:47 +000022547 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000022548 *" $ac_func.$ac_objext "* ) ;;
Thomas Wouters477c8d52006-05-27 19:21:47 +000022549 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
22550 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000022551esac
22552
Guido van Rossum2b3ac691996-08-30 15:18:41 +000022553fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000022554done
22555
Michael W. Hudson54241132001-12-07 15:38:26 +000022556
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000022557LIBS=$LIBS_SAVE
22558
Guido van Rossumef2255b2000-03-10 22:30:29 +000022559# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000022560if test "${ac_cv_header_wchar_h+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000022561 { echo "$as_me:$LINENO: checking for wchar.h" >&5
22562echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022563if test "${ac_cv_header_wchar_h+set}" = set; then
22564 echo $ECHO_N "(cached) $ECHO_C" >&6
22565fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000022566{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
22567echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000022568else
Martin v. Löwis11437992002-04-12 09:54:03 +000022569 # Is the header compilable?
Thomas Wouters477c8d52006-05-27 19:21:47 +000022570{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
22571echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022572cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022573/* confdefs.h. */
22574_ACEOF
22575cat confdefs.h >>conftest.$ac_ext
22576cat >>conftest.$ac_ext <<_ACEOF
22577/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022578$ac_includes_default
22579#include <wchar.h>
22580_ACEOF
22581rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000022582if { (ac_try="$ac_compile"
22583case "(($ac_try" in
22584 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22585 *) ac_try_echo=$ac_try;;
22586esac
22587eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22588 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022589 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022590 grep -v '^ *+' conftest.er1 >conftest.err
22591 rm -f conftest.er1
22592 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22594 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000022595 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
22596 { (case "(($ac_try" in
22597 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22598 *) ac_try_echo=$ac_try;;
22599esac
22600eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22601 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000022602 ac_status=$?
22603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22604 (exit $ac_status); }; } &&
22605 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000022606 { (case "(($ac_try" in
22607 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22608 *) ac_try_echo=$ac_try;;
22609esac
22610eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22611 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022612 ac_status=$?
22613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22614 (exit $ac_status); }; }; then
22615 ac_header_compiler=yes
22616else
22617 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022618sed 's/^/| /' conftest.$ac_ext >&5
22619
Thomas Wouters477c8d52006-05-27 19:21:47 +000022620 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000022621fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000022622
Skip Montanarof0d5f792004-08-15 14:08:23 +000022623rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000022624{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22625echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022626
22627# Is the header present?
Thomas Wouters477c8d52006-05-27 19:21:47 +000022628{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
22629echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022630cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022631/* confdefs.h. */
22632_ACEOF
22633cat confdefs.h >>conftest.$ac_ext
22634cat >>conftest.$ac_ext <<_ACEOF
22635/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000022636#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022637_ACEOF
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000022638if { (ac_try="$ac_cpp conftest.$ac_ext"
22639case "(($ac_try" in
22640 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22641 *) ac_try_echo=$ac_try;;
22642esac
22643eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22644 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022645 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000022646 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000022647 rm -f conftest.er1
22648 cat conftest.err >&5
22649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22650 (exit $ac_status); } >/dev/null; then
22651 if test -s conftest.err; then
22652 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000022653 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +000022654 else
22655 ac_cpp_err=
22656 fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000022657else
Martin v. Löwis11437992002-04-12 09:54:03 +000022658 ac_cpp_err=yes
22659fi
22660if test -z "$ac_cpp_err"; then
22661 ac_header_preproc=yes
22662else
22663 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022664sed 's/^/| /' conftest.$ac_ext >&5
22665
Martin v. Löwis11437992002-04-12 09:54:03 +000022666 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000022667fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000022668
Martin v. Löwis11437992002-04-12 09:54:03 +000022669rm -f conftest.err conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000022670{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22671echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022672
22673# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022674case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22675 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000022676 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
22677echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000022678 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
22679echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
22680 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022681 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000022682 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022683 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
22684echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000022685 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
22686echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
22687 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
22688echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
22689 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
22690echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022691 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
22692echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000022693 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
22694echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +000022695 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000022696## ------------------------------------------------ ##
22697## Report this to http://www.python.org/python-bugs ##
22698## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000022699_ASBOX
Thomas Wouters477c8d52006-05-27 19:21:47 +000022700 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000022701 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000022702esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000022703{ echo "$as_me:$LINENO: checking for wchar.h" >&5
22704echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022705if test "${ac_cv_header_wchar_h+set}" = set; then
22706 echo $ECHO_N "(cached) $ECHO_C" >&6
22707else
22708 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000022709fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000022710{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
22711echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022712
22713fi
22714if test $ac_cv_header_wchar_h = yes; then
22715
22716
22717cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000022718#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022719_ACEOF
22720
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022721 wchar_h="yes"
22722
Guido van Rossumef2255b2000-03-10 22:30:29 +000022723else
Martin v. Löwis11437992002-04-12 09:54:03 +000022724 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000022725
22726fi
22727
Michael W. Hudson54241132001-12-07 15:38:26 +000022728
Martin v. Löwis11437992002-04-12 09:54:03 +000022729
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022730# determine wchar_t size
22731if test "$wchar_h" = yes
22732then
Thomas Wouters477c8d52006-05-27 19:21:47 +000022733 { echo "$as_me:$LINENO: checking for wchar_t" >&5
22734echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022735if test "${ac_cv_type_wchar_t+set}" = set; then
22736 echo $ECHO_N "(cached) $ECHO_C" >&6
22737else
22738 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022739/* confdefs.h. */
22740_ACEOF
22741cat confdefs.h >>conftest.$ac_ext
22742cat >>conftest.$ac_ext <<_ACEOF
22743/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022744#include <wchar.h>
22745
Thomas Wouters477c8d52006-05-27 19:21:47 +000022746typedef wchar_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022747int
22748main ()
22749{
Thomas Wouters477c8d52006-05-27 19:21:47 +000022750if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000022751 return 0;
Thomas Wouters477c8d52006-05-27 19:21:47 +000022752if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000022753 return 0;
22754 ;
22755 return 0;
22756}
22757_ACEOF
22758rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000022759if { (ac_try="$ac_compile"
22760case "(($ac_try" in
22761 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22762 *) ac_try_echo=$ac_try;;
22763esac
22764eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22765 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022766 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022767 grep -v '^ *+' conftest.er1 >conftest.err
22768 rm -f conftest.er1
22769 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22771 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000022772 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
22773 { (case "(($ac_try" in
22774 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22775 *) ac_try_echo=$ac_try;;
22776esac
22777eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22778 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000022779 ac_status=$?
22780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22781 (exit $ac_status); }; } &&
22782 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000022783 { (case "(($ac_try" in
22784 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22785 *) ac_try_echo=$ac_try;;
22786esac
22787eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22788 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022789 ac_status=$?
22790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22791 (exit $ac_status); }; }; then
22792 ac_cv_type_wchar_t=yes
22793else
22794 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022795sed 's/^/| /' conftest.$ac_ext >&5
22796
Thomas Wouters477c8d52006-05-27 19:21:47 +000022797 ac_cv_type_wchar_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000022798fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000022799
Skip Montanarof0d5f792004-08-15 14:08:23 +000022800rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022801fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000022802{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
22803echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022804
Thomas Wouters477c8d52006-05-27 19:21:47 +000022805{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
22806echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022807if test "${ac_cv_sizeof_wchar_t+set}" = set; then
22808 echo $ECHO_N "(cached) $ECHO_C" >&6
22809else
22810 if test "$ac_cv_type_wchar_t" = yes; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000022811 # The cast to long int works around a bug in the HP C Compiler
Martin v. Löwis11437992002-04-12 09:54:03 +000022812 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
22813 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
22814 # This bug is HP SR number 8606223364.
22815 if test "$cross_compiling" = yes; then
22816 # Depending upon the size, compute the lo and hi bounds.
22817cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022818/* confdefs.h. */
22819_ACEOF
22820cat confdefs.h >>conftest.$ac_ext
22821cat >>conftest.$ac_ext <<_ACEOF
22822/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022823#include <wchar.h>
22824
Thomas Wouters477c8d52006-05-27 19:21:47 +000022825 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022826int
22827main ()
22828{
Thomas Wouters477c8d52006-05-27 19:21:47 +000022829static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000022830test_array [0] = 0
22831
22832 ;
22833 return 0;
22834}
22835_ACEOF
22836rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000022837if { (ac_try="$ac_compile"
22838case "(($ac_try" in
22839 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22840 *) ac_try_echo=$ac_try;;
22841esac
22842eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22843 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022844 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022845 grep -v '^ *+' conftest.er1 >conftest.err
22846 rm -f conftest.er1
22847 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22849 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000022850 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
22851 { (case "(($ac_try" in
22852 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22853 *) ac_try_echo=$ac_try;;
22854esac
22855eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22856 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000022857 ac_status=$?
22858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22859 (exit $ac_status); }; } &&
22860 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000022861 { (case "(($ac_try" in
22862 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22863 *) ac_try_echo=$ac_try;;
22864esac
22865eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22866 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022867 ac_status=$?
22868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22869 (exit $ac_status); }; }; then
22870 ac_lo=0 ac_mid=0
22871 while :; do
22872 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022873/* confdefs.h. */
22874_ACEOF
22875cat confdefs.h >>conftest.$ac_ext
22876cat >>conftest.$ac_ext <<_ACEOF
22877/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022878#include <wchar.h>
22879
Thomas Wouters477c8d52006-05-27 19:21:47 +000022880 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022881int
22882main ()
22883{
Thomas Wouters477c8d52006-05-27 19:21:47 +000022884static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000022885test_array [0] = 0
22886
22887 ;
22888 return 0;
22889}
22890_ACEOF
22891rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000022892if { (ac_try="$ac_compile"
22893case "(($ac_try" in
22894 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22895 *) ac_try_echo=$ac_try;;
22896esac
22897eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22898 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022899 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022900 grep -v '^ *+' conftest.er1 >conftest.err
22901 rm -f conftest.er1
22902 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22904 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000022905 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
22906 { (case "(($ac_try" in
22907 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22908 *) ac_try_echo=$ac_try;;
22909esac
22910eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22911 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000022912 ac_status=$?
22913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22914 (exit $ac_status); }; } &&
22915 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000022916 { (case "(($ac_try" in
22917 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22918 *) ac_try_echo=$ac_try;;
22919esac
22920eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22921 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022922 ac_status=$?
22923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22924 (exit $ac_status); }; }; then
22925 ac_hi=$ac_mid; break
22926else
22927 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022928sed 's/^/| /' conftest.$ac_ext >&5
22929
Thomas Wouters477c8d52006-05-27 19:21:47 +000022930 ac_lo=`expr $ac_mid + 1`
22931 if test $ac_lo -le $ac_mid; then
22932 ac_lo= ac_hi=
22933 break
22934 fi
22935 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000022936fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000022937
Skip Montanarof0d5f792004-08-15 14:08:23 +000022938rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022939 done
22940else
22941 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022942sed 's/^/| /' conftest.$ac_ext >&5
22943
Thomas Wouters477c8d52006-05-27 19:21:47 +000022944 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022945/* confdefs.h. */
22946_ACEOF
22947cat confdefs.h >>conftest.$ac_ext
22948cat >>conftest.$ac_ext <<_ACEOF
22949/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022950#include <wchar.h>
22951
Thomas Wouters477c8d52006-05-27 19:21:47 +000022952 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022953int
22954main ()
22955{
Thomas Wouters477c8d52006-05-27 19:21:47 +000022956static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000022957test_array [0] = 0
22958
22959 ;
22960 return 0;
22961}
22962_ACEOF
22963rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000022964if { (ac_try="$ac_compile"
22965case "(($ac_try" in
22966 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22967 *) ac_try_echo=$ac_try;;
22968esac
22969eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22970 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022971 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022972 grep -v '^ *+' conftest.er1 >conftest.err
22973 rm -f conftest.er1
22974 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022975 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22976 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000022977 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
22978 { (case "(($ac_try" in
22979 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22980 *) ac_try_echo=$ac_try;;
22981esac
22982eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22983 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000022984 ac_status=$?
22985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22986 (exit $ac_status); }; } &&
22987 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000022988 { (case "(($ac_try" in
22989 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22990 *) ac_try_echo=$ac_try;;
22991esac
22992eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22993 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022994 ac_status=$?
22995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22996 (exit $ac_status); }; }; then
22997 ac_hi=-1 ac_mid=-1
22998 while :; do
22999 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023000/* confdefs.h. */
23001_ACEOF
23002cat confdefs.h >>conftest.$ac_ext
23003cat >>conftest.$ac_ext <<_ACEOF
23004/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023005#include <wchar.h>
23006
Thomas Wouters477c8d52006-05-27 19:21:47 +000023007 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000023008int
23009main ()
23010{
Thomas Wouters477c8d52006-05-27 19:21:47 +000023011static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000023012test_array [0] = 0
23013
23014 ;
23015 return 0;
23016}
23017_ACEOF
23018rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023019if { (ac_try="$ac_compile"
23020case "(($ac_try" in
23021 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23022 *) ac_try_echo=$ac_try;;
23023esac
23024eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23025 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023026 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023027 grep -v '^ *+' conftest.er1 >conftest.err
23028 rm -f conftest.er1
23029 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23031 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023032 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
23033 { (case "(($ac_try" in
23034 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23035 *) ac_try_echo=$ac_try;;
23036esac
23037eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23038 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000023039 ac_status=$?
23040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23041 (exit $ac_status); }; } &&
23042 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023043 { (case "(($ac_try" in
23044 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23045 *) ac_try_echo=$ac_try;;
23046esac
23047eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23048 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023049 ac_status=$?
23050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23051 (exit $ac_status); }; }; then
23052 ac_lo=$ac_mid; break
23053else
23054 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023055sed 's/^/| /' conftest.$ac_ext >&5
23056
Thomas Wouters477c8d52006-05-27 19:21:47 +000023057 ac_hi=`expr '(' $ac_mid ')' - 1`
23058 if test $ac_mid -le $ac_hi; then
23059 ac_lo= ac_hi=
23060 break
23061 fi
23062 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000023063fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000023064
Skip Montanarof0d5f792004-08-15 14:08:23 +000023065rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023066 done
23067else
23068 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023069sed 's/^/| /' conftest.$ac_ext >&5
23070
Thomas Wouters477c8d52006-05-27 19:21:47 +000023071 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000023072fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000023073
Skip Montanarof0d5f792004-08-15 14:08:23 +000023074rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023075fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000023076
Skip Montanarof0d5f792004-08-15 14:08:23 +000023077rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023078# Binary search between lo and hi bounds.
23079while test "x$ac_lo" != "x$ac_hi"; do
23080 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
23081 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023082/* confdefs.h. */
23083_ACEOF
23084cat confdefs.h >>conftest.$ac_ext
23085cat >>conftest.$ac_ext <<_ACEOF
23086/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023087#include <wchar.h>
23088
Thomas Wouters477c8d52006-05-27 19:21:47 +000023089 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000023090int
23091main ()
23092{
Thomas Wouters477c8d52006-05-27 19:21:47 +000023093static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000023094test_array [0] = 0
23095
23096 ;
23097 return 0;
23098}
23099_ACEOF
23100rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023101if { (ac_try="$ac_compile"
23102case "(($ac_try" in
23103 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23104 *) ac_try_echo=$ac_try;;
23105esac
23106eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23107 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023108 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023109 grep -v '^ *+' conftest.er1 >conftest.err
23110 rm -f conftest.er1
23111 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23113 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023114 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
23115 { (case "(($ac_try" in
23116 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23117 *) ac_try_echo=$ac_try;;
23118esac
23119eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23120 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000023121 ac_status=$?
23122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23123 (exit $ac_status); }; } &&
23124 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023125 { (case "(($ac_try" in
23126 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23127 *) ac_try_echo=$ac_try;;
23128esac
23129eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23130 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023131 ac_status=$?
23132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23133 (exit $ac_status); }; }; then
23134 ac_hi=$ac_mid
23135else
23136 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023137sed 's/^/| /' conftest.$ac_ext >&5
23138
Thomas Wouters477c8d52006-05-27 19:21:47 +000023139 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000023140fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000023141
Skip Montanarof0d5f792004-08-15 14:08:23 +000023142rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023143done
23144case $ac_lo in
23145?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Thomas Wouters477c8d52006-05-27 19:21:47 +000023146'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000023147See \`config.log' for more details." >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000023148echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000023149See \`config.log' for more details." >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +000023150 { (exit 77); exit 77; }; } ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000023151esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023152else
Martin v. Löwis11437992002-04-12 09:54:03 +000023153 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023154/* confdefs.h. */
23155_ACEOF
23156cat confdefs.h >>conftest.$ac_ext
23157cat >>conftest.$ac_ext <<_ACEOF
23158/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023159#include <wchar.h>
23160
Thomas Wouters477c8d52006-05-27 19:21:47 +000023161 typedef wchar_t ac__type_sizeof_;
23162static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
23163static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000023164#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023165#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023166int
23167main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023168{
Martin v. Löwis11437992002-04-12 09:54:03 +000023169
23170 FILE *f = fopen ("conftest.val", "w");
23171 if (! f)
Thomas Wouters477c8d52006-05-27 19:21:47 +000023172 return 1;
23173 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000023174 {
Thomas Wouters477c8d52006-05-27 19:21:47 +000023175 long int i = longval ();
23176 if (i != ((long int) (sizeof (ac__type_sizeof_))))
23177 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000023178 fprintf (f, "%ld\n", i);
23179 }
23180 else
23181 {
Thomas Wouters477c8d52006-05-27 19:21:47 +000023182 unsigned long int i = ulongval ();
23183 if (i != ((long int) (sizeof (ac__type_sizeof_))))
23184 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000023185 fprintf (f, "%lu\n", i);
23186 }
Thomas Wouters477c8d52006-05-27 19:21:47 +000023187 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000023188
23189 ;
23190 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000023191}
Martin v. Löwis11437992002-04-12 09:54:03 +000023192_ACEOF
23193rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023194if { (ac_try="$ac_link"
23195case "(($ac_try" in
23196 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23197 *) ac_try_echo=$ac_try;;
23198esac
23199eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23200 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023201 ac_status=$?
23202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23203 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023204 { (case "(($ac_try" in
23205 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23206 *) ac_try_echo=$ac_try;;
23207esac
23208eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23209 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023210 ac_status=$?
23211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23212 (exit $ac_status); }; }; then
23213 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000023214else
Martin v. Löwis11437992002-04-12 09:54:03 +000023215 echo "$as_me: program exited with status $ac_status" >&5
23216echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023217sed 's/^/| /' conftest.$ac_ext >&5
23218
Martin v. Löwis11437992002-04-12 09:54:03 +000023219( exit $ac_status )
Thomas Wouters477c8d52006-05-27 19:21:47 +000023220{ { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000023221See \`config.log' for more details." >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000023222echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000023223See \`config.log' for more details." >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +000023224 { (exit 77); exit 77; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023225fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000023226rm -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 +000023227fi
23228rm -f conftest.val
23229else
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023230 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +000023231fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000023232fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000023233{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
23234echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023235cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023236#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000023237_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023238
Michael W. Hudson54241132001-12-07 15:38:26 +000023239
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023240fi
23241
Thomas Wouters477c8d52006-05-27 19:21:47 +000023242{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
23243echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023244have_ucs4_tcl=no
23245cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023246/* confdefs.h. */
23247_ACEOF
23248cat confdefs.h >>conftest.$ac_ext
23249cat >>conftest.$ac_ext <<_ACEOF
23250/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023251
23252#include <tcl.h>
23253#if TCL_UTF_MAX != 6
23254# error "NOT UCS4_TCL"
23255#endif
23256int
23257main ()
23258{
23259
23260 ;
23261 return 0;
23262}
23263_ACEOF
23264rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023265if { (ac_try="$ac_compile"
23266case "(($ac_try" in
23267 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23268 *) ac_try_echo=$ac_try;;
23269esac
23270eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23271 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023272 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023273 grep -v '^ *+' conftest.er1 >conftest.err
23274 rm -f conftest.er1
23275 cat conftest.err >&5
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23277 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023278 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
23279 { (case "(($ac_try" in
23280 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23281 *) ac_try_echo=$ac_try;;
23282esac
23283eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23284 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000023285 ac_status=$?
23286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23287 (exit $ac_status); }; } &&
23288 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023289 { (case "(($ac_try" in
23290 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23291 *) ac_try_echo=$ac_try;;
23292esac
23293eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23294 (eval "$ac_try") 2>&5
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023295 ac_status=$?
23296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23297 (exit $ac_status); }; }; then
23298
23299
23300cat >>confdefs.h <<\_ACEOF
23301#define HAVE_UCS4_TCL 1
23302_ACEOF
23303
23304 have_ucs4_tcl=yes
23305
23306else
23307 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023308sed 's/^/| /' conftest.$ac_ext >&5
23309
Thomas Wouters477c8d52006-05-27 19:21:47 +000023310
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023311fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000023312
Skip Montanarof0d5f792004-08-15 14:08:23 +000023313rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000023314{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
23315echo "${ECHO_T}$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023316
Skip Montanaro6dead952003-09-25 14:50:04 +000023317# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023318if test "$wchar_h" = yes
23319then
23320 # check whether wchar_t is signed or not
Thomas Wouters477c8d52006-05-27 19:21:47 +000023321 { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
23322echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023323 if test "${ac_cv_wchar_t_signed+set}" = set; then
23324 echo $ECHO_N "(cached) $ECHO_C" >&6
23325else
23326
23327 if test "$cross_compiling" = yes; then
23328 ac_cv_wchar_t_signed=yes
23329else
23330 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023331/* confdefs.h. */
23332_ACEOF
23333cat confdefs.h >>conftest.$ac_ext
23334cat >>conftest.$ac_ext <<_ACEOF
23335/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023336
23337 #include <wchar.h>
23338 int main()
23339 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000023340 /* Success: exit code 0 */
23341 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023342 }
23343
23344_ACEOF
23345rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023346if { (ac_try="$ac_link"
23347case "(($ac_try" in
23348 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23349 *) ac_try_echo=$ac_try;;
23350esac
23351eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23352 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023353 ac_status=$?
23354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23355 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023356 { (case "(($ac_try" in
23357 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23358 *) ac_try_echo=$ac_try;;
23359esac
23360eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23361 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023362 ac_status=$?
23363 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23364 (exit $ac_status); }; }; then
23365 ac_cv_wchar_t_signed=yes
23366else
23367 echo "$as_me: program exited with status $ac_status" >&5
23368echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023369sed 's/^/| /' conftest.$ac_ext >&5
23370
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023371( exit $ac_status )
23372ac_cv_wchar_t_signed=no
23373fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000023374rm -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 +000023375fi
23376
Thomas Wouters477c8d52006-05-27 19:21:47 +000023377
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023378fi
23379
Thomas Wouters477c8d52006-05-27 19:21:47 +000023380 { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
23381echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
23382fi
23383
23384{ echo "$as_me:$LINENO: checking what type to use for unicode" >&5
23385echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6; }
23386# Check whether --enable-unicode was given.
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023387if test "${enable_unicode+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000023388 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023389else
23390 enable_unicode=yes
Thomas Wouters477c8d52006-05-27 19:21:47 +000023391fi
23392
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023393
23394if test $enable_unicode = yes
23395then
Martin v. Löwisfd917792001-06-27 20:22:04 +000023396 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023397 case "$have_ucs4_tcl" in
23398 yes) enable_unicode="ucs4"
23399 ;;
23400 *) enable_unicode="ucs2"
23401 ;;
23402 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023403fi
23404
Martin v. Löwis0036cba2002-04-12 09:58:45 +000023405
23406
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023407case "$enable_unicode" in
23408ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000023409 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023410#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000023411_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023412
23413 ;;
23414ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000023415 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023416#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000023417_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023418
23419 ;;
23420esac
23421
Michael W. Hudson54241132001-12-07 15:38:26 +000023422
Martin v. Löwis11437992002-04-12 09:54:03 +000023423
23424
Martin v. Löwis0036cba2002-04-12 09:58:45 +000023425
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023426if test "$enable_unicode" = "no"
23427then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000023428 UNICODE_OBJS=""
Thomas Wouters477c8d52006-05-27 19:21:47 +000023429 { echo "$as_me:$LINENO: result: not used" >&5
23430echo "${ECHO_T}not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023431else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000023432 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000023433
23434cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023435#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023436_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023437
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023438
23439 # wchar_t is only usable if it maps to an unsigned type
23440 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000023441 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023442 then
23443 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023444
Martin v. Löwis11437992002-04-12 09:54:03 +000023445cat >>confdefs.h <<\_ACEOF
23446#define HAVE_USABLE_WCHAR_T 1
23447_ACEOF
23448
23449 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023450#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000023451_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023452
23453 elif test "$ac_cv_sizeof_short" = "$unicode_size"
23454 then
23455 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000023456 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023457#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000023458_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023459
23460 elif test "$ac_cv_sizeof_long" = "$unicode_size"
23461 then
23462 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000023463 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023464#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000023465_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023466
23467 else
23468 PY_UNICODE_TYPE="no type found"
23469 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000023470 { echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
23471echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023472fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000023473
23474# check for endianness
Thomas Wouters477c8d52006-05-27 19:21:47 +000023475{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
23476echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023477if test "${ac_cv_c_bigendian+set}" = set; then
23478 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000023479else
Martin v. Löwis11437992002-04-12 09:54:03 +000023480 # See if sys/param.h defines the BYTE_ORDER macro.
23481cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023482/* confdefs.h. */
23483_ACEOF
23484cat confdefs.h >>conftest.$ac_ext
23485cat >>conftest.$ac_ext <<_ACEOF
23486/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000023487#include <sys/types.h>
23488#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000023489
Martin v. Löwis11437992002-04-12 09:54:03 +000023490int
23491main ()
23492{
Guido van Rossumef2255b2000-03-10 22:30:29 +000023493#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
23494 bogus endian macros
23495#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023496
23497 ;
23498 return 0;
23499}
23500_ACEOF
23501rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023502if { (ac_try="$ac_compile"
23503case "(($ac_try" in
23504 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23505 *) ac_try_echo=$ac_try;;
23506esac
23507eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23508 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023509 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023510 grep -v '^ *+' conftest.er1 >conftest.err
23511 rm -f conftest.er1
23512 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23514 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023515 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
23516 { (case "(($ac_try" in
23517 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23518 *) ac_try_echo=$ac_try;;
23519esac
23520eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23521 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000023522 ac_status=$?
23523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23524 (exit $ac_status); }; } &&
23525 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023526 { (case "(($ac_try" in
23527 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23528 *) ac_try_echo=$ac_try;;
23529esac
23530eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23531 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023532 ac_status=$?
23533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23534 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000023535 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000023536cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023537/* confdefs.h. */
23538_ACEOF
23539cat confdefs.h >>conftest.$ac_ext
23540cat >>conftest.$ac_ext <<_ACEOF
23541/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000023542#include <sys/types.h>
23543#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000023544
Martin v. Löwis11437992002-04-12 09:54:03 +000023545int
23546main ()
23547{
Guido van Rossumef2255b2000-03-10 22:30:29 +000023548#if BYTE_ORDER != BIG_ENDIAN
23549 not big endian
23550#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023551
23552 ;
23553 return 0;
23554}
23555_ACEOF
23556rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023557if { (ac_try="$ac_compile"
23558case "(($ac_try" in
23559 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23560 *) ac_try_echo=$ac_try;;
23561esac
23562eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23563 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023564 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023565 grep -v '^ *+' conftest.er1 >conftest.err
23566 rm -f conftest.er1
23567 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23569 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023570 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
23571 { (case "(($ac_try" in
23572 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23573 *) ac_try_echo=$ac_try;;
23574esac
23575eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23576 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000023577 ac_status=$?
23578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23579 (exit $ac_status); }; } &&
23580 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023581 { (case "(($ac_try" in
23582 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23583 *) ac_try_echo=$ac_try;;
23584esac
23585eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23586 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023587 ac_status=$?
23588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23589 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000023590 ac_cv_c_bigendian=yes
23591else
Martin v. Löwis11437992002-04-12 09:54:03 +000023592 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023593sed 's/^/| /' conftest.$ac_ext >&5
23594
Thomas Wouters477c8d52006-05-27 19:21:47 +000023595 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000023596fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000023597
Skip Montanarof0d5f792004-08-15 14:08:23 +000023598rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000023599else
Martin v. Löwis11437992002-04-12 09:54:03 +000023600 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023601sed 's/^/| /' conftest.$ac_ext >&5
23602
Thomas Wouters477c8d52006-05-27 19:21:47 +000023603 # It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000023604if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +000023605 # try to guess the endianness by grepping values into an object file
Martin v. Löwis11437992002-04-12 09:54:03 +000023606 ac_cv_c_bigendian=unknown
23607 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023608/* confdefs.h. */
23609_ACEOF
23610cat confdefs.h >>conftest.$ac_ext
23611cat >>conftest.$ac_ext <<_ACEOF
23612/* end confdefs.h. */
Thomas Wouters477c8d52006-05-27 19:21:47 +000023613short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
23614short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000023615void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000023616short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
23617short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000023618void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023619int
23620main ()
23621{
23622 _ascii (); _ebcdic ();
23623 ;
23624 return 0;
23625}
23626_ACEOF
23627rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023628if { (ac_try="$ac_compile"
23629case "(($ac_try" in
23630 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23631 *) ac_try_echo=$ac_try;;
23632esac
23633eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23634 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023635 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023636 grep -v '^ *+' conftest.er1 >conftest.err
23637 rm -f conftest.er1
23638 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23640 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023641 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
23642 { (case "(($ac_try" in
23643 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23644 *) ac_try_echo=$ac_try;;
23645esac
23646eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23647 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000023648 ac_status=$?
23649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23650 (exit $ac_status); }; } &&
23651 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023652 { (case "(($ac_try" in
23653 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23654 *) ac_try_echo=$ac_try;;
23655esac
23656eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23657 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023658 ac_status=$?
23659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23660 (exit $ac_status); }; }; then
Skip Montanaro6dead952003-09-25 14:50:04 +000023661 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023662 ac_cv_c_bigendian=yes
23663fi
Skip Montanaro6dead952003-09-25 14:50:04 +000023664if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023665 if test "$ac_cv_c_bigendian" = unknown; then
23666 ac_cv_c_bigendian=no
23667 else
23668 # finding both strings is unlikely to happen, but who knows?
23669 ac_cv_c_bigendian=unknown
23670 fi
23671fi
23672else
23673 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023674sed 's/^/| /' conftest.$ac_ext >&5
23675
Thomas Wouters477c8d52006-05-27 19:21:47 +000023676
Martin v. Löwis11437992002-04-12 09:54:03 +000023677fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000023678
Skip Montanarof0d5f792004-08-15 14:08:23 +000023679rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023680else
23681 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023682/* confdefs.h. */
23683_ACEOF
23684cat confdefs.h >>conftest.$ac_ext
23685cat >>conftest.$ac_ext <<_ACEOF
23686/* end confdefs.h. */
Thomas Wouters477c8d52006-05-27 19:21:47 +000023687$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000023688int
23689main ()
23690{
Thomas Wouters477c8d52006-05-27 19:21:47 +000023691
Guido van Rossumef2255b2000-03-10 22:30:29 +000023692 /* Are we little or big endian? From Harbison&Steele. */
23693 union
23694 {
Thomas Wouters477c8d52006-05-27 19:21:47 +000023695 long int l;
23696 char c[sizeof (long int)];
Guido van Rossumef2255b2000-03-10 22:30:29 +000023697 } u;
23698 u.l = 1;
Thomas Wouters477c8d52006-05-27 19:21:47 +000023699 return u.c[sizeof (long int) - 1] == 1;
23700
23701 ;
23702 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000023703}
Martin v. Löwis11437992002-04-12 09:54:03 +000023704_ACEOF
23705rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023706if { (ac_try="$ac_link"
23707case "(($ac_try" in
23708 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23709 *) ac_try_echo=$ac_try;;
23710esac
23711eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23712 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023713 ac_status=$?
23714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23715 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023716 { (case "(($ac_try" in
23717 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23718 *) ac_try_echo=$ac_try;;
23719esac
23720eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23721 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023722 ac_status=$?
23723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23724 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000023725 ac_cv_c_bigendian=no
23726else
Martin v. Löwis11437992002-04-12 09:54:03 +000023727 echo "$as_me: program exited with status $ac_status" >&5
23728echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023729sed 's/^/| /' conftest.$ac_ext >&5
23730
Martin v. Löwis11437992002-04-12 09:54:03 +000023731( exit $ac_status )
23732ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000023733fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000023734rm -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 +000023735fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000023736
23737
Martin v. Löwis11437992002-04-12 09:54:03 +000023738fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000023739
Skip Montanarof0d5f792004-08-15 14:08:23 +000023740rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023741fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000023742{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
23743echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023744case $ac_cv_c_bigendian in
23745 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000023746
Martin v. Löwis11437992002-04-12 09:54:03 +000023747cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000023748#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023749_ACEOF
23750 ;;
23751 no)
23752 ;;
23753 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000023754 { { echo "$as_me:$LINENO: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000023755presetting ac_cv_c_bigendian=no (or yes) will help" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023756echo "$as_me: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000023757presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
23758 { (exit 1); exit 1; }; } ;;
23759esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000023760
Michael W. Hudson54241132001-12-07 15:38:26 +000023761
Thomas Wouters477c8d52006-05-27 19:21:47 +000023762
23763
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023764# Check whether right shifting a negative integer extends the sign bit
23765# or fills with zeros (like the Cray J90, according to Tim Peters).
Thomas Wouters477c8d52006-05-27 19:21:47 +000023766{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
23767echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023768if test "${ac_cv_rshift_extends_sign+set}" = set; then
23769 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000023770else
Martin v. Löwis11437992002-04-12 09:54:03 +000023771
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023772if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000023773 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023774else
Martin v. Löwis11437992002-04-12 09:54:03 +000023775 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023776/* confdefs.h. */
23777_ACEOF
23778cat confdefs.h >>conftest.$ac_ext
23779cat >>conftest.$ac_ext <<_ACEOF
23780/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023781
23782int main()
23783{
Vladimir Marangozova6180282000-07-12 05:05:06 +000023784 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023785}
23786
Martin v. Löwis11437992002-04-12 09:54:03 +000023787_ACEOF
23788rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023789if { (ac_try="$ac_link"
23790case "(($ac_try" in
23791 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23792 *) ac_try_echo=$ac_try;;
23793esac
23794eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23795 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023796 ac_status=$?
23797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23798 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023799 { (case "(($ac_try" in
23800 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23801 *) ac_try_echo=$ac_try;;
23802esac
23803eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23804 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023805 ac_status=$?
23806 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23807 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000023808 ac_cv_rshift_extends_sign=yes
23809else
Martin v. Löwis11437992002-04-12 09:54:03 +000023810 echo "$as_me: program exited with status $ac_status" >&5
23811echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023812sed 's/^/| /' conftest.$ac_ext >&5
23813
Martin v. Löwis11437992002-04-12 09:54:03 +000023814( exit $ac_status )
23815ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000023816fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000023817rm -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 +000023818fi
23819
Thomas Wouters477c8d52006-05-27 19:21:47 +000023820
23821fi
23822
23823{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
23824echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000023825if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023826then
Martin v. Löwis11437992002-04-12 09:54:03 +000023827
23828cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023829#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023830_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023831
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023832fi
23833
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023834# check for getc_unlocked and related locking functions
Thomas Wouters477c8d52006-05-27 19:21:47 +000023835{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
23836echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023837if test "${ac_cv_have_getc_unlocked+set}" = set; then
23838 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023839else
Martin v. Löwis11437992002-04-12 09:54:03 +000023840
23841cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023842/* confdefs.h. */
23843_ACEOF
23844cat confdefs.h >>conftest.$ac_ext
23845cat >>conftest.$ac_ext <<_ACEOF
23846/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023847#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023848int
23849main ()
23850{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023851
23852 FILE *f = fopen("/dev/null", "r");
23853 flockfile(f);
23854 getc_unlocked(f);
23855 funlockfile(f);
23856
Martin v. Löwis11437992002-04-12 09:54:03 +000023857 ;
23858 return 0;
23859}
23860_ACEOF
23861rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023862if { (ac_try="$ac_link"
23863case "(($ac_try" in
23864 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23865 *) ac_try_echo=$ac_try;;
23866esac
23867eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23868 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023869 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023870 grep -v '^ *+' conftest.er1 >conftest.err
23871 rm -f conftest.er1
23872 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23874 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023875 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
23876 { (case "(($ac_try" in
23877 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23878 *) ac_try_echo=$ac_try;;
23879esac
23880eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23881 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000023882 ac_status=$?
23883 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23884 (exit $ac_status); }; } &&
23885 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023886 { (case "(($ac_try" in
23887 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23888 *) ac_try_echo=$ac_try;;
23889esac
23890eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23891 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023892 ac_status=$?
23893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23894 (exit $ac_status); }; }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023895 ac_cv_have_getc_unlocked=yes
23896else
Martin v. Löwis11437992002-04-12 09:54:03 +000023897 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023898sed 's/^/| /' conftest.$ac_ext >&5
23899
Thomas Wouters477c8d52006-05-27 19:21:47 +000023900 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023901fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000023902
Skip Montanarof0d5f792004-08-15 14:08:23 +000023903rm -f conftest.err conftest.$ac_objext \
23904 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023905fi
23906
Thomas Wouters477c8d52006-05-27 19:21:47 +000023907{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
23908echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023909if test "$ac_cv_have_getc_unlocked" = yes
23910then
Martin v. Löwis11437992002-04-12 09:54:03 +000023911
23912cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023913#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023914_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023915
23916fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023917
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023918# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000023919# save the value of LIBS so we don't actually link Python with readline
23920LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023921
Thomas Wouters477c8d52006-05-27 19:21:47 +000023922{ echo "$as_me:$LINENO: checking for readline in -lreadline" >&5
23923echo $ECHO_N "checking for readline in -lreadline... $ECHO_C" >&6; }
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023924if test "${ac_cv_lib_readline_readline+set}" = set; then
23925 echo $ECHO_N "(cached) $ECHO_C" >&6
23926else
23927 ac_check_lib_save_LIBS=$LIBS
23928LIBS="-lreadline $LIBS"
23929cat >conftest.$ac_ext <<_ACEOF
23930/* confdefs.h. */
23931_ACEOF
23932cat confdefs.h >>conftest.$ac_ext
23933cat >>conftest.$ac_ext <<_ACEOF
23934/* end confdefs.h. */
23935
Thomas Wouters477c8d52006-05-27 19:21:47 +000023936/* Override any GCC internal prototype to avoid an error.
23937 Use char because int might match the return type of a GCC
23938 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023939#ifdef __cplusplus
23940extern "C"
23941#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023942char readline ();
23943int
23944main ()
23945{
Thomas Wouters477c8d52006-05-27 19:21:47 +000023946return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023947 ;
23948 return 0;
23949}
23950_ACEOF
23951rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023952if { (ac_try="$ac_link"
23953case "(($ac_try" in
23954 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23955 *) ac_try_echo=$ac_try;;
23956esac
23957eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23958 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023959 ac_status=$?
23960 grep -v '^ *+' conftest.er1 >conftest.err
23961 rm -f conftest.er1
23962 cat conftest.err >&5
23963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23964 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023965 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
23966 { (case "(($ac_try" in
23967 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23968 *) ac_try_echo=$ac_try;;
23969esac
23970eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23971 (eval "$ac_try") 2>&5
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023972 ac_status=$?
23973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23974 (exit $ac_status); }; } &&
23975 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023976 { (case "(($ac_try" in
23977 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23978 *) ac_try_echo=$ac_try;;
23979esac
23980eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23981 (eval "$ac_try") 2>&5
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023982 ac_status=$?
23983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23984 (exit $ac_status); }; }; then
23985 ac_cv_lib_readline_readline=yes
23986else
23987 echo "$as_me: failed program was:" >&5
23988sed 's/^/| /' conftest.$ac_ext >&5
23989
Thomas Wouters477c8d52006-05-27 19:21:47 +000023990 ac_cv_lib_readline_readline=no
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023991fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000023992
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023993rm -f conftest.err conftest.$ac_objext \
23994 conftest$ac_exeext conftest.$ac_ext
23995LIBS=$ac_check_lib_save_LIBS
23996fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000023997{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_readline" >&5
23998echo "${ECHO_T}$ac_cv_lib_readline_readline" >&6; }
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023999if test $ac_cv_lib_readline_readline = yes; then
24000 cat >>confdefs.h <<_ACEOF
24001#define HAVE_LIBREADLINE 1
24002_ACEOF
24003
24004 LIBS="-lreadline $LIBS"
24005
24006fi
24007
24008if test "$ac_cv_have_readline_readline" = no
24009then
24010
Thomas Wouters477c8d52006-05-27 19:21:47 +000024011{ echo "$as_me:$LINENO: checking for readline in -ltermcap" >&5
24012echo $ECHO_N "checking for readline in -ltermcap... $ECHO_C" >&6; }
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024013if test "${ac_cv_lib_termcap_readline+set}" = set; then
24014 echo $ECHO_N "(cached) $ECHO_C" >&6
24015else
24016 ac_check_lib_save_LIBS=$LIBS
24017LIBS="-ltermcap $LIBS"
24018cat >conftest.$ac_ext <<_ACEOF
24019/* confdefs.h. */
24020_ACEOF
24021cat confdefs.h >>conftest.$ac_ext
24022cat >>conftest.$ac_ext <<_ACEOF
24023/* end confdefs.h. */
24024
Thomas Wouters477c8d52006-05-27 19:21:47 +000024025/* Override any GCC internal prototype to avoid an error.
24026 Use char because int might match the return type of a GCC
24027 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024028#ifdef __cplusplus
24029extern "C"
24030#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024031char readline ();
24032int
24033main ()
24034{
Thomas Wouters477c8d52006-05-27 19:21:47 +000024035return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024036 ;
24037 return 0;
24038}
24039_ACEOF
24040rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024041if { (ac_try="$ac_link"
24042case "(($ac_try" in
24043 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24044 *) ac_try_echo=$ac_try;;
24045esac
24046eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24047 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024048 ac_status=$?
24049 grep -v '^ *+' conftest.er1 >conftest.err
24050 rm -f conftest.er1
24051 cat conftest.err >&5
24052 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24053 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024054 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
24055 { (case "(($ac_try" in
24056 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24057 *) ac_try_echo=$ac_try;;
24058esac
24059eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24060 (eval "$ac_try") 2>&5
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024061 ac_status=$?
24062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24063 (exit $ac_status); }; } &&
24064 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024065 { (case "(($ac_try" in
24066 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24067 *) ac_try_echo=$ac_try;;
24068esac
24069eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24070 (eval "$ac_try") 2>&5
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024071 ac_status=$?
24072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24073 (exit $ac_status); }; }; then
24074 ac_cv_lib_termcap_readline=yes
24075else
24076 echo "$as_me: failed program was:" >&5
24077sed 's/^/| /' conftest.$ac_ext >&5
24078
Thomas Wouters477c8d52006-05-27 19:21:47 +000024079 ac_cv_lib_termcap_readline=no
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024080fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000024081
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024082rm -f conftest.err conftest.$ac_objext \
24083 conftest$ac_exeext conftest.$ac_ext
24084LIBS=$ac_check_lib_save_LIBS
24085fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000024086{ echo "$as_me:$LINENO: result: $ac_cv_lib_termcap_readline" >&5
24087echo "${ECHO_T}$ac_cv_lib_termcap_readline" >&6; }
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024088if test $ac_cv_lib_termcap_readline = yes; then
24089 cat >>confdefs.h <<_ACEOF
24090#define HAVE_LIBTERMCAP 1
24091_ACEOF
24092
24093 LIBS="-ltermcap $LIBS"
24094
24095fi
24096
24097fi
24098
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024099# check for readline 2.1
Thomas Wouters477c8d52006-05-27 19:21:47 +000024100{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
24101echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024102if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
24103 echo $ECHO_N "(cached) $ECHO_C" >&6
24104else
24105 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024106LIBS="-lreadline $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024107cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024108/* confdefs.h. */
24109_ACEOF
24110cat confdefs.h >>conftest.$ac_ext
24111cat >>conftest.$ac_ext <<_ACEOF
24112/* end confdefs.h. */
24113
Thomas Wouters477c8d52006-05-27 19:21:47 +000024114/* Override any GCC internal prototype to avoid an error.
24115 Use char because int might match the return type of a GCC
24116 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024117#ifdef __cplusplus
24118extern "C"
24119#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024120char rl_callback_handler_install ();
24121int
24122main ()
24123{
Thomas Wouters477c8d52006-05-27 19:21:47 +000024124return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024125 ;
24126 return 0;
24127}
24128_ACEOF
24129rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024130if { (ac_try="$ac_link"
24131case "(($ac_try" in
24132 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24133 *) ac_try_echo=$ac_try;;
24134esac
24135eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24136 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024137 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024138 grep -v '^ *+' conftest.er1 >conftest.err
24139 rm -f conftest.er1
24140 cat conftest.err >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24142 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024143 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
24144 { (case "(($ac_try" in
24145 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24146 *) ac_try_echo=$ac_try;;
24147esac
24148eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24149 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000024150 ac_status=$?
24151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24152 (exit $ac_status); }; } &&
24153 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024154 { (case "(($ac_try" in
24155 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24156 *) ac_try_echo=$ac_try;;
24157esac
24158eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24159 (eval "$ac_try") 2>&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024160 ac_status=$?
24161 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24162 (exit $ac_status); }; }; then
24163 ac_cv_lib_readline_rl_callback_handler_install=yes
24164else
24165 echo "$as_me: failed program was:" >&5
24166sed 's/^/| /' conftest.$ac_ext >&5
24167
Thomas Wouters477c8d52006-05-27 19:21:47 +000024168 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024169fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000024170
Skip Montanarof0d5f792004-08-15 14:08:23 +000024171rm -f conftest.err conftest.$ac_objext \
24172 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024173LIBS=$ac_check_lib_save_LIBS
24174fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000024175{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
24176echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024177if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
24178
24179cat >>confdefs.h <<\_ACEOF
24180#define HAVE_RL_CALLBACK 1
24181_ACEOF
24182
24183fi
24184
24185
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024186# check for readline 2.2
24187cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024188/* confdefs.h. */
24189_ACEOF
24190cat confdefs.h >>conftest.$ac_ext
24191cat >>conftest.$ac_ext <<_ACEOF
24192/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024193#include <readline/readline.h>
24194_ACEOF
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024195if { (ac_try="$ac_cpp conftest.$ac_ext"
24196case "(($ac_try" in
24197 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24198 *) ac_try_echo=$ac_try;;
24199esac
24200eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24201 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024202 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000024203 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024204 rm -f conftest.er1
24205 cat conftest.err >&5
24206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24207 (exit $ac_status); } >/dev/null; then
24208 if test -s conftest.err; then
24209 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000024210 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024211 else
24212 ac_cpp_err=
24213 fi
24214else
24215 ac_cpp_err=yes
24216fi
24217if test -z "$ac_cpp_err"; then
24218 have_readline=yes
24219else
24220 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024221sed 's/^/| /' conftest.$ac_ext >&5
24222
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024223 have_readline=no
24224fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000024225
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024226rm -f conftest.err conftest.$ac_ext
24227if test $have_readline = yes
24228then
24229 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024230/* confdefs.h. */
24231_ACEOF
24232cat confdefs.h >>conftest.$ac_ext
24233cat >>conftest.$ac_ext <<_ACEOF
24234/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024235#include <readline/readline.h>
24236
24237_ACEOF
24238if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000024239 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024240
24241cat >>confdefs.h <<\_ACEOF
24242#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
24243_ACEOF
24244
24245fi
24246rm -f conftest*
24247
24248fi
24249
Martin v. Löwis0daad592001-09-30 21:09:59 +000024250# check for readline 4.0
Thomas Wouters477c8d52006-05-27 19:21:47 +000024251{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
24252echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024253if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
24254 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000024255else
Martin v. Löwis11437992002-04-12 09:54:03 +000024256 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024257LIBS="-lreadline $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000024258cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024259/* confdefs.h. */
24260_ACEOF
24261cat confdefs.h >>conftest.$ac_ext
24262cat >>conftest.$ac_ext <<_ACEOF
24263/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024264
Thomas Wouters477c8d52006-05-27 19:21:47 +000024265/* Override any GCC internal prototype to avoid an error.
24266 Use char because int might match the return type of a GCC
24267 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024268#ifdef __cplusplus
24269extern "C"
24270#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000024271char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000024272int
24273main ()
24274{
Thomas Wouters477c8d52006-05-27 19:21:47 +000024275return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000024276 ;
24277 return 0;
24278}
24279_ACEOF
24280rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024281if { (ac_try="$ac_link"
24282case "(($ac_try" in
24283 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24284 *) ac_try_echo=$ac_try;;
24285esac
24286eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24287 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024288 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024289 grep -v '^ *+' conftest.er1 >conftest.err
24290 rm -f conftest.er1
24291 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024292 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24293 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024294 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
24295 { (case "(($ac_try" in
24296 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24297 *) ac_try_echo=$ac_try;;
24298esac
24299eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24300 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000024301 ac_status=$?
24302 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24303 (exit $ac_status); }; } &&
24304 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024305 { (case "(($ac_try" in
24306 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24307 *) ac_try_echo=$ac_try;;
24308esac
24309eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24310 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024311 ac_status=$?
24312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24313 (exit $ac_status); }; }; then
24314 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000024315else
Martin v. Löwis11437992002-04-12 09:54:03 +000024316 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024317sed 's/^/| /' conftest.$ac_ext >&5
24318
Thomas Wouters477c8d52006-05-27 19:21:47 +000024319 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000024320fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000024321
Skip Montanarof0d5f792004-08-15 14:08:23 +000024322rm -f conftest.err conftest.$ac_objext \
24323 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024324LIBS=$ac_check_lib_save_LIBS
24325fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000024326{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
24327echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024328if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000024329
Martin v. Löwis11437992002-04-12 09:54:03 +000024330cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000024331#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024332_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000024333
Martin v. Löwis0daad592001-09-30 21:09:59 +000024334fi
24335
Michael W. Hudson54241132001-12-07 15:38:26 +000024336
Martin v. Löwis0daad592001-09-30 21:09:59 +000024337# check for readline 4.2
Thomas Wouters477c8d52006-05-27 19:21:47 +000024338{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
24339echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024340if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
24341 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000024342else
Martin v. Löwis11437992002-04-12 09:54:03 +000024343 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024344LIBS="-lreadline $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000024345cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024346/* confdefs.h. */
24347_ACEOF
24348cat confdefs.h >>conftest.$ac_ext
24349cat >>conftest.$ac_ext <<_ACEOF
24350/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024351
Thomas Wouters477c8d52006-05-27 19:21:47 +000024352/* Override any GCC internal prototype to avoid an error.
24353 Use char because int might match the return type of a GCC
24354 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024355#ifdef __cplusplus
24356extern "C"
24357#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000024358char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000024359int
24360main ()
24361{
Thomas Wouters477c8d52006-05-27 19:21:47 +000024362return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000024363 ;
24364 return 0;
24365}
24366_ACEOF
24367rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024368if { (ac_try="$ac_link"
24369case "(($ac_try" in
24370 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24371 *) ac_try_echo=$ac_try;;
24372esac
24373eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24374 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024375 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024376 grep -v '^ *+' conftest.er1 >conftest.err
24377 rm -f conftest.er1
24378 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024379 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24380 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024381 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
24382 { (case "(($ac_try" in
24383 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24384 *) ac_try_echo=$ac_try;;
24385esac
24386eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24387 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000024388 ac_status=$?
24389 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24390 (exit $ac_status); }; } &&
24391 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024392 { (case "(($ac_try" in
24393 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24394 *) ac_try_echo=$ac_try;;
24395esac
24396eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24397 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024398 ac_status=$?
24399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24400 (exit $ac_status); }; }; then
24401 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000024402else
Martin v. Löwis11437992002-04-12 09:54:03 +000024403 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024404sed 's/^/| /' conftest.$ac_ext >&5
24405
Thomas Wouters477c8d52006-05-27 19:21:47 +000024406 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000024407fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000024408
Skip Montanarof0d5f792004-08-15 14:08:23 +000024409rm -f conftest.err conftest.$ac_objext \
24410 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024411LIBS=$ac_check_lib_save_LIBS
24412fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000024413{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
24414echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024415if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000024416
Martin v. Löwis11437992002-04-12 09:54:03 +000024417cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000024418#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024419_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000024420
Guido van Rossum353ae582001-07-10 16:45:32 +000024421fi
24422
Jack Jansendd19cf82001-12-06 22:36:17 +000024423
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024424# also in readline 4.2
24425cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024426/* confdefs.h. */
24427_ACEOF
24428cat confdefs.h >>conftest.$ac_ext
24429cat >>conftest.$ac_ext <<_ACEOF
24430/* end confdefs.h. */
24431#include <readline/readline.h>
24432_ACEOF
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024433if { (ac_try="$ac_cpp conftest.$ac_ext"
24434case "(($ac_try" in
24435 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24436 *) ac_try_echo=$ac_try;;
24437esac
24438eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24439 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024440 ac_status=$?
24441 grep -v '^ *+' conftest.er1 >conftest.err
24442 rm -f conftest.er1
24443 cat conftest.err >&5
24444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24445 (exit $ac_status); } >/dev/null; then
24446 if test -s conftest.err; then
24447 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000024448 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024449 else
24450 ac_cpp_err=
24451 fi
24452else
24453 ac_cpp_err=yes
24454fi
24455if test -z "$ac_cpp_err"; then
24456 have_readline=yes
24457else
24458 echo "$as_me: failed program was:" >&5
24459sed 's/^/| /' conftest.$ac_ext >&5
24460
24461 have_readline=no
24462fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000024463
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024464rm -f conftest.err conftest.$ac_ext
24465if test $have_readline = yes
24466then
24467 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024468/* confdefs.h. */
24469_ACEOF
24470cat confdefs.h >>conftest.$ac_ext
24471cat >>conftest.$ac_ext <<_ACEOF
24472/* end confdefs.h. */
24473#include <readline/readline.h>
24474
24475_ACEOF
24476if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
24477 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
24478
24479cat >>confdefs.h <<\_ACEOF
24480#define HAVE_RL_CATCH_SIGNAL 1
24481_ACEOF
24482
24483fi
24484rm -f conftest*
24485
24486fi
24487
Martin v. Löwis82bca632006-02-10 20:49:30 +000024488# End of readline checks: restore LIBS
24489LIBS=$LIBS_no_readline
24490
Thomas Wouters477c8d52006-05-27 19:21:47 +000024491{ echo "$as_me:$LINENO: checking for broken nice()" >&5
24492echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024493if test "${ac_cv_broken_nice+set}" = set; then
24494 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000024495else
Martin v. Löwis11437992002-04-12 09:54:03 +000024496
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024497if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000024498 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024499else
Martin v. Löwis11437992002-04-12 09:54:03 +000024500 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024501/* confdefs.h. */
24502_ACEOF
24503cat confdefs.h >>conftest.$ac_ext
24504cat >>conftest.$ac_ext <<_ACEOF
24505/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024506
24507int main()
24508{
24509 int val1 = nice(1);
24510 if (val1 != -1 && val1 == nice(2))
24511 exit(0);
24512 exit(1);
24513}
24514
Martin v. Löwis11437992002-04-12 09:54:03 +000024515_ACEOF
24516rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024517if { (ac_try="$ac_link"
24518case "(($ac_try" in
24519 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24520 *) ac_try_echo=$ac_try;;
24521esac
24522eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24523 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024524 ac_status=$?
24525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24526 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024527 { (case "(($ac_try" in
24528 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24529 *) ac_try_echo=$ac_try;;
24530esac
24531eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24532 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024533 ac_status=$?
24534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24535 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024536 ac_cv_broken_nice=yes
24537else
Martin v. Löwis11437992002-04-12 09:54:03 +000024538 echo "$as_me: program exited with status $ac_status" >&5
24539echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024540sed 's/^/| /' conftest.$ac_ext >&5
24541
Martin v. Löwis11437992002-04-12 09:54:03 +000024542( exit $ac_status )
24543ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024544fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000024545rm -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 +000024546fi
24547
Thomas Wouters477c8d52006-05-27 19:21:47 +000024548
24549fi
24550
24551{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
24552echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024553if test "$ac_cv_broken_nice" = yes
24554then
Martin v. Löwis11437992002-04-12 09:54:03 +000024555
24556cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024557#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024558_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024559
24560fi
24561
Thomas Wouters477c8d52006-05-27 19:21:47 +000024562{ echo "$as_me:$LINENO: checking for broken poll()" >&5
24563echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024564if test "$cross_compiling" = yes; then
24565 ac_cv_broken_poll=no
24566else
24567 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024568/* confdefs.h. */
24569_ACEOF
24570cat confdefs.h >>conftest.$ac_ext
24571cat >>conftest.$ac_ext <<_ACEOF
24572/* end confdefs.h. */
24573
24574#include <poll.h>
24575
24576int main (void)
24577 {
24578 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
24579
24580 close (42);
24581
24582 int poll_test = poll (&poll_struct, 1, 0);
24583
24584 if (poll_test < 0)
24585 {
24586 exit(0);
24587 }
24588 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
24589 {
24590 exit(0);
24591 }
24592 else
24593 {
24594 exit(1);
24595 }
24596 }
24597
24598_ACEOF
24599rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024600if { (ac_try="$ac_link"
24601case "(($ac_try" in
24602 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24603 *) ac_try_echo=$ac_try;;
24604esac
24605eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24606 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024607 ac_status=$?
24608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24609 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024610 { (case "(($ac_try" in
24611 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24612 *) ac_try_echo=$ac_try;;
24613esac
24614eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24615 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024616 ac_status=$?
24617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24618 (exit $ac_status); }; }; then
24619 ac_cv_broken_poll=yes
24620else
24621 echo "$as_me: program exited with status $ac_status" >&5
24622echo "$as_me: failed program was:" >&5
24623sed 's/^/| /' conftest.$ac_ext >&5
24624
24625( exit $ac_status )
24626ac_cv_broken_poll=no
24627fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000024628rm -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 +000024629fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000024630
24631
24632{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
24633echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024634if test "$ac_cv_broken_poll" = yes
24635then
24636
24637cat >>confdefs.h <<\_ACEOF
24638#define HAVE_BROKEN_POLL 1
24639_ACEOF
24640
24641fi
24642
Brett Cannon43802422005-02-10 20:48:03 +000024643# 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 +000024644# (which is not required by ISO C or UNIX spec) and/or if we support
24645# tzname[]
Thomas Wouters477c8d52006-05-27 19:21:47 +000024646{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
24647echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000024648if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
24649 echo $ECHO_N "(cached) $ECHO_C" >&6
24650else
24651 cat >conftest.$ac_ext <<_ACEOF
24652/* confdefs.h. */
24653_ACEOF
24654cat confdefs.h >>conftest.$ac_ext
24655cat >>conftest.$ac_ext <<_ACEOF
24656/* end confdefs.h. */
24657#include <sys/types.h>
24658#include <$ac_cv_struct_tm>
24659
24660
24661int
24662main ()
24663{
24664static struct tm ac_aggr;
24665if (ac_aggr.tm_zone)
24666return 0;
24667 ;
24668 return 0;
24669}
24670_ACEOF
24671rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024672if { (ac_try="$ac_compile"
24673case "(($ac_try" in
24674 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24675 *) ac_try_echo=$ac_try;;
24676esac
24677eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24678 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000024679 ac_status=$?
24680 grep -v '^ *+' conftest.er1 >conftest.err
24681 rm -f conftest.er1
24682 cat conftest.err >&5
24683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24684 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024685 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
24686 { (case "(($ac_try" in
24687 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24688 *) ac_try_echo=$ac_try;;
24689esac
24690eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24691 (eval "$ac_try") 2>&5
Brett Cannon43802422005-02-10 20:48:03 +000024692 ac_status=$?
24693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24694 (exit $ac_status); }; } &&
24695 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024696 { (case "(($ac_try" in
24697 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24698 *) ac_try_echo=$ac_try;;
24699esac
24700eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24701 (eval "$ac_try") 2>&5
Brett Cannon43802422005-02-10 20:48:03 +000024702 ac_status=$?
24703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24704 (exit $ac_status); }; }; then
24705 ac_cv_member_struct_tm_tm_zone=yes
24706else
24707 echo "$as_me: failed program was:" >&5
24708sed 's/^/| /' conftest.$ac_ext >&5
24709
Thomas Wouters477c8d52006-05-27 19:21:47 +000024710 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000024711/* confdefs.h. */
24712_ACEOF
24713cat confdefs.h >>conftest.$ac_ext
24714cat >>conftest.$ac_ext <<_ACEOF
24715/* end confdefs.h. */
24716#include <sys/types.h>
24717#include <$ac_cv_struct_tm>
24718
24719
24720int
24721main ()
24722{
24723static struct tm ac_aggr;
24724if (sizeof ac_aggr.tm_zone)
24725return 0;
24726 ;
24727 return 0;
24728}
24729_ACEOF
24730rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024731if { (ac_try="$ac_compile"
24732case "(($ac_try" in
24733 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24734 *) ac_try_echo=$ac_try;;
24735esac
24736eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24737 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000024738 ac_status=$?
24739 grep -v '^ *+' conftest.er1 >conftest.err
24740 rm -f conftest.er1
24741 cat conftest.err >&5
24742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24743 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024744 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
24745 { (case "(($ac_try" in
24746 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24747 *) ac_try_echo=$ac_try;;
24748esac
24749eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24750 (eval "$ac_try") 2>&5
Brett Cannon43802422005-02-10 20:48:03 +000024751 ac_status=$?
24752 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24753 (exit $ac_status); }; } &&
24754 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024755 { (case "(($ac_try" in
24756 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24757 *) ac_try_echo=$ac_try;;
24758esac
24759eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24760 (eval "$ac_try") 2>&5
Brett Cannon43802422005-02-10 20:48:03 +000024761 ac_status=$?
24762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24763 (exit $ac_status); }; }; then
24764 ac_cv_member_struct_tm_tm_zone=yes
24765else
24766 echo "$as_me: failed program was:" >&5
24767sed 's/^/| /' conftest.$ac_ext >&5
24768
Thomas Wouters477c8d52006-05-27 19:21:47 +000024769 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000024770fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000024771
Brett Cannon43802422005-02-10 20:48:03 +000024772rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
24773fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000024774
Brett Cannon43802422005-02-10 20:48:03 +000024775rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
24776fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000024777{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
24778echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000024779if test $ac_cv_member_struct_tm_tm_zone = yes; then
24780
24781cat >>confdefs.h <<_ACEOF
24782#define HAVE_STRUCT_TM_TM_ZONE 1
24783_ACEOF
24784
24785
24786fi
24787
24788if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
24789
24790cat >>confdefs.h <<\_ACEOF
24791#define HAVE_TM_ZONE 1
24792_ACEOF
24793
24794else
Thomas Wouters477c8d52006-05-27 19:21:47 +000024795 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
24796echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
24797if test "${ac_cv_have_decl_tzname+set}" = set; then
24798 echo $ECHO_N "(cached) $ECHO_C" >&6
24799else
24800 cat >conftest.$ac_ext <<_ACEOF
24801/* confdefs.h. */
24802_ACEOF
24803cat confdefs.h >>conftest.$ac_ext
24804cat >>conftest.$ac_ext <<_ACEOF
24805/* end confdefs.h. */
24806#include <time.h>
24807
24808int
24809main ()
24810{
24811#ifndef tzname
24812 char *p = (char *) tzname;
24813 return !p;
24814#endif
24815
24816 ;
24817 return 0;
24818}
24819_ACEOF
24820rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024821if { (ac_try="$ac_compile"
24822case "(($ac_try" in
24823 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24824 *) ac_try_echo=$ac_try;;
24825esac
24826eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24827 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters477c8d52006-05-27 19:21:47 +000024828 ac_status=$?
24829 grep -v '^ *+' conftest.er1 >conftest.err
24830 rm -f conftest.er1
24831 cat conftest.err >&5
24832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24833 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024834 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
24835 { (case "(($ac_try" in
24836 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24837 *) ac_try_echo=$ac_try;;
24838esac
24839eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24840 (eval "$ac_try") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000024841 ac_status=$?
24842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24843 (exit $ac_status); }; } &&
24844 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024845 { (case "(($ac_try" in
24846 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24847 *) ac_try_echo=$ac_try;;
24848esac
24849eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24850 (eval "$ac_try") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000024851 ac_status=$?
24852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24853 (exit $ac_status); }; }; then
24854 ac_cv_have_decl_tzname=yes
24855else
24856 echo "$as_me: failed program was:" >&5
24857sed 's/^/| /' conftest.$ac_ext >&5
24858
24859 ac_cv_have_decl_tzname=no
24860fi
24861
24862rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
24863fi
24864{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
24865echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
24866if test $ac_cv_have_decl_tzname = yes; then
24867
24868cat >>confdefs.h <<_ACEOF
24869#define HAVE_DECL_TZNAME 1
24870_ACEOF
24871
24872
24873else
24874 cat >>confdefs.h <<_ACEOF
24875#define HAVE_DECL_TZNAME 0
24876_ACEOF
24877
24878
24879fi
24880
24881
24882 { echo "$as_me:$LINENO: checking for tzname" >&5
24883echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000024884if test "${ac_cv_var_tzname+set}" = set; then
24885 echo $ECHO_N "(cached) $ECHO_C" >&6
24886else
24887 cat >conftest.$ac_ext <<_ACEOF
24888/* confdefs.h. */
24889_ACEOF
24890cat confdefs.h >>conftest.$ac_ext
24891cat >>conftest.$ac_ext <<_ACEOF
24892/* end confdefs.h. */
24893#include <time.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +000024894#if !HAVE_DECL_TZNAME
24895extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000024896#endif
24897
24898int
24899main ()
24900{
Thomas Wouters477c8d52006-05-27 19:21:47 +000024901return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000024902 ;
24903 return 0;
24904}
24905_ACEOF
24906rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024907if { (ac_try="$ac_link"
24908case "(($ac_try" in
24909 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24910 *) ac_try_echo=$ac_try;;
24911esac
24912eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24913 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000024914 ac_status=$?
24915 grep -v '^ *+' conftest.er1 >conftest.err
24916 rm -f conftest.er1
24917 cat conftest.err >&5
24918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24919 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024920 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
24921 { (case "(($ac_try" in
24922 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24923 *) ac_try_echo=$ac_try;;
24924esac
24925eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24926 (eval "$ac_try") 2>&5
Brett Cannon43802422005-02-10 20:48:03 +000024927 ac_status=$?
24928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24929 (exit $ac_status); }; } &&
24930 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024931 { (case "(($ac_try" in
24932 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24933 *) ac_try_echo=$ac_try;;
24934esac
24935eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24936 (eval "$ac_try") 2>&5
Brett Cannon43802422005-02-10 20:48:03 +000024937 ac_status=$?
24938 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24939 (exit $ac_status); }; }; then
24940 ac_cv_var_tzname=yes
24941else
24942 echo "$as_me: failed program was:" >&5
24943sed 's/^/| /' conftest.$ac_ext >&5
24944
Thomas Wouters477c8d52006-05-27 19:21:47 +000024945 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000024946fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000024947
Brett Cannon43802422005-02-10 20:48:03 +000024948rm -f conftest.err conftest.$ac_objext \
24949 conftest$ac_exeext conftest.$ac_ext
24950fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000024951{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
24952echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000024953 if test $ac_cv_var_tzname = yes; then
24954
24955cat >>confdefs.h <<\_ACEOF
24956#define HAVE_TZNAME 1
24957_ACEOF
24958
24959 fi
24960fi
24961
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024962
Martin v. Löwis1d459062005-03-14 21:23:33 +000024963# check tzset(3) exists and works like we expect it to
Thomas Wouters477c8d52006-05-27 19:21:47 +000024964{ echo "$as_me:$LINENO: checking for working tzset()" >&5
24965echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024966if test "${ac_cv_working_tzset+set}" = set; then
24967 echo $ECHO_N "(cached) $ECHO_C" >&6
24968else
24969
24970if test "$cross_compiling" = yes; then
24971 ac_cv_working_tzset=no
24972else
24973 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024974/* confdefs.h. */
24975_ACEOF
24976cat confdefs.h >>conftest.$ac_ext
24977cat >>conftest.$ac_ext <<_ACEOF
24978/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024979
24980#include <stdlib.h>
24981#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000024982#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000024983
24984#if HAVE_TZNAME
24985extern char *tzname[];
24986#endif
24987
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024988int main()
24989{
Brett Cannon18367812003-09-19 00:59:16 +000024990 /* Note that we need to ensure that not only does tzset(3)
24991 do 'something' with localtime, but it works as documented
24992 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000024993 This includes making sure that tzname is set properly if
24994 tm->tm_zone does not exist since it is the alternative way
24995 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000024996
24997 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000024998 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000024999 */
25000
Martin v. Löwis1d459062005-03-14 21:23:33 +000025001 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000025002 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
25003
Neal Norwitz7f2588c2003-04-11 15:35:53 +000025004 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025005 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000025006 if (localtime(&groundhogday)->tm_hour != 0)
25007 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025008#if HAVE_TZNAME
25009 /* For UTC, tzname[1] is sometimes "", sometimes " " */
25010 if (strcmp(tzname[0], "UTC") ||
25011 (tzname[1][0] != 0 && tzname[1][0] != ' '))
25012 exit(1);
25013#endif
Brett Cannon18367812003-09-19 00:59:16 +000025014
Neal Norwitz7f2588c2003-04-11 15:35:53 +000025015 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025016 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000025017 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025018 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025019#if HAVE_TZNAME
25020 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
25021 exit(1);
25022#endif
Brett Cannon18367812003-09-19 00:59:16 +000025023
25024 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
25025 tzset();
25026 if (localtime(&groundhogday)->tm_hour != 11)
25027 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025028#if HAVE_TZNAME
25029 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
25030 exit(1);
25031#endif
25032
25033#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000025034 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
25035 exit(1);
25036 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
25037 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025038#endif
Brett Cannon18367812003-09-19 00:59:16 +000025039
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025040 exit(0);
25041}
25042
25043_ACEOF
25044rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000025045if { (ac_try="$ac_link"
25046case "(($ac_try" in
25047 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25048 *) ac_try_echo=$ac_try;;
25049esac
25050eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25051 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025052 ac_status=$?
25053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25054 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000025055 { (case "(($ac_try" in
25056 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25057 *) ac_try_echo=$ac_try;;
25058esac
25059eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25060 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025061 ac_status=$?
25062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25063 (exit $ac_status); }; }; then
25064 ac_cv_working_tzset=yes
25065else
25066 echo "$as_me: program exited with status $ac_status" >&5
25067echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025068sed 's/^/| /' conftest.$ac_ext >&5
25069
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025070( exit $ac_status )
25071ac_cv_working_tzset=no
25072fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000025073rm -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 +000025074fi
25075
Thomas Wouters477c8d52006-05-27 19:21:47 +000025076
25077fi
25078
25079{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
25080echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025081if test "$ac_cv_working_tzset" = yes
25082then
25083
25084cat >>confdefs.h <<\_ACEOF
25085#define HAVE_WORKING_TZSET 1
25086_ACEOF
25087
25088fi
25089
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025090# Look for subsecond timestamps in struct stat
Thomas Wouters477c8d52006-05-27 19:21:47 +000025091{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
25092echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025093if test "${ac_cv_stat_tv_nsec+set}" = set; then
25094 echo $ECHO_N "(cached) $ECHO_C" >&6
25095else
25096 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025097/* confdefs.h. */
25098_ACEOF
25099cat confdefs.h >>conftest.$ac_ext
25100cat >>conftest.$ac_ext <<_ACEOF
25101/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025102#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025103int
25104main ()
25105{
25106
25107struct stat st;
25108st.st_mtim.tv_nsec = 1;
25109
25110 ;
25111 return 0;
25112}
25113_ACEOF
25114rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000025115if { (ac_try="$ac_compile"
25116case "(($ac_try" in
25117 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25118 *) ac_try_echo=$ac_try;;
25119esac
25120eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25121 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025122 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025123 grep -v '^ *+' conftest.er1 >conftest.err
25124 rm -f conftest.er1
25125 cat conftest.err >&5
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25127 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000025128 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
25129 { (case "(($ac_try" in
25130 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25131 *) ac_try_echo=$ac_try;;
25132esac
25133eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25134 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000025135 ac_status=$?
25136 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25137 (exit $ac_status); }; } &&
25138 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000025139 { (case "(($ac_try" in
25140 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25141 *) ac_try_echo=$ac_try;;
25142esac
25143eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25144 (eval "$ac_try") 2>&5
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025145 ac_status=$?
25146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25147 (exit $ac_status); }; }; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000025148 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025149else
25150 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025151sed 's/^/| /' conftest.$ac_ext >&5
25152
Thomas Wouters477c8d52006-05-27 19:21:47 +000025153 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025154fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000025155
Skip Montanarof0d5f792004-08-15 14:08:23 +000025156rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025157fi
25158
Thomas Wouters477c8d52006-05-27 19:21:47 +000025159{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
25160echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025161if test "$ac_cv_stat_tv_nsec" = yes
25162then
25163
25164cat >>confdefs.h <<\_ACEOF
25165#define HAVE_STAT_TV_NSEC 1
25166_ACEOF
25167
25168fi
25169
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025170# Look for BSD style subsecond timestamps in struct stat
Thomas Wouters477c8d52006-05-27 19:21:47 +000025171{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
25172echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025173if test "${ac_cv_stat_tv_nsec2+set}" = set; then
25174 echo $ECHO_N "(cached) $ECHO_C" >&6
25175else
25176 cat >conftest.$ac_ext <<_ACEOF
25177/* confdefs.h. */
25178_ACEOF
25179cat confdefs.h >>conftest.$ac_ext
25180cat >>conftest.$ac_ext <<_ACEOF
25181/* end confdefs.h. */
25182#include <sys/stat.h>
25183int
25184main ()
25185{
25186
25187struct stat st;
25188st.st_mtimespec.tv_nsec = 1;
25189
25190 ;
25191 return 0;
25192}
25193_ACEOF
25194rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000025195if { (ac_try="$ac_compile"
25196case "(($ac_try" in
25197 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25198 *) ac_try_echo=$ac_try;;
25199esac
25200eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25201 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025202 ac_status=$?
25203 grep -v '^ *+' conftest.er1 >conftest.err
25204 rm -f conftest.er1
25205 cat conftest.err >&5
25206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25207 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000025208 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
25209 { (case "(($ac_try" in
25210 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25211 *) ac_try_echo=$ac_try;;
25212esac
25213eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25214 (eval "$ac_try") 2>&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025215 ac_status=$?
25216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25217 (exit $ac_status); }; } &&
25218 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000025219 { (case "(($ac_try" in
25220 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25221 *) ac_try_echo=$ac_try;;
25222esac
25223eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25224 (eval "$ac_try") 2>&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025225 ac_status=$?
25226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25227 (exit $ac_status); }; }; then
25228 ac_cv_stat_tv_nsec2=yes
25229else
25230 echo "$as_me: failed program was:" >&5
25231sed 's/^/| /' conftest.$ac_ext >&5
25232
Thomas Wouters477c8d52006-05-27 19:21:47 +000025233 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025234fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000025235
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025236rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
25237fi
25238
Thomas Wouters477c8d52006-05-27 19:21:47 +000025239{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
25240echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025241if test "$ac_cv_stat_tv_nsec2" = yes
25242then
25243
25244cat >>confdefs.h <<\_ACEOF
25245#define HAVE_STAT_TV_NSEC2 1
25246_ACEOF
25247
25248fi
25249
Jack Jansen666b1e72001-10-31 12:11:48 +000025250# On HP/UX 11.0, mvwdelch is a block with a return statement
Thomas Wouters477c8d52006-05-27 19:21:47 +000025251{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
25252echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025253if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
25254 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000025255else
Martin v. Löwis11437992002-04-12 09:54:03 +000025256 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025257/* confdefs.h. */
25258_ACEOF
25259cat confdefs.h >>conftest.$ac_ext
25260cat >>conftest.$ac_ext <<_ACEOF
25261/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000025262#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025263int
25264main ()
25265{
Jack Jansen666b1e72001-10-31 12:11:48 +000025266
25267 int rtn;
25268 rtn = mvwdelch(0,0,0);
25269
Martin v. Löwis11437992002-04-12 09:54:03 +000025270 ;
25271 return 0;
25272}
25273_ACEOF
25274rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000025275if { (ac_try="$ac_compile"
25276case "(($ac_try" in
25277 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25278 *) ac_try_echo=$ac_try;;
25279esac
25280eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25281 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025282 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025283 grep -v '^ *+' conftest.er1 >conftest.err
25284 rm -f conftest.er1
25285 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25287 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000025288 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
25289 { (case "(($ac_try" in
25290 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25291 *) ac_try_echo=$ac_try;;
25292esac
25293eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25294 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000025295 ac_status=$?
25296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25297 (exit $ac_status); }; } &&
25298 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000025299 { (case "(($ac_try" in
25300 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25301 *) ac_try_echo=$ac_try;;
25302esac
25303eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25304 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025305 ac_status=$?
25306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25307 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000025308 ac_cv_mvwdelch_is_expression=yes
25309else
Martin v. Löwis11437992002-04-12 09:54:03 +000025310 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025311sed 's/^/| /' conftest.$ac_ext >&5
25312
Thomas Wouters477c8d52006-05-27 19:21:47 +000025313 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000025314fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000025315
Skip Montanarof0d5f792004-08-15 14:08:23 +000025316rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000025317fi
25318
Thomas Wouters477c8d52006-05-27 19:21:47 +000025319{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
25320echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000025321
25322if test "$ac_cv_mvwdelch_is_expression" = yes
25323then
Martin v. Löwis11437992002-04-12 09:54:03 +000025324
25325cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000025326#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025327_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000025328
25329fi
25330
Thomas Wouters477c8d52006-05-27 19:21:47 +000025331{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
25332echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025333if test "${ac_cv_window_has_flags+set}" = set; then
25334 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000025335else
Martin v. Löwis11437992002-04-12 09:54:03 +000025336 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025337/* confdefs.h. */
25338_ACEOF
25339cat confdefs.h >>conftest.$ac_ext
25340cat >>conftest.$ac_ext <<_ACEOF
25341/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000025342#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025343int
25344main ()
25345{
Jack Jansen666b1e72001-10-31 12:11:48 +000025346
25347 WINDOW *w;
25348 w->_flags = 0;
25349
Martin v. Löwis11437992002-04-12 09:54:03 +000025350 ;
25351 return 0;
25352}
25353_ACEOF
25354rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000025355if { (ac_try="$ac_compile"
25356case "(($ac_try" in
25357 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25358 *) ac_try_echo=$ac_try;;
25359esac
25360eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25361 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025362 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025363 grep -v '^ *+' conftest.er1 >conftest.err
25364 rm -f conftest.er1
25365 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025366 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25367 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000025368 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
25369 { (case "(($ac_try" in
25370 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25371 *) ac_try_echo=$ac_try;;
25372esac
25373eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25374 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000025375 ac_status=$?
25376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25377 (exit $ac_status); }; } &&
25378 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000025379 { (case "(($ac_try" in
25380 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25381 *) ac_try_echo=$ac_try;;
25382esac
25383eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25384 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025385 ac_status=$?
25386 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25387 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000025388 ac_cv_window_has_flags=yes
25389else
Martin v. Löwis11437992002-04-12 09:54:03 +000025390 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025391sed 's/^/| /' conftest.$ac_ext >&5
25392
Thomas Wouters477c8d52006-05-27 19:21:47 +000025393 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000025394fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000025395
Skip Montanarof0d5f792004-08-15 14:08:23 +000025396rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000025397fi
25398
Thomas Wouters477c8d52006-05-27 19:21:47 +000025399{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
25400echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000025401
Jack Jansen666b1e72001-10-31 12:11:48 +000025402
25403if test "$ac_cv_window_has_flags" = yes
25404then
Martin v. Löwis11437992002-04-12 09:54:03 +000025405
25406cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000025407#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025408_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000025409
25410fi
25411
Thomas Wouters477c8d52006-05-27 19:21:47 +000025412{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
25413echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000025414
25415if test -e /dev/ptmx
25416then
Thomas Wouters477c8d52006-05-27 19:21:47 +000025417 { echo "$as_me:$LINENO: result: yes" >&5
25418echo "${ECHO_T}yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000025419
25420cat >>confdefs.h <<\_ACEOF
25421#define HAVE_DEV_PTMX 1
25422_ACEOF
25423
25424else
Thomas Wouters477c8d52006-05-27 19:21:47 +000025425 { echo "$as_me:$LINENO: result: no" >&5
25426echo "${ECHO_T}no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000025427fi
25428
Thomas Wouters477c8d52006-05-27 19:21:47 +000025429{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
25430echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000025431
25432if test -e /dev/ptc
25433then
Thomas Wouters477c8d52006-05-27 19:21:47 +000025434 { echo "$as_me:$LINENO: result: yes" >&5
25435echo "${ECHO_T}yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000025436
25437cat >>confdefs.h <<\_ACEOF
25438#define HAVE_DEV_PTC 1
25439_ACEOF
25440
25441else
Thomas Wouters477c8d52006-05-27 19:21:47 +000025442 { echo "$as_me:$LINENO: result: no" >&5
25443echo "${ECHO_T}no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000025444fi
25445
Thomas Wouters477c8d52006-05-27 19:21:47 +000025446{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
25447echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
25448if test "$cross_compiling" = yes; then
25449 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
25450See \`config.log' for more details." >&5
25451echo "$as_me: error: cannot run test program while cross compiling
25452See \`config.log' for more details." >&2;}
25453 { (exit 1); exit 1; }; }
25454else
25455 cat >conftest.$ac_ext <<_ACEOF
25456/* confdefs.h. */
25457_ACEOF
25458cat confdefs.h >>conftest.$ac_ext
25459cat >>conftest.$ac_ext <<_ACEOF
25460/* end confdefs.h. */
25461#include <stdio.h>
25462#include <stddef.h>
25463#include <string.h>
25464
25465int main()
25466{
25467 char buffer[4];
25468
25469 if(sprintf(buffer, "%zd", (size_t)123) < 0)
25470 return 1;
25471
25472 if (strncmp(buffer, "123", 3))
25473 return 1;
25474
25475 return 0;
25476}
25477_ACEOF
25478rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000025479if { (ac_try="$ac_link"
25480case "(($ac_try" in
25481 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25482 *) ac_try_echo=$ac_try;;
25483esac
25484eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25485 (eval "$ac_link") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000025486 ac_status=$?
25487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25488 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000025489 { (case "(($ac_try" in
25490 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25491 *) ac_try_echo=$ac_try;;
25492esac
25493eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25494 (eval "$ac_try") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000025495 ac_status=$?
25496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25497 (exit $ac_status); }; }; then
25498 { echo "$as_me:$LINENO: result: yes" >&5
25499echo "${ECHO_T}yes" >&6; }
25500
25501cat >>confdefs.h <<\_ACEOF
25502#define PY_FORMAT_SIZE_T "z"
25503_ACEOF
25504
25505else
25506 echo "$as_me: program exited with status $ac_status" >&5
25507echo "$as_me: failed program was:" >&5
25508sed 's/^/| /' conftest.$ac_ext >&5
25509
25510( exit $ac_status )
25511{ echo "$as_me:$LINENO: result: no" >&5
25512echo "${ECHO_T}no" >&6; }
25513fi
25514rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
25515fi
25516
25517
25518
25519{ echo "$as_me:$LINENO: checking for socklen_t" >&5
25520echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025521if test "${ac_cv_type_socklen_t+set}" = set; then
25522 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000025523else
Martin v. Löwis11437992002-04-12 09:54:03 +000025524 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025525/* confdefs.h. */
25526_ACEOF
25527cat confdefs.h >>conftest.$ac_ext
25528cat >>conftest.$ac_ext <<_ACEOF
25529/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000025530
25531#ifdef HAVE_SYS_TYPES_H
25532#include <sys/types.h>
25533#endif
25534#ifdef HAVE_SYS_SOCKET_H
25535#include <sys/socket.h>
25536#endif
25537
25538
Thomas Wouters477c8d52006-05-27 19:21:47 +000025539typedef socklen_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000025540int
25541main ()
25542{
Thomas Wouters477c8d52006-05-27 19:21:47 +000025543if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000025544 return 0;
Thomas Wouters477c8d52006-05-27 19:21:47 +000025545if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000025546 return 0;
25547 ;
25548 return 0;
25549}
25550_ACEOF
25551rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000025552if { (ac_try="$ac_compile"
25553case "(($ac_try" in
25554 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25555 *) ac_try_echo=$ac_try;;
25556esac
25557eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25558 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025559 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025560 grep -v '^ *+' conftest.er1 >conftest.err
25561 rm -f conftest.er1
25562 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25564 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000025565 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
25566 { (case "(($ac_try" in
25567 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25568 *) ac_try_echo=$ac_try;;
25569esac
25570eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25571 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000025572 ac_status=$?
25573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25574 (exit $ac_status); }; } &&
25575 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000025576 { (case "(($ac_try" in
25577 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25578 *) ac_try_echo=$ac_try;;
25579esac
25580eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25581 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025582 ac_status=$?
25583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25584 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000025585 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000025586else
Martin v. Löwis11437992002-04-12 09:54:03 +000025587 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025588sed 's/^/| /' conftest.$ac_ext >&5
25589
Thomas Wouters477c8d52006-05-27 19:21:47 +000025590 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000025591fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000025592
Skip Montanarof0d5f792004-08-15 14:08:23 +000025593rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025594fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000025595{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
25596echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025597if test $ac_cv_type_socklen_t = yes; then
25598 :
25599else
Guido van Rossum95713eb2000-05-18 20:53:31 +000025600
Martin v. Löwis01c04012002-11-11 14:58:44 +000025601cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000025602#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000025603_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000025604
25605fi
25606
Michael W. Hudson54241132001-12-07 15:38:26 +000025607
Michael W. Hudson54241132001-12-07 15:38:26 +000025608
25609
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000025610for h in `(cd $srcdir;echo Python/thread_*.h)`
25611do
25612 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
25613done
25614
Michael W. Hudson54241132001-12-07 15:38:26 +000025615
Neal Norwitzd24499d2005-12-18 21:36:39 +000025616SRCDIRS="Parser Grammar Objects Python Modules Mac"
Thomas Wouters477c8d52006-05-27 19:21:47 +000025617{ echo "$as_me:$LINENO: checking for build directories" >&5
25618echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000025619for dir in $SRCDIRS; do
25620 if test ! -d $dir; then
25621 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000025622 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000025623done
Thomas Wouters477c8d52006-05-27 19:21:47 +000025624{ echo "$as_me:$LINENO: result: done" >&5
25625echo "${ECHO_T}done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000025626
Guido van Rossum627b2d71993-12-24 10:39:16 +000025627# generate output files
Thomas Wouters477c8d52006-05-27 19:21:47 +000025628ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000025629
Martin v. Löwis11437992002-04-12 09:54:03 +000025630cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025631# This file is a shell script that caches the results of configure
25632# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000025633# scripts and configure runs, see configure's option --config-cache.
25634# It is not useful on other systems. If it contains results you don't
25635# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025636#
Martin v. Löwis11437992002-04-12 09:54:03 +000025637# config.status only pays attention to the cache file if you give it
25638# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025639#
Skip Montanaro6dead952003-09-25 14:50:04 +000025640# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000025641# loading this file, other *unset* `ac_cv_foo' will be assigned the
25642# following values.
25643
25644_ACEOF
25645
Guido van Rossumf78abae1997-01-21 22:02:36 +000025646# The following way of writing the cache mishandles newlines in values,
25647# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters477c8d52006-05-27 19:21:47 +000025648# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000025649# Ultrix sh set writes to stderr and can't be redirected directly,
25650# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters477c8d52006-05-27 19:21:47 +000025651(
25652 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
25653 eval ac_val=\$$ac_var
25654 case $ac_val in #(
25655 *${as_nl}*)
25656 case $ac_var in #(
25657 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
25658echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
25659 esac
25660 case $ac_var in #(
25661 _ | IFS | as_nl) ;; #(
25662 *) $as_unset $ac_var ;;
25663 esac ;;
25664 esac
25665 done
25666
Martin v. Löwis11437992002-04-12 09:54:03 +000025667 (set) 2>&1 |
Thomas Wouters477c8d52006-05-27 19:21:47 +000025668 case $as_nl`(ac_space=' '; set) 2>&1` in #(
25669 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000025670 # `set' does not quote correctly, so add quotes (double-quote
25671 # substitution turns \\\\ into \\, and sed turns \\ into \).
25672 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025673 "s/'/'\\\\''/g;
25674 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters477c8d52006-05-27 19:21:47 +000025675 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000025676 *)
25677 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters477c8d52006-05-27 19:21:47 +000025678 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000025679 ;;
Thomas Wouters477c8d52006-05-27 19:21:47 +000025680 esac |
25681 sort
25682) |
Martin v. Löwis11437992002-04-12 09:54:03 +000025683 sed '
Thomas Wouters477c8d52006-05-27 19:21:47 +000025684 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000025685 t clear
Thomas Wouters477c8d52006-05-27 19:21:47 +000025686 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000025687 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
25688 t end
Thomas Wouters477c8d52006-05-27 19:21:47 +000025689 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
25690 :end' >>confcache
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000025691if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
25692 if test -w "$cache_file"; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000025693 test "x$cache_file" != "x/dev/null" &&
25694 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
25695echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000025696 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000025697 else
Thomas Wouters477c8d52006-05-27 19:21:47 +000025698 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
25699echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000025700 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025701fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000025702rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000025703
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025704test "x$prefix" = xNONE && prefix=$ac_default_prefix
25705# Let make expand exec_prefix.
25706test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000025707
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025708DEFS=-DHAVE_CONFIG_H
25709
Skip Montanaro6dead952003-09-25 14:50:04 +000025710ac_libobjs=
25711ac_ltlibobjs=
25712for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
25713 # 1. Remove the extension, and $U if already installed.
Thomas Wouters477c8d52006-05-27 19:21:47 +000025714 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
25715 ac_i=`echo "$ac_i" | sed "$ac_script"`
25716 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
25717 # will be set to the directory where LIBOBJS objects are built.
25718 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
25719 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000025720done
25721LIBOBJS=$ac_libobjs
25722
25723LTLIBOBJS=$ac_ltlibobjs
25724
25725
Martin v. Löwis11437992002-04-12 09:54:03 +000025726
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025727: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000025728ac_clean_files_save=$ac_clean_files
25729ac_clean_files="$ac_clean_files $CONFIG_STATUS"
25730{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
25731echo "$as_me: creating $CONFIG_STATUS" >&6;}
25732cat >$CONFIG_STATUS <<_ACEOF
25733#! $SHELL
25734# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000025735# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025736# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000025737# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000025738
Martin v. Löwis11437992002-04-12 09:54:03 +000025739debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000025740ac_cs_recheck=false
25741ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000025742SHELL=\${CONFIG_SHELL-$SHELL}
25743_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000025744
Martin v. Löwis11437992002-04-12 09:54:03 +000025745cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025746## --------------------- ##
25747## M4sh Initialization. ##
25748## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000025749
Martin v. Löwis11437992002-04-12 09:54:03 +000025750# Be Bourne compatible
25751if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
25752 emulate sh
25753 NULLCMD=:
Skip Montanaro6dead952003-09-25 14:50:04 +000025754 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
25755 # is contrary to our usage. Disable this feature.
25756 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters477c8d52006-05-27 19:21:47 +000025757 setopt NO_GLOB_SUBST
25758else
25759 case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
Michael W. Hudson54241132001-12-07 15:38:26 +000025760fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000025761BIN_SH=xpg4; export BIN_SH # for Tru64
Skip Montanarof0d5f792004-08-15 14:08:23 +000025762DUALCASE=1; export DUALCASE # for MKS sh
Michael W. Hudson54241132001-12-07 15:38:26 +000025763
Michael W. Hudson54241132001-12-07 15:38:26 +000025764
Thomas Wouters477c8d52006-05-27 19:21:47 +000025765# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000025766# Avoid depending upon Character Ranges.
25767as_cr_letters='abcdefghijklmnopqrstuvwxyz'
25768as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
25769as_cr_Letters=$as_cr_letters$as_cr_LETTERS
25770as_cr_digits='0123456789'
25771as_cr_alnum=$as_cr_Letters$as_cr_digits
25772
25773# The user is always right.
25774if test "${PATH_SEPARATOR+set}" != set; then
Skip Montanaro6dead952003-09-25 14:50:04 +000025775 echo "#! /bin/sh" >conf$$.sh
25776 echo "exit 0" >>conf$$.sh
25777 chmod +x conf$$.sh
25778 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025779 PATH_SEPARATOR=';'
25780 else
25781 PATH_SEPARATOR=:
25782 fi
Skip Montanaro6dead952003-09-25 14:50:04 +000025783 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000025784fi
25785
Thomas Wouters477c8d52006-05-27 19:21:47 +000025786# Support unset when possible.
25787if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
25788 as_unset=unset
25789else
25790 as_unset=false
25791fi
Martin v. Löwis11437992002-04-12 09:54:03 +000025792
Thomas Wouters477c8d52006-05-27 19:21:47 +000025793
25794# IFS
25795# We need space, tab and new line, in precisely that order. Quoting is
25796# there to prevent editors from complaining about space-tab.
25797# (If _AS_PATH_WALK were called with IFS unset, it would disable word
25798# splitting by setting IFS to empty value.)
25799as_nl='
25800'
25801IFS=" "" $as_nl"
25802
25803# Find who we are. Look in the path if we contain no directory separator.
25804case $0 in
25805 *[\\/]* ) as_myself=$0 ;;
25806 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000025807for as_dir in $PATH
25808do
25809 IFS=$as_save_IFS
25810 test -z "$as_dir" && as_dir=.
25811 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
25812done
Thomas Wouters477c8d52006-05-27 19:21:47 +000025813IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000025814
Thomas Wouters477c8d52006-05-27 19:21:47 +000025815 ;;
25816esac
25817# We did not find ourselves, most probably we were run as `sh COMMAND'
25818# in which case we are not to be found in the path.
25819if test "x$as_myself" = x; then
25820 as_myself=$0
25821fi
25822if test ! -f "$as_myself"; then
25823 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
25824 { (exit 1); exit 1; }
25825fi
25826
25827# Work around bugs in pre-3.0 UWIN ksh.
25828for as_var in ENV MAIL MAILPATH
25829do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
25830done
25831PS1='$ '
25832PS2='> '
25833PS4='+ '
25834
25835# NLS nuisances.
25836for as_var in \
25837 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
25838 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
25839 LC_TELEPHONE LC_TIME
Martin v. Löwis11437992002-04-12 09:54:03 +000025840do
Thomas Wouters477c8d52006-05-27 19:21:47 +000025841 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
25842 eval $as_var=C; export $as_var
25843 else
25844 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
25845 fi
25846done
25847
25848# Required to use basename.
25849if expr a : '\(a\)' >/dev/null 2>&1 &&
25850 test "X`expr 00001 : '.*\(...\)'`" = X001; then
25851 as_expr=expr
25852else
25853 as_expr=false
25854fi
25855
25856if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
25857 as_basename=basename
25858else
25859 as_basename=false
25860fi
25861
25862
25863# Name of the executable.
25864as_me=`$as_basename -- "$0" ||
25865$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
25866 X"$0" : 'X\(//\)$' \| \
25867 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
25868echo X/"$0" |
25869 sed '/^.*\/\([^/][^/]*\)\/*$/{
25870 s//\1/
25871 q
25872 }
25873 /^X\/\(\/\/\)$/{
25874 s//\1/
25875 q
25876 }
25877 /^X\/\(\/\).*/{
25878 s//\1/
25879 q
25880 }
25881 s/.*/./; q'`
25882
25883# CDPATH.
25884$as_unset CDPATH
25885
25886
25887
Martin v. Löwis11437992002-04-12 09:54:03 +000025888 as_lineno_1=$LINENO
25889 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000025890 test "x$as_lineno_1" != "x$as_lineno_2" &&
Thomas Wouters477c8d52006-05-27 19:21:47 +000025891 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000025892
Martin v. Löwis11437992002-04-12 09:54:03 +000025893 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
25894 # uniformly replaced by the line number. The first 'sed' inserts a
Thomas Wouters477c8d52006-05-27 19:21:47 +000025895 # line-number line after each line using $LINENO; the second 'sed'
25896 # does the real work. The second script uses 'N' to pair each
25897 # line-number line with the line containing $LINENO, and appends
25898 # trailing '-' during substitution so that $LINENO is not a special
25899 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000025900 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Thomas Wouters477c8d52006-05-27 19:21:47 +000025901 # scripts with optimization help from Paolo Bonzini. Blame Lee
25902 # E. McMahon (1931-1989) for sed's syntax. :-)
25903 sed -n '
25904 p
25905 /[$]LINENO/=
25906 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000025907 sed '
Thomas Wouters477c8d52006-05-27 19:21:47 +000025908 s/[$]LINENO.*/&-/
25909 t lineno
25910 b
25911 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000025912 N
Thomas Wouters477c8d52006-05-27 19:21:47 +000025913 :loop
25914 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000025915 t loop
Thomas Wouters477c8d52006-05-27 19:21:47 +000025916 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000025917 ' >$as_me.lineno &&
Thomas Wouters477c8d52006-05-27 19:21:47 +000025918 chmod +x "$as_me.lineno" ||
25919 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000025920 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000025921
Martin v. Löwis11437992002-04-12 09:54:03 +000025922 # Don't try to exec as it changes $[0], causing all sort of problems
25923 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters477c8d52006-05-27 19:21:47 +000025924 # original and so on. Autoconf is especially sensitive to this).
25925 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000025926 # Exit status is that of the last command.
25927 exit
25928}
25929
25930
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000025931if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000025932 as_dirname=dirname
25933else
25934 as_dirname=false
25935fi
25936
25937ECHO_C= ECHO_N= ECHO_T=
25938case `echo -n x` in
25939-n*)
25940 case `echo 'x\c'` in
25941 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
25942 *) ECHO_C='\c';;
25943 esac;;
25944*)
25945 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000025946esac
25947
Thomas Wouters477c8d52006-05-27 19:21:47 +000025948if expr a : '\(a\)' >/dev/null 2>&1 &&
25949 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025950 as_expr=expr
25951else
25952 as_expr=false
25953fi
25954
25955rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters477c8d52006-05-27 19:21:47 +000025956if test -d conf$$.dir; then
25957 rm -f conf$$.dir/conf$$.file
25958else
25959 rm -f conf$$.dir
25960 mkdir conf$$.dir
25961fi
Martin v. Löwis11437992002-04-12 09:54:03 +000025962echo >conf$$.file
25963if ln -s conf$$.file conf$$ 2>/dev/null; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000025964 as_ln_s='ln -s'
25965 # ... but there are two gotchas:
25966 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
25967 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
25968 # In both cases, we have to default to `cp -p'.
25969 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +000025970 as_ln_s='cp -p'
Martin v. Löwis11437992002-04-12 09:54:03 +000025971elif ln conf$$.file conf$$ 2>/dev/null; then
25972 as_ln_s=ln
25973else
25974 as_ln_s='cp -p'
25975fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000025976rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
25977rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000025978
Skip Montanaro6dead952003-09-25 14:50:04 +000025979if mkdir -p . 2>/dev/null; then
25980 as_mkdir_p=:
25981else
Skip Montanarof0d5f792004-08-15 14:08:23 +000025982 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000025983 as_mkdir_p=false
25984fi
25985
Thomas Wouters477c8d52006-05-27 19:21:47 +000025986# Find out whether ``test -x'' works. Don't use a zero-byte file, as
25987# systems may use methods other than mode bits to determine executability.
25988cat >conf$$.file <<_ASEOF
25989#! /bin/sh
25990exit 0
25991_ASEOF
25992chmod +x conf$$.file
25993if test -x conf$$.file >/dev/null 2>&1; then
25994 as_executable_p="test -x"
25995else
25996 as_executable_p=:
25997fi
25998rm -f conf$$.file
Martin v. Löwis11437992002-04-12 09:54:03 +000025999
26000# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000026001as_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 +000026002
26003# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000026004as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000026005
26006
Martin v. Löwis11437992002-04-12 09:54:03 +000026007exec 6>&1
26008
Thomas Wouters477c8d52006-05-27 19:21:47 +000026009# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000026010# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters477c8d52006-05-27 19:21:47 +000026011# values after options handling.
26012ac_log="
Guido van Rossum0c4eb622006-03-30 16:19:24 +000026013This file was extended by python $as_me 3.0, which was
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000026014generated by GNU Autoconf 2.59e. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000026015
26016 CONFIG_FILES = $CONFIG_FILES
26017 CONFIG_HEADERS = $CONFIG_HEADERS
26018 CONFIG_LINKS = $CONFIG_LINKS
26019 CONFIG_COMMANDS = $CONFIG_COMMANDS
26020 $ $0 $@
26021
Thomas Wouters477c8d52006-05-27 19:21:47 +000026022on `(hostname || uname -n) 2>/dev/null | sed 1q`
26023"
26024
Martin v. Löwis11437992002-04-12 09:54:03 +000026025_ACEOF
26026
Thomas Wouters477c8d52006-05-27 19:21:47 +000026027cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026028# Files that config.status was made for.
Thomas Wouters477c8d52006-05-27 19:21:47 +000026029config_files="$ac_config_files"
26030config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000026031
Thomas Wouters477c8d52006-05-27 19:21:47 +000026032_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026033
26034cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026035ac_cs_usage="\
26036\`$as_me' instantiates files from templates according to the
26037current configuration.
26038
26039Usage: $0 [OPTIONS] [FILE]...
26040
26041 -h, --help print this help, then exit
26042 -V, --version print version number, then exit
Skip Montanaro6dead952003-09-25 14:50:04 +000026043 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000026044 -d, --debug don't remove temporary files
26045 --recheck update $as_me by reconfiguring in the same conditions
26046 --file=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000026047 instantiate the configuration file FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000026048 --header=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000026049 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000026050
26051Configuration files:
26052$config_files
26053
26054Configuration headers:
26055$config_headers
26056
26057Report bugs to <bug-autoconf@gnu.org>."
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 +000026060cat >>$CONFIG_STATUS <<_ACEOF
26061ac_cs_version="\\
Guido van Rossum0c4eb622006-03-30 16:19:24 +000026062python config.status 3.0
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000026063configured by $0, generated by GNU Autoconf 2.59e,
26064 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000026065
Thomas Wouters477c8d52006-05-27 19:21:47 +000026066Copyright (C) 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000026067This config.status script is free software; the Free Software Foundation
26068gives unlimited permission to copy, distribute and modify it."
Thomas Wouters477c8d52006-05-27 19:21:47 +000026069
26070ac_pwd='$ac_pwd'
26071srcdir='$srcdir'
26072INSTALL='$INSTALL'
Martin v. Löwis11437992002-04-12 09:54:03 +000026073_ACEOF
26074
26075cat >>$CONFIG_STATUS <<\_ACEOF
26076# If no file are specified by the user, then we need to provide default
26077# value. By we need to know if files were specified by the user.
26078ac_need_defaults=:
26079while test $# != 0
26080do
26081 case $1 in
26082 --*=*)
Thomas Wouters477c8d52006-05-27 19:21:47 +000026083 ac_option=`expr "X$1" : 'X\([^=]*\)='`
26084 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000026085 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000026086 ;;
Thomas Wouters477c8d52006-05-27 19:21:47 +000026087 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000026088 ac_option=$1
26089 ac_optarg=$2
26090 ac_shift=shift
26091 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026092 esac
26093
Skip Montanaro6dead952003-09-25 14:50:04 +000026094 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000026095 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000026096 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
26097 ac_cs_recheck=: ;;
Thomas Wouters477c8d52006-05-27 19:21:47 +000026098 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
26099 echo "$ac_cs_version"; exit ;;
26100 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000026101 debug=: ;;
26102 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000026103 $ac_shift
26104 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000026105 ac_need_defaults=false;;
26106 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000026107 $ac_shift
26108 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000026109 ac_need_defaults=false;;
Thomas Wouters477c8d52006-05-27 19:21:47 +000026110 --he | --h)
26111 # Conflict between --help and --header
26112 { echo "$as_me: error: ambiguous option: $1
26113Try \`$0 --help' for more information." >&2
26114 { (exit 1); exit 1; }; };;
26115 --help | --hel | -h )
26116 echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000026117 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
26118 | -silent | --silent | --silen | --sile | --sil | --si | --s)
26119 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026120
26121 # This is an error.
Thomas Wouters477c8d52006-05-27 19:21:47 +000026122 -*) { echo "$as_me: error: unrecognized option: $1
26123Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000026124 { (exit 1); exit 1; }; } ;;
26125
Thomas Wouters477c8d52006-05-27 19:21:47 +000026126 *) ac_config_targets="$ac_config_targets $1"
26127 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026128
26129 esac
26130 shift
26131done
26132
Skip Montanaro6dead952003-09-25 14:50:04 +000026133ac_configure_extra_args=
26134
26135if $ac_cs_silent; then
26136 exec 6>/dev/null
26137 ac_configure_extra_args="$ac_configure_extra_args --silent"
26138fi
26139
26140_ACEOF
26141cat >>$CONFIG_STATUS <<_ACEOF
26142if \$ac_cs_recheck; then
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000026143 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 +000026144 CONFIG_SHELL=$SHELL
26145 export CONFIG_SHELL
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000026146 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000026147fi
26148
Martin v. Löwis11437992002-04-12 09:54:03 +000026149_ACEOF
Thomas Wouters477c8d52006-05-27 19:21:47 +000026150cat >>$CONFIG_STATUS <<\_ACEOF
26151exec 5>>config.log
26152{
26153 echo
26154 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
26155## Running $as_me. ##
26156_ASBOX
26157 echo "$ac_log"
26158} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026159
Thomas Wouters477c8d52006-05-27 19:21:47 +000026160_ACEOF
26161cat >>$CONFIG_STATUS <<_ACEOF
26162_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026163
26164cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters477c8d52006-05-27 19:21:47 +000026165
26166# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000026167for ac_config_target in $ac_config_targets
26168do
Thomas Wouters477c8d52006-05-27 19:21:47 +000026169 case $ac_config_target in
26170 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
26171 "Mac/OSX/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/OSX/Makefile" ;;
26172 "Mac/OSX/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/OSX/PythonLauncher/Makefile" ;;
26173 "Mac/OSX/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/OSX/IDLE/Makefile" ;;
26174 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
26175 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
26176
Martin v. Löwis11437992002-04-12 09:54:03 +000026177 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
26178echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
26179 { (exit 1); exit 1; }; };;
26180 esac
26181done
26182
Thomas Wouters477c8d52006-05-27 19:21:47 +000026183
Martin v. Löwis11437992002-04-12 09:54:03 +000026184# If the user did not use the arguments to specify the items to instantiate,
26185# then the envvar interface is used. Set only those that are not.
26186# We use the long form for the default assignment because of an extremely
26187# bizarre bug on SunOS 4.1.3.
26188if $ac_need_defaults; then
26189 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
26190 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
26191fi
26192
Skip Montanaro6dead952003-09-25 14:50:04 +000026193# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters477c8d52006-05-27 19:21:47 +000026194# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000026195# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters477c8d52006-05-27 19:21:47 +000026196# Hook for its removal unless debugging.
26197# Note that there is a small window in which the directory will not be cleaned:
26198# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000026199$debug ||
26200{
Thomas Wouters477c8d52006-05-27 19:21:47 +000026201 tmp=
26202 trap 'exit_status=$?
26203 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
26204' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000026205 trap '{ (exit 1); exit 1; }' 1 2 13 15
26206}
Martin v. Löwis11437992002-04-12 09:54:03 +000026207# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000026208
Martin v. Löwis11437992002-04-12 09:54:03 +000026209{
Thomas Wouters477c8d52006-05-27 19:21:47 +000026210 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000026211 test -n "$tmp" && test -d "$tmp"
26212} ||
26213{
Thomas Wouters477c8d52006-05-27 19:21:47 +000026214 tmp=./conf$$-$RANDOM
26215 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000026216} ||
26217{
Skip Montanaro6dead952003-09-25 14:50:04 +000026218 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000026219 { (exit 1); exit 1; }
26220}
26221
Martin v. Löwis11437992002-04-12 09:54:03 +000026222#
Thomas Wouters477c8d52006-05-27 19:21:47 +000026223# Set up the sed scripts for CONFIG_FILES section.
Martin v. Löwis11437992002-04-12 09:54:03 +000026224#
26225
26226# No need to generate the scripts if there are no CONFIG_FILES.
26227# This happens for instance when ./config.status config.h
Thomas Wouters477c8d52006-05-27 19:21:47 +000026228if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026229
26230_ACEOF
26231
Thomas Wouters477c8d52006-05-27 19:21:47 +000026232
26233
26234ac_delim='%!_!# '
26235for ac_last_try in false false false false false :; do
26236 cat >conf$$subs.sed <<_ACEOF
26237SHELL!$SHELL$ac_delim
26238PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
26239PACKAGE_NAME!$PACKAGE_NAME$ac_delim
26240PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
26241PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
26242PACKAGE_STRING!$PACKAGE_STRING$ac_delim
26243PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
26244exec_prefix!$exec_prefix$ac_delim
26245prefix!$prefix$ac_delim
26246program_transform_name!$program_transform_name$ac_delim
26247bindir!$bindir$ac_delim
26248sbindir!$sbindir$ac_delim
26249libexecdir!$libexecdir$ac_delim
26250datarootdir!$datarootdir$ac_delim
26251datadir!$datadir$ac_delim
26252sysconfdir!$sysconfdir$ac_delim
26253sharedstatedir!$sharedstatedir$ac_delim
26254localstatedir!$localstatedir$ac_delim
26255includedir!$includedir$ac_delim
26256oldincludedir!$oldincludedir$ac_delim
26257docdir!$docdir$ac_delim
26258infodir!$infodir$ac_delim
26259htmldir!$htmldir$ac_delim
26260dvidir!$dvidir$ac_delim
26261pdfdir!$pdfdir$ac_delim
26262psdir!$psdir$ac_delim
26263libdir!$libdir$ac_delim
26264localedir!$localedir$ac_delim
26265mandir!$mandir$ac_delim
26266DEFS!$DEFS$ac_delim
26267ECHO_C!$ECHO_C$ac_delim
26268ECHO_N!$ECHO_N$ac_delim
26269ECHO_T!$ECHO_T$ac_delim
26270LIBS!$LIBS$ac_delim
26271build_alias!$build_alias$ac_delim
26272host_alias!$host_alias$ac_delim
26273target_alias!$target_alias$ac_delim
26274VERSION!$VERSION$ac_delim
26275SOVERSION!$SOVERSION$ac_delim
26276CONFIG_ARGS!$CONFIG_ARGS$ac_delim
26277UNIVERSALSDK!$UNIVERSALSDK$ac_delim
26278PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
26279PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
26280PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
26281PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
26282FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
26283FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
26284MACHDEP!$MACHDEP$ac_delim
26285SGI_ABI!$SGI_ABI$ac_delim
26286EXTRAPLATDIR!$EXTRAPLATDIR$ac_delim
26287EXTRAMACHDEPPATH!$EXTRAMACHDEPPATH$ac_delim
26288CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
26289EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim
26290CC!$CC$ac_delim
26291CFLAGS!$CFLAGS$ac_delim
26292LDFLAGS!$LDFLAGS$ac_delim
26293CPPFLAGS!$CPPFLAGS$ac_delim
26294ac_ct_CC!$ac_ct_CC$ac_delim
26295EXEEXT!$EXEEXT$ac_delim
26296OBJEXT!$OBJEXT$ac_delim
26297CXX!$CXX$ac_delim
26298MAINCC!$MAINCC$ac_delim
26299CPP!$CPP$ac_delim
26300GREP!$GREP$ac_delim
26301EGREP!$EGREP$ac_delim
26302BUILDEXEEXT!$BUILDEXEEXT$ac_delim
26303LIBRARY!$LIBRARY$ac_delim
26304LDLIBRARY!$LDLIBRARY$ac_delim
26305DLLLIBRARY!$DLLLIBRARY$ac_delim
26306BLDLIBRARY!$BLDLIBRARY$ac_delim
26307LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
26308INSTSONAME!$INSTSONAME$ac_delim
26309RUNSHARED!$RUNSHARED$ac_delim
26310LINKCC!$LINKCC$ac_delim
26311RANLIB!$RANLIB$ac_delim
26312AR!$AR$ac_delim
26313SVNVERSION!$SVNVERSION$ac_delim
26314INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
26315INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
26316INSTALL_DATA!$INSTALL_DATA$ac_delim
26317LN!$LN$ac_delim
26318OPT!$OPT$ac_delim
26319BASECFLAGS!$BASECFLAGS$ac_delim
26320OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
26321LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
26322SO!$SO$ac_delim
26323LDSHARED!$LDSHARED$ac_delim
26324BLDSHARED!$BLDSHARED$ac_delim
26325CCSHARED!$CCSHARED$ac_delim
26326LINKFORSHARED!$LINKFORSHARED$ac_delim
26327CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
26328SHLIBS!$SHLIBS$ac_delim
26329USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
26330SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
26331USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
26332LDLAST!$LDLAST$ac_delim
26333THREADOBJ!$THREADOBJ$ac_delim
26334_ACEOF
26335
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000026336 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000026337 break
26338 elif $ac_last_try; then
26339 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
26340echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
26341 { (exit 1); exit 1; }; }
26342 else
26343 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000026344 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026345done
26346
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000026347ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
26348if test -n "$ac_eof"; then
26349 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
26350 ac_eof=`expr $ac_eof + 1`
Thomas Wouters477c8d52006-05-27 19:21:47 +000026351fi
26352
26353cat >>$CONFIG_STATUS <<_ACEOF
26354cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
26355/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
26356_ACEOF
26357sed '
26358s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
26359s/^/s,@/; s/!/@,|#_!!_#|/
26360:n
26361t n
26362s/'"$ac_delim"'$/,g/; t
26363s/$/\\/; p
26364N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
26365' >>$CONFIG_STATUS <conf$$subs.sed
26366rm -f conf$$subs.sed
26367cat >>$CONFIG_STATUS <<_ACEOF
26368CEOF$ac_eof
26369_ACEOF
26370
26371
26372ac_delim='%!_!# '
26373for ac_last_try in false false false false false :; do
26374 cat >conf$$subs.sed <<_ACEOF
26375DLINCLDIR!$DLINCLDIR$ac_delim
26376DYNLOADFILE!$DYNLOADFILE$ac_delim
26377MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
26378TRUE!$TRUE$ac_delim
26379LIBOBJS!$LIBOBJS$ac_delim
26380HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
26381HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
26382HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
26383HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
26384HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
26385LIBM!$LIBM$ac_delim
26386LIBC!$LIBC$ac_delim
26387UNICODE_OBJS!$UNICODE_OBJS$ac_delim
26388THREADHEADERS!$THREADHEADERS$ac_delim
26389SRCDIRS!$SRCDIRS$ac_delim
26390LTLIBOBJS!$LTLIBOBJS$ac_delim
26391_ACEOF
26392
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000026393 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 16; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000026394 break
26395 elif $ac_last_try; then
26396 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
26397echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
26398 { (exit 1); exit 1; }; }
26399 else
26400 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
26401 fi
26402done
26403
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000026404ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
26405if test -n "$ac_eof"; then
26406 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
26407 ac_eof=`expr $ac_eof + 1`
Thomas Wouters477c8d52006-05-27 19:21:47 +000026408fi
26409
26410cat >>$CONFIG_STATUS <<_ACEOF
26411cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
26412/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
26413_ACEOF
26414sed '
26415s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
26416s/^/s,@/; s/!/@,|#_!!_#|/
26417:n
26418t n
26419s/'"$ac_delim"'$/,g/; t
26420s/$/\\/; p
26421N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
26422' >>$CONFIG_STATUS <conf$$subs.sed
26423rm -f conf$$subs.sed
26424cat >>$CONFIG_STATUS <<_ACEOF
26425:end
26426s/|#_!!_#|//g
26427CEOF$ac_eof
26428_ACEOF
26429
26430
26431# VPATH may cause trouble with some makes, so we remove $(srcdir),
26432# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
26433# trailing colons and then remove the whole line if VPATH becomes empty
26434# (actually we leave an empty line to preserve line numbers).
26435if test "x$srcdir" = x.; then
26436 ac_vpsub='/^[ ]*VPATH[ ]*=/{
26437s/:*\$(srcdir):*/:/
26438s/:*\${srcdir}:*/:/
26439s/:*@srcdir@:*/:/
26440s/^\([^=]*=[ ]*\):*/\1/
26441s/:*$//
26442s/^[^=]*=[ ]*$//
26443}'
26444fi
26445
26446cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026447fi # test -n "$CONFIG_FILES"
26448
Thomas Wouters477c8d52006-05-27 19:21:47 +000026449
26450for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
26451do
26452 case $ac_tag in
26453 :[FHLC]) ac_mode=$ac_tag; continue;;
26454 esac
26455 case $ac_mode$ac_tag in
26456 :[FHL]*:*);;
26457 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
26458echo "$as_me: error: Invalid tag $ac_tag." >&2;}
26459 { (exit 1); exit 1; }; };;
26460 :[FH]-) ac_tag=-:-;;
26461 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
26462 esac
26463 ac_save_IFS=$IFS
26464 IFS=:
26465 set x $ac_tag
26466 IFS=$ac_save_IFS
26467 shift
26468 ac_file=$1
26469 shift
26470
26471 case $ac_mode in
26472 :L) ac_source=$1;;
26473 :[FH])
26474 ac_file_inputs=
26475 for ac_f
26476 do
26477 case $ac_f in
26478 -) ac_f="$tmp/stdin";;
26479 *) # Look for the file first in the build tree, then in the source tree
26480 # (if the path is not absolute). The absolute path cannot be DOS-style,
26481 # because $ac_f cannot contain `:'.
26482 test -f "$ac_f" ||
26483 case $ac_f in
26484 [\\/$]*) false;;
26485 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
26486 esac ||
26487 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
26488echo "$as_me: error: cannot find input file: $ac_f" >&2;}
26489 { (exit 1); exit 1; }; };;
26490 esac
26491 ac_file_inputs="$ac_file_inputs $ac_f"
26492 done
26493
26494 # Let's still pretend it is `configure' which instantiates (i.e., don't
26495 # use $as_me), people would be surprised to read:
26496 # /* config.h. Generated by config.status. */
26497 configure_input="Generated from "`IFS=:
26498 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
26499 if test x"$ac_file" != x-; then
26500 configure_input="$ac_file. $configure_input"
26501 { echo "$as_me:$LINENO: creating $ac_file" >&5
26502echo "$as_me: creating $ac_file" >&6;}
26503 fi
26504
26505 case $ac_tag in
26506 *:-:* | *:-) cat >"$tmp/stdin";;
26507 esac
26508 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026509 esac
26510
Thomas Wouters477c8d52006-05-27 19:21:47 +000026511 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000026512$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026513 X"$ac_file" : 'X\(//\)[^/]' \| \
26514 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters477c8d52006-05-27 19:21:47 +000026515 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +000026516echo X"$ac_file" |
Thomas Wouters477c8d52006-05-27 19:21:47 +000026517 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26518 s//\1/
26519 q
26520 }
26521 /^X\(\/\/\)[^/].*/{
26522 s//\1/
26523 q
26524 }
26525 /^X\(\/\/\)$/{
26526 s//\1/
26527 q
26528 }
26529 /^X\(\/\).*/{
26530 s//\1/
26531 q
26532 }
26533 s/.*/./; q'`
26534 { as_dir="$ac_dir"
26535 case $as_dir in #(
26536 -*) as_dir=./$as_dir;;
26537 esac
26538 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000026539 as_dirs=
Thomas Wouters477c8d52006-05-27 19:21:47 +000026540 while :; do
26541 case $as_dir in #(
26542 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
26543 *) as_qdir=$as_dir;;
26544 esac
26545 as_dirs="'$as_qdir' $as_dirs"
26546 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000026547$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026548 X"$as_dir" : 'X\(//\)[^/]' \| \
26549 X"$as_dir" : 'X\(//\)$' \| \
Thomas Wouters477c8d52006-05-27 19:21:47 +000026550 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Skip Montanaro6dead952003-09-25 14:50:04 +000026551echo X"$as_dir" |
Thomas Wouters477c8d52006-05-27 19:21:47 +000026552 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26553 s//\1/
26554 q
26555 }
26556 /^X\(\/\/\)[^/].*/{
26557 s//\1/
26558 q
26559 }
26560 /^X\(\/\/\)$/{
26561 s//\1/
26562 q
26563 }
26564 /^X\(\/\).*/{
26565 s//\1/
26566 q
26567 }
26568 s/.*/./; q'`
26569 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000026570 done
Thomas Wouters477c8d52006-05-27 19:21:47 +000026571 test -z "$as_dirs" || eval "mkdir $as_dirs"
26572 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
26573echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000026574 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026575 ac_builddir=.
26576
Thomas Wouters477c8d52006-05-27 19:21:47 +000026577case "$ac_dir" in
26578.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
26579*)
Martin v. Löwis11437992002-04-12 09:54:03 +000026580 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Thomas Wouters477c8d52006-05-27 19:21:47 +000026581 # A ".." for each directory in $ac_dir_suffix.
26582 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
26583 case $ac_top_builddir_sub in
26584 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
26585 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
26586 esac ;;
26587esac
26588ac_abs_top_builddir=$ac_pwd
26589ac_abs_builddir=$ac_pwd$ac_dir_suffix
26590# for backward compatibility:
26591ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000026592
26593case $srcdir in
Thomas Wouters477c8d52006-05-27 19:21:47 +000026594 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000026595 ac_srcdir=.
Thomas Wouters477c8d52006-05-27 19:21:47 +000026596 ac_top_srcdir=$ac_top_builddir_sub
26597 ac_abs_top_srcdir=$ac_pwd ;;
26598 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000026599 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters477c8d52006-05-27 19:21:47 +000026600 ac_top_srcdir=$srcdir
26601 ac_abs_top_srcdir=$srcdir ;;
26602 *) # Relative name.
26603 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
26604 ac_top_srcdir=$ac_top_build_prefix$srcdir
26605 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026606esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000026607ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000026608
Martin v. Löwis11437992002-04-12 09:54:03 +000026609
Thomas Wouters477c8d52006-05-27 19:21:47 +000026610 case $ac_mode in
26611 :F)
26612 #
26613 # CONFIG_FILE
26614 #
Martin v. Löwis11437992002-04-12 09:54:03 +000026615
26616 case $INSTALL in
26617 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters477c8d52006-05-27 19:21:47 +000026618 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026619 esac
Martin v. Löwis11437992002-04-12 09:54:03 +000026620_ACEOF
Thomas Wouters477c8d52006-05-27 19:21:47 +000026621
26622cat >>$CONFIG_STATUS <<\_ACEOF
26623# If the template does not know about datarootdir, expand it.
26624# FIXME: This hack should be removed a few years after 2.60.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000026625ac_datarootdir_hack=; ac_datarootdir_seen=
Thomas Wouters477c8d52006-05-27 19:21:47 +000026626
26627case `sed -n '/datarootdir/ {
26628 p
26629 q
26630}
26631/@datadir@/p
26632/@docdir@/p
26633/@infodir@/p
26634/@localedir@/p
26635/@mandir@/p
26636' $ac_file_inputs` in
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000026637*datarootdir*) ac_datarootdir_seen=yes;;
Thomas Wouters477c8d52006-05-27 19:21:47 +000026638*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
26639 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
26640echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
26641_ACEOF
26642cat >>$CONFIG_STATUS <<_ACEOF
26643 ac_datarootdir_hack='
26644 s&@datadir@&$datadir&g
26645 s&@docdir@&$docdir&g
26646 s&@infodir@&$infodir&g
26647 s&@localedir@&$localedir&g
26648 s&@mandir@&$mandir&g
26649 s&\\\${datarootdir}&$datarootdir&g' ;;
26650esac
26651_ACEOF
26652
26653# Neutralize VPATH when `$srcdir' = `.'.
26654# Shell code in configure.ac might set extrasub.
26655# FIXME: do we really want to maintain this feature?
Martin v. Löwis11437992002-04-12 09:54:03 +000026656cat >>$CONFIG_STATUS <<_ACEOF
26657 sed "$ac_vpsub
26658$extrasub
26659_ACEOF
26660cat >>$CONFIG_STATUS <<\_ACEOF
26661:t
26662/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Thomas Wouters477c8d52006-05-27 19:21:47 +000026663s&@configure_input@&$configure_input&;t t
26664s&@top_builddir@&$ac_top_builddir_sub&;t t
26665s&@srcdir@&$ac_srcdir&;t t
26666s&@abs_srcdir@&$ac_abs_srcdir&;t t
26667s&@top_srcdir@&$ac_top_srcdir&;t t
26668s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
26669s&@builddir@&$ac_builddir&;t t
26670s&@abs_builddir@&$ac_abs_builddir&;t t
26671s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
26672s&@INSTALL@&$ac_INSTALL&;t t
26673$ac_datarootdir_hack
26674" $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 +000026675
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000026676test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
26677 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
26678 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
26679which seems to be undefined. Please make sure it is defined." >&5
26680echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
26681which seems to be undefined. Please make sure it is defined." >&2;}
26682
Thomas Wouters477c8d52006-05-27 19:21:47 +000026683 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000026684 case $ac_file in
Thomas Wouters477c8d52006-05-27 19:21:47 +000026685 -) cat "$tmp/out"; rm -f "$tmp/out";;
26686 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026687 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000026688 ;;
26689 :H)
26690 #
26691 # CONFIG_HEADER
26692 #
Martin v. Löwis11437992002-04-12 09:54:03 +000026693_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026694
Thomas Wouters477c8d52006-05-27 19:21:47 +000026695# Transform confdefs.h into a sed script `conftest.defines', that
26696# substitutes the proper values into config.h.in to produce config.h.
26697rm -f conftest.defines conftest.tail
26698# First, append a space to every undef/define line, to ease matching.
26699echo 's/$/ /' >conftest.defines
26700# Then, protect against being on the right side of a sed subst, or in
26701# an unquoted here document, in config.status. If some macros were
26702# called several times there might be several #defines for the same
26703# symbol, which is useless. But do not sort them, since the last
26704# AC_DEFINE must be honored.
26705ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000026706# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
26707# NAME is the cpp macro being defined, VALUE is the value it is being given.
26708# PARAMS is the parameter list in the macro definition--in most cases, it's
26709# just an empty string.
26710ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
26711ac_dB='\\)[ (].*,\\1define\\2'
26712ac_dC=' '
26713ac_dD=' ,'
26714
Thomas Wouters477c8d52006-05-27 19:21:47 +000026715uniq confdefs.h |
26716 sed -n '
26717 t rset
26718 :rset
26719 s/^[ ]*#[ ]*define[ ][ ]*//
26720 t ok
26721 d
26722 :ok
26723 s/[\\&,]/\\&/g
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000026724 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
26725 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
Thomas Wouters477c8d52006-05-27 19:21:47 +000026726 ' >>conftest.defines
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026727
Thomas Wouters477c8d52006-05-27 19:21:47 +000026728# Remove the space that was appended to ease matching.
26729# Then replace #undef with comments. This is necessary, for
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026730# example, in the case of _POSIX_SOURCE, which is predefined and required
26731# on some systems where configure will not decide to define it.
Thomas Wouters477c8d52006-05-27 19:21:47 +000026732# (The regexp can be short, since the line contains either #define or #undef.)
26733echo 's/ $//
26734s,^[ #]*u.*,/* & */,' >>conftest.defines
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026735
Thomas Wouters477c8d52006-05-27 19:21:47 +000026736# Break up conftest.defines:
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000026737ac_max_sed_lines=50
Thomas Wouters477c8d52006-05-27 19:21:47 +000026738
26739# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
26740# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
26741# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
26742# et cetera.
26743ac_in='$ac_file_inputs'
26744ac_out='"$tmp/out1"'
26745ac_nxt='"$tmp/out2"'
26746
26747while :
Jack Jansendd19cf82001-12-06 22:36:17 +000026748do
Thomas Wouters477c8d52006-05-27 19:21:47 +000026749 # Write a here document:
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000026750 cat >>$CONFIG_STATUS <<_ACEOF
26751 # First, check the format of the line:
26752 cat >"\$tmp/defines.sed" <<\\CEOF
26753/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
26754/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
Thomas Wouters477c8d52006-05-27 19:21:47 +000026755b
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000026756:def
26757_ACEOF
Thomas Wouters477c8d52006-05-27 19:21:47 +000026758 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000026759 echo 'CEOF
Thomas Wouters477c8d52006-05-27 19:21:47 +000026760 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
26761 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
26762 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
26763 grep . conftest.tail >/dev/null || break
Martin v. Löwis11437992002-04-12 09:54:03 +000026764 rm -f conftest.defines
26765 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000026766done
Thomas Wouters477c8d52006-05-27 19:21:47 +000026767rm -f conftest.defines conftest.tail
Jack Jansendd19cf82001-12-06 22:36:17 +000026768
Thomas Wouters477c8d52006-05-27 19:21:47 +000026769echo "ac_result=$ac_in" >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000026770cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026771 if test x"$ac_file" != x-; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000026772 echo "/* $configure_input */" >"$tmp/config.h"
26773 cat "$ac_result" >>"$tmp/config.h"
26774 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026775 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
26776echo "$as_me: $ac_file is unchanged" >&6;}
26777 else
Martin v. Löwis11437992002-04-12 09:54:03 +000026778 rm -f $ac_file
Thomas Wouters477c8d52006-05-27 19:21:47 +000026779 mv "$tmp/config.h" $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000026780 fi
26781 else
Thomas Wouters477c8d52006-05-27 19:21:47 +000026782 echo "/* $configure_input */"
26783 cat "$ac_result"
Martin v. Löwis11437992002-04-12 09:54:03 +000026784 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026785 rm -f "$tmp/out12"
26786 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000026787
Thomas Wouters477c8d52006-05-27 19:21:47 +000026788
26789 esac
26790
26791done # for ac_tag
26792
Guido van Rossum627b2d71993-12-24 10:39:16 +000026793
Martin v. Löwis11437992002-04-12 09:54:03 +000026794{ (exit 0); exit 0; }
26795_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026796chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000026797ac_clean_files=$ac_clean_files_save
26798
26799
26800# configure is writing to config.log, and then calls config.status.
26801# config.status does its own redirection, appending to config.log.
26802# Unfortunately, on DOS this fails, as config.log is still kept open
26803# by configure, so config.status won't be able to write to it; its
26804# output is simply discarded. So we exec the FD to /dev/null,
26805# effectively closing config.log, so it can be properly (re)opened and
26806# appended to by config.status. When coming back to configure, we
26807# need to make the FD available again.
26808if test "$no_create" != yes; then
26809 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000026810 ac_config_status_args=
26811 test "$silent" = yes &&
26812 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000026813 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000026814 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000026815 exec 5>>config.log
26816 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
26817 # would make configure fail if this is the last instruction.
26818 $ac_cs_success || { (exit 1); exit 1; }
26819fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000026820
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000026821
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000026822echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000026823if test ! -f Modules/Setup
26824then
26825 cp $srcdir/Modules/Setup.dist Modules/Setup
26826fi
26827
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000026828echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000026829if test ! -f Modules/Setup.local
26830then
26831 echo "# Edit this file for local setup changes" >Modules/Setup.local
26832fi
26833
26834echo "creating Makefile"
26835$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
26836 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000026837 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000026838mv config.c Modules