blob: 033bb687ab8b60fd9a588fcbd0be20042251c4df [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Thomas Wouters0e3f5912006-08-11 14:57:12 +00002# From configure.in Revision: 46754 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Thomas Wouters0e3f5912006-08-11 14:57:12 +00004# Generated by GNU Autoconf 2.60 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
Thomas Wouters0e3f5912006-08-11 14:57:12 +0000236 # Try only shells that exist, to save several forks.
237 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +0000238 { ("$as_shell") 2> /dev/null <<\_ASEOF
Thomas Wouters477c8d52006-05-27 19:21:47 +0000239# Be Bourne compatible
240if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
241 emulate sh
242 NULLCMD=:
243 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
244 # is contrary to our usage. Disable this feature.
245 alias -g '${1+"$@"}'='"$@"'
246 setopt NO_GLOB_SUBST
247else
248 case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
249fi
250BIN_SH=xpg4; export BIN_SH # for Tru64
251DUALCASE=1; export DUALCASE # for MKS sh
252
253:
254_ASEOF
255}; then
256 CONFIG_SHELL=$as_shell
257 as_have_required=yes
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +0000258 if { "$as_shell" 2> /dev/null <<\_ASEOF
Thomas Wouters477c8d52006-05-27 19:21:47 +0000259# Be Bourne compatible
260if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
261 emulate sh
262 NULLCMD=:
263 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
264 # is contrary to our usage. Disable this feature.
265 alias -g '${1+"$@"}'='"$@"'
266 setopt NO_GLOB_SUBST
267else
268 case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
269fi
270BIN_SH=xpg4; export BIN_SH # for Tru64
271DUALCASE=1; export DUALCASE # for MKS sh
272
273:
274(as_func_return () {
275 (exit $1)
276}
277as_func_success () {
278 as_func_return 0
279}
280as_func_failure () {
281 as_func_return 1
282}
283as_func_ret_success () {
284 return 0
285}
286as_func_ret_failure () {
287 return 1
288}
289
290exitcode=0
291if as_func_success; then
292 :
293else
294 exitcode=1
295 echo as_func_success failed.
296fi
297
298if as_func_failure; then
299 exitcode=1
300 echo as_func_failure succeeded.
301fi
302
303if as_func_ret_success; then
304 :
305else
306 exitcode=1
307 echo as_func_ret_success failed.
308fi
309
310if as_func_ret_failure; then
311 exitcode=1
312 echo as_func_ret_failure succeeded.
313fi
314
315if ( set x; as_func_ret_success y && test x = "$1" ); then
316 :
317else
318 exitcode=1
319 echo positional parameters were not saved.
320fi
321
322test $exitcode = 0) || { (exit 1); exit 1; }
323
324(
Martin v. Löwis11437992002-04-12 09:54:03 +0000325 as_lineno_1=$LINENO
326 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +0000327 test "x$as_lineno_1" != "x$as_lineno_2" &&
Thomas Wouters477c8d52006-05-27 19:21:47 +0000328 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
329
330_ASEOF
331}; then
332 break
333fi
334
335fi
336
337 done
338
339 if test "x$CONFIG_SHELL" != x; then
340 for as_var in BASH_ENV ENV
341 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
342 done
343 export CONFIG_SHELL
344 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
345fi
346
347
348 if test $as_have_required = no; then
349 echo This script requires a shell more modern than all the
350 echo shells that I found on your system. Please install a
351 echo modern shell, or manually run the script under such a
352 echo shell if you do have one.
353 { (exit 1); exit 1; }
354fi
355
356
357fi
358
359fi
360
361
362
363(eval "as_func_return () {
364 (exit \$1)
365}
366as_func_success () {
367 as_func_return 0
368}
369as_func_failure () {
370 as_func_return 1
371}
372as_func_ret_success () {
373 return 0
374}
375as_func_ret_failure () {
376 return 1
377}
378
379exitcode=0
380if as_func_success; then
381 :
382else
383 exitcode=1
384 echo as_func_success failed.
385fi
386
387if as_func_failure; then
388 exitcode=1
389 echo as_func_failure succeeded.
390fi
391
392if as_func_ret_success; then
393 :
394else
395 exitcode=1
396 echo as_func_ret_success failed.
397fi
398
399if as_func_ret_failure; then
400 exitcode=1
401 echo as_func_ret_failure succeeded.
402fi
403
404if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
405 :
406else
407 exitcode=1
408 echo positional parameters were not saved.
409fi
410
411test \$exitcode = 0") || {
412 echo No shell found that supports shell functions.
413 echo Please tell autoconf@gnu.org about your system,
414 echo including any error possibly output before this
415 echo message
416}
417
418
419
420 as_lineno_1=$LINENO
421 as_lineno_2=$LINENO
422 test "x$as_lineno_1" != "x$as_lineno_2" &&
423 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Martin v. Löwis11437992002-04-12 09:54:03 +0000424
425 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
426 # uniformly replaced by the line number. The first 'sed' inserts a
Thomas Wouters477c8d52006-05-27 19:21:47 +0000427 # line-number line after each line using $LINENO; the second 'sed'
428 # does the real work. The second script uses 'N' to pair each
429 # line-number line with the line containing $LINENO, and appends
430 # trailing '-' during substitution so that $LINENO is not a special
431 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +0000432 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Thomas Wouters477c8d52006-05-27 19:21:47 +0000433 # scripts with optimization help from Paolo Bonzini. Blame Lee
434 # E. McMahon (1931-1989) for sed's syntax. :-)
435 sed -n '
436 p
437 /[$]LINENO/=
438 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000439 sed '
Thomas Wouters477c8d52006-05-27 19:21:47 +0000440 s/[$]LINENO.*/&-/
441 t lineno
442 b
443 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000444 N
Thomas Wouters477c8d52006-05-27 19:21:47 +0000445 :loop
446 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000447 t loop
Thomas Wouters477c8d52006-05-27 19:21:47 +0000448 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000449 ' >$as_me.lineno &&
Thomas Wouters477c8d52006-05-27 19:21:47 +0000450 chmod +x "$as_me.lineno" ||
Martin v. Löwis11437992002-04-12 09:54:03 +0000451 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
452 { (exit 1); exit 1; }; }
453
454 # Don't try to exec as it changes $[0], causing all sort of problems
455 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters477c8d52006-05-27 19:21:47 +0000456 # original and so on. Autoconf is especially sensitive to this).
457 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000458 # Exit status is that of the last command.
459 exit
460}
461
462
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +0000463if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
Thomas Wouters477c8d52006-05-27 19:21:47 +0000464 as_dirname=dirname
465else
466 as_dirname=false
467fi
468
469ECHO_C= ECHO_N= ECHO_T=
470case `echo -n x` in
471-n*)
472 case `echo 'x\c'` in
473 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
474 *) ECHO_C='\c';;
475 esac;;
476*)
477 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000478esac
479
Thomas Wouters477c8d52006-05-27 19:21:47 +0000480if expr a : '\(a\)' >/dev/null 2>&1 &&
481 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000482 as_expr=expr
483else
484 as_expr=false
485fi
486
487rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters477c8d52006-05-27 19:21:47 +0000488if test -d conf$$.dir; then
489 rm -f conf$$.dir/conf$$.file
490else
491 rm -f conf$$.dir
492 mkdir conf$$.dir
493fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000494echo >conf$$.file
495if ln -s conf$$.file conf$$ 2>/dev/null; then
Thomas Wouters477c8d52006-05-27 19:21:47 +0000496 as_ln_s='ln -s'
497 # ... but there are two gotchas:
498 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
499 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
500 # In both cases, we have to default to `cp -p'.
501 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +0000502 as_ln_s='cp -p'
Martin v. Löwis11437992002-04-12 09:54:03 +0000503elif ln conf$$.file conf$$ 2>/dev/null; then
504 as_ln_s=ln
505else
506 as_ln_s='cp -p'
507fi
Thomas Wouters477c8d52006-05-27 19:21:47 +0000508rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
509rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000510
Skip Montanaro6dead952003-09-25 14:50:04 +0000511if mkdir -p . 2>/dev/null; then
512 as_mkdir_p=:
513else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000514 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000515 as_mkdir_p=false
516fi
517
Thomas Wouters477c8d52006-05-27 19:21:47 +0000518# Find out whether ``test -x'' works. Don't use a zero-byte file, as
519# systems may use methods other than mode bits to determine executability.
520cat >conf$$.file <<_ASEOF
521#! /bin/sh
522exit 0
523_ASEOF
524chmod +x conf$$.file
525if test -x conf$$.file >/dev/null 2>&1; then
526 as_executable_p="test -x"
527else
528 as_executable_p=:
529fi
530rm -f conf$$.file
Martin v. Löwis11437992002-04-12 09:54:03 +0000531
532# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000533as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000534
535# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000536as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000537
538
Martin v. Löwis11437992002-04-12 09:54:03 +0000539
Thomas Wouters477c8d52006-05-27 19:21:47 +0000540exec 7<&0 </dev/null 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000541
542# Name of the host.
543# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
544# so uname gets run too.
545ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
546
Martin v. Löwis11437992002-04-12 09:54:03 +0000547#
548# Initializations.
549#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000550ac_default_prefix=/usr/local
Thomas Wouters477c8d52006-05-27 19:21:47 +0000551ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000552ac_config_libobj_dir=.
Thomas Wouters477c8d52006-05-27 19:21:47 +0000553LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000554cross_compiling=no
555subdirs=
556MFLAGS=
557MAKEFLAGS=
558SHELL=${CONFIG_SHELL-/bin/sh}
559
Martin v. Löwis11437992002-04-12 09:54:03 +0000560# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000561PACKAGE_NAME='python'
562PACKAGE_TARNAME='python'
Guido van Rossum0c4eb622006-03-30 16:19:24 +0000563PACKAGE_VERSION='3.0'
564PACKAGE_STRING='python 3.0'
Martin v. Löwis1d459062005-03-14 21:23:33 +0000565PACKAGE_BUGREPORT='http://www.python.org/python-bugs'
Martin v. Löwis11437992002-04-12 09:54:03 +0000566
567ac_unique_file="Include/object.h"
568# Factoring default headers for most tests.
569ac_includes_default="\
570#include <stdio.h>
571#if HAVE_SYS_TYPES_H
572# include <sys/types.h>
573#endif
574#if HAVE_SYS_STAT_H
575# include <sys/stat.h>
576#endif
577#if STDC_HEADERS
578# include <stdlib.h>
579# include <stddef.h>
580#else
581# if HAVE_STDLIB_H
582# include <stdlib.h>
583# endif
584#endif
585#if HAVE_STRING_H
586# if !STDC_HEADERS && HAVE_MEMORY_H
587# include <memory.h>
588# endif
589# include <string.h>
590#endif
591#if HAVE_STRINGS_H
592# include <strings.h>
593#endif
594#if HAVE_INTTYPES_H
595# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000596#endif
597#if HAVE_STDINT_H
598# include <stdint.h>
Martin v. Löwis11437992002-04-12 09:54:03 +0000599#endif
600#if HAVE_UNISTD_H
601# include <unistd.h>
602#endif"
603
Thomas Wouters477c8d52006-05-27 19:21:47 +0000604ac_subst_vars='SHELL
605PATH_SEPARATOR
606PACKAGE_NAME
607PACKAGE_TARNAME
608PACKAGE_VERSION
609PACKAGE_STRING
610PACKAGE_BUGREPORT
611exec_prefix
612prefix
613program_transform_name
614bindir
615sbindir
616libexecdir
617datarootdir
618datadir
619sysconfdir
620sharedstatedir
621localstatedir
622includedir
623oldincludedir
624docdir
625infodir
626htmldir
627dvidir
628pdfdir
629psdir
630libdir
631localedir
632mandir
633DEFS
634ECHO_C
635ECHO_N
636ECHO_T
637LIBS
638build_alias
639host_alias
640target_alias
641VERSION
642SOVERSION
643CONFIG_ARGS
644UNIVERSALSDK
645PYTHONFRAMEWORK
646PYTHONFRAMEWORKDIR
647PYTHONFRAMEWORKPREFIX
648PYTHONFRAMEWORKINSTALLDIR
649FRAMEWORKINSTALLFIRST
650FRAMEWORKINSTALLLAST
Thomas Wouters73e5a5b2006-06-08 15:35:45 +0000651FRAMEWORKALTINSTALLFIRST
652FRAMEWORKALTINSTALLLAST
653FRAMEWORKUNIXTOOLSPREFIX
Thomas Wouters477c8d52006-05-27 19:21:47 +0000654MACHDEP
655SGI_ABI
656EXTRAPLATDIR
657EXTRAMACHDEPPATH
658CONFIGURE_MACOSX_DEPLOYMENT_TARGET
659EXPORT_MACOSX_DEPLOYMENT_TARGET
660CC
661CFLAGS
662LDFLAGS
663CPPFLAGS
664ac_ct_CC
665EXEEXT
666OBJEXT
667CXX
668MAINCC
669CPP
670GREP
671EGREP
672BUILDEXEEXT
673LIBRARY
674LDLIBRARY
675DLLLIBRARY
676BLDLIBRARY
677LDLIBRARYDIR
678INSTSONAME
679RUNSHARED
680LINKCC
681RANLIB
682AR
683SVNVERSION
684INSTALL_PROGRAM
685INSTALL_SCRIPT
686INSTALL_DATA
687LN
688OPT
689BASECFLAGS
690OTHER_LIBTOOL_OPT
691LIBTOOL_CRUFT
692SO
693LDSHARED
694BLDSHARED
695CCSHARED
696LINKFORSHARED
697CFLAGSFORSHARED
698SHLIBS
699USE_SIGNAL_MODULE
700SIGNAL_OBJS
701USE_THREAD_MODULE
702LDLAST
703THREADOBJ
704DLINCLDIR
705DYNLOADFILE
706MACHDEP_OBJS
707TRUE
708LIBOBJS
709HAVE_GETHOSTBYNAME_R_6_ARG
710HAVE_GETHOSTBYNAME_R_5_ARG
711HAVE_GETHOSTBYNAME_R_3_ARG
712HAVE_GETHOSTBYNAME_R
713HAVE_GETHOSTBYNAME
714LIBM
715LIBC
716UNICODE_OBJS
717THREADHEADERS
718SRCDIRS
719LTLIBOBJS'
Skip Montanaro6dead952003-09-25 14:50:04 +0000720ac_subst_files=''
Thomas Wouters477c8d52006-05-27 19:21:47 +0000721 ac_precious_vars='build_alias
722host_alias
723target_alias
724CC
725CFLAGS
726LDFLAGS
727CPPFLAGS
728CPP'
729
Guido van Rossum627b2d71993-12-24 10:39:16 +0000730
Guido van Rossum7f43da71994-08-01 12:15:30 +0000731# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000732ac_init_help=
733ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000734# The variables have the same names as the options, with
735# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000736cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000737exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000738no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000739no_recursion=
740prefix=NONE
741program_prefix=NONE
742program_suffix=NONE
743program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000744silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000745site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000746srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000747verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000748x_includes=NONE
749x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000750
751# Installation directory options.
752# These are left unexpanded so users can "make install exec_prefix=/foo"
753# and all the variables that are supposed to be based on exec_prefix
754# by default will actually change.
755# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters477c8d52006-05-27 19:21:47 +0000756# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000757bindir='${exec_prefix}/bin'
758sbindir='${exec_prefix}/sbin'
759libexecdir='${exec_prefix}/libexec'
Thomas Wouters477c8d52006-05-27 19:21:47 +0000760datarootdir='${prefix}/share'
761datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000762sysconfdir='${prefix}/etc'
763sharedstatedir='${prefix}/com'
764localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000765includedir='${prefix}/include'
766oldincludedir='/usr/include'
Thomas Wouters477c8d52006-05-27 19:21:47 +0000767docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
768infodir='${datarootdir}/info'
769htmldir='${docdir}'
770dvidir='${docdir}'
771pdfdir='${docdir}'
772psdir='${docdir}'
773libdir='${exec_prefix}/lib'
774localedir='${datarootdir}/locale'
775mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000776
Guido van Rossum7f43da71994-08-01 12:15:30 +0000777ac_prev=
Thomas Wouters477c8d52006-05-27 19:21:47 +0000778ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000779for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000780do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000781 # If the previous option needs an argument, assign it.
782 if test -n "$ac_prev"; then
Thomas Wouters477c8d52006-05-27 19:21:47 +0000783 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000784 ac_prev=
785 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000786 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000787
Thomas Wouters477c8d52006-05-27 19:21:47 +0000788 case $ac_option in
789 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
790 *) ac_optarg=yes ;;
791 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000792
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000793 # Accept the important Cygnus configure options, so we can diagnose typos.
794
Thomas Wouters477c8d52006-05-27 19:21:47 +0000795 case $ac_dashdash$ac_option in
796 --)
797 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000798
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000799 -bindir | --bindir | --bindi | --bind | --bin | --bi)
800 ac_prev=bindir ;;
801 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000802 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000803
804 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000805 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000806 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000807 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000808
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000809 -cache-file | --cache-file | --cache-fil | --cache-fi \
810 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
811 ac_prev=cache_file ;;
812 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
813 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000814 cache_file=$ac_optarg ;;
815
816 --config-cache | -C)
817 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000818
Thomas Wouters477c8d52006-05-27 19:21:47 +0000819 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000820 ac_prev=datadir ;;
Thomas Wouters477c8d52006-05-27 19:21:47 +0000821 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000822 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000823
Thomas Wouters477c8d52006-05-27 19:21:47 +0000824 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
825 | --dataroo | --dataro | --datar)
826 ac_prev=datarootdir ;;
827 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
828 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
829 datarootdir=$ac_optarg ;;
830
Guido van Rossum7f43da71994-08-01 12:15:30 +0000831 -disable-* | --disable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000832 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000833 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000834 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
835 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
836 { (exit 1); exit 1; }; }
837 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
Thomas Wouters477c8d52006-05-27 19:21:47 +0000838 eval enable_$ac_feature=no ;;
839
840 -docdir | --docdir | --docdi | --doc | --do)
841 ac_prev=docdir ;;
842 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
843 docdir=$ac_optarg ;;
844
845 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
846 ac_prev=dvidir ;;
847 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
848 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000849
850 -enable-* | --enable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000851 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000852 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000853 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
854 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
855 { (exit 1); exit 1; }; }
856 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
Thomas Wouters477c8d52006-05-27 19:21:47 +0000857 eval enable_$ac_feature=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000858
Guido van Rossum7f43da71994-08-01 12:15:30 +0000859 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
860 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
861 | --exec | --exe | --ex)
862 ac_prev=exec_prefix ;;
863 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
864 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
865 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000866 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000867
868 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000869 # Obsolete; use --with-gas.
870 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000871
Martin v. Löwis11437992002-04-12 09:54:03 +0000872 -help | --help | --hel | --he | -h)
873 ac_init_help=long ;;
874 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
875 ac_init_help=recursive ;;
876 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
877 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000878
879 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000880 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000881 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000882 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000883
Thomas Wouters477c8d52006-05-27 19:21:47 +0000884 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
885 ac_prev=htmldir ;;
886 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
887 | --ht=*)
888 htmldir=$ac_optarg ;;
889
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000890 -includedir | --includedir | --includedi | --included | --include \
891 | --includ | --inclu | --incl | --inc)
892 ac_prev=includedir ;;
893 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
894 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000895 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000896
897 -infodir | --infodir | --infodi | --infod | --info | --inf)
898 ac_prev=infodir ;;
899 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000900 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000901
902 -libdir | --libdir | --libdi | --libd)
903 ac_prev=libdir ;;
904 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000905 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000906
907 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
908 | --libexe | --libex | --libe)
909 ac_prev=libexecdir ;;
910 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
911 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000912 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000913
Thomas Wouters477c8d52006-05-27 19:21:47 +0000914 -localedir | --localedir | --localedi | --localed | --locale)
915 ac_prev=localedir ;;
916 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
917 localedir=$ac_optarg ;;
918
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000919 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters477c8d52006-05-27 19:21:47 +0000920 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000921 ac_prev=localstatedir ;;
922 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters477c8d52006-05-27 19:21:47 +0000923 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000924 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000925
926 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
927 ac_prev=mandir ;;
928 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000929 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000930
Guido van Rossum7f43da71994-08-01 12:15:30 +0000931 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000932 # Obsolete; use --without-fp.
933 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000934
935 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000936 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000937 no_create=yes ;;
938
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000939 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
940 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
941 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000942
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000943 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
944 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
945 | --oldin | --oldi | --old | --ol | --o)
946 ac_prev=oldincludedir ;;
947 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
948 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
949 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000950 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000951
Guido van Rossum7f43da71994-08-01 12:15:30 +0000952 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
953 ac_prev=prefix ;;
954 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000955 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000956
957 -program-prefix | --program-prefix | --program-prefi | --program-pref \
958 | --program-pre | --program-pr | --program-p)
959 ac_prev=program_prefix ;;
960 -program-prefix=* | --program-prefix=* | --program-prefi=* \
961 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000962 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000963
964 -program-suffix | --program-suffix | --program-suffi | --program-suff \
965 | --program-suf | --program-su | --program-s)
966 ac_prev=program_suffix ;;
967 -program-suffix=* | --program-suffix=* | --program-suffi=* \
968 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000969 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000970
971 -program-transform-name | --program-transform-name \
972 | --program-transform-nam | --program-transform-na \
973 | --program-transform-n | --program-transform- \
974 | --program-transform | --program-transfor \
975 | --program-transfo | --program-transf \
976 | --program-trans | --program-tran \
977 | --progr-tra | --program-tr | --program-t)
978 ac_prev=program_transform_name ;;
979 -program-transform-name=* | --program-transform-name=* \
980 | --program-transform-nam=* | --program-transform-na=* \
981 | --program-transform-n=* | --program-transform-=* \
982 | --program-transform=* | --program-transfor=* \
983 | --program-transfo=* | --program-transf=* \
984 | --program-trans=* | --program-tran=* \
985 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000986 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000987
Thomas Wouters477c8d52006-05-27 19:21:47 +0000988 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
989 ac_prev=pdfdir ;;
990 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
991 pdfdir=$ac_optarg ;;
992
993 -psdir | --psdir | --psdi | --psd | --ps)
994 ac_prev=psdir ;;
995 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
996 psdir=$ac_optarg ;;
997
Guido van Rossum7f43da71994-08-01 12:15:30 +0000998 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
999 | -silent | --silent | --silen | --sile | --sil)
1000 silent=yes ;;
1001
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001002 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1003 ac_prev=sbindir ;;
1004 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1005 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001006 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001007
1008 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1009 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1010 | --sharedst | --shareds | --shared | --share | --shar \
1011 | --sha | --sh)
1012 ac_prev=sharedstatedir ;;
1013 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1014 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1015 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1016 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001017 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001018
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001019 -site | --site | --sit)
1020 ac_prev=site ;;
1021 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001022 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001023
Guido van Rossum7f43da71994-08-01 12:15:30 +00001024 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1025 ac_prev=srcdir ;;
1026 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001027 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001028
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001029 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1030 | --syscon | --sysco | --sysc | --sys | --sy)
1031 ac_prev=sysconfdir ;;
1032 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1033 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001034 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001035
Guido van Rossum7f43da71994-08-01 12:15:30 +00001036 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001037 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001038 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001039 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001040
1041 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1042 verbose=yes ;;
1043
Martin v. Löwis11437992002-04-12 09:54:03 +00001044 -version | --version | --versio | --versi | --vers | -V)
1045 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001046
1047 -with-* | --with-*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001048 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001049 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001050 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
1051 { echo "$as_me: error: invalid package name: $ac_package" >&2
1052 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001053 ac_package=`echo $ac_package| sed 's/-/_/g'`
Thomas Wouters477c8d52006-05-27 19:21:47 +00001054 eval with_$ac_package=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001055
1056 -without-* | --without-*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001057 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001058 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001059 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
1060 { echo "$as_me: error: invalid package name: $ac_package" >&2
1061 { (exit 1); exit 1; }; }
1062 ac_package=`echo $ac_package | sed 's/-/_/g'`
Thomas Wouters477c8d52006-05-27 19:21:47 +00001063 eval with_$ac_package=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001064
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001065 --x)
1066 # Obsolete; use --with-x.
1067 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001068
1069 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1070 | --x-incl | --x-inc | --x-in | --x-i)
1071 ac_prev=x_includes ;;
1072 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1073 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001074 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001075
1076 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1077 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1078 ac_prev=x_libraries ;;
1079 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1080 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001081 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001082
Martin v. Löwis11437992002-04-12 09:54:03 +00001083 -*) { echo "$as_me: error: unrecognized option: $ac_option
1084Try \`$0 --help' for more information." >&2
1085 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001086 ;;
1087
Martin v. Löwis11437992002-04-12 09:54:03 +00001088 *=*)
1089 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1090 # Reject names that are not valid shell variable names.
1091 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
1092 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
1093 { (exit 1); exit 1; }; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00001094 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001095 export $ac_envvar ;;
1096
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001097 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001098 # FIXME: should be removed in autoconf 3.0.
1099 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1100 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1101 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1102 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001103 ;;
1104
1105 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001106done
1107
Guido van Rossum7f43da71994-08-01 12:15:30 +00001108if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001109 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1110 { echo "$as_me: error: missing argument to $ac_option" >&2
1111 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001112fi
1113
Thomas Wouters477c8d52006-05-27 19:21:47 +00001114# Be sure to have absolute directory names.
1115for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1116 datadir sysconfdir sharedstatedir localstatedir includedir \
1117 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1118 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001119do
Thomas Wouters477c8d52006-05-27 19:21:47 +00001120 eval ac_val=\$$ac_var
Martin v. Löwis11437992002-04-12 09:54:03 +00001121 case $ac_val in
Thomas Wouters477c8d52006-05-27 19:21:47 +00001122 [\\/$]* | ?:[\\/]* ) continue;;
1123 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001124 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +00001125 { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
1126 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001127done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001128
Martin v. Löwis11437992002-04-12 09:54:03 +00001129# There might be people who depend on the old broken behavior: `$host'
1130# used to hold the argument of --host etc.
1131# FIXME: To remove some day.
1132build=$build_alias
1133host=$host_alias
1134target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001135
Martin v. Löwis11437992002-04-12 09:54:03 +00001136# FIXME: To remove some day.
1137if test "x$host_alias" != x; then
1138 if test "x$build_alias" = x; then
1139 cross_compiling=maybe
1140 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1141 If a cross compiler is detected then cross compile mode will be used." >&2
1142 elif test "x$build_alias" != "x$host_alias"; then
1143 cross_compiling=yes
1144 fi
1145fi
1146
1147ac_tool_prefix=
1148test -n "$host_alias" && ac_tool_prefix=$host_alias-
1149
1150test "$silent" = yes && exec 6>/dev/null
1151
Guido van Rossum627b2d71993-12-24 10:39:16 +00001152
Thomas Wouters477c8d52006-05-27 19:21:47 +00001153ac_pwd=`pwd` && test -n "$ac_pwd" &&
1154ac_ls_di=`ls -di .` &&
1155ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1156 { echo "$as_me: error: Working directory cannot be determined" >&2
1157 { (exit 1); exit 1; }; }
1158test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1159 { echo "$as_me: error: pwd does not report name of working directory" >&2
1160 { (exit 1); exit 1; }; }
1161
1162
Guido van Rossum627b2d71993-12-24 10:39:16 +00001163# Find the source files, if location was not specified.
1164if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001165 ac_srcdir_defaulted=yes
Thomas Wouters477c8d52006-05-27 19:21:47 +00001166 # Try the directory containing this script, then the parent directory.
1167 ac_confdir=`$as_dirname -- "$0" ||
Martin v. Löwis11437992002-04-12 09:54:03 +00001168$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +00001169 X"$0" : 'X\(//\)[^/]' \| \
1170 X"$0" : 'X\(//\)$' \| \
Thomas Wouters477c8d52006-05-27 19:21:47 +00001171 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +00001172echo X"$0" |
Thomas Wouters477c8d52006-05-27 19:21:47 +00001173 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1174 s//\1/
1175 q
1176 }
1177 /^X\(\/\/\)[^/].*/{
1178 s//\1/
1179 q
1180 }
1181 /^X\(\/\/\)$/{
1182 s//\1/
1183 q
1184 }
1185 /^X\(\/\).*/{
1186 s//\1/
1187 q
1188 }
1189 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001190 srcdir=$ac_confdir
Thomas Wouters477c8d52006-05-27 19:21:47 +00001191 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001192 srcdir=..
1193 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001194else
1195 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001196fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00001197if test ! -r "$srcdir/$ac_unique_file"; then
1198 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1199 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001200 { (exit 1); exit 1; }; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001201fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00001202ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1203ac_abs_confdir=`(
1204 cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00001205 { (exit 1); exit 1; }; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00001206 pwd)`
1207# When building in place, set srcdir=.
1208if test "$ac_abs_confdir" = "$ac_pwd"; then
1209 srcdir=.
1210fi
1211# Remove unnecessary trailing slashes from srcdir.
1212# Double slashes in file names in object file debugging info
1213# mess up M-x gdb in Emacs.
1214case $srcdir in
1215*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1216esac
1217for ac_var in $ac_precious_vars; do
1218 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1219 eval ac_env_${ac_var}_value=\$${ac_var}
1220 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1221 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1222done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001223
Martin v. Löwis11437992002-04-12 09:54:03 +00001224#
1225# Report the --help message.
1226#
1227if test "$ac_init_help" = "long"; then
1228 # Omit some internal or obsolete options to make the list less imposing.
1229 # This message is too long to be a string in the A/UX 3.1 sh.
1230 cat <<_ACEOF
Guido van Rossum0c4eb622006-03-30 16:19:24 +00001231\`configure' configures python 3.0 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001232
1233Usage: $0 [OPTION]... [VAR=VALUE]...
1234
1235To assign environment variables (e.g., CC, CFLAGS...), specify them as
1236VAR=VALUE. See below for descriptions of some of the useful variables.
1237
1238Defaults for the options are specified in brackets.
1239
1240Configuration:
1241 -h, --help display this help and exit
1242 --help=short display options specific to this package
1243 --help=recursive display the short help of all the included packages
1244 -V, --version display version information and exit
1245 -q, --quiet, --silent do not print \`checking...' messages
1246 --cache-file=FILE cache test results in FILE [disabled]
1247 -C, --config-cache alias for \`--cache-file=config.cache'
1248 -n, --no-create do not create output files
1249 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1250
Martin v. Löwis11437992002-04-12 09:54:03 +00001251Installation directories:
1252 --prefix=PREFIX install architecture-independent files in PREFIX
Skip Montanarof0d5f792004-08-15 14:08:23 +00001253 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001254 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Skip Montanarof0d5f792004-08-15 14:08:23 +00001255 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001256
1257By default, \`make install' will install all the files in
1258\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1259an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1260for instance \`--prefix=\$HOME'.
1261
1262For better control, use the options below.
1263
1264Fine tuning of the installation directories:
1265 --bindir=DIR user executables [EPREFIX/bin]
1266 --sbindir=DIR system admin executables [EPREFIX/sbin]
1267 --libexecdir=DIR program executables [EPREFIX/libexec]
Martin v. Löwis11437992002-04-12 09:54:03 +00001268 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1269 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1270 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1271 --libdir=DIR object code libraries [EPREFIX/lib]
1272 --includedir=DIR C header files [PREFIX/include]
1273 --oldincludedir=DIR C header files for non-gcc [/usr/include]
Thomas Wouters477c8d52006-05-27 19:21:47 +00001274 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1275 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1276 --infodir=DIR info documentation [DATAROOTDIR/info]
1277 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1278 --mandir=DIR man documentation [DATAROOTDIR/man]
1279 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1280 --htmldir=DIR html documentation [DOCDIR]
1281 --dvidir=DIR dvi documentation [DOCDIR]
1282 --pdfdir=DIR pdf documentation [DOCDIR]
1283 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001284_ACEOF
1285
1286 cat <<\_ACEOF
1287_ACEOF
1288fi
1289
1290if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001291 case $ac_init_help in
Guido van Rossum0c4eb622006-03-30 16:19:24 +00001292 short | recursive ) echo "Configuration of python 3.0:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001293 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001294 cat <<\_ACEOF
1295
1296Optional Features:
1297 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1298 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Thomas Wouters477c8d52006-05-27 19:21:47 +00001299 --enable-universalsdk[SDKDIR]
1300 Build agains Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001301 --enable-framework[=INSTALLDIR]
1302 Build (MacOSX|Darwin) framework
1303 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001304 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001305 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
1306 --enable-ipv6 Enable ipv6 (with ipv4) support
1307 --disable-ipv6 Disable ipv6 support
1308 --enable-unicode[=ucs[24]]
1309 Enable Unicode strings (default is yes)
Martin v. Löwis11437992002-04-12 09:54:03 +00001310
1311Optional Packages:
1312 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1313 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001314 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001315 --with-cxx-main=<compiler>
1316 compile main() and link python executable with C++
1317 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001318 --with-suffix=.exe set executable suffix
1319 --with-pydebug build with Py_DEBUG defined
1320 --with-libs='lib1 ...' link against additional libs
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001321 --with-system-ffi build _ctypes module using an installed ffi library
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001322 --with-signal-module disable/enable signal module
1323 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1324 --with(out)-threads[=DIRECTORY]
1325 disable/enable thread support
1326 --with(out)-thread[=DIRECTORY]
1327 deprecated; use --with(out)-threads
1328 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001329 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001330 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001331 --with(out)-pymalloc disable/enable specialized mallocs
1332 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001333 --with-fpectl enable SIGFPE catching
1334 --with-libm=STRING math library
1335 --with-libc=STRING C library
Martin v. Löwis11437992002-04-12 09:54:03 +00001336
1337Some influential environment variables:
1338 CC C compiler command
1339 CFLAGS C compiler flags
1340 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1341 nonstandard directory <lib dir>
Thomas Wouters477c8d52006-05-27 19:21:47 +00001342 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1343 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001344 CPP C preprocessor
1345
1346Use these variables to override the choices made by `configure' or to help
1347it to find libraries and programs with nonstandard names/locations.
1348
Martin v. Löwis1d459062005-03-14 21:23:33 +00001349Report bugs to <http://www.python.org/python-bugs>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001350_ACEOF
Thomas Wouters477c8d52006-05-27 19:21:47 +00001351ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001352fi
1353
1354if test "$ac_init_help" = "recursive"; then
1355 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001356 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00001357 test -d "$ac_dir" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001358 ac_builddir=.
1359
Thomas Wouters477c8d52006-05-27 19:21:47 +00001360case "$ac_dir" in
1361.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1362*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001363 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Thomas Wouters477c8d52006-05-27 19:21:47 +00001364 # A ".." for each directory in $ac_dir_suffix.
1365 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
1366 case $ac_top_builddir_sub in
1367 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1368 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1369 esac ;;
1370esac
1371ac_abs_top_builddir=$ac_pwd
1372ac_abs_builddir=$ac_pwd$ac_dir_suffix
1373# for backward compatibility:
1374ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001375
1376case $srcdir in
Thomas Wouters477c8d52006-05-27 19:21:47 +00001377 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001378 ac_srcdir=.
Thomas Wouters477c8d52006-05-27 19:21:47 +00001379 ac_top_srcdir=$ac_top_builddir_sub
1380 ac_abs_top_srcdir=$ac_pwd ;;
1381 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001382 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters477c8d52006-05-27 19:21:47 +00001383 ac_top_srcdir=$srcdir
1384 ac_abs_top_srcdir=$srcdir ;;
1385 *) # Relative name.
1386 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1387 ac_top_srcdir=$ac_top_build_prefix$srcdir
1388 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001389esac
Thomas Wouters477c8d52006-05-27 19:21:47 +00001390ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001391
Thomas Wouters477c8d52006-05-27 19:21:47 +00001392 cd "$ac_dir" || { ac_status=$?; continue; }
1393 # Check for guested configure.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00001394 if test -f "$ac_srcdir/configure.gnu"; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00001395 echo &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00001396 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1397 elif test -f "$ac_srcdir/configure"; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00001398 echo &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00001399 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001400 else
1401 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters477c8d52006-05-27 19:21:47 +00001402 fi || ac_status=$?
1403 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001404 done
1405fi
1406
Thomas Wouters477c8d52006-05-27 19:21:47 +00001407test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001408if $ac_init_version; then
1409 cat <<\_ACEOF
Guido van Rossum0c4eb622006-03-30 16:19:24 +00001410python configure 3.0
Thomas Wouters0e3f5912006-08-11 14:57:12 +00001411generated by GNU Autoconf 2.60
Martin v. Löwis11437992002-04-12 09:54:03 +00001412
Thomas Wouters477c8d52006-05-27 19:21:47 +00001413Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
14142002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001415This configure script is free software; the Free Software Foundation
1416gives unlimited permission to copy, distribute and modify it.
1417_ACEOF
Thomas Wouters477c8d52006-05-27 19:21:47 +00001418 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001419fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00001420cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00001421This file contains any messages produced by compilers while
1422running configure, to aid debugging if configure makes a mistake.
1423
Guido van Rossum0c4eb622006-03-30 16:19:24 +00001424It was created by python $as_me 3.0, which was
Thomas Wouters0e3f5912006-08-11 14:57:12 +00001425generated by GNU Autoconf 2.60. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00001426
1427 $ $0 $@
1428
1429_ACEOF
Thomas Wouters477c8d52006-05-27 19:21:47 +00001430exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00001431{
1432cat <<_ASUNAME
1433## --------- ##
1434## Platform. ##
1435## --------- ##
1436
1437hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1438uname -m = `(uname -m) 2>/dev/null || echo unknown`
1439uname -r = `(uname -r) 2>/dev/null || echo unknown`
1440uname -s = `(uname -s) 2>/dev/null || echo unknown`
1441uname -v = `(uname -v) 2>/dev/null || echo unknown`
1442
1443/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1444/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1445
1446/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1447/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1448/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters477c8d52006-05-27 19:21:47 +00001449/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00001450/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1451/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1452/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1453
1454_ASUNAME
1455
1456as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1457for as_dir in $PATH
1458do
1459 IFS=$as_save_IFS
1460 test -z "$as_dir" && as_dir=.
1461 echo "PATH: $as_dir"
1462done
Thomas Wouters477c8d52006-05-27 19:21:47 +00001463IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00001464
1465} >&5
1466
1467cat >&5 <<_ACEOF
1468
1469
1470## ----------- ##
1471## Core tests. ##
1472## ----------- ##
1473
1474_ACEOF
1475
1476
1477# Keep a trace of the command line.
1478# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001479# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001480# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001481# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001482ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001483ac_configure_args0=
1484ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00001485ac_must_keep_next=false
1486for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001487do
Skip Montanaro6dead952003-09-25 14:50:04 +00001488 for ac_arg
1489 do
1490 case $ac_arg in
1491 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1492 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1493 | -silent | --silent | --silen | --sile | --sil)
1494 continue ;;
Thomas Wouters477c8d52006-05-27 19:21:47 +00001495 *\'*)
Skip Montanaro6dead952003-09-25 14:50:04 +00001496 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1497 esac
1498 case $ac_pass in
1499 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1500 2)
1501 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1502 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001503 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00001504 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00001505 case $ac_arg in
1506 *=* | --config-cache | -C | -disable-* | --disable-* \
1507 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1508 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1509 | -with-* | --with-* | -without-* | --without-* | --x)
1510 case "$ac_configure_args0 " in
1511 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1512 esac
1513 ;;
1514 -* ) ac_must_keep_next=true ;;
1515 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00001516 fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00001517 ac_configure_args="$ac_configure_args '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00001518 ;;
1519 esac
1520 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001521done
Skip Montanaro6dead952003-09-25 14:50:04 +00001522$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1523$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001524
1525# When interrupted or exit'd, cleanup temporary files, and complete
1526# config.log. We remove comments because anyway the quotes in there
1527# would cause problems or look ugly.
Thomas Wouters477c8d52006-05-27 19:21:47 +00001528# WARNING: Use '\'' to represent an apostrophe within the trap.
1529# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
Martin v. Löwis11437992002-04-12 09:54:03 +00001530trap 'exit_status=$?
1531 # Save into config.log some information that might help in debugging.
1532 {
1533 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001534
Martin v. Löwis11437992002-04-12 09:54:03 +00001535 cat <<\_ASBOX
1536## ---------------- ##
1537## Cache variables. ##
1538## ---------------- ##
1539_ASBOX
1540 echo
1541 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters477c8d52006-05-27 19:21:47 +00001542(
1543 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1544 eval ac_val=\$$ac_var
1545 case $ac_val in #(
1546 *${as_nl}*)
1547 case $ac_var in #(
1548 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1549echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
1550 esac
1551 case $ac_var in #(
1552 _ | IFS | as_nl) ;; #(
1553 *) $as_unset $ac_var ;;
1554 esac ;;
1555 esac
1556 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001557 (set) 2>&1 |
Thomas Wouters477c8d52006-05-27 19:21:47 +00001558 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1559 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001560 sed -n \
Thomas Wouters477c8d52006-05-27 19:21:47 +00001561 "s/'\''/'\''\\\\'\'''\''/g;
1562 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1563 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +00001564 *)
Thomas Wouters477c8d52006-05-27 19:21:47 +00001565 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +00001566 ;;
Thomas Wouters477c8d52006-05-27 19:21:47 +00001567 esac |
1568 sort
1569)
Martin v. Löwis11437992002-04-12 09:54:03 +00001570 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001571
1572 cat <<\_ASBOX
1573## ----------------- ##
1574## Output variables. ##
1575## ----------------- ##
1576_ASBOX
1577 echo
1578 for ac_var in $ac_subst_vars
1579 do
Thomas Wouters477c8d52006-05-27 19:21:47 +00001580 eval ac_val=\$$ac_var
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00001581 case $ac_val in
1582 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1583 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +00001584 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001585 done | sort
1586 echo
1587
1588 if test -n "$ac_subst_files"; then
1589 cat <<\_ASBOX
Thomas Wouters477c8d52006-05-27 19:21:47 +00001590## ------------------- ##
1591## File substitutions. ##
1592## ------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00001593_ASBOX
1594 echo
1595 for ac_var in $ac_subst_files
1596 do
Thomas Wouters477c8d52006-05-27 19:21:47 +00001597 eval ac_val=\$$ac_var
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00001598 case $ac_val in
1599 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1600 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +00001601 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001602 done | sort
1603 echo
1604 fi
1605
Martin v. Löwis11437992002-04-12 09:54:03 +00001606 if test -s confdefs.h; then
1607 cat <<\_ASBOX
1608## ----------- ##
1609## confdefs.h. ##
1610## ----------- ##
1611_ASBOX
1612 echo
Thomas Wouters477c8d52006-05-27 19:21:47 +00001613 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001614 echo
1615 fi
1616 test "$ac_signal" != 0 &&
1617 echo "$as_me: caught signal $ac_signal"
1618 echo "$as_me: exit $exit_status"
1619 } >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +00001620 rm -f core *.core core.conftest.* &&
1621 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001622 exit $exit_status
Thomas Wouters477c8d52006-05-27 19:21:47 +00001623' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00001624for ac_signal in 1 2 13 15; do
1625 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1626done
1627ac_signal=0
1628
1629# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters477c8d52006-05-27 19:21:47 +00001630rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001631
1632# Predefined preprocessor variables.
1633
1634cat >>confdefs.h <<_ACEOF
1635#define PACKAGE_NAME "$PACKAGE_NAME"
1636_ACEOF
1637
1638
1639cat >>confdefs.h <<_ACEOF
1640#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1641_ACEOF
1642
1643
1644cat >>confdefs.h <<_ACEOF
1645#define PACKAGE_VERSION "$PACKAGE_VERSION"
1646_ACEOF
1647
1648
1649cat >>confdefs.h <<_ACEOF
1650#define PACKAGE_STRING "$PACKAGE_STRING"
1651_ACEOF
1652
1653
1654cat >>confdefs.h <<_ACEOF
1655#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1656_ACEOF
1657
1658
1659# Let the site file select an alternate cache file if it wants to.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001660# Prefer explicitly selected file to automatically selected ones.
Thomas Wouters477c8d52006-05-27 19:21:47 +00001661if test -n "$CONFIG_SITE"; then
1662 set x "$CONFIG_SITE"
1663elif test "x$prefix" != xNONE; then
1664 set x "$prefix/share/config.site" "$prefix/etc/config.site"
1665else
1666 set x "$ac_default_prefix/share/config.site" \
1667 "$ac_default_prefix/etc/config.site"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001668fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00001669shift
1670for ac_site_file
1671do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001672 if test -r "$ac_site_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001673 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1674echo "$as_me: loading site script $ac_site_file" >&6;}
1675 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001676 . "$ac_site_file"
1677 fi
1678done
1679
1680if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001681 # Some versions of bash will fail to source /dev/null (special
1682 # files actually), so we avoid doing that.
1683 if test -f "$cache_file"; then
1684 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1685echo "$as_me: loading cache $cache_file" >&6;}
1686 case $cache_file in
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00001687 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1688 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00001689 esac
1690 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001691else
Martin v. Löwis11437992002-04-12 09:54:03 +00001692 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1693echo "$as_me: creating cache $cache_file" >&6;}
1694 >$cache_file
1695fi
1696
1697# Check that the precious variables saved in the cache have kept the same
1698# value.
1699ac_cache_corrupted=false
Thomas Wouters477c8d52006-05-27 19:21:47 +00001700for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001701 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1702 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters477c8d52006-05-27 19:21:47 +00001703 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1704 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00001705 case $ac_old_set,$ac_new_set in
1706 set,)
1707 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1708echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1709 ac_cache_corrupted=: ;;
1710 ,set)
1711 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1712echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1713 ac_cache_corrupted=: ;;
1714 ,);;
1715 *)
1716 if test "x$ac_old_val" != "x$ac_new_val"; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001717 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001718echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001719 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001720echo "$as_me: former value: $ac_old_val" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001721 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001722echo "$as_me: current value: $ac_new_val" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001723 ac_cache_corrupted=:
Martin v. Löwis11437992002-04-12 09:54:03 +00001724 fi;;
1725 esac
1726 # Pass precious variables to config.status.
1727 if test "$ac_new_set" = set; then
1728 case $ac_new_val in
Thomas Wouters477c8d52006-05-27 19:21:47 +00001729 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001730 *) ac_arg=$ac_var=$ac_new_val ;;
1731 esac
1732 case " $ac_configure_args " in
1733 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1734 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1735 esac
1736 fi
1737done
1738if $ac_cache_corrupted; then
1739 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1740echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1741 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1742echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1743 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001744fi
1745
Thomas Wouters477c8d52006-05-27 19:21:47 +00001746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
Guido van Rossum7f43da71994-08-01 12:15:30 +00001770ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001771ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001772ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1773ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1774ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001775
Guido van Rossum627b2d71993-12-24 10:39:16 +00001776
Michael W. Hudson54241132001-12-07 15:38:26 +00001777
Thomas Wouters477c8d52006-05-27 19:21:47 +00001778ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001779
1780
Martin v. Löwis11437992002-04-12 09:54:03 +00001781
1782
1783
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001784
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001785
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001786# We don't use PACKAGE_ variables, and they cause conflicts
1787# with other autoconf-based packages that include Python.h
1788grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1789rm confdefs.h
1790mv confdefs.h.new confdefs.h
1791
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001792
Guido van Rossum0c4eb622006-03-30 16:19:24 +00001793VERSION=3.0
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001794
Martin v. Löwis1142de32002-03-29 16:28:31 +00001795
1796SOVERSION=1.0
1797
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001798# The later defininition of _XOPEN_SOURCE disables certain features
1799# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1800
1801cat >>confdefs.h <<\_ACEOF
1802#define _GNU_SOURCE 1
1803_ACEOF
1804
1805
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001806# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1807# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1808# them.
1809
1810cat >>confdefs.h <<\_ACEOF
1811#define _NETBSD_SOURCE 1
1812_ACEOF
1813
1814
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001815# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1816# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1817# them.
1818
1819cat >>confdefs.h <<\_ACEOF
1820#define __BSD_VISIBLE 1
1821_ACEOF
1822
1823
Martin v. Löwisd6320502004-08-12 13:45:08 +00001824# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1825# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
1826
1827cat >>confdefs.h <<\_ACEOF
1828#define _BSD_TYPES 1
1829_ACEOF
1830
1831
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001832define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001833
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001834# Arguments passed to configure.
1835
1836CONFIG_ARGS="$ac_configure_args"
1837
Thomas Wouters477c8d52006-05-27 19:21:47 +00001838# Check whether --enable-universalsdk was given.
1839if test "${enable_universalsdk+set}" = set; then
1840 enableval=$enable_universalsdk;
1841 case $enableval in
1842 yes)
1843 enableval=/Developer/SDKs/MacOSX10.4u.sdk
1844 ;;
1845 esac
1846 case $enableval in
1847 no)
1848 UNIVERSALSDK=
1849 enable_universalsdk=
1850 ;;
1851 *)
1852 UNIVERSALSDK=$enableval
1853 ;;
1854 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001855
Thomas Wouters477c8d52006-05-27 19:21:47 +00001856else
1857
1858 UNIVERSALSDK=
1859 enable_universalsdk=
1860
1861fi
1862
1863
1864
1865# Check whether --enable-framework was given.
1866if test "${enable_framework+set}" = set; then
1867 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00001868 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001869 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001870 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001871 esac
1872 case $enableval in
1873 no)
1874 PYTHONFRAMEWORK=
1875 PYTHONFRAMEWORKDIR=no-framework
1876 PYTHONFRAMEWORKPREFIX=
1877 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00001878 FRAMEWORKINSTALLFIRST=
1879 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00001880 FRAMEWORKALTINSTALLFIRST=
1881 FRAMEWORKALTINSTALLLAST=
1882 if test "x${prefix}" = "xNONE"; then
1883 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1884 else
1885 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1886 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001887 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001888 ;;
1889 *)
Jack Jansen127e56e2001-09-11 14:41:54 +00001890 PYTHONFRAMEWORK=Python
1891 PYTHONFRAMEWORKDIR=Python.framework
Jack Jansene578a632001-08-15 01:27:14 +00001892 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001893 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00001894 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
1895 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00001896 FRAMEWORKALTINSTALLFIRST="${FRAMEWORKINSTALLFIRST} bininstall maninstall"
1897 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
1898 if test "x${prefix}" = "xNONE" ; then
1899 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1900 else
1901 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1902 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001903 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00001904
1905 # Add makefiles for Mac specific code to the list of output
1906 # files:
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00001907 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001908
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00001909 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001910
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00001911 ac_config_files="$ac_config_files Mac/IDLE/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001912
Jack Jansene578a632001-08-15 01:27:14 +00001913 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001914
Guido van Rossum563e7081996-09-10 18:20:48 +00001915else
Martin v. Löwis11437992002-04-12 09:54:03 +00001916
Jack Jansene578a632001-08-15 01:27:14 +00001917 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00001918 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00001919 PYTHONFRAMEWORKPREFIX=
1920 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00001921 FRAMEWORKINSTALLFIRST=
1922 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00001923 FRAMEWORKALTINSTALLFIRST=
1924 FRAMEWORKALTINSTALLLAST=
1925 if test "x${prefix}" = "xNONE" ; then
1926 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1927 else
1928 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1929 fi
Jack Jansene578a632001-08-15 01:27:14 +00001930 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001931
Thomas Wouters477c8d52006-05-27 19:21:47 +00001932fi
1933
1934
1935
Michael W. Hudson54241132001-12-07 15:38:26 +00001936
1937
1938
1939
Jack Jansene578a632001-08-15 01:27:14 +00001940
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00001941
1942
1943
Jack Jansene578a632001-08-15 01:27:14 +00001944##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001945## AC_HELP_STRING(--with-dyld,
1946## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00001947##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001948# Set name for machine-dependent library files
1949
Thomas Wouters477c8d52006-05-27 19:21:47 +00001950{ echo "$as_me:$LINENO: checking MACHDEP" >&5
1951echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001952if test -z "$MACHDEP"
1953then
Guido van Rossum563e7081996-09-10 18:20:48 +00001954 ac_sys_system=`uname -s`
Martin v. Löwis21ee4092002-09-30 16:19:48 +00001955 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \
1956 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00001957 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001958 else
Guido van Rossum563e7081996-09-10 18:20:48 +00001959 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001960 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00001961 ac_md_system=`echo $ac_sys_system |
1962 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
1963 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00001964 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00001965 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00001966
Guido van Rossum07397971997-04-29 21:49:50 +00001967 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001968 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001969 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00001970 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00001971 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00001972 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001973 esac
1974fi
Guido van Rossum91922671997-10-09 20:24:13 +00001975
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001976# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
1977# disable features if it is defined, without any means to access these
1978# features as extensions. For these systems, we skip the definition of
1979# _XOPEN_SOURCE. Before adding a system to the list to gain access to
1980# some feature, make sure there is no alternative way to access this
1981# feature. Also, when using wildcards, make sure you have verified the
1982# need for not defining _XOPEN_SOURCE on all systems matching the
1983# wildcard, and that the wildcard does not include future systems
1984# (which may remove their limitations).
1985case $ac_sys_system/$ac_sys_release in
1986 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
1987 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00001988 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00001989 OpenBSD/2.* | OpenBSD/3.[0123456789])
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001990 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00001991 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
1992 # of union __?sigval. Reported by Stuart Bishop.
1993 SunOS/5.6)
1994 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00001995 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
1996 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00001997 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00001998 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00001999 define_xopen_source=no;;
2000 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002001 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002002 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002003 define_xopen_source=no;;
Anthony Baxter6169c6b2003-10-04 07:46:23 +00002004 # On FreeBSD 4.8 and MacOS X 10.2, a bug in ncurses.h means that
2005 # it craps out if _XOPEN_EXTENDED_SOURCE is defined. Apparently,
2006 # this is fixed in 10.3, which identifies itself as Darwin/7.*
2007 # This should hopefully be fixed in FreeBSD 4.9
2008 FreeBSD/4.8* | Darwin/6* )
2009 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002010 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
2011 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
2012 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00002013 AIX/4)
2014 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002015 AIX/5)
2016 if test `uname -r` -eq 1; then
2017 define_xopen_source=no
2018 fi
2019 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002020 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2021 # disables platform specific features beyond repair.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00002022 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
Thomas Wouters0e3f5912006-08-11 14:57:12 +00002023 # has no effect, don't bother defining them
2024 Darwin/[789].*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002025 define_xopen_source=no
2026 ;;
2027
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002028esac
2029
2030if test $define_xopen_source = yes
2031then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002032 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
2033 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00002034 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
2035 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00002036 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00002037 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00002038
2039cat >>confdefs.h <<\_ACEOF
2040#define _XOPEN_SOURCE 500
2041_ACEOF
2042
2043 ;;
2044 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002045
2046cat >>confdefs.h <<\_ACEOF
2047#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002048_ACEOF
2049
Skip Montanarof0d5f792004-08-15 14:08:23 +00002050 ;;
2051 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002052
2053 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
2054 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
2055 # several APIs are not declared. Since this is also needed in some
2056 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00002057 # except for Solaris 10, where it must not be defined,
2058 # as it implies XPG4.2
2059 case $ac_sys_system/$ac_sys_release in
2060 SunOS/5.10)
2061 ;;
2062 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002063
2064cat >>confdefs.h <<\_ACEOF
2065#define _XOPEN_SOURCE_EXTENDED 1
2066_ACEOF
2067
Martin v. Löwis7dece662005-11-26 11:38:24 +00002068 ;;
2069 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002070
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002071
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002072cat >>confdefs.h <<\_ACEOF
2073#define _POSIX_C_SOURCE 200112L
2074_ACEOF
2075
2076
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002077fi
2078
Guido van Rossum91922671997-10-09 20:24:13 +00002079#
2080# SGI compilers allow the specification of the both the ABI and the
2081# ISA on the command line. Depending on the values of these switches,
2082# different and often incompatable code will be generated.
2083#
2084# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
2085# thus supply support for various ABI/ISA combinations. The MACHDEP
2086# variable is also adjusted.
2087#
2088
2089if test ! -z "$SGI_ABI"
2090then
2091 CC="cc $SGI_ABI"
2092 LDFLAGS="$SGI_ABI $LDFLAGS"
2093 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
2094fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002095{ echo "$as_me:$LINENO: result: $MACHDEP" >&5
2096echo "${ECHO_T}$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002097
Jack Jansen83f898c2002-12-30 22:23:40 +00002098# And add extra plat-mac for darwin
2099
Jack Jansen7b59b422003-03-17 15:44:10 +00002100
Thomas Wouters477c8d52006-05-27 19:21:47 +00002101{ echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5
2102echo $ECHO_N "checking EXTRAPLATDIR... $ECHO_C" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002103if test -z "$EXTRAPLATDIR"
2104then
2105 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00002106 darwin)
2107 EXTRAPLATDIR="\$(PLATMACDIRS)"
2108 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
2109 ;;
2110 *)
2111 EXTRAPLATDIR=""
2112 EXTRAMACHDEPPATH=""
2113 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00002114 esac
2115fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002116{ echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5
2117echo "${ECHO_T}$EXTRAPLATDIR" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002118
Jack Jansen6b08a402004-06-03 12:41:45 +00002119# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
2120# it may influence the way we can build extensions, so distutils
2121# needs to check it
2122
Thomas Wouters477c8d52006-05-27 19:21:47 +00002123
Jack Jansen6b08a402004-06-03 12:41:45 +00002124CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002125EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00002126
Guido van Rossum627b2d71993-12-24 10:39:16 +00002127# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00002128
2129# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
2130# for debug/optimization stuff. BASECFLAGS is for flags that are required
2131# just to get things to compile and link. Users are free to override OPT
2132# when running configure or make. The build should not break if they do.
2133# BASECFLAGS should generally not be messed with, however.
2134
2135# XXX shouldn't some/most/all of this code be merged with the stuff later
2136# on that fiddles with OPT and BASECFLAGS?
Thomas Wouters477c8d52006-05-27 19:21:47 +00002137{ echo "$as_me:$LINENO: checking for --without-gcc" >&5
2138echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002139
Thomas Wouters477c8d52006-05-27 19:21:47 +00002140# Check whether --with-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002141if test "${with_gcc+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00002142 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002143 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +00002144 no) CC=cc
2145 without_gcc=yes;;
2146 yes) CC=gcc
2147 without_gcc=no;;
2148 *) CC=$withval
2149 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002150 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00002151else
Martin v. Löwis11437992002-04-12 09:54:03 +00002152
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002153 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002154 AIX*) CC=cc_r
2155 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002156 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002157 case $BE_HOST_CPU in
2158 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00002159 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002160 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00002161 BASECFLAGS="$BASECFLAGS -export pragma"
2162 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002163 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002164 ;;
2165 x86)
Fred Drake5790be12000-10-09 17:06:13 +00002166 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002167 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00002168 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002169 ;;
2170 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002171 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
2172echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
2173 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002174 ;;
2175 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002176 AR="\$(srcdir)/Modules/ar_beos"
2177 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002178 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00002179 Monterey*)
2180 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00002181 without_gcc=;;
2182 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00002183 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +00002184fi
2185
2186{ echo "$as_me:$LINENO: result: $without_gcc" >&5
2187echo "${ECHO_T}$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002188
Guido van Rossum8b131c51995-03-09 14:10:13 +00002189# If the user switches compilers, we can't believe the cache
2190if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
2191then
Martin v. Löwis11437992002-04-12 09:54:03 +00002192 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
2193(it is also a good idea to do 'make clean' before compiling)" >&5
2194echo "$as_me: error: cached CC is different -- throw away $cache_file
2195(it is also a good idea to do 'make clean' before compiling)" >&2;}
2196 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00002197fi
2198
Martin v. Löwis11437992002-04-12 09:54:03 +00002199ac_ext=c
2200ac_cpp='$CPP $CPPFLAGS'
2201ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2202ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2203ac_compiler_gnu=$ac_cv_c_compiler_gnu
2204if test -n "$ac_tool_prefix"; then
2205 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2206set dummy ${ac_tool_prefix}gcc; ac_word=$2
Thomas Wouters477c8d52006-05-27 19:21:47 +00002207{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2208echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002209if test "${ac_cv_prog_CC+set}" = set; then
2210 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002211else
2212 if test -n "$CC"; then
2213 ac_cv_prog_CC="$CC" # Let the user override the test.
2214else
Martin v. Löwis11437992002-04-12 09:54:03 +00002215as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2216for as_dir in $PATH
2217do
2218 IFS=$as_save_IFS
2219 test -z "$as_dir" && as_dir=.
2220 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters477c8d52006-05-27 19:21:47 +00002221 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002222 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2223 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2224 break 2
2225 fi
2226done
2227done
Thomas Wouters477c8d52006-05-27 19:21:47 +00002228IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002229
Jack Jansendd19cf82001-12-06 22:36:17 +00002230fi
2231fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002232CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00002233if test -n "$CC"; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00002234 { echo "$as_me:$LINENO: result: $CC" >&5
2235echo "${ECHO_T}$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002236else
Thomas Wouters477c8d52006-05-27 19:21:47 +00002237 { echo "$as_me:$LINENO: result: no" >&5
2238echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002239fi
2240
Thomas Wouters477c8d52006-05-27 19:21:47 +00002241
Martin v. Löwis11437992002-04-12 09:54:03 +00002242fi
2243if test -z "$ac_cv_prog_CC"; then
2244 ac_ct_CC=$CC
2245 # Extract the first word of "gcc", so it can be a program name with args.
2246set dummy gcc; ac_word=$2
Thomas Wouters477c8d52006-05-27 19:21:47 +00002247{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2248echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002249if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2250 echo $ECHO_N "(cached) $ECHO_C" >&6
2251else
2252 if test -n "$ac_ct_CC"; then
2253 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2254else
2255as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2256for as_dir in $PATH
2257do
2258 IFS=$as_save_IFS
2259 test -z "$as_dir" && as_dir=.
2260 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters477c8d52006-05-27 19:21:47 +00002261 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002262 ac_cv_prog_ac_ct_CC="gcc"
2263 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2264 break 2
2265 fi
2266done
2267done
Thomas Wouters477c8d52006-05-27 19:21:47 +00002268IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002269
2270fi
2271fi
2272ac_ct_CC=$ac_cv_prog_ac_ct_CC
2273if test -n "$ac_ct_CC"; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00002274 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2275echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002276else
Thomas Wouters477c8d52006-05-27 19:21:47 +00002277 { echo "$as_me:$LINENO: result: no" >&5
2278echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002279fi
2280
Thomas Wouters477c8d52006-05-27 19:21:47 +00002281 if test "x$ac_ct_CC" = x; then
2282 CC=""
2283 else
2284 case $cross_compiling:$ac_tool_warned in
2285yes:)
2286{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2287whose name does not start with the host triplet. If you think this
2288configuration is useful to you, please write to autoconf@gnu.org." >&5
2289echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2290whose name does not start with the host triplet. If you think this
2291configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2292ac_tool_warned=yes ;;
2293esac
2294 CC=$ac_ct_CC
2295 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002296else
2297 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002298fi
2299
Jack Jansendd19cf82001-12-06 22:36:17 +00002300if test -z "$CC"; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00002301 if test -n "$ac_tool_prefix"; then
2302 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
Martin v. Löwis11437992002-04-12 09:54:03 +00002303set dummy ${ac_tool_prefix}cc; ac_word=$2
Thomas Wouters477c8d52006-05-27 19:21:47 +00002304{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2305echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002306if test "${ac_cv_prog_CC+set}" = set; then
2307 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002308else
2309 if test -n "$CC"; then
2310 ac_cv_prog_CC="$CC" # Let the user override the test.
2311else
Martin v. Löwis11437992002-04-12 09:54:03 +00002312as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2313for as_dir in $PATH
2314do
2315 IFS=$as_save_IFS
2316 test -z "$as_dir" && as_dir=.
2317 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters477c8d52006-05-27 19:21:47 +00002318 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002319 ac_cv_prog_CC="${ac_tool_prefix}cc"
2320 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2321 break 2
2322 fi
2323done
2324done
Thomas Wouters477c8d52006-05-27 19:21:47 +00002325IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002326
2327fi
2328fi
2329CC=$ac_cv_prog_CC
2330if test -n "$CC"; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00002331 { echo "$as_me:$LINENO: result: $CC" >&5
2332echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002333else
Thomas Wouters477c8d52006-05-27 19:21:47 +00002334 { echo "$as_me:$LINENO: result: no" >&5
2335echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002336fi
2337
Thomas Wouters477c8d52006-05-27 19:21:47 +00002338
Martin v. Löwis11437992002-04-12 09:54:03 +00002339 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002340fi
2341if test -z "$CC"; then
2342 # Extract the first word of "cc", so it can be a program name with args.
2343set dummy cc; ac_word=$2
Thomas Wouters477c8d52006-05-27 19:21:47 +00002344{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2345echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002346if test "${ac_cv_prog_CC+set}" = set; then
2347 echo $ECHO_N "(cached) $ECHO_C" >&6
2348else
2349 if test -n "$CC"; then
2350 ac_cv_prog_CC="$CC" # Let the user override the test.
2351else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002352 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002353as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2354for as_dir in $PATH
2355do
2356 IFS=$as_save_IFS
2357 test -z "$as_dir" && as_dir=.
2358 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters477c8d52006-05-27 19:21:47 +00002359 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002360 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2361 ac_prog_rejected=yes
2362 continue
2363 fi
2364 ac_cv_prog_CC="cc"
2365 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2366 break 2
2367 fi
2368done
2369done
Thomas Wouters477c8d52006-05-27 19:21:47 +00002370IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002371
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002372if test $ac_prog_rejected = yes; then
2373 # We found a bogon in the path, so make sure we never use it.
2374 set dummy $ac_cv_prog_CC
2375 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002376 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002377 # We chose a different compiler from the bogus one.
2378 # However, it has the same basename, so the bogon will be chosen
2379 # first if we set CC to just the basename; use the full file name.
2380 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002381 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002382 fi
2383fi
2384fi
2385fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002386CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002387if test -n "$CC"; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00002388 { echo "$as_me:$LINENO: result: $CC" >&5
2389echo "${ECHO_T}$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002390else
Thomas Wouters477c8d52006-05-27 19:21:47 +00002391 { echo "$as_me:$LINENO: result: no" >&5
2392echo "${ECHO_T}no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002393fi
2394
Thomas Wouters477c8d52006-05-27 19:21:47 +00002395
Martin v. Löwis11437992002-04-12 09:54:03 +00002396fi
2397if test -z "$CC"; then
2398 if test -n "$ac_tool_prefix"; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00002399 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002400 do
2401 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2402set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Thomas Wouters477c8d52006-05-27 19:21:47 +00002403{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2404echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002405if test "${ac_cv_prog_CC+set}" = set; then
2406 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002407else
2408 if test -n "$CC"; then
2409 ac_cv_prog_CC="$CC" # Let the user override the test.
2410else
Martin v. Löwis11437992002-04-12 09:54:03 +00002411as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2412for as_dir in $PATH
2413do
2414 IFS=$as_save_IFS
2415 test -z "$as_dir" && as_dir=.
2416 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters477c8d52006-05-27 19:21:47 +00002417 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002418 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2419 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2420 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002421 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002422done
2423done
Thomas Wouters477c8d52006-05-27 19:21:47 +00002424IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002425
2426fi
2427fi
2428CC=$ac_cv_prog_CC
2429if test -n "$CC"; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00002430 { echo "$as_me:$LINENO: result: $CC" >&5
2431echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002432else
Thomas Wouters477c8d52006-05-27 19:21:47 +00002433 { echo "$as_me:$LINENO: result: no" >&5
2434echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002435fi
2436
Thomas Wouters477c8d52006-05-27 19:21:47 +00002437
Martin v. Löwis11437992002-04-12 09:54:03 +00002438 test -n "$CC" && break
2439 done
2440fi
2441if test -z "$CC"; then
2442 ac_ct_CC=$CC
Thomas Wouters477c8d52006-05-27 19:21:47 +00002443 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002444do
2445 # Extract the first word of "$ac_prog", so it can be a program name with args.
2446set dummy $ac_prog; ac_word=$2
Thomas Wouters477c8d52006-05-27 19:21:47 +00002447{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2448echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002449if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2450 echo $ECHO_N "(cached) $ECHO_C" >&6
2451else
2452 if test -n "$ac_ct_CC"; then
2453 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2454else
2455as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2456for as_dir in $PATH
2457do
2458 IFS=$as_save_IFS
2459 test -z "$as_dir" && as_dir=.
2460 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters477c8d52006-05-27 19:21:47 +00002461 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002462 ac_cv_prog_ac_ct_CC="$ac_prog"
2463 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2464 break 2
2465 fi
2466done
2467done
Thomas Wouters477c8d52006-05-27 19:21:47 +00002468IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00002469
Martin v. Löwis11437992002-04-12 09:54:03 +00002470fi
2471fi
2472ac_ct_CC=$ac_cv_prog_ac_ct_CC
2473if test -n "$ac_ct_CC"; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00002474 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2475echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002476else
Thomas Wouters477c8d52006-05-27 19:21:47 +00002477 { echo "$as_me:$LINENO: result: no" >&5
2478echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002479fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002480
Thomas Wouters477c8d52006-05-27 19:21:47 +00002481
Martin v. Löwis11437992002-04-12 09:54:03 +00002482 test -n "$ac_ct_CC" && break
2483done
Michael W. Hudson54241132001-12-07 15:38:26 +00002484
Thomas Wouters477c8d52006-05-27 19:21:47 +00002485 if test "x$ac_ct_CC" = x; then
2486 CC=""
2487 else
2488 case $cross_compiling:$ac_tool_warned in
2489yes:)
2490{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2491whose name does not start with the host triplet. If you think this
2492configuration is useful to you, please write to autoconf@gnu.org." >&5
2493echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2494whose name does not start with the host triplet. If you think this
2495configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2496ac_tool_warned=yes ;;
2497esac
2498 CC=$ac_ct_CC
2499 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002500fi
2501
2502fi
2503
2504
Skip Montanaro6dead952003-09-25 14:50:04 +00002505test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2506See \`config.log' for more details." >&5
2507echo "$as_me: error: no acceptable C compiler found in \$PATH
2508See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002509 { (exit 1); exit 1; }; }
2510
2511# Provide some information about the compiler.
Thomas Wouters477c8d52006-05-27 19:21:47 +00002512echo "$as_me:$LINENO: checking for C compiler version" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002513ac_compiler=`set X $ac_compile; echo $2`
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002514{ (ac_try="$ac_compiler --version >&5"
2515case "(($ac_try" in
2516 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2517 *) ac_try_echo=$ac_try;;
2518esac
2519eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2520 (eval "$ac_compiler --version >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002521 ac_status=$?
2522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2523 (exit $ac_status); }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002524{ (ac_try="$ac_compiler -v >&5"
2525case "(($ac_try" in
2526 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2527 *) ac_try_echo=$ac_try;;
2528esac
2529eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2530 (eval "$ac_compiler -v >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002531 ac_status=$?
2532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2533 (exit $ac_status); }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002534{ (ac_try="$ac_compiler -V >&5"
2535case "(($ac_try" in
2536 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2537 *) ac_try_echo=$ac_try;;
2538esac
2539eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2540 (eval "$ac_compiler -V >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002541 ac_status=$?
2542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2543 (exit $ac_status); }
2544
2545cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002546/* confdefs.h. */
2547_ACEOF
2548cat confdefs.h >>conftest.$ac_ext
2549cat >>conftest.$ac_ext <<_ACEOF
2550/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002551
Martin v. Löwis11437992002-04-12 09:54:03 +00002552int
2553main ()
2554{
2555
2556 ;
2557 return 0;
2558}
2559_ACEOF
2560ac_clean_files_save=$ac_clean_files
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002561ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002562# Try to create an executable without -o first, disregard a.out.
2563# It will help us diagnose broken compilers, and finding out an intuition
2564# of exeext.
Thomas Wouters477c8d52006-05-27 19:21:47 +00002565{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2566echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002567ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002568#
2569# List of possible output files, starting from the most likely.
2570# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2571# only as a last resort. b.out is created by i960 compilers.
2572ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2573#
2574# The IRIX 6 linker writes into existing files which may not be
2575# executable, retaining their permissions. Remove them first so a
2576# subsequent execution test works.
2577ac_rmfiles=
2578for ac_file in $ac_files
2579do
2580 case $ac_file in
2581 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2582 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2583 esac
2584done
2585rm -f $ac_rmfiles
Thomas Wouters477c8d52006-05-27 19:21:47 +00002586
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002587if { (ac_try="$ac_link_default"
2588case "(($ac_try" in
2589 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2590 *) ac_try_echo=$ac_try;;
2591esac
2592eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2593 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002594 ac_status=$?
2595 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2596 (exit $ac_status); }; then
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002597 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2598# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2599# in a Makefile. We should not override ac_cv_exeext if it was cached,
2600# so that the user can short-circuit this test for compilers unknown to
2601# Autoconf.
2602for ac_file in $ac_files
Skip Montanaro6dead952003-09-25 14:50:04 +00002603do
2604 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002605 case $ac_file in
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002606 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
2607 ;;
2608 [ab].out )
2609 # We found the default executable, but exeext='' is most
2610 # certainly right.
2611 break;;
2612 *.* )
2613 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2614 then :; else
2615 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2616 fi
2617 # We set ac_cv_exeext here because the later test for it is not
2618 # safe: cross compilers may not add the suffix if given an `-o'
2619 # argument, so we may need to know it at that point already.
2620 # Even if this section looks crufty: it has the advantage of
2621 # actually working.
2622 break;;
2623 * )
2624 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002625 esac
2626done
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002627test "$ac_cv_exeext" = no && ac_cv_exeext=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002628
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002629else
Martin v. Löwis11437992002-04-12 09:54:03 +00002630 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002631sed 's/^/| /' conftest.$ac_ext >&5
2632
2633{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2634See \`config.log' for more details." >&5
2635echo "$as_me: error: C compiler cannot create executables
2636See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002637 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002638fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002639
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002640ac_exeext=$ac_cv_exeext
Thomas Wouters477c8d52006-05-27 19:21:47 +00002641{ echo "$as_me:$LINENO: result: $ac_file" >&5
2642echo "${ECHO_T}$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002643
Thomas Wouters477c8d52006-05-27 19:21:47 +00002644# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002645# the compiler is broken, or we cross compile.
Thomas Wouters477c8d52006-05-27 19:21:47 +00002646{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2647echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002648# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2649# If not cross compiling, check that we can run a simple program.
2650if test "$cross_compiling" != yes; then
2651 if { ac_try='./$ac_file'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002652 { (case "(($ac_try" in
2653 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2654 *) ac_try_echo=$ac_try;;
2655esac
2656eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2657 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002658 ac_status=$?
2659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2660 (exit $ac_status); }; }; then
2661 cross_compiling=no
2662 else
2663 if test "$cross_compiling" = maybe; then
2664 cross_compiling=yes
2665 else
2666 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002667If you meant to cross compile, use \`--host'.
2668See \`config.log' for more details." >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002669echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002670If you meant to cross compile, use \`--host'.
2671See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002672 { (exit 1); exit 1; }; }
2673 fi
2674 fi
2675fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002676{ echo "$as_me:$LINENO: result: yes" >&5
2677echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002678
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002679rm -f a.out a.exe conftest$ac_cv_exeext b.out
2680ac_clean_files=$ac_clean_files_save
2681# Check that the compiler produces executables we can run. If not, either
2682# the compiler is broken, or we cross compile.
Thomas Wouters477c8d52006-05-27 19:21:47 +00002683{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2684echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2685{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2686echo "${ECHO_T}$cross_compiling" >&6; }
2687
2688{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2689echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002690if { (ac_try="$ac_link"
2691case "(($ac_try" in
2692 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2693 *) ac_try_echo=$ac_try;;
2694esac
2695eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2696 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002697 ac_status=$?
2698 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2699 (exit $ac_status); }; then
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002700 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2701# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2702# work properly (i.e., refer to `conftest.exe'), while it won't with
2703# `rm'.
2704for ac_file in conftest.exe conftest conftest.*; do
2705 test -f "$ac_file" || continue
2706 case $ac_file in
2707 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2708 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2709 break;;
2710 * ) break;;
2711 esac
2712done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002713else
Skip Montanaro6dead952003-09-25 14:50:04 +00002714 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2715See \`config.log' for more details." >&5
2716echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2717See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002718 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002719fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002720
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002721rm -f conftest$ac_cv_exeext
Thomas Wouters477c8d52006-05-27 19:21:47 +00002722{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2723echo "${ECHO_T}$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002724
2725rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002726EXEEXT=$ac_cv_exeext
2727ac_exeext=$EXEEXT
Thomas Wouters477c8d52006-05-27 19:21:47 +00002728{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
2729echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002730if test "${ac_cv_objext+set}" = set; then
2731 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002732else
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002733 cat >conftest.$ac_ext <<_ACEOF
2734/* confdefs.h. */
2735_ACEOF
2736cat confdefs.h >>conftest.$ac_ext
2737cat >>conftest.$ac_ext <<_ACEOF
2738/* end confdefs.h. */
2739
2740int
2741main ()
2742{
2743
2744 ;
2745 return 0;
2746}
2747_ACEOF
2748rm -f conftest.o conftest.obj
2749if { (ac_try="$ac_compile"
2750case "(($ac_try" in
2751 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2752 *) ac_try_echo=$ac_try;;
2753esac
2754eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2755 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002756 ac_status=$?
2757 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2758 (exit $ac_status); }; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00002759 for ac_file in conftest.o conftest.obj conftest.*; do
2760 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00002761 case $ac_file in
Thomas Wouters477c8d52006-05-27 19:21:47 +00002762 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002763 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2764 break;;
2765 esac
2766done
2767else
2768 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002769sed 's/^/| /' conftest.$ac_ext >&5
2770
2771{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2772See \`config.log' for more details." >&5
2773echo "$as_me: error: cannot compute suffix of object files: cannot compile
2774See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002775 { (exit 1); exit 1; }; }
2776fi
2777
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002778rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002779fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002780{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2781echo "${ECHO_T}$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002782OBJEXT=$ac_cv_objext
2783ac_objext=$OBJEXT
Thomas Wouters477c8d52006-05-27 19:21:47 +00002784{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2785echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002786if test "${ac_cv_c_compiler_gnu+set}" = set; then
2787 echo $ECHO_N "(cached) $ECHO_C" >&6
2788else
2789 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002790/* confdefs.h. */
2791_ACEOF
2792cat confdefs.h >>conftest.$ac_ext
2793cat >>conftest.$ac_ext <<_ACEOF
2794/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002795
Martin v. Löwis11437992002-04-12 09:54:03 +00002796int
2797main ()
2798{
2799#ifndef __GNUC__
2800 choke me
2801#endif
2802
2803 ;
2804 return 0;
2805}
2806_ACEOF
2807rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002808if { (ac_try="$ac_compile"
2809case "(($ac_try" in
2810 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2811 *) ac_try_echo=$ac_try;;
2812esac
2813eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2814 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002815 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002816 grep -v '^ *+' conftest.er1 >conftest.err
2817 rm -f conftest.er1
2818 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2820 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002821 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
2822 { (case "(($ac_try" in
2823 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2824 *) ac_try_echo=$ac_try;;
2825esac
2826eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2827 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00002828 ac_status=$?
2829 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2830 (exit $ac_status); }; } &&
2831 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002832 { (case "(($ac_try" in
2833 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2834 *) ac_try_echo=$ac_try;;
2835esac
2836eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2837 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002838 ac_status=$?
2839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2840 (exit $ac_status); }; }; then
2841 ac_compiler_gnu=yes
2842else
2843 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002844sed 's/^/| /' conftest.$ac_ext >&5
2845
Thomas Wouters477c8d52006-05-27 19:21:47 +00002846 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002847fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002848
Thomas Wouters0e3f5912006-08-11 14:57:12 +00002849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002850ac_cv_c_compiler_gnu=$ac_compiler_gnu
2851
2852fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002853{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2854echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002855GCC=`test $ac_compiler_gnu = yes && echo yes`
2856ac_test_CFLAGS=${CFLAGS+set}
2857ac_save_CFLAGS=$CFLAGS
Thomas Wouters477c8d52006-05-27 19:21:47 +00002858{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2859echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002860if test "${ac_cv_prog_cc_g+set}" = set; then
2861 echo $ECHO_N "(cached) $ECHO_C" >&6
2862else
Thomas Wouters477c8d52006-05-27 19:21:47 +00002863 ac_save_c_werror_flag=$ac_c_werror_flag
2864 ac_c_werror_flag=yes
2865 ac_cv_prog_cc_g=no
2866 CFLAGS="-g"
2867 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002868/* confdefs.h. */
2869_ACEOF
2870cat confdefs.h >>conftest.$ac_ext
2871cat >>conftest.$ac_ext <<_ACEOF
2872/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002873
Martin v. Löwis11437992002-04-12 09:54:03 +00002874int
2875main ()
2876{
2877
2878 ;
2879 return 0;
2880}
2881_ACEOF
2882rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002883if { (ac_try="$ac_compile"
2884case "(($ac_try" in
2885 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2886 *) ac_try_echo=$ac_try;;
2887esac
2888eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2889 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002890 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002891 grep -v '^ *+' conftest.er1 >conftest.err
2892 rm -f conftest.er1
2893 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2895 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002896 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
2897 { (case "(($ac_try" in
2898 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2899 *) ac_try_echo=$ac_try;;
2900esac
2901eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2902 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00002903 ac_status=$?
2904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2905 (exit $ac_status); }; } &&
2906 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002907 { (case "(($ac_try" in
2908 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2909 *) ac_try_echo=$ac_try;;
2910esac
2911eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2912 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002913 ac_status=$?
2914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2915 (exit $ac_status); }; }; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002916 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002917else
Martin v. Löwis11437992002-04-12 09:54:03 +00002918 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002919sed 's/^/| /' conftest.$ac_ext >&5
2920
Thomas Wouters477c8d52006-05-27 19:21:47 +00002921 CFLAGS=""
2922 cat >conftest.$ac_ext <<_ACEOF
2923/* confdefs.h. */
2924_ACEOF
2925cat confdefs.h >>conftest.$ac_ext
2926cat >>conftest.$ac_ext <<_ACEOF
2927/* end confdefs.h. */
2928
2929int
2930main ()
2931{
2932
2933 ;
2934 return 0;
2935}
2936_ACEOF
2937rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002938if { (ac_try="$ac_compile"
2939case "(($ac_try" in
2940 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2941 *) ac_try_echo=$ac_try;;
2942esac
2943eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2944 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters477c8d52006-05-27 19:21:47 +00002945 ac_status=$?
2946 grep -v '^ *+' conftest.er1 >conftest.err
2947 rm -f conftest.er1
2948 cat conftest.err >&5
2949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2950 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002951 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
2952 { (case "(($ac_try" in
2953 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2954 *) ac_try_echo=$ac_try;;
2955esac
2956eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2957 (eval "$ac_try") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +00002958 ac_status=$?
2959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2960 (exit $ac_status); }; } &&
2961 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002962 { (case "(($ac_try" in
2963 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2964 *) ac_try_echo=$ac_try;;
2965esac
2966eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2967 (eval "$ac_try") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +00002968 ac_status=$?
2969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2970 (exit $ac_status); }; }; then
2971 :
2972else
2973 echo "$as_me: failed program was:" >&5
2974sed 's/^/| /' conftest.$ac_ext >&5
2975
2976 ac_c_werror_flag=$ac_save_c_werror_flag
2977 CFLAGS="-g"
2978 cat >conftest.$ac_ext <<_ACEOF
2979/* confdefs.h. */
2980_ACEOF
2981cat confdefs.h >>conftest.$ac_ext
2982cat >>conftest.$ac_ext <<_ACEOF
2983/* end confdefs.h. */
2984
2985int
2986main ()
2987{
2988
2989 ;
2990 return 0;
2991}
2992_ACEOF
2993rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002994if { (ac_try="$ac_compile"
2995case "(($ac_try" in
2996 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2997 *) ac_try_echo=$ac_try;;
2998esac
2999eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3000 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters477c8d52006-05-27 19:21:47 +00003001 ac_status=$?
3002 grep -v '^ *+' conftest.er1 >conftest.err
3003 rm -f conftest.er1
3004 cat conftest.err >&5
3005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3006 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003007 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3008 { (case "(($ac_try" in
3009 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3010 *) ac_try_echo=$ac_try;;
3011esac
3012eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3013 (eval "$ac_try") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +00003014 ac_status=$?
3015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3016 (exit $ac_status); }; } &&
3017 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003018 { (case "(($ac_try" in
3019 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3020 *) ac_try_echo=$ac_try;;
3021esac
3022eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3023 (eval "$ac_try") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +00003024 ac_status=$?
3025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3026 (exit $ac_status); }; }; then
3027 ac_cv_prog_cc_g=yes
3028else
3029 echo "$as_me: failed program was:" >&5
3030sed 's/^/| /' conftest.$ac_ext >&5
3031
3032
Guido van Rossum627b2d71993-12-24 10:39:16 +00003033fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003034
Thomas Wouters0e3f5912006-08-11 14:57:12 +00003035rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003036fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003037
Thomas Wouters0e3f5912006-08-11 14:57:12 +00003038rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +00003039fi
3040
Thomas Wouters0e3f5912006-08-11 14:57:12 +00003041rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +00003042 ac_c_werror_flag=$ac_save_c_werror_flag
3043fi
3044{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3045echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003046if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003047 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003048elif test $ac_cv_prog_cc_g = yes; then
3049 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003050 CFLAGS="-g -O2"
3051 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003052 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003053 fi
3054else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003055 if test "$GCC" = yes; then
3056 CFLAGS="-O2"
3057 else
3058 CFLAGS=
3059 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003060fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003061{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3062echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
3063if test "${ac_cv_prog_cc_c89+set}" = set; then
Skip Montanaro6dead952003-09-25 14:50:04 +00003064 echo $ECHO_N "(cached) $ECHO_C" >&6
3065else
Thomas Wouters477c8d52006-05-27 19:21:47 +00003066 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003067ac_save_CC=$CC
3068cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003069/* confdefs.h. */
3070_ACEOF
3071cat confdefs.h >>conftest.$ac_ext
3072cat >>conftest.$ac_ext <<_ACEOF
3073/* end confdefs.h. */
3074#include <stdarg.h>
3075#include <stdio.h>
3076#include <sys/types.h>
3077#include <sys/stat.h>
3078/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3079struct buf { int x; };
3080FILE * (*rcsopen) (struct buf *, struct stat *, int);
3081static char *e (p, i)
3082 char **p;
3083 int i;
3084{
3085 return p[i];
3086}
3087static char *f (char * (*g) (char **, int), char **p, ...)
3088{
3089 char *s;
3090 va_list v;
3091 va_start (v,p);
3092 s = g (p, va_arg (v,int));
3093 va_end (v);
3094 return s;
3095}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003096
3097/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3098 function prototypes and stuff, but not '\xHH' hex character constants.
3099 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters477c8d52006-05-27 19:21:47 +00003100 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003101 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3102 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters477c8d52006-05-27 19:21:47 +00003103 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003104int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3105
Thomas Wouters0e3f5912006-08-11 14:57:12 +00003106/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3107 inside strings and character constants. */
3108#define FOO(x) 'x'
3109int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3110
Skip Montanaro6dead952003-09-25 14:50:04 +00003111int test (int i, double x);
3112struct s1 {int (*f) (int a);};
3113struct s2 {int (*f) (double a);};
3114int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3115int argc;
3116char **argv;
3117int
3118main ()
3119{
3120return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3121 ;
3122 return 0;
3123}
3124_ACEOF
Thomas Wouters477c8d52006-05-27 19:21:47 +00003125for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3126 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003127do
3128 CC="$ac_save_CC $ac_arg"
3129 rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003130if { (ac_try="$ac_compile"
3131case "(($ac_try" in
3132 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3133 *) ac_try_echo=$ac_try;;
3134esac
3135eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3136 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00003137 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003138 grep -v '^ *+' conftest.er1 >conftest.err
3139 rm -f conftest.er1
3140 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3142 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003143 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3144 { (case "(($ac_try" in
3145 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3146 *) ac_try_echo=$ac_try;;
3147esac
3148eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3149 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00003150 ac_status=$?
3151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3152 (exit $ac_status); }; } &&
3153 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003154 { (case "(($ac_try" in
3155 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3156 *) ac_try_echo=$ac_try;;
3157esac
3158eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3159 (eval "$ac_try") 2>&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003160 ac_status=$?
3161 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3162 (exit $ac_status); }; }; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00003163 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003164else
3165 echo "$as_me: failed program was:" >&5
3166sed 's/^/| /' conftest.$ac_ext >&5
3167
Thomas Wouters477c8d52006-05-27 19:21:47 +00003168
Skip Montanaro6dead952003-09-25 14:50:04 +00003169fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003170
Thomas Wouters0e3f5912006-08-11 14:57:12 +00003171rm -f core conftest.err conftest.$ac_objext
Thomas Wouters477c8d52006-05-27 19:21:47 +00003172 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003173done
Thomas Wouters477c8d52006-05-27 19:21:47 +00003174rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003175CC=$ac_save_CC
3176
3177fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003178# AC_CACHE_VAL
3179case "x$ac_cv_prog_cc_c89" in
3180 x)
3181 { echo "$as_me:$LINENO: result: none needed" >&5
3182echo "${ECHO_T}none needed" >&6; } ;;
3183 xno)
3184 { echo "$as_me:$LINENO: result: unsupported" >&5
3185echo "${ECHO_T}unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003186 *)
Thomas Wouters477c8d52006-05-27 19:21:47 +00003187 CC="$CC $ac_cv_prog_cc_c89"
3188 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3189echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003190esac
3191
Skip Montanaro6dead952003-09-25 14:50:04 +00003192
Martin v. Löwis11437992002-04-12 09:54:03 +00003193ac_ext=c
3194ac_cpp='$CPP $CPPFLAGS'
3195ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3196ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3197ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003198
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003199
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003200
3201
Thomas Wouters477c8d52006-05-27 19:21:47 +00003202{ echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
3203echo $ECHO_N "checking for --with-cxx-main=<compiler>... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003204
Thomas Wouters477c8d52006-05-27 19:21:47 +00003205# Check whether --with-cxx_main was given.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003206if test "${with_cxx_main+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00003207 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003208
3209 case $withval in
3210 no) with_cxx_main=no
3211 MAINCC='$(CC)';;
3212 yes) with_cxx_main=yes
3213 MAINCC='$(CXX)';;
3214 *) with_cxx_main=yes
3215 MAINCC=$withval
3216 if test -z "$CXX"
3217 then
3218 CXX=$withval
3219 fi;;
3220 esac
3221else
3222
3223 with_cxx_main=no
3224 MAINCC='$(CC)'
3225
Thomas Wouters477c8d52006-05-27 19:21:47 +00003226fi
3227
3228{ echo "$as_me:$LINENO: result: $with_cxx_main" >&5
3229echo "${ECHO_T}$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003230
3231preset_cxx="$CXX"
3232if test -z "$CXX"
3233then
3234 case "$CC" in
3235 gcc) # Extract the first word of "g++", so it can be a program name with args.
3236set dummy g++; ac_word=$2
Thomas Wouters477c8d52006-05-27 19:21:47 +00003237{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3238echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003239if test "${ac_cv_path_CXX+set}" = set; then
3240 echo $ECHO_N "(cached) $ECHO_C" >&6
3241else
3242 case $CXX in
3243 [\\/]* | ?:[\\/]*)
3244 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3245 ;;
3246 *)
3247 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3248for as_dir in notfound
3249do
3250 IFS=$as_save_IFS
3251 test -z "$as_dir" && as_dir=.
3252 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters477c8d52006-05-27 19:21:47 +00003253 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 +00003254 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
3255 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3256 break 2
3257 fi
3258done
3259done
Thomas Wouters477c8d52006-05-27 19:21:47 +00003260IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003261
3262 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
3263 ;;
3264esac
3265fi
3266CXX=$ac_cv_path_CXX
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003267if test -n "$CXX"; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00003268 { echo "$as_me:$LINENO: result: $CXX" >&5
3269echo "${ECHO_T}$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003270else
Thomas Wouters477c8d52006-05-27 19:21:47 +00003271 { echo "$as_me:$LINENO: result: no" >&5
3272echo "${ECHO_T}no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003273fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003274
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003275 ;;
3276 cc) # Extract the first word of "c++", so it can be a program name with args.
3277set dummy c++; ac_word=$2
Thomas Wouters477c8d52006-05-27 19:21:47 +00003278{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3279echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003280if test "${ac_cv_path_CXX+set}" = set; then
3281 echo $ECHO_N "(cached) $ECHO_C" >&6
3282else
3283 case $CXX in
3284 [\\/]* | ?:[\\/]*)
3285 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3286 ;;
3287 *)
3288 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3289for as_dir in notfound
3290do
3291 IFS=$as_save_IFS
3292 test -z "$as_dir" && as_dir=.
3293 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters477c8d52006-05-27 19:21:47 +00003294 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 +00003295 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
3296 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3297 break 2
3298 fi
3299done
3300done
Thomas Wouters477c8d52006-05-27 19:21:47 +00003301IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003302
3303 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
3304 ;;
3305esac
3306fi
3307CXX=$ac_cv_path_CXX
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003308if test -n "$CXX"; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00003309 { echo "$as_me:$LINENO: result: $CXX" >&5
3310echo "${ECHO_T}$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003311else
Thomas Wouters477c8d52006-05-27 19:21:47 +00003312 { echo "$as_me:$LINENO: result: no" >&5
3313echo "${ECHO_T}no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003314fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003315
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003316 ;;
3317 esac
3318 if test "$CXX" = "notfound"
3319 then
3320 CXX=""
3321 fi
3322fi
3323if test -z "$CXX"
3324then
3325 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
3326do
3327 # Extract the first word of "$ac_prog", so it can be a program name with args.
3328set dummy $ac_prog; ac_word=$2
Thomas Wouters477c8d52006-05-27 19:21:47 +00003329{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3330echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003331if test "${ac_cv_prog_CXX+set}" = set; then
3332 echo $ECHO_N "(cached) $ECHO_C" >&6
3333else
3334 if test -n "$CXX"; then
3335 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3336else
3337as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3338for as_dir in $PATH
3339do
3340 IFS=$as_save_IFS
3341 test -z "$as_dir" && as_dir=.
3342 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters477c8d52006-05-27 19:21:47 +00003343 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 +00003344 ac_cv_prog_CXX="$ac_prog"
3345 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3346 break 2
3347 fi
3348done
3349done
Thomas Wouters477c8d52006-05-27 19:21:47 +00003350IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003351
3352fi
3353fi
3354CXX=$ac_cv_prog_CXX
3355if test -n "$CXX"; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00003356 { echo "$as_me:$LINENO: result: $CXX" >&5
3357echo "${ECHO_T}$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003358else
Thomas Wouters477c8d52006-05-27 19:21:47 +00003359 { echo "$as_me:$LINENO: result: no" >&5
3360echo "${ECHO_T}no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003361fi
3362
Thomas Wouters477c8d52006-05-27 19:21:47 +00003363
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003364 test -n "$CXX" && break
3365done
3366test -n "$CXX" || CXX="notfound"
3367
3368 if test "$CXX" = "notfound"
3369 then
3370 CXX=""
3371 fi
3372fi
3373if test "$preset_cxx" != "$CXX"
3374then
3375 { echo "$as_me:$LINENO: WARNING:
3376
3377 By default, distutils will build C++ extension modules with \"$CXX\".
3378 If this is not intended, then set CXX on the configure command line.
3379 " >&5
3380echo "$as_me: WARNING:
3381
3382 By default, distutils will build C++ extension modules with \"$CXX\".
3383 If this is not intended, then set CXX on the configure command line.
3384 " >&2;}
3385fi
3386
3387
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003388# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00003389
3390ac_ext=c
3391ac_cpp='$CPP $CPPFLAGS'
3392ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3393ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3394ac_compiler_gnu=$ac_cv_c_compiler_gnu
Thomas Wouters477c8d52006-05-27 19:21:47 +00003395{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3396echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003397# On Suns, sometimes $CPP names a directory.
3398if test -n "$CPP" && test -d "$CPP"; then
3399 CPP=
3400fi
3401if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003402 if test "${ac_cv_prog_CPP+set}" = set; then
3403 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003404else
Martin v. Löwis11437992002-04-12 09:54:03 +00003405 # Double quotes because CPP needs to be expanded
3406 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3407 do
3408 ac_preproc_ok=false
3409for ac_c_preproc_warn_flag in '' yes
3410do
3411 # Use a header file that comes with gcc, so configuring glibc
3412 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003413 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3414 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003415 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00003416 # not just through cpp. "Syntax error" is here to catch this case.
3417 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003418/* confdefs.h. */
3419_ACEOF
3420cat confdefs.h >>conftest.$ac_ext
3421cat >>conftest.$ac_ext <<_ACEOF
3422/* end confdefs.h. */
3423#ifdef __STDC__
3424# include <limits.h>
3425#else
3426# include <assert.h>
3427#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003428 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003429_ACEOF
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003430if { (ac_try="$ac_cpp conftest.$ac_ext"
3431case "(($ac_try" in
3432 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3433 *) ac_try_echo=$ac_try;;
3434esac
3435eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3436 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003437 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003438 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003439 rm -f conftest.er1
3440 cat conftest.err >&5
3441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3442 (exit $ac_status); } >/dev/null; then
3443 if test -s conftest.err; then
3444 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +00003445 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +00003446 else
3447 ac_cpp_err=
3448 fi
3449else
3450 ac_cpp_err=yes
3451fi
3452if test -z "$ac_cpp_err"; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003453 :
3454else
Martin v. Löwis11437992002-04-12 09:54:03 +00003455 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003456sed 's/^/| /' conftest.$ac_ext >&5
3457
Martin v. Löwis11437992002-04-12 09:54:03 +00003458 # Broken: fails on valid input.
3459continue
Jack Jansendd19cf82001-12-06 22:36:17 +00003460fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003461
Martin v. Löwis11437992002-04-12 09:54:03 +00003462rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00003463
Thomas Wouters477c8d52006-05-27 19:21:47 +00003464 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003465 # can be detected and how.
3466 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003467/* confdefs.h. */
3468_ACEOF
3469cat confdefs.h >>conftest.$ac_ext
3470cat >>conftest.$ac_ext <<_ACEOF
3471/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003472#include <ac_nonexistent.h>
3473_ACEOF
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003474if { (ac_try="$ac_cpp conftest.$ac_ext"
3475case "(($ac_try" in
3476 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3477 *) ac_try_echo=$ac_try;;
3478esac
3479eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3480 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003481 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003482 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003483 rm -f conftest.er1
3484 cat conftest.err >&5
3485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3486 (exit $ac_status); } >/dev/null; then
3487 if test -s conftest.err; then
3488 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +00003489 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +00003490 else
3491 ac_cpp_err=
3492 fi
3493else
3494 ac_cpp_err=yes
3495fi
3496if test -z "$ac_cpp_err"; then
3497 # Broken: success on invalid input.
3498continue
3499else
3500 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003501sed 's/^/| /' conftest.$ac_ext >&5
3502
Martin v. Löwis11437992002-04-12 09:54:03 +00003503 # Passes both tests.
3504ac_preproc_ok=:
3505break
3506fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003507
Martin v. Löwis11437992002-04-12 09:54:03 +00003508rm -f conftest.err conftest.$ac_ext
3509
3510done
3511# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3512rm -f conftest.err conftest.$ac_ext
3513if $ac_preproc_ok; then
3514 break
3515fi
3516
3517 done
3518 ac_cv_prog_CPP=$CPP
3519
3520fi
3521 CPP=$ac_cv_prog_CPP
3522else
3523 ac_cv_prog_CPP=$CPP
3524fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003525{ echo "$as_me:$LINENO: result: $CPP" >&5
3526echo "${ECHO_T}$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003527ac_preproc_ok=false
3528for ac_c_preproc_warn_flag in '' yes
3529do
3530 # Use a header file that comes with gcc, so configuring glibc
3531 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003532 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3533 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003534 # On the NeXT, cc -E runs the code through the compiler's parser,
3535 # not just through cpp. "Syntax error" is here to catch this case.
3536 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003537/* confdefs.h. */
3538_ACEOF
3539cat confdefs.h >>conftest.$ac_ext
3540cat >>conftest.$ac_ext <<_ACEOF
3541/* end confdefs.h. */
3542#ifdef __STDC__
3543# include <limits.h>
3544#else
3545# include <assert.h>
3546#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003547 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003548_ACEOF
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003549if { (ac_try="$ac_cpp conftest.$ac_ext"
3550case "(($ac_try" in
3551 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3552 *) ac_try_echo=$ac_try;;
3553esac
3554eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3555 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003556 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003557 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003558 rm -f conftest.er1
3559 cat conftest.err >&5
3560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3561 (exit $ac_status); } >/dev/null; then
3562 if test -s conftest.err; then
3563 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +00003564 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +00003565 else
3566 ac_cpp_err=
3567 fi
3568else
3569 ac_cpp_err=yes
3570fi
3571if test -z "$ac_cpp_err"; then
3572 :
3573else
3574 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003575sed 's/^/| /' conftest.$ac_ext >&5
3576
Martin v. Löwis11437992002-04-12 09:54:03 +00003577 # Broken: fails on valid input.
3578continue
3579fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003580
Martin v. Löwis11437992002-04-12 09:54:03 +00003581rm -f conftest.err conftest.$ac_ext
3582
Thomas Wouters477c8d52006-05-27 19:21:47 +00003583 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003584 # can be detected and how.
3585 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003586/* confdefs.h. */
3587_ACEOF
3588cat confdefs.h >>conftest.$ac_ext
3589cat >>conftest.$ac_ext <<_ACEOF
3590/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003591#include <ac_nonexistent.h>
3592_ACEOF
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003593if { (ac_try="$ac_cpp conftest.$ac_ext"
3594case "(($ac_try" in
3595 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3596 *) ac_try_echo=$ac_try;;
3597esac
3598eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3599 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003600 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003601 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003602 rm -f conftest.er1
3603 cat conftest.err >&5
3604 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3605 (exit $ac_status); } >/dev/null; then
3606 if test -s conftest.err; then
3607 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +00003608 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +00003609 else
3610 ac_cpp_err=
3611 fi
3612else
3613 ac_cpp_err=yes
3614fi
3615if test -z "$ac_cpp_err"; then
3616 # Broken: success on invalid input.
3617continue
3618else
3619 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003620sed 's/^/| /' conftest.$ac_ext >&5
3621
Martin v. Löwis11437992002-04-12 09:54:03 +00003622 # Passes both tests.
3623ac_preproc_ok=:
3624break
3625fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003626
Martin v. Löwis11437992002-04-12 09:54:03 +00003627rm -f conftest.err conftest.$ac_ext
3628
3629done
3630# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3631rm -f conftest.err conftest.$ac_ext
3632if $ac_preproc_ok; then
3633 :
3634else
Skip Montanaro6dead952003-09-25 14:50:04 +00003635 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3636See \`config.log' for more details." >&5
3637echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3638See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00003639 { (exit 1); exit 1; }; }
3640fi
3641
3642ac_ext=c
3643ac_cpp='$CPP $CPPFLAGS'
3644ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3645ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3646ac_compiler_gnu=$ac_cv_c_compiler_gnu
3647
3648
Thomas Wouters477c8d52006-05-27 19:21:47 +00003649{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3650echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
3651if test "${ac_cv_path_GREP+set}" = set; then
Skip Montanaro6dead952003-09-25 14:50:04 +00003652 echo $ECHO_N "(cached) $ECHO_C" >&6
3653else
Thomas Wouters477c8d52006-05-27 19:21:47 +00003654 # Extract the first word of "grep ggrep" to use in msg output
3655if test -z "$GREP"; then
3656set dummy grep ggrep; ac_prog_name=$2
3657if test "${ac_cv_path_GREP+set}" = set; then
3658 echo $ECHO_N "(cached) $ECHO_C" >&6
3659else
3660 ac_path_GREP_found=false
3661# Loop through the user's path and test for each of PROGNAME-LIST
3662as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3663for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3664do
3665 IFS=$as_save_IFS
3666 test -z "$as_dir" && as_dir=.
3667 for ac_prog in grep ggrep; do
3668 for ac_exec_ext in '' $ac_executable_extensions; do
3669 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3670 { test -f "$ac_path_GREP" && $as_executable_p "$ac_path_GREP"; } || continue
3671 # Check for GNU ac_path_GREP and select it if it is found.
3672 # Check for GNU $ac_path_GREP
3673case `"$ac_path_GREP" --version 2>&1` in
3674*GNU*)
3675 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3676*)
3677 ac_count=0
3678 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3679 while :
3680 do
3681 cat "conftest.in" "conftest.in" >"conftest.tmp"
3682 mv "conftest.tmp" "conftest.in"
3683 cp "conftest.in" "conftest.nl"
3684 echo 'GREP' >> "conftest.nl"
3685 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3686 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3687 ac_count=`expr $ac_count + 1`
3688 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3689 # Best one so far, save it but keep looking for a better one
3690 ac_cv_path_GREP="$ac_path_GREP"
3691 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00003692 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003693 # 10*(2^10) chars as input seems more than enough
3694 test $ac_count -gt 10 && break
3695 done
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003696 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003697esac
3698
3699
3700 $ac_path_GREP_found && break 3
3701 done
3702done
3703
3704done
3705IFS=$as_save_IFS
3706
3707
Skip Montanaro6dead952003-09-25 14:50:04 +00003708fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003709
3710GREP="$ac_cv_path_GREP"
3711if test -z "$GREP"; then
3712 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3713echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
3714 { (exit 1); exit 1; }; }
3715fi
3716
3717else
3718 ac_cv_path_GREP=$GREP
3719fi
3720
3721
3722fi
3723{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3724echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
3725 GREP="$ac_cv_path_GREP"
3726
3727
3728{ echo "$as_me:$LINENO: checking for egrep" >&5
3729echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
3730if test "${ac_cv_path_EGREP+set}" = set; then
3731 echo $ECHO_N "(cached) $ECHO_C" >&6
3732else
3733 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3734 then ac_cv_path_EGREP="$GREP -E"
3735 else
3736 # Extract the first word of "egrep" to use in msg output
3737if test -z "$EGREP"; then
3738set dummy egrep; ac_prog_name=$2
3739if test "${ac_cv_path_EGREP+set}" = set; then
3740 echo $ECHO_N "(cached) $ECHO_C" >&6
3741else
3742 ac_path_EGREP_found=false
3743# Loop through the user's path and test for each of PROGNAME-LIST
3744as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3745for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3746do
3747 IFS=$as_save_IFS
3748 test -z "$as_dir" && as_dir=.
3749 for ac_prog in egrep; do
3750 for ac_exec_ext in '' $ac_executable_extensions; do
3751 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3752 { test -f "$ac_path_EGREP" && $as_executable_p "$ac_path_EGREP"; } || continue
3753 # Check for GNU ac_path_EGREP and select it if it is found.
3754 # Check for GNU $ac_path_EGREP
3755case `"$ac_path_EGREP" --version 2>&1` in
3756*GNU*)
3757 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3758*)
3759 ac_count=0
3760 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3761 while :
3762 do
3763 cat "conftest.in" "conftest.in" >"conftest.tmp"
3764 mv "conftest.tmp" "conftest.in"
3765 cp "conftest.in" "conftest.nl"
3766 echo 'EGREP' >> "conftest.nl"
3767 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3768 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3769 ac_count=`expr $ac_count + 1`
3770 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3771 # Best one so far, save it but keep looking for a better one
3772 ac_cv_path_EGREP="$ac_path_EGREP"
3773 ac_path_EGREP_max=$ac_count
3774 fi
3775 # 10*(2^10) chars as input seems more than enough
3776 test $ac_count -gt 10 && break
3777 done
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003778 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003779esac
3780
3781
3782 $ac_path_EGREP_found && break 3
3783 done
3784done
3785
3786done
3787IFS=$as_save_IFS
3788
3789
3790fi
3791
3792EGREP="$ac_cv_path_EGREP"
3793if test -z "$EGREP"; then
3794 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3795echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
3796 { (exit 1); exit 1; }; }
3797fi
3798
3799else
3800 ac_cv_path_EGREP=$EGREP
3801fi
3802
3803
3804 fi
3805fi
3806{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3807echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
3808 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00003809
3810
Martin v. Löwis11437992002-04-12 09:54:03 +00003811
Thomas Wouters477c8d52006-05-27 19:21:47 +00003812{ echo "$as_me:$LINENO: checking for AIX" >&5
3813echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003814cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003815/* confdefs.h. */
3816_ACEOF
3817cat confdefs.h >>conftest.$ac_ext
3818cat >>conftest.$ac_ext <<_ACEOF
3819/* end confdefs.h. */
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003820#ifdef _AIX
3821 yes
3822#endif
3823
Martin v. Löwis11437992002-04-12 09:54:03 +00003824_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003825if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00003826 $EGREP "yes" >/dev/null 2>&1; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00003827 { echo "$as_me:$LINENO: result: yes" >&5
3828echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003829cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003830#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003831_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003832
3833else
Thomas Wouters477c8d52006-05-27 19:21:47 +00003834 { echo "$as_me:$LINENO: result: no" >&5
3835echo "${ECHO_T}no" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003836fi
3837rm -f conftest*
3838
Michael W. Hudson54241132001-12-07 15:38:26 +00003839
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003840
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003841# Check for unsupported systems
3842case $ac_sys_system/$ac_sys_release in
Martin v. Löwis12af0482004-01-31 12:34:17 +00003843Linux*/1*)
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003844 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3845 echo See README for details.
3846 exit 1;;
3847esac
3848
Michael W. Hudson54241132001-12-07 15:38:26 +00003849
Thomas Wouters477c8d52006-05-27 19:21:47 +00003850{ echo "$as_me:$LINENO: checking for --with-suffix" >&5
3851echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003852
Thomas Wouters477c8d52006-05-27 19:21:47 +00003853# Check whether --with-suffix was given.
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003854if test "${with_suffix+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00003855 withval=$with_suffix;
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003856 case $withval in
3857 no) EXEEXT=;;
3858 yes) EXEEXT=.exe;;
3859 *) EXEEXT=$withval;;
3860 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +00003861fi
3862
3863{ echo "$as_me:$LINENO: result: $EXEEXT" >&5
3864echo "${ECHO_T}$EXEEXT" >&6; }
Jack Jansen1999ef42001-12-06 21:47:20 +00003865
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003866# Test whether we're running on a non-case-sensitive system, in which
3867# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00003868
Thomas Wouters477c8d52006-05-27 19:21:47 +00003869{ echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3870echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6; }
Jack Jansen3c2c4332002-11-06 13:33:32 +00003871if test ! -d CaseSensitiveTestDir; then
3872mkdir CaseSensitiveTestDir
3873fi
3874
3875if test -d casesensitivetestdir
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003876then
Thomas Wouters477c8d52006-05-27 19:21:47 +00003877 { echo "$as_me:$LINENO: result: yes" >&5
3878echo "${ECHO_T}yes" >&6; }
Jack Jansen1999ef42001-12-06 21:47:20 +00003879 BUILDEXEEXT=.exe
3880else
Thomas Wouters477c8d52006-05-27 19:21:47 +00003881 { echo "$as_me:$LINENO: result: no" >&5
3882echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003883 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003884fi
Jack Jansen3c2c4332002-11-06 13:33:32 +00003885rmdir CaseSensitiveTestDir
Guido van Rossumff555e32000-09-22 15:38:21 +00003886
Guido van Rossumdd997f71998-10-07 19:58:26 +00003887case $MACHDEP in
3888bsdos*)
3889 case $CC in
3890 gcc) CC="$CC -D_HAVE_BSDI";;
3891 esac;;
3892esac
3893
Guido van Rossum24b1e751997-08-21 02:29:16 +00003894case $ac_sys_system in
3895hp*|HP*)
3896 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00003897 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003898 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00003899Monterey*)
3900 case $CC in
3901 cc) CC="$CC -Wl,-Bexport";;
3902 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003903SunOS*)
3904 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00003905
3906cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003907#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003908_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003909
3910 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003911esac
3912
Michael W. Hudson54241132001-12-07 15:38:26 +00003913
3914
Thomas Wouters477c8d52006-05-27 19:21:47 +00003915{ echo "$as_me:$LINENO: checking LIBRARY" >&5
3916echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003917if test -z "$LIBRARY"
3918then
3919 LIBRARY='libpython$(VERSION).a'
3920fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003921{ echo "$as_me:$LINENO: result: $LIBRARY" >&5
3922echo "${ECHO_T}$LIBRARY" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003923
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003924# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003925# name of the library into which to insert object files). BLDLIBRARY is also
3926# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3927# is blank as the main program is not linked directly against LDLIBRARY.
3928# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3929# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3930# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3931# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003932#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003933# RUNSHARED is used to run shared python without installed libraries
3934#
3935# INSTSONAME is the name of the shared library that will be use to install
3936# on the system - some systems like version suffix, others don't
3937
3938
Michael W. Hudson54241132001-12-07 15:38:26 +00003939
3940
3941
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003942
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003943LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003944BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis09bdf722002-05-08 08:51:29 +00003945INSTSONAME='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003946DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003947LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003948RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003949
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003950# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003951# If CXX is set, and if it is needed to link a main function that was
3952# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3953# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003954# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003955# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003956
Thomas Wouters477c8d52006-05-27 19:21:47 +00003957{ echo "$as_me:$LINENO: checking LINKCC" >&5
3958echo $ECHO_N "checking LINKCC... $ECHO_C" >&6; }
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003959if test -z "$LINKCC"
3960then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003961 LINKCC='$(PURIFY) $(MAINCC)'
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003962 case $ac_sys_system in
3963 AIX*)
Neal Norwitz0b27ff92003-03-31 15:53:49 +00003964 exp_extra="\"\""
3965 if test $ac_sys_release -ge 5 -o \
3966 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3967 exp_extra="."
3968 fi
3969 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003970 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003971 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003972 esac
3973fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003974{ echo "$as_me:$LINENO: result: $LINKCC" >&5
3975echo "${ECHO_T}$LINKCC" >&6; }
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003976
Thomas Wouters477c8d52006-05-27 19:21:47 +00003977{ echo "$as_me:$LINENO: checking for --enable-shared" >&5
3978echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6; }
3979# Check whether --enable-shared was given.
Martin v. Löwis1142de32002-03-29 16:28:31 +00003980if test "${enable_shared+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00003981 enableval=$enable_shared;
3982fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003983
Martin v. Löwis1142de32002-03-29 16:28:31 +00003984
3985if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00003986then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003987 case $ac_sys_system in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003988 CYGWIN* | atheos*)
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003989 enable_shared="yes";;
3990 *)
3991 enable_shared="no";;
3992 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003993fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003994{ echo "$as_me:$LINENO: result: $enable_shared" >&5
3995echo "${ECHO_T}$enable_shared" >&6; }
Martin v. Löwis1142de32002-03-29 16:28:31 +00003996
Thomas Wouters477c8d52006-05-27 19:21:47 +00003997{ echo "$as_me:$LINENO: checking for --enable-profiling" >&5
3998echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6; }
3999# Check whether --enable-profiling was given.
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004000if test "${enable_profiling+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00004001 enableval=$enable_profiling; ac_save_cc="$CC"
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004002 CC="$CC -pg"
4003 if test "$cross_compiling" = yes; then
4004 ac_enable_profiling="no"
4005else
4006 cat >conftest.$ac_ext <<_ACEOF
4007/* confdefs.h. */
4008_ACEOF
4009cat confdefs.h >>conftest.$ac_ext
4010cat >>conftest.$ac_ext <<_ACEOF
4011/* end confdefs.h. */
4012int main() { return 0; }
4013_ACEOF
4014rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004015if { (ac_try="$ac_link"
4016case "(($ac_try" in
4017 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4018 *) ac_try_echo=$ac_try;;
4019esac
4020eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4021 (eval "$ac_link") 2>&5
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004022 ac_status=$?
4023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4024 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004025 { (case "(($ac_try" in
4026 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4027 *) ac_try_echo=$ac_try;;
4028esac
4029eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4030 (eval "$ac_try") 2>&5
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004031 ac_status=$?
4032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4033 (exit $ac_status); }; }; then
4034 ac_enable_profiling="yes"
4035else
4036 echo "$as_me: program exited with status $ac_status" >&5
4037echo "$as_me: failed program was:" >&5
4038sed 's/^/| /' conftest.$ac_ext >&5
4039
4040( exit $ac_status )
4041ac_enable_profiling="no"
4042fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00004043rm -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 +00004044fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00004045
4046
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004047 CC="$ac_save_cc"
Thomas Wouters477c8d52006-05-27 19:21:47 +00004048fi
4049
4050{ echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
4051echo "${ECHO_T}$ac_enable_profiling" >&6; }
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004052
4053case "$ac_enable_profiling" in
4054 "yes")
4055 BASECFLAGS="-pg $BASECFLAGS"
4056 LDFLAGS="-pg $LDFLAGS"
4057 ;;
4058esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004059
Thomas Wouters477c8d52006-05-27 19:21:47 +00004060{ echo "$as_me:$LINENO: checking LDLIBRARY" >&5
4061echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00004062
Guido van Rossumb8552162001-09-05 14:58:11 +00004063# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4064# library that we build, but we do not want to link against it (we
4065# will find it with a -framework option). For this reason there is an
4066# extra variable BLDLIBRARY against which Python and the extension
4067# modules are linked, BLDLIBRARY. This is normally the same as
4068# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00004069if test "$enable_framework"
4070then
4071 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen66b84832003-07-04 12:14:39 +00004072 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
Jack Jansene578a632001-08-15 01:27:14 +00004073 BLDLIBRARY=''
4074else
4075 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00004076fi
Jack Jansene578a632001-08-15 01:27:14 +00004077
Martin v. Löwis1142de32002-03-29 16:28:31 +00004078# Other platforms follow
4079if test $enable_shared = "yes"; then
Mark Hammond8235ea12002-07-19 06:55:41 +00004080
4081cat >>confdefs.h <<\_ACEOF
4082#define Py_ENABLE_SHARED 1
4083_ACEOF
4084
Martin v. Löwis1142de32002-03-29 16:28:31 +00004085 case $ac_sys_system in
4086 BeOS*)
4087 LDLIBRARY='libpython$(VERSION).so'
4088 ;;
4089 CYGWIN*)
4090 LDLIBRARY='libpython$(VERSION).dll.a'
4091 DLLLIBRARY='libpython$(VERSION).dll'
4092 ;;
4093 SunOS*)
4094 LDLIBRARY='libpython$(VERSION).so'
Martin v. Löwisd141a8c2003-06-14 15:20:28 +00004095 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004096 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis2389c412003-10-31 15:42:07 +00004097 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis1142de32002-03-29 16:28:31 +00004098 ;;
Martin v. Löwis86d66262006-02-17 08:40:11 +00004099 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00004100 LDLIBRARY='libpython$(VERSION).so'
4101 BLDLIBRARY='-L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004102 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Hye-Shik Chang33761492004-10-26 09:53:46 +00004103 case $ac_sys_system in
4104 FreeBSD*)
4105 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4106 ;;
4107 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004108 INSTSONAME="$LDLIBRARY".$SOVERSION
4109 ;;
4110 hp*|HP*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00004111 case `uname -m` in
4112 ia64)
4113 LDLIBRARY='libpython$(VERSION).so'
4114 ;;
4115 *)
4116 LDLIBRARY='libpython$(VERSION).sl'
4117 ;;
4118 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004119 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004120 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00004121 ;;
4122 OSF*)
4123 LDLIBRARY='libpython$(VERSION).so'
Neal Norwitz671b9e32006-01-09 07:07:12 +00004124 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004125 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00004126 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00004127 atheos*)
4128 LDLIBRARY='libpython$(VERSION).so'
4129 BLDLIBRARY='-L. -lpython$(VERSION)'
4130 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
4131 ;;
Martin v. Löwis1142de32002-03-29 16:28:31 +00004132 esac
Jason Tishler30765592003-09-04 11:04:06 +00004133else # shared is disabled
4134 case $ac_sys_system in
4135 CYGWIN*)
4136 BLDLIBRARY='$(LIBRARY)'
4137 LDLIBRARY='libpython$(VERSION).dll.a'
4138 ;;
4139 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004140fi
4141
Thomas Wouters477c8d52006-05-27 19:21:47 +00004142{ echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
4143echo "${ECHO_T}$LDLIBRARY" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00004144
Martin v. Löwis11437992002-04-12 09:54:03 +00004145if test -n "$ac_tool_prefix"; then
4146 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4147set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Thomas Wouters477c8d52006-05-27 19:21:47 +00004148{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4149echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004150if test "${ac_cv_prog_RANLIB+set}" = set; then
4151 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004152else
4153 if test -n "$RANLIB"; then
4154 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4155else
Martin v. Löwis11437992002-04-12 09:54:03 +00004156as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4157for as_dir in $PATH
4158do
4159 IFS=$as_save_IFS
4160 test -z "$as_dir" && as_dir=.
4161 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters477c8d52006-05-27 19:21:47 +00004162 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 +00004163 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4164 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4165 break 2
4166 fi
4167done
4168done
Thomas Wouters477c8d52006-05-27 19:21:47 +00004169IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004170
Guido van Rossum627b2d71993-12-24 10:39:16 +00004171fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004172fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004173RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004174if test -n "$RANLIB"; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00004175 { echo "$as_me:$LINENO: result: $RANLIB" >&5
4176echo "${ECHO_T}$RANLIB" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004177else
Thomas Wouters477c8d52006-05-27 19:21:47 +00004178 { echo "$as_me:$LINENO: result: no" >&5
4179echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004180fi
4181
Thomas Wouters477c8d52006-05-27 19:21:47 +00004182
Martin v. Löwis11437992002-04-12 09:54:03 +00004183fi
4184if test -z "$ac_cv_prog_RANLIB"; then
4185 ac_ct_RANLIB=$RANLIB
4186 # Extract the first word of "ranlib", so it can be a program name with args.
4187set dummy ranlib; ac_word=$2
Thomas Wouters477c8d52006-05-27 19:21:47 +00004188{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4189echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004190if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4191 echo $ECHO_N "(cached) $ECHO_C" >&6
4192else
4193 if test -n "$ac_ct_RANLIB"; then
4194 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4195else
4196as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4197for as_dir in $PATH
4198do
4199 IFS=$as_save_IFS
4200 test -z "$as_dir" && as_dir=.
4201 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters477c8d52006-05-27 19:21:47 +00004202 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 +00004203 ac_cv_prog_ac_ct_RANLIB="ranlib"
4204 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4205 break 2
4206 fi
4207done
4208done
Thomas Wouters477c8d52006-05-27 19:21:47 +00004209IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004210
Martin v. Löwis11437992002-04-12 09:54:03 +00004211fi
4212fi
4213ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4214if test -n "$ac_ct_RANLIB"; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00004215 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4216echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004217else
Thomas Wouters477c8d52006-05-27 19:21:47 +00004218 { echo "$as_me:$LINENO: result: no" >&5
4219echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004220fi
4221
Thomas Wouters477c8d52006-05-27 19:21:47 +00004222 if test "x$ac_ct_RANLIB" = x; then
4223 RANLIB=":"
4224 else
4225 case $cross_compiling:$ac_tool_warned in
4226yes:)
4227{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
4228whose name does not start with the host triplet. If you think this
4229configuration is useful to you, please write to autoconf@gnu.org." >&5
4230echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
4231whose name does not start with the host triplet. If you think this
4232configuration is useful to you, please write to autoconf@gnu.org." >&2;}
4233ac_tool_warned=yes ;;
4234esac
4235 RANLIB=$ac_ct_RANLIB
4236 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004237else
4238 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004239fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004240
4241
Guido van Rossum7f43da71994-08-01 12:15:30 +00004242for ac_prog in ar aal
4243do
Martin v. Löwis11437992002-04-12 09:54:03 +00004244 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004245set dummy $ac_prog; ac_word=$2
Thomas Wouters477c8d52006-05-27 19:21:47 +00004246{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4247echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004248if test "${ac_cv_prog_AR+set}" = set; then
4249 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004250else
4251 if test -n "$AR"; then
4252 ac_cv_prog_AR="$AR" # Let the user override the test.
4253else
Martin v. Löwis11437992002-04-12 09:54:03 +00004254as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4255for as_dir in $PATH
4256do
4257 IFS=$as_save_IFS
4258 test -z "$as_dir" && as_dir=.
4259 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters477c8d52006-05-27 19:21:47 +00004260 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 +00004261 ac_cv_prog_AR="$ac_prog"
4262 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4263 break 2
4264 fi
4265done
4266done
Thomas Wouters477c8d52006-05-27 19:21:47 +00004267IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004268
Guido van Rossum7f43da71994-08-01 12:15:30 +00004269fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004270fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004271AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004272if test -n "$AR"; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00004273 { echo "$as_me:$LINENO: result: $AR" >&5
4274echo "${ECHO_T}$AR" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004275else
Thomas Wouters477c8d52006-05-27 19:21:47 +00004276 { echo "$as_me:$LINENO: result: no" >&5
4277echo "${ECHO_T}no" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004278fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00004279
Thomas Wouters477c8d52006-05-27 19:21:47 +00004280
Martin v. Löwis11437992002-04-12 09:54:03 +00004281 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00004282done
4283test -n "$AR" || AR="ar"
4284
Michael W. Hudson54241132001-12-07 15:38:26 +00004285
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004286
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00004287# Extract the first word of "svnversion", so it can be a program name with args.
4288set dummy svnversion; ac_word=$2
Thomas Wouters477c8d52006-05-27 19:21:47 +00004289{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4290echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004291if test "${ac_cv_prog_SVNVERSION+set}" = set; then
4292 echo $ECHO_N "(cached) $ECHO_C" >&6
4293else
4294 if test -n "$SVNVERSION"; then
4295 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
4296else
4297as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4298for as_dir in $PATH
4299do
4300 IFS=$as_save_IFS
4301 test -z "$as_dir" && as_dir=.
4302 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters477c8d52006-05-27 19:21:47 +00004303 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 +00004304 ac_cv_prog_SVNVERSION="found"
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004305 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4306 break 2
4307 fi
4308done
4309done
Thomas Wouters477c8d52006-05-27 19:21:47 +00004310IFS=$as_save_IFS
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004311
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004312 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004313fi
4314fi
4315SVNVERSION=$ac_cv_prog_SVNVERSION
4316if test -n "$SVNVERSION"; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00004317 { echo "$as_me:$LINENO: result: $SVNVERSION" >&5
4318echo "${ECHO_T}$SVNVERSION" >&6; }
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004319else
Thomas Wouters477c8d52006-05-27 19:21:47 +00004320 { echo "$as_me:$LINENO: result: no" >&5
4321echo "${ECHO_T}no" >&6; }
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004322fi
4323
Thomas Wouters477c8d52006-05-27 19:21:47 +00004324
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00004325if test $SVNVERSION = found
4326then
4327 SVNVERSION="svnversion \$(srcdir)"
4328else
4329 SVNVERSION="echo exported"
4330fi
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004331
Neil Schemenauera42c8272001-03-31 00:01:55 +00004332case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00004333bsdos*|hp*|HP*)
4334 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00004335 if test -z "$INSTALL"
4336 then
4337 INSTALL="${srcdir}/install-sh -c"
4338 fi
4339esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004340ac_aux_dir=
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004341for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4342 if test -f "$ac_dir/install-sh"; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004343 ac_aux_dir=$ac_dir
4344 ac_install_sh="$ac_aux_dir/install-sh -c"
4345 break
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004346 elif test -f "$ac_dir/install.sh"; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004347 ac_aux_dir=$ac_dir
4348 ac_install_sh="$ac_aux_dir/install.sh -c"
4349 break
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004350 elif test -f "$ac_dir/shtool"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004351 ac_aux_dir=$ac_dir
4352 ac_install_sh="$ac_aux_dir/shtool install -c"
4353 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004354 fi
4355done
4356if test -z "$ac_aux_dir"; then
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004357 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
4358echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00004359 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004360fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004361
4362# These three variables are undocumented and unsupported,
4363# and are intended to be withdrawn in a future Autoconf release.
4364# They can cause serious problems if a builder's source tree is in a directory
4365# whose full name contains unusual characters.
4366ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4367ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4368ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4369
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004370
4371# Find a good install program. We prefer a C program (faster),
4372# so one script is as good as another. But avoid the broken or
4373# incompatible versions:
4374# SysV /etc/install, /usr/sbin/install
4375# SunOS /usr/etc/install
4376# IRIX /sbin/install
4377# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00004378# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004379# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4380# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4381# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
Skip Montanarof0d5f792004-08-15 14:08:23 +00004382# OS/2's system install, which has a completely different semantic
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004383# ./install, which can be erroneously created by make from ./install.sh.
Thomas Wouters477c8d52006-05-27 19:21:47 +00004384{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4385echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004386if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004387if test "${ac_cv_path_install+set}" = set; then
4388 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004389else
Martin v. Löwis11437992002-04-12 09:54:03 +00004390 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4391for as_dir in $PATH
4392do
4393 IFS=$as_save_IFS
4394 test -z "$as_dir" && as_dir=.
4395 # Account for people who put trailing slashes in PATH elements.
4396case $as_dir/ in
4397 ./ | .// | /cC/* | \
4398 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Skip Montanarof0d5f792004-08-15 14:08:23 +00004399 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
Martin v. Löwis11437992002-04-12 09:54:03 +00004400 /usr/ucb/* ) ;;
4401 *)
4402 # OSF1 and SCO ODT 3.0 have their own names for install.
4403 # Don't use installbsd from OSF since it installs stuff as root
4404 # by default.
4405 for ac_prog in ginstall scoinst install; do
4406 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters477c8d52006-05-27 19:21:47 +00004407 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 +00004408 if test $ac_prog = install &&
4409 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4410 # AIX install. It has an incompatible calling convention.
4411 :
4412 elif test $ac_prog = install &&
4413 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4414 # program-specific install script used by HP pwplus--don't use.
4415 :
4416 else
4417 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4418 break 3
4419 fi
4420 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004421 done
Martin v. Löwis11437992002-04-12 09:54:03 +00004422 done
4423 ;;
4424esac
4425done
Thomas Wouters477c8d52006-05-27 19:21:47 +00004426IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004427
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004428
4429fi
4430 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004431 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004432 else
Thomas Wouters477c8d52006-05-27 19:21:47 +00004433 # As a last resort, use the slow shell script. Don't cache a
4434 # value for INSTALL within a source directory, because that will
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004435 # break other packages using the cache if that directory is
Thomas Wouters477c8d52006-05-27 19:21:47 +00004436 # removed, or if the value is a relative name.
Martin v. Löwis11437992002-04-12 09:54:03 +00004437 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004438 fi
4439fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00004440{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4441echo "${ECHO_T}$INSTALL" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004442
4443# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4444# It thinks the first close brace ends the variable substitution.
4445test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4446
Martin v. Löwis11437992002-04-12 09:54:03 +00004447test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004448
4449test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4450
Michael W. Hudson54241132001-12-07 15:38:26 +00004451
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004452# Not every filesystem supports hard links
4453
4454if test -z "$LN" ; then
4455 case $ac_sys_system in
4456 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00004457 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00004458 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004459 *) LN=ln;;
4460 esac
4461fi
4462
Fred Drake109d9862001-07-11 06:27:56 +00004463# Check for --with-pydebug
Thomas Wouters477c8d52006-05-27 19:21:47 +00004464{ echo "$as_me:$LINENO: checking for --with-pydebug" >&5
4465echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004466
Thomas Wouters477c8d52006-05-27 19:21:47 +00004467# Check whether --with-pydebug was given.
Fred Drake109d9862001-07-11 06:27:56 +00004468if test "${with_pydebug+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00004469 withval=$with_pydebug;
Fred Drake109d9862001-07-11 06:27:56 +00004470if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00004471then
4472
4473cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00004474#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00004475_ACEOF
4476
Thomas Wouters477c8d52006-05-27 19:21:47 +00004477 { echo "$as_me:$LINENO: result: yes" >&5
4478echo "${ECHO_T}yes" >&6; };
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004479 Py_DEBUG='true'
Thomas Wouters477c8d52006-05-27 19:21:47 +00004480else { echo "$as_me:$LINENO: result: no" >&5
4481echo "${ECHO_T}no" >&6; }; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00004482fi
4483else
Thomas Wouters477c8d52006-05-27 19:21:47 +00004484 { echo "$as_me:$LINENO: result: no" >&5
4485echo "${ECHO_T}no" >&6; }
4486fi
4487
Fred Drake109d9862001-07-11 06:27:56 +00004488
Skip Montanarodecc6a42003-01-01 20:07:49 +00004489# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
4490# merged with this chunk of code?
4491
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004492# Optimizer/debugger flags
Skip Montanarodecc6a42003-01-01 20:07:49 +00004493# ------------------------
4494# (The following bit of code is complicated enough - please keep things
4495# indented properly. Just pretend you're editing Python code. ;-)
4496
4497# There are two parallel sets of case statements below, one that checks to
4498# see if OPT was set and one that does BASECFLAGS setting based upon
4499# compiler and platform. BASECFLAGS tweaks need to be made even if the
4500# user set OPT.
4501
4502# tweak OPT based on compiler and platform, only if the user didn't set
4503# it on the command line
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004504
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004505if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004506then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004507 case $GCC in
4508 yes)
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004509 if test "$CC" != 'g++' ; then
4510 STRICT_PROTO="-Wstrict-prototypes"
4511 fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00004512 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004513 yes)
Fred Drake109d9862001-07-11 06:27:56 +00004514 if test "$Py_DEBUG" = 'true' ; then
4515 # Optimization messes up debuggers, so turn it off for
4516 # debug builds.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004517 OPT="-g -Wall $STRICT_PROTO"
Fred Drake109d9862001-07-11 06:27:56 +00004518 else
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004519 OPT="-g -O3 -Wall $STRICT_PROTO"
Skip Montanarodecc6a42003-01-01 20:07:49 +00004520 fi
4521 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004522 *)
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004523 OPT="-O3 -Wall $STRICT_PROTO"
Skip Montanarodecc6a42003-01-01 20:07:49 +00004524 ;;
Fred Drake109d9862001-07-11 06:27:56 +00004525 esac
Martin v. Löwis21ee4092002-09-30 16:19:48 +00004526 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00004527 SCO_SV*) OPT="$OPT -m486 -DSCO5"
4528 ;;
4529 esac
Fred Drake109d9862001-07-11 06:27:56 +00004530 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00004531
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004532 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00004533 OPT="-O"
4534 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004535 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00004536
4537 # The current (beta) Monterey compiler dies with optimizations
4538 # XXX what is Monterey? Does it still die w/ -O? Can we get rid of this?
Jack Jansenca06bc62001-08-03 15:32:23 +00004539 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00004540 Monterey*)
4541 OPT=""
4542 ;;
Jack Jansenca06bc62001-08-03 15:32:23 +00004543 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00004544
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004545fi
4546
Skip Montanarodecc6a42003-01-01 20:07:49 +00004547
4548# tweak BASECFLAGS based on compiler and platform
4549case $GCC in
4550yes)
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004551 # Python violates C99 rules, by casting between incompatible
4552 # pointer types. GCC may generate bad code as a result of that,
4553 # so use -fno-strict-aliasing if supported.
Thomas Wouters477c8d52006-05-27 19:21:47 +00004554 { echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
4555echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6; }
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004556 ac_save_cc="$CC"
4557 CC="$CC -fno-strict-aliasing"
4558 if test "$cross_compiling" = yes; then
4559 ac_cv_no_strict_aliasing_ok=no
4560else
4561 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004562/* confdefs.h. */
4563_ACEOF
4564cat confdefs.h >>conftest.$ac_ext
4565cat >>conftest.$ac_ext <<_ACEOF
4566/* end confdefs.h. */
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004567int main() { return 0; }
4568_ACEOF
4569rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004570if { (ac_try="$ac_link"
4571case "(($ac_try" in
4572 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4573 *) ac_try_echo=$ac_try;;
4574esac
4575eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4576 (eval "$ac_link") 2>&5
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004577 ac_status=$?
4578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4579 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004580 { (case "(($ac_try" in
4581 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4582 *) ac_try_echo=$ac_try;;
4583esac
4584eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4585 (eval "$ac_try") 2>&5
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004586 ac_status=$?
4587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4588 (exit $ac_status); }; }; then
4589 ac_cv_no_strict_aliasing_ok=yes
4590else
4591 echo "$as_me: program exited with status $ac_status" >&5
4592echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004593sed 's/^/| /' conftest.$ac_ext >&5
4594
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004595( exit $ac_status )
4596ac_cv_no_strict_aliasing_ok=no
4597fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00004598rm -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 +00004599fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00004600
4601
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004602 CC="$ac_save_cc"
Thomas Wouters477c8d52006-05-27 19:21:47 +00004603 { echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
4604echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6; }
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004605 if test $ac_cv_no_strict_aliasing_ok = yes
4606 then
4607 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
4608 fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00004609 case $ac_sys_system in
4610 SCO_SV*)
4611 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
4612 ;;
4613 # is there any other compiler on Darwin besides gcc?
4614 Darwin*)
Jack Jansene0040412003-07-23 22:17:28 +00004615 BASECFLAGS="$BASECFLAGS -Wno-long-double -no-cpp-precomp -mno-fused-madd"
Thomas Wouters477c8d52006-05-27 19:21:47 +00004616 if test "${enable_universalsdk}"; then
4617 BASECFLAGS="-arch ppc -arch i386 -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
4618 fi
4619
Skip Montanarodecc6a42003-01-01 20:07:49 +00004620 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004621 OSF*)
4622 BASECFLAGS="$BASECFLAGS -mieee"
4623 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00004624 esac
4625 ;;
4626
4627*)
4628 case $ac_sys_system in
4629 OpenUNIX*|UnixWare*)
4630 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
4631 ;;
Neal Norwitzb44f1652003-05-26 14:11:55 +00004632 OSF*)
4633 BASECFLAGS="$BASECFLAGS -ieee -std"
4634 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00004635 SCO_SV*)
4636 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
4637 ;;
4638 esac
4639 ;;
4640esac
4641
Fred Drakee1ceaa02001-12-04 20:55:47 +00004642if test "$Py_DEBUG" = 'true'; then
4643 :
4644else
4645 OPT="-DNDEBUG $OPT"
4646fi
4647
Guido van Rossum563e7081996-09-10 18:20:48 +00004648if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00004649then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004650 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00004651fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00004652
Neal Norwitz020c46a2006-01-07 21:39:28 +00004653# disable check for icc since it seems to pass, but generates a warning
4654if test "$CC" = icc
4655then
4656 ac_cv_opt_olimit_ok=no
4657fi
4658
Thomas Wouters477c8d52006-05-27 19:21:47 +00004659{ echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
4660echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004661if test "${ac_cv_opt_olimit_ok+set}" = set; then
4662 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00004663else
4664 ac_save_cc="$CC"
4665CC="$CC -OPT:Olimit=0"
4666if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00004667 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00004668else
Martin v. Löwis11437992002-04-12 09:54:03 +00004669 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004670/* confdefs.h. */
4671_ACEOF
4672cat confdefs.h >>conftest.$ac_ext
4673cat >>conftest.$ac_ext <<_ACEOF
4674/* end confdefs.h. */
Guido van Rossum91922671997-10-09 20:24:13 +00004675int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004676_ACEOF
4677rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004678if { (ac_try="$ac_link"
4679case "(($ac_try" in
4680 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4681 *) ac_try_echo=$ac_try;;
4682esac
4683eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4684 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004685 ac_status=$?
4686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4687 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004688 { (case "(($ac_try" in
4689 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4690 *) ac_try_echo=$ac_try;;
4691esac
4692eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4693 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004694 ac_status=$?
4695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4696 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00004697 ac_cv_opt_olimit_ok=yes
4698else
Martin v. Löwis11437992002-04-12 09:54:03 +00004699 echo "$as_me: program exited with status $ac_status" >&5
4700echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004701sed 's/^/| /' conftest.$ac_ext >&5
4702
Martin v. Löwis11437992002-04-12 09:54:03 +00004703( exit $ac_status )
4704ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00004705fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00004706rm -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 +00004707fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00004708
4709
Guido van Rossum91922671997-10-09 20:24:13 +00004710CC="$ac_save_cc"
4711fi
4712
Thomas Wouters477c8d52006-05-27 19:21:47 +00004713{ echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
4714echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6; }
Guido van Rossum2efa34b1997-10-23 17:43:11 +00004715if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00004716 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00004717 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
4718 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
4719 # environment?
4720 Darwin*)
4721 ;;
4722 *)
4723 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
4724 ;;
Guido van Rossum5839e582000-10-09 19:52:35 +00004725 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004726else
Thomas Wouters477c8d52006-05-27 19:21:47 +00004727 { echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
4728echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004729 if test "${ac_cv_olimit_ok+set}" = set; then
4730 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004731else
4732 ac_save_cc="$CC"
4733 CC="$CC -Olimit 1500"
4734 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00004735 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004736else
Martin v. Löwis11437992002-04-12 09:54:03 +00004737 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004738/* confdefs.h. */
4739_ACEOF
4740cat confdefs.h >>conftest.$ac_ext
4741cat >>conftest.$ac_ext <<_ACEOF
4742/* end confdefs.h. */
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004743int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004744_ACEOF
4745rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004746if { (ac_try="$ac_link"
4747case "(($ac_try" in
4748 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4749 *) ac_try_echo=$ac_try;;
4750esac
4751eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4752 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004753 ac_status=$?
4754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4755 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004756 { (case "(($ac_try" in
4757 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4758 *) ac_try_echo=$ac_try;;
4759esac
4760eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4761 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004762 ac_status=$?
4763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4764 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004765 ac_cv_olimit_ok=yes
4766else
Martin v. Löwis11437992002-04-12 09:54:03 +00004767 echo "$as_me: program exited with status $ac_status" >&5
4768echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004769sed 's/^/| /' conftest.$ac_ext >&5
4770
Martin v. Löwis11437992002-04-12 09:54:03 +00004771( exit $ac_status )
4772ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00004773fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00004774rm -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 +00004775fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00004776
4777
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004778 CC="$ac_save_cc"
4779fi
4780
Thomas Wouters477c8d52006-05-27 19:21:47 +00004781 { echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4782echo "${ECHO_T}$ac_cv_olimit_ok" >&6; }
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004783 if test $ac_cv_olimit_ok = yes; then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004784 BASECFLAGS="$BASECFLAGS -Olimit 1500"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004785 fi
4786fi
4787
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004788# On some compilers, pthreads are available without further options
4789# (e.g. MacOS X). On some of these systems, the compiler will not
4790# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
4791# So we have to see first whether pthreads are available without
4792# options before we can check whether -Kpthread improves anything.
Thomas Wouters477c8d52006-05-27 19:21:47 +00004793{ echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
4794echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004795if test "${ac_cv_pthread_is_default+set}" = set; then
4796 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00004797else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004798 if test "$cross_compiling" = yes; then
4799 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004800else
Martin v. Löwis11437992002-04-12 09:54:03 +00004801 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004802/* confdefs.h. */
4803_ACEOF
4804cat confdefs.h >>conftest.$ac_ext
4805cat >>conftest.$ac_ext <<_ACEOF
4806/* end confdefs.h. */
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004807
Martin v. Löwis130fb172001-07-19 11:00:41 +00004808#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004809
4810void* routine(void* p){return NULL;}
4811
4812int main(){
4813 pthread_t p;
4814 if(pthread_create(&p,NULL,routine,NULL)!=0)
4815 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00004816 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004817 return 0;
4818}
4819
Martin v. Löwis11437992002-04-12 09:54:03 +00004820_ACEOF
4821rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004822if { (ac_try="$ac_link"
4823case "(($ac_try" in
4824 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4825 *) ac_try_echo=$ac_try;;
4826esac
4827eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4828 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004829 ac_status=$?
4830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4831 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004832 { (case "(($ac_try" in
4833 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4834 *) ac_try_echo=$ac_try;;
4835esac
4836eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4837 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004838 ac_status=$?
4839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4840 (exit $ac_status); }; }; then
Skip Montanarod8d39a02003-07-10 20:44:10 +00004841
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004842 ac_cv_pthread_is_default=yes
Skip Montanarod8d39a02003-07-10 20:44:10 +00004843 ac_cv_kthread=no
4844 ac_cv_pthread=no
4845
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004846else
Martin v. Löwis11437992002-04-12 09:54:03 +00004847 echo "$as_me: program exited with status $ac_status" >&5
4848echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004849sed 's/^/| /' conftest.$ac_ext >&5
4850
Martin v. Löwis11437992002-04-12 09:54:03 +00004851( exit $ac_status )
4852ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004853fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00004854rm -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 +00004855fi
4856
Thomas Wouters477c8d52006-05-27 19:21:47 +00004857
4858
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004859fi
4860
Thomas Wouters477c8d52006-05-27 19:21:47 +00004861{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
4862echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; }
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004863
Michael W. Hudson54241132001-12-07 15:38:26 +00004864
Martin v. Löwis11437992002-04-12 09:54:03 +00004865if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004866then
4867 ac_cv_kpthread=no
4868else
4869# -Kpthread, if available, provides the right #defines
4870# and linker options to make pthread_create available
4871# Some compilers won't report that they do not support -Kpthread,
4872# so we need to run a program to see whether it really made the
4873# function available.
Thomas Wouters477c8d52006-05-27 19:21:47 +00004874{ echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
4875echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004876if test "${ac_cv_kpthread+set}" = set; then
4877 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004878else
4879 ac_save_cc="$CC"
4880CC="$CC -Kpthread"
4881if test "$cross_compiling" = yes; then
4882 ac_cv_kpthread=no
4883else
Martin v. Löwis11437992002-04-12 09:54:03 +00004884 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004885/* confdefs.h. */
4886_ACEOF
4887cat confdefs.h >>conftest.$ac_ext
4888cat >>conftest.$ac_ext <<_ACEOF
4889/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004890
4891#include <pthread.h>
4892
4893void* routine(void* p){return NULL;}
4894
4895int main(){
4896 pthread_t p;
4897 if(pthread_create(&p,NULL,routine,NULL)!=0)
4898 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00004899 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004900 return 0;
4901}
4902
Martin v. Löwis11437992002-04-12 09:54:03 +00004903_ACEOF
4904rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004905if { (ac_try="$ac_link"
4906case "(($ac_try" in
4907 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4908 *) ac_try_echo=$ac_try;;
4909esac
4910eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4911 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004912 ac_status=$?
4913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4914 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004915 { (case "(($ac_try" in
4916 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4917 *) ac_try_echo=$ac_try;;
4918esac
4919eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4920 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004921 ac_status=$?
4922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4923 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00004924 ac_cv_kpthread=yes
4925else
Martin v. Löwis11437992002-04-12 09:54:03 +00004926 echo "$as_me: program exited with status $ac_status" >&5
4927echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004928sed 's/^/| /' conftest.$ac_ext >&5
4929
Martin v. Löwis11437992002-04-12 09:54:03 +00004930( exit $ac_status )
4931ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00004932fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00004933rm -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 +00004934fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00004935
4936
Martin v. Löwis130fb172001-07-19 11:00:41 +00004937CC="$ac_save_cc"
4938fi
4939
Thomas Wouters477c8d52006-05-27 19:21:47 +00004940{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
4941echo "${ECHO_T}$ac_cv_kpthread" >&6; }
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004942fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00004943
Skip Montanarod8d39a02003-07-10 20:44:10 +00004944if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004945then
4946# -Kthread, if available, provides the right #defines
4947# and linker options to make pthread_create available
4948# Some compilers won't report that they do not support -Kthread,
4949# so we need to run a program to see whether it really made the
4950# function available.
Thomas Wouters477c8d52006-05-27 19:21:47 +00004951{ echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
4952echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6; }
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004953if test "${ac_cv_kthread+set}" = set; then
4954 echo $ECHO_N "(cached) $ECHO_C" >&6
4955else
4956 ac_save_cc="$CC"
4957CC="$CC -Kthread"
4958if test "$cross_compiling" = yes; then
4959 ac_cv_kthread=no
4960else
4961 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004962/* confdefs.h. */
4963_ACEOF
4964cat confdefs.h >>conftest.$ac_ext
4965cat >>conftest.$ac_ext <<_ACEOF
4966/* end confdefs.h. */
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004967
4968#include <pthread.h>
4969
4970void* routine(void* p){return NULL;}
4971
4972int main(){
4973 pthread_t p;
4974 if(pthread_create(&p,NULL,routine,NULL)!=0)
4975 return 1;
4976 (void)pthread_detach(p);
4977 return 0;
4978}
4979
4980_ACEOF
4981rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004982if { (ac_try="$ac_link"
4983case "(($ac_try" in
4984 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4985 *) ac_try_echo=$ac_try;;
4986esac
4987eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4988 (eval "$ac_link") 2>&5
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004989 ac_status=$?
4990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4991 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004992 { (case "(($ac_try" in
4993 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4994 *) ac_try_echo=$ac_try;;
4995esac
4996eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4997 (eval "$ac_try") 2>&5
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004998 ac_status=$?
4999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5000 (exit $ac_status); }; }; then
5001 ac_cv_kthread=yes
5002else
5003 echo "$as_me: program exited with status $ac_status" >&5
5004echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005005sed 's/^/| /' conftest.$ac_ext >&5
5006
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005007( exit $ac_status )
5008ac_cv_kthread=no
5009fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00005010rm -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 +00005011fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00005012
5013
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005014CC="$ac_save_cc"
5015fi
5016
Thomas Wouters477c8d52006-05-27 19:21:47 +00005017{ echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
5018echo "${ECHO_T}$ac_cv_kthread" >&6; }
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005019fi
5020
Skip Montanarod8d39a02003-07-10 20:44:10 +00005021if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005022then
5023# -pthread, if available, provides the right #defines
5024# and linker options to make pthread_create available
5025# Some compilers won't report that they do not support -pthread,
5026# so we need to run a program to see whether it really made the
5027# function available.
Thomas Wouters477c8d52006-05-27 19:21:47 +00005028{ echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
5029echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005030if test "${ac_cv_thread+set}" = set; then
5031 echo $ECHO_N "(cached) $ECHO_C" >&6
5032else
5033 ac_save_cc="$CC"
5034CC="$CC -pthread"
5035if test "$cross_compiling" = yes; then
5036 ac_cv_pthread=no
5037else
5038 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005039/* confdefs.h. */
5040_ACEOF
5041cat confdefs.h >>conftest.$ac_ext
5042cat >>conftest.$ac_ext <<_ACEOF
5043/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005044
5045#include <pthread.h>
5046
5047void* routine(void* p){return NULL;}
5048
5049int main(){
5050 pthread_t p;
5051 if(pthread_create(&p,NULL,routine,NULL)!=0)
5052 return 1;
5053 (void)pthread_detach(p);
5054 return 0;
5055}
5056
5057_ACEOF
5058rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00005059if { (ac_try="$ac_link"
5060case "(($ac_try" in
5061 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5062 *) ac_try_echo=$ac_try;;
5063esac
5064eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5065 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005066 ac_status=$?
5067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5068 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00005069 { (case "(($ac_try" in
5070 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5071 *) ac_try_echo=$ac_try;;
5072esac
5073eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5074 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005075 ac_status=$?
5076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5077 (exit $ac_status); }; }; then
5078 ac_cv_pthread=yes
5079else
5080 echo "$as_me: program exited with status $ac_status" >&5
5081echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005082sed 's/^/| /' conftest.$ac_ext >&5
5083
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005084( exit $ac_status )
5085ac_cv_pthread=no
5086fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00005087rm -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 +00005088fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00005089
5090
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005091CC="$ac_save_cc"
5092fi
5093
Thomas Wouters477c8d52006-05-27 19:21:47 +00005094{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5095echo "${ECHO_T}$ac_cv_pthread" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005096fi
5097
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005098# If we have set a CC compiler flag for thread support then
5099# check if it works for CXX, too.
5100ac_cv_cxx_thread=no
5101if test ! -z "$CXX"
5102then
Thomas Wouters477c8d52006-05-27 19:21:47 +00005103{ echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5104echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6; }
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005105ac_save_cxx="$CXX"
5106
5107if test "$ac_cv_kpthread" = "yes"
5108then
5109 CXX="$CXX -Kpthread"
5110 ac_cv_cxx_thread=yes
5111elif test "$ac_cv_kthread" = "yes"
5112then
5113 CXX="$CXX -Kthread"
5114 ac_cv_cxx_thread=yes
5115elif test "$ac_cv_pthread" = "yes"
5116then
5117 CXX="$CXX -pthread"
5118 ac_cv_cxx_thread=yes
5119fi
5120
5121if test $ac_cv_cxx_thread = yes
5122then
5123 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5124 $CXX -c conftest.$ac_ext 2>&5
5125 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5126 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5127 then
5128 ac_cv_cxx_thread=yes
5129 else
5130 ac_cv_cxx_thread=no
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005131 fi
5132 rm -fr conftest*
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005133fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00005134{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5135echo "${ECHO_T}$ac_cv_cxx_thread" >&6; }
Brett Cannonc601e0f2004-11-07 01:24:12 +00005136fi
5137CXX="$ac_save_cxx"
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005138
Michael W. Hudson54241132001-12-07 15:38:26 +00005139
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005140# checks for header files
Thomas Wouters477c8d52006-05-27 19:21:47 +00005141{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5142echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005143if test "${ac_cv_header_stdc+set}" = set; then
5144 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005145else
Martin v. Löwis11437992002-04-12 09:54:03 +00005146 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005147/* confdefs.h. */
5148_ACEOF
5149cat confdefs.h >>conftest.$ac_ext
5150cat >>conftest.$ac_ext <<_ACEOF
5151/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005152#include <stdlib.h>
5153#include <stdarg.h>
5154#include <string.h>
5155#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005156
Skip Montanaro6dead952003-09-25 14:50:04 +00005157int
5158main ()
5159{
5160
5161 ;
5162 return 0;
5163}
Martin v. Löwis11437992002-04-12 09:54:03 +00005164_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005165rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00005166if { (ac_try="$ac_compile"
5167case "(($ac_try" in
5168 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5169 *) ac_try_echo=$ac_try;;
5170esac
5171eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5172 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005173 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005174 grep -v '^ *+' conftest.er1 >conftest.err
5175 rm -f conftest.er1
5176 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005178 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00005179 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
5180 { (case "(($ac_try" in
5181 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5182 *) ac_try_echo=$ac_try;;
5183esac
5184eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5185 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005186 ac_status=$?
5187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5188 (exit $ac_status); }; } &&
5189 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00005190 { (case "(($ac_try" in
5191 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5192 *) ac_try_echo=$ac_try;;
5193esac
5194eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5195 (eval "$ac_try") 2>&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005196 ac_status=$?
5197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5198 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005199 ac_cv_header_stdc=yes
5200else
Martin v. Löwis11437992002-04-12 09:54:03 +00005201 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005202sed 's/^/| /' conftest.$ac_ext >&5
5203
Thomas Wouters477c8d52006-05-27 19:21:47 +00005204 ac_cv_header_stdc=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005205fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00005206
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005208
5209if test $ac_cv_header_stdc = yes; then
5210 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00005211 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005212/* confdefs.h. */
5213_ACEOF
5214cat confdefs.h >>conftest.$ac_ext
5215cat >>conftest.$ac_ext <<_ACEOF
5216/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005217#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005218
5219_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005220if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005221 $EGREP "memchr" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005222 :
5223else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005224 ac_cv_header_stdc=no
5225fi
5226rm -f conftest*
5227
5228fi
5229
5230if test $ac_cv_header_stdc = yes; then
5231 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00005232 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005233/* confdefs.h. */
5234_ACEOF
5235cat confdefs.h >>conftest.$ac_ext
5236cat >>conftest.$ac_ext <<_ACEOF
5237/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005238#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005239
5240_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005241if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005242 $EGREP "free" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005243 :
5244else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005245 ac_cv_header_stdc=no
5246fi
5247rm -f conftest*
5248
5249fi
5250
5251if test $ac_cv_header_stdc = yes; then
5252 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00005253 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005254 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005255else
Martin v. Löwis11437992002-04-12 09:54:03 +00005256 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005257/* confdefs.h. */
5258_ACEOF
5259cat confdefs.h >>conftest.$ac_ext
5260cat >>conftest.$ac_ext <<_ACEOF
5261/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005262#include <ctype.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +00005263#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005264#if ((' ' & 0x0FF) == 0x020)
5265# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5266# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5267#else
Skip Montanaro6dead952003-09-25 14:50:04 +00005268# define ISLOWER(c) \
Skip Montanarof0d5f792004-08-15 14:08:23 +00005269 (('a' <= (c) && (c) <= 'i') \
5270 || ('j' <= (c) && (c) <= 'r') \
5271 || ('s' <= (c) && (c) <= 'z'))
Martin v. Löwis11437992002-04-12 09:54:03 +00005272# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5273#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00005274
Martin v. Löwis11437992002-04-12 09:54:03 +00005275#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5276int
5277main ()
5278{
5279 int i;
5280 for (i = 0; i < 256; i++)
5281 if (XOR (islower (i), ISLOWER (i))
Skip Montanarof0d5f792004-08-15 14:08:23 +00005282 || toupper (i) != TOUPPER (i))
Thomas Wouters477c8d52006-05-27 19:21:47 +00005283 return 2;
5284 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00005285}
5286_ACEOF
5287rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00005288if { (ac_try="$ac_link"
5289case "(($ac_try" in
5290 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5291 *) ac_try_echo=$ac_try;;
5292esac
5293eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5294 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005295 ac_status=$?
5296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5297 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00005298 { (case "(($ac_try" in
5299 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5300 *) ac_try_echo=$ac_try;;
5301esac
5302eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5303 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005304 ac_status=$?
5305 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5306 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005307 :
5308else
Martin v. Löwis11437992002-04-12 09:54:03 +00005309 echo "$as_me: program exited with status $ac_status" >&5
5310echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005311sed 's/^/| /' conftest.$ac_ext >&5
5312
Martin v. Löwis11437992002-04-12 09:54:03 +00005313( exit $ac_status )
5314ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005315fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00005316rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5317fi
5318
5319
Michael W. Hudson54241132001-12-07 15:38:26 +00005320fi
5321fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00005322{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5323echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00005324if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005325
5326cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005327#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005328_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005329
5330fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005331
Skip Montanarob9820a32004-01-17 00:16:12 +00005332# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
Skip Montanarof0d5f792004-08-15 14:08:23 +00005343 inttypes.h stdint.h unistd.h
Skip Montanarob9820a32004-01-17 00:16:12 +00005344do
5345as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Thomas Wouters477c8d52006-05-27 19:21:47 +00005346{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5347echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5348if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Skip Montanarob9820a32004-01-17 00:16:12 +00005349 echo $ECHO_N "(cached) $ECHO_C" >&6
5350else
5351 cat >conftest.$ac_ext <<_ACEOF
Skip Montanarob9820a32004-01-17 00:16:12 +00005352/* confdefs.h. */
5353_ACEOF
5354cat confdefs.h >>conftest.$ac_ext
5355cat >>conftest.$ac_ext <<_ACEOF
5356/* end confdefs.h. */
5357$ac_includes_default
5358
5359#include <$ac_header>
5360_ACEOF
5361rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00005362if { (ac_try="$ac_compile"
5363case "(($ac_try" in
5364 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5365 *) ac_try_echo=$ac_try;;
5366esac
5367eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5368 (eval "$ac_compile") 2>conftest.er1
Skip Montanarob9820a32004-01-17 00:16:12 +00005369 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005370 grep -v '^ *+' conftest.er1 >conftest.err
5371 rm -f conftest.er1
5372 cat conftest.err >&5
Skip Montanarob9820a32004-01-17 00:16:12 +00005373 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5374 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00005375 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
5376 { (case "(($ac_try" in
5377 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5378 *) ac_try_echo=$ac_try;;
5379esac
5380eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5381 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005382 ac_status=$?
5383 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5384 (exit $ac_status); }; } &&
5385 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00005386 { (case "(($ac_try" in
5387 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5388 *) ac_try_echo=$ac_try;;
5389esac
5390eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5391 (eval "$ac_try") 2>&5
Skip Montanarob9820a32004-01-17 00:16:12 +00005392 ac_status=$?
5393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5394 (exit $ac_status); }; }; then
5395 eval "$as_ac_Header=yes"
5396else
5397 echo "$as_me: failed program was:" >&5
5398sed 's/^/| /' conftest.$ac_ext >&5
5399
Thomas Wouters477c8d52006-05-27 19:21:47 +00005400 eval "$as_ac_Header=no"
Skip Montanarob9820a32004-01-17 00:16:12 +00005401fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00005402
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005403rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanarob9820a32004-01-17 00:16:12 +00005404fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00005405ac_res=`eval echo '${'$as_ac_Header'}'`
5406 { echo "$as_me:$LINENO: result: $ac_res" >&5
5407echo "${ECHO_T}$ac_res" >&6; }
Skip Montanarob9820a32004-01-17 00:16:12 +00005408if test `eval echo '${'$as_ac_Header'}'` = yes; then
5409 cat >>confdefs.h <<_ACEOF
5410#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5411_ACEOF
5412
5413fi
5414
5415done
5416
5417
Martin v. Löwis11437992002-04-12 09:54:03 +00005418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
Anthony Baxter8a560de2004-10-13 15:30:56 +00005454
Martin v. Löwisc3001752005-01-23 09:27:24 +00005455
Martin v. Löwis11017b12006-01-14 18:12:57 +00005456
Thomas Wouters477c8d52006-05-27 19:21:47 +00005457
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005458
5459
5460
5461
5462
5463
5464
5465
5466for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5467fcntl.h grp.h \
5468shadow.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
5469signal.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005470unistd.h utime.h \
Anthony Baxter8a560de2004-10-13 15:30:56 +00005471sys/audioio.h sys/bsdtty.h sys/file.h sys/loadavg.h sys/lock.h sys/mkdev.h \
5472sys/modem.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005473sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
5474sys/time.h \
5475sys/times.h sys/types.h sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
Hye-Shik Chang81268602004-02-02 06:05:24 +00005476sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
5477bluetooth/bluetooth.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00005478do
Martin v. Löwis11437992002-04-12 09:54:03 +00005479as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Thomas Wouters477c8d52006-05-27 19:21:47 +00005480if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5481 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5482echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5483if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005484 echo $ECHO_N "(cached) $ECHO_C" >&6
5485fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00005486ac_res=`eval echo '${'$as_ac_Header'}'`
5487 { echo "$as_me:$LINENO: result: $ac_res" >&5
5488echo "${ECHO_T}$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005489else
Martin v. Löwis11437992002-04-12 09:54:03 +00005490 # Is the header compilable?
Thomas Wouters477c8d52006-05-27 19:21:47 +00005491{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5492echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005493cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005494/* confdefs.h. */
5495_ACEOF
5496cat confdefs.h >>conftest.$ac_ext
5497cat >>conftest.$ac_ext <<_ACEOF
5498/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005499$ac_includes_default
5500#include <$ac_header>
5501_ACEOF
5502rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00005503if { (ac_try="$ac_compile"
5504case "(($ac_try" in
5505 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5506 *) ac_try_echo=$ac_try;;
5507esac
5508eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5509 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005510 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005511 grep -v '^ *+' conftest.er1 >conftest.err
5512 rm -f conftest.er1
5513 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5515 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00005516 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
5517 { (case "(($ac_try" in
5518 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5519 *) ac_try_echo=$ac_try;;
5520esac
5521eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5522 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005523 ac_status=$?
5524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5525 (exit $ac_status); }; } &&
5526 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00005527 { (case "(($ac_try" in
5528 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5529 *) ac_try_echo=$ac_try;;
5530esac
5531eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5532 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005533 ac_status=$?
5534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5535 (exit $ac_status); }; }; then
5536 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00005537else
Martin v. Löwis11437992002-04-12 09:54:03 +00005538 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005539sed 's/^/| /' conftest.$ac_ext >&5
5540
Thomas Wouters477c8d52006-05-27 19:21:47 +00005541 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005542fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00005543
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005544rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +00005545{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5546echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005547
5548# Is the header present?
Thomas Wouters477c8d52006-05-27 19:21:47 +00005549{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5550echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005551cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005552/* confdefs.h. */
5553_ACEOF
5554cat confdefs.h >>conftest.$ac_ext
5555cat >>conftest.$ac_ext <<_ACEOF
5556/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005557#include <$ac_header>
5558_ACEOF
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00005559if { (ac_try="$ac_cpp conftest.$ac_ext"
5560case "(($ac_try" in
5561 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5562 *) ac_try_echo=$ac_try;;
5563esac
5564eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5565 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005566 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005567 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00005568 rm -f conftest.er1
5569 cat conftest.err >&5
5570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5571 (exit $ac_status); } >/dev/null; then
5572 if test -s conftest.err; then
5573 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +00005574 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +00005575 else
5576 ac_cpp_err=
5577 fi
5578else
5579 ac_cpp_err=yes
5580fi
5581if test -z "$ac_cpp_err"; then
5582 ac_header_preproc=yes
5583else
5584 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005585sed 's/^/| /' conftest.$ac_ext >&5
5586
Martin v. Löwis11437992002-04-12 09:54:03 +00005587 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00005588fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00005589
Martin v. Löwis11437992002-04-12 09:54:03 +00005590rm -f conftest.err conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +00005591{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5592echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005593
5594# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005595case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5596 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +00005597 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5598echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005599 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5600echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
5601 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005602 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005603 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005604 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5605echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005606 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5607echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5608 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5609echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5610 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5611echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005612 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5613echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005614 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5615echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +00005616 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00005617## ------------------------------------------------ ##
5618## Report this to http://www.python.org/python-bugs ##
5619## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005620_ASBOX
Thomas Wouters477c8d52006-05-27 19:21:47 +00005621 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005622 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00005623esac
Thomas Wouters477c8d52006-05-27 19:21:47 +00005624{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5625echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5626if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005627 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005628else
Skip Montanarof0d5f792004-08-15 14:08:23 +00005629 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005630fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00005631ac_res=`eval echo '${'$as_ac_Header'}'`
5632 { echo "$as_me:$LINENO: result: $ac_res" >&5
5633echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005634
5635fi
5636if test `eval echo '${'$as_ac_Header'}'` = yes; then
5637 cat >>confdefs.h <<_ACEOF
5638#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5639_ACEOF
5640
5641fi
5642
Guido van Rossum627b2d71993-12-24 10:39:16 +00005643done
5644
Martin v. Löwis11437992002-04-12 09:54:03 +00005645
5646
5647
5648
5649
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005650ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005651for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
5652 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
Thomas Wouters477c8d52006-05-27 19:21:47 +00005653{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5654echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
5655if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005656 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005657else
Martin v. Löwis11437992002-04-12 09:54:03 +00005658 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005659/* confdefs.h. */
5660_ACEOF
5661cat confdefs.h >>conftest.$ac_ext
5662cat >>conftest.$ac_ext <<_ACEOF
5663/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005664#include <sys/types.h>
5665#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00005666
Martin v. Löwis11437992002-04-12 09:54:03 +00005667int
5668main ()
5669{
5670if ((DIR *) 0)
5671return 0;
5672 ;
5673 return 0;
5674}
5675_ACEOF
5676rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00005677if { (ac_try="$ac_compile"
5678case "(($ac_try" in
5679 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5680 *) ac_try_echo=$ac_try;;
5681esac
5682eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5683 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005684 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005685 grep -v '^ *+' conftest.er1 >conftest.err
5686 rm -f conftest.er1
5687 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005688 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5689 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00005690 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
5691 { (case "(($ac_try" in
5692 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5693 *) ac_try_echo=$ac_try;;
5694esac
5695eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5696 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005697 ac_status=$?
5698 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5699 (exit $ac_status); }; } &&
5700 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00005701 { (case "(($ac_try" in
5702 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5703 *) ac_try_echo=$ac_try;;
5704esac
5705eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5706 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005707 ac_status=$?
5708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5709 (exit $ac_status); }; }; then
5710 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00005711else
Martin v. Löwis11437992002-04-12 09:54:03 +00005712 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005713sed 's/^/| /' conftest.$ac_ext >&5
5714
Thomas Wouters477c8d52006-05-27 19:21:47 +00005715 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005716fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00005717
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005718rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005719fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00005720ac_res=`eval echo '${'$as_ac_Header'}'`
5721 { echo "$as_me:$LINENO: result: $ac_res" >&5
5722echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005723if test `eval echo '${'$as_ac_Header'}'` = yes; then
5724 cat >>confdefs.h <<_ACEOF
5725#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
5726_ACEOF
5727
5728ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00005729fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005730
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005731done
5732# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5733if test $ac_header_dirent = dirent.h; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00005734 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5735echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005736if test "${ac_cv_search_opendir+set}" = set; then
5737 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005738else
Martin v. Löwis11437992002-04-12 09:54:03 +00005739 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005740cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005741/* confdefs.h. */
5742_ACEOF
5743cat confdefs.h >>conftest.$ac_ext
5744cat >>conftest.$ac_ext <<_ACEOF
5745/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005746
Thomas Wouters477c8d52006-05-27 19:21:47 +00005747/* Override any GCC internal prototype to avoid an error.
5748 Use char because int might match the return type of a GCC
5749 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005750#ifdef __cplusplus
5751extern "C"
5752#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005753char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005754int
5755main ()
5756{
Thomas Wouters477c8d52006-05-27 19:21:47 +00005757return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005758 ;
5759 return 0;
5760}
5761_ACEOF
Thomas Wouters477c8d52006-05-27 19:21:47 +00005762for ac_lib in '' dir; do
5763 if test -z "$ac_lib"; then
5764 ac_res="none required"
5765 else
5766 ac_res=-l$ac_lib
Martin v. Löwis11437992002-04-12 09:54:03 +00005767 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters477c8d52006-05-27 19:21:47 +00005768 fi
5769 rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00005770if { (ac_try="$ac_link"
5771case "(($ac_try" in
5772 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5773 *) ac_try_echo=$ac_try;;
5774esac
5775eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5776 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005777 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005778 grep -v '^ *+' conftest.er1 >conftest.err
5779 rm -f conftest.er1
5780 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5782 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00005783 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
5784 { (case "(($ac_try" in
5785 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5786 *) ac_try_echo=$ac_try;;
5787esac
5788eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5789 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005790 ac_status=$?
5791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5792 (exit $ac_status); }; } &&
5793 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00005794 { (case "(($ac_try" in
5795 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5796 *) ac_try_echo=$ac_try;;
5797esac
5798eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5799 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005800 ac_status=$?
5801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5802 (exit $ac_status); }; }; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00005803 ac_cv_search_opendir=$ac_res
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005804else
Martin v. Löwis11437992002-04-12 09:54:03 +00005805 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005806sed 's/^/| /' conftest.$ac_ext >&5
5807
Thomas Wouters477c8d52006-05-27 19:21:47 +00005808
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005809fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00005810
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005811rm -f core conftest.err conftest.$ac_objext \
Thomas Wouters477c8d52006-05-27 19:21:47 +00005812 conftest$ac_exeext
5813 if test "${ac_cv_search_opendir+set}" = set; then
5814 break
Martin v. Löwis11437992002-04-12 09:54:03 +00005815fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00005816done
5817if test "${ac_cv_search_opendir+set}" = set; then
5818 :
5819else
5820 ac_cv_search_opendir=no
5821fi
5822rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005823LIBS=$ac_func_search_save_LIBS
5824fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00005825{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5826echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
5827ac_res=$ac_cv_search_opendir
5828if test "$ac_res" != no; then
5829 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005830
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005831fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005832
Michael W. Hudson54241132001-12-07 15:38:26 +00005833else
Thomas Wouters477c8d52006-05-27 19:21:47 +00005834 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5835echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005836if test "${ac_cv_search_opendir+set}" = set; then
5837 echo $ECHO_N "(cached) $ECHO_C" >&6
5838else
5839 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005840cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005841/* confdefs.h. */
5842_ACEOF
5843cat confdefs.h >>conftest.$ac_ext
5844cat >>conftest.$ac_ext <<_ACEOF
5845/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005846
Thomas Wouters477c8d52006-05-27 19:21:47 +00005847/* Override any GCC internal prototype to avoid an error.
5848 Use char because int might match the return type of a GCC
5849 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005850#ifdef __cplusplus
5851extern "C"
5852#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005853char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005854int
5855main ()
5856{
Thomas Wouters477c8d52006-05-27 19:21:47 +00005857return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005858 ;
5859 return 0;
5860}
5861_ACEOF
Thomas Wouters477c8d52006-05-27 19:21:47 +00005862for ac_lib in '' x; do
5863 if test -z "$ac_lib"; then
5864 ac_res="none required"
5865 else
5866 ac_res=-l$ac_lib
Martin v. Löwis11437992002-04-12 09:54:03 +00005867 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters477c8d52006-05-27 19:21:47 +00005868 fi
5869 rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00005870if { (ac_try="$ac_link"
5871case "(($ac_try" in
5872 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5873 *) ac_try_echo=$ac_try;;
5874esac
5875eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5876 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005877 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005878 grep -v '^ *+' conftest.er1 >conftest.err
5879 rm -f conftest.er1
5880 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005881 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5882 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00005883 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
5884 { (case "(($ac_try" in
5885 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5886 *) ac_try_echo=$ac_try;;
5887esac
5888eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5889 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005890 ac_status=$?
5891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5892 (exit $ac_status); }; } &&
5893 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00005894 { (case "(($ac_try" in
5895 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5896 *) ac_try_echo=$ac_try;;
5897esac
5898eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5899 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005900 ac_status=$?
5901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5902 (exit $ac_status); }; }; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00005903 ac_cv_search_opendir=$ac_res
Martin v. Löwis11437992002-04-12 09:54:03 +00005904else
5905 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005906sed 's/^/| /' conftest.$ac_ext >&5
5907
Thomas Wouters477c8d52006-05-27 19:21:47 +00005908
Martin v. Löwis11437992002-04-12 09:54:03 +00005909fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00005910
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005911rm -f core conftest.err conftest.$ac_objext \
Thomas Wouters477c8d52006-05-27 19:21:47 +00005912 conftest$ac_exeext
5913 if test "${ac_cv_search_opendir+set}" = set; then
5914 break
Martin v. Löwis11437992002-04-12 09:54:03 +00005915fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00005916done
5917if test "${ac_cv_search_opendir+set}" = set; then
5918 :
5919else
5920 ac_cv_search_opendir=no
5921fi
5922rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005923LIBS=$ac_func_search_save_LIBS
5924fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00005925{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5926echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
5927ac_res=$ac_cv_search_opendir
5928if test "$ac_res" != no; then
5929 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00005930
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005931fi
5932
5933fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005934
Thomas Wouters477c8d52006-05-27 19:21:47 +00005935{ echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
5936echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005937if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
5938 echo $ECHO_N "(cached) $ECHO_C" >&6
5939else
5940 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005941/* confdefs.h. */
5942_ACEOF
5943cat confdefs.h >>conftest.$ac_ext
5944cat >>conftest.$ac_ext <<_ACEOF
5945/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005946#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005947int
5948main ()
5949{
5950return makedev(0, 0);
5951 ;
5952 return 0;
5953}
5954_ACEOF
5955rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00005956if { (ac_try="$ac_link"
5957case "(($ac_try" in
5958 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5959 *) ac_try_echo=$ac_try;;
5960esac
5961eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5962 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005963 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005964 grep -v '^ *+' conftest.er1 >conftest.err
5965 rm -f conftest.er1
5966 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5968 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00005969 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
5970 { (case "(($ac_try" in
5971 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5972 *) ac_try_echo=$ac_try;;
5973esac
5974eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5975 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005976 ac_status=$?
5977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5978 (exit $ac_status); }; } &&
5979 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00005980 { (case "(($ac_try" in
5981 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5982 *) ac_try_echo=$ac_try;;
5983esac
5984eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5985 (eval "$ac_try") 2>&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005986 ac_status=$?
5987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5988 (exit $ac_status); }; }; then
5989 ac_cv_header_sys_types_h_makedev=yes
5990else
5991 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005992sed 's/^/| /' conftest.$ac_ext >&5
5993
Thomas Wouters477c8d52006-05-27 19:21:47 +00005994 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005995fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00005996
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005997rm -f core conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +00005998 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005999
6000fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00006001{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
6002echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006003
6004if test $ac_cv_header_sys_types_h_makedev = no; then
6005if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00006006 { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6007echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006008if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
6009 echo $ECHO_N "(cached) $ECHO_C" >&6
6010fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00006011{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6012echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006013else
6014 # Is the header compilable?
Thomas Wouters477c8d52006-05-27 19:21:47 +00006015{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
6016echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006017cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006018/* confdefs.h. */
6019_ACEOF
6020cat confdefs.h >>conftest.$ac_ext
6021cat >>conftest.$ac_ext <<_ACEOF
6022/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006023$ac_includes_default
6024#include <sys/mkdev.h>
6025_ACEOF
6026rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006027if { (ac_try="$ac_compile"
6028case "(($ac_try" in
6029 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6030 *) ac_try_echo=$ac_try;;
6031esac
6032eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6033 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006034 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006035 grep -v '^ *+' conftest.er1 >conftest.err
6036 rm -f conftest.er1
6037 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6039 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006040 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
6041 { (case "(($ac_try" in
6042 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6043 *) ac_try_echo=$ac_try;;
6044esac
6045eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6046 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006047 ac_status=$?
6048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6049 (exit $ac_status); }; } &&
6050 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006051 { (case "(($ac_try" in
6052 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6053 *) ac_try_echo=$ac_try;;
6054esac
6055eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6056 (eval "$ac_try") 2>&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006057 ac_status=$?
6058 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6059 (exit $ac_status); }; }; then
6060 ac_header_compiler=yes
6061else
6062 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006063sed 's/^/| /' conftest.$ac_ext >&5
6064
Thomas Wouters477c8d52006-05-27 19:21:47 +00006065 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006066fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00006067
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006068rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +00006069{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6070echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006071
6072# Is the header present?
Thomas Wouters477c8d52006-05-27 19:21:47 +00006073{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
6074echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006075cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006076/* confdefs.h. */
6077_ACEOF
6078cat confdefs.h >>conftest.$ac_ext
6079cat >>conftest.$ac_ext <<_ACEOF
6080/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006081#include <sys/mkdev.h>
6082_ACEOF
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006083if { (ac_try="$ac_cpp conftest.$ac_ext"
6084case "(($ac_try" in
6085 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6086 *) ac_try_echo=$ac_try;;
6087esac
6088eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6089 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006090 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006091 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006092 rm -f conftest.er1
6093 cat conftest.err >&5
6094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6095 (exit $ac_status); } >/dev/null; then
6096 if test -s conftest.err; then
6097 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +00006098 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006099 else
6100 ac_cpp_err=
6101 fi
6102else
6103 ac_cpp_err=yes
6104fi
6105if test -z "$ac_cpp_err"; then
6106 ac_header_preproc=yes
6107else
6108 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006109sed 's/^/| /' conftest.$ac_ext >&5
6110
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006111 ac_header_preproc=no
6112fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00006113
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006114rm -f conftest.err conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +00006115{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6116echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006117
6118# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006119case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6120 yes:no: )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006121 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
6122echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006123 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
6124echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
6125 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006126 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006127 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006128 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
6129echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006130 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
6131echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
6132 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
6133echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
6134 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
6135echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006136 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
6137echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006138 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
6139echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +00006140 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00006141## ------------------------------------------------ ##
6142## Report this to http://www.python.org/python-bugs ##
6143## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006144_ASBOX
Thomas Wouters477c8d52006-05-27 19:21:47 +00006145 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006146 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006147esac
Thomas Wouters477c8d52006-05-27 19:21:47 +00006148{ echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6149echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006150if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
6151 echo $ECHO_N "(cached) $ECHO_C" >&6
6152else
6153 ac_cv_header_sys_mkdev_h=$ac_header_preproc
6154fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00006155{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6156echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006157
6158fi
6159if test $ac_cv_header_sys_mkdev_h = yes; then
6160
6161cat >>confdefs.h <<\_ACEOF
6162#define MAJOR_IN_MKDEV 1
6163_ACEOF
6164
6165fi
6166
6167
6168
6169 if test $ac_cv_header_sys_mkdev_h = no; then
6170 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00006171 { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6172echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006173if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
6174 echo $ECHO_N "(cached) $ECHO_C" >&6
6175fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00006176{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6177echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006178else
6179 # Is the header compilable?
Thomas Wouters477c8d52006-05-27 19:21:47 +00006180{ echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6181echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006182cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006183/* confdefs.h. */
6184_ACEOF
6185cat confdefs.h >>conftest.$ac_ext
6186cat >>conftest.$ac_ext <<_ACEOF
6187/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006188$ac_includes_default
6189#include <sys/sysmacros.h>
6190_ACEOF
6191rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006192if { (ac_try="$ac_compile"
6193case "(($ac_try" in
6194 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6195 *) ac_try_echo=$ac_try;;
6196esac
6197eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6198 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006199 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006200 grep -v '^ *+' conftest.er1 >conftest.err
6201 rm -f conftest.er1
6202 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6204 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006205 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
6206 { (case "(($ac_try" in
6207 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6208 *) ac_try_echo=$ac_try;;
6209esac
6210eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6211 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006212 ac_status=$?
6213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6214 (exit $ac_status); }; } &&
6215 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006216 { (case "(($ac_try" in
6217 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6218 *) ac_try_echo=$ac_try;;
6219esac
6220eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6221 (eval "$ac_try") 2>&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006222 ac_status=$?
6223 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6224 (exit $ac_status); }; }; then
6225 ac_header_compiler=yes
6226else
6227 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006228sed 's/^/| /' conftest.$ac_ext >&5
6229
Thomas Wouters477c8d52006-05-27 19:21:47 +00006230 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006231fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00006232
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006233rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +00006234{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6235echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006236
6237# Is the header present?
Thomas Wouters477c8d52006-05-27 19:21:47 +00006238{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6239echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006240cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006241/* confdefs.h. */
6242_ACEOF
6243cat confdefs.h >>conftest.$ac_ext
6244cat >>conftest.$ac_ext <<_ACEOF
6245/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006246#include <sys/sysmacros.h>
6247_ACEOF
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006248if { (ac_try="$ac_cpp conftest.$ac_ext"
6249case "(($ac_try" in
6250 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6251 *) ac_try_echo=$ac_try;;
6252esac
6253eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6254 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006255 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006256 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006257 rm -f conftest.er1
6258 cat conftest.err >&5
6259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6260 (exit $ac_status); } >/dev/null; then
6261 if test -s conftest.err; then
6262 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +00006263 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006264 else
6265 ac_cpp_err=
6266 fi
6267else
6268 ac_cpp_err=yes
6269fi
6270if test -z "$ac_cpp_err"; then
6271 ac_header_preproc=yes
6272else
6273 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006274sed 's/^/| /' conftest.$ac_ext >&5
6275
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006276 ac_header_preproc=no
6277fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00006278
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006279rm -f conftest.err conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +00006280{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6281echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006282
6283# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006284case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6285 yes:no: )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006286 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6287echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006288 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6289echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
6290 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006291 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006292 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006293 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6294echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006295 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6296echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6297 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6298echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6299 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6300echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006301 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6302echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006303 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6304echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +00006305 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00006306## ------------------------------------------------ ##
6307## Report this to http://www.python.org/python-bugs ##
6308## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006309_ASBOX
Thomas Wouters477c8d52006-05-27 19:21:47 +00006310 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006311 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006312esac
Thomas Wouters477c8d52006-05-27 19:21:47 +00006313{ echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6314echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006315if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
6316 echo $ECHO_N "(cached) $ECHO_C" >&6
6317else
6318 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6319fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00006320{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6321echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006322
6323fi
6324if test $ac_cv_header_sys_sysmacros_h = yes; then
6325
6326cat >>confdefs.h <<\_ACEOF
6327#define MAJOR_IN_SYSMACROS 1
6328_ACEOF
6329
6330fi
6331
6332
6333 fi
6334fi
6335
Michael W. Hudson54241132001-12-07 15:38:26 +00006336
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006337# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006338
6339for ac_header in term.h
6340do
6341as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Thomas Wouters477c8d52006-05-27 19:21:47 +00006342{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6343echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6344if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006345 echo $ECHO_N "(cached) $ECHO_C" >&6
6346else
6347 cat >conftest.$ac_ext <<_ACEOF
6348/* confdefs.h. */
6349_ACEOF
6350cat confdefs.h >>conftest.$ac_ext
6351cat >>conftest.$ac_ext <<_ACEOF
6352/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006353
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006354#ifdef HAVE_CURSES_H
6355#include <curses.h>
6356#endif
6357
6358
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006359#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006360_ACEOF
6361rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006362if { (ac_try="$ac_compile"
6363case "(($ac_try" in
6364 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6365 *) ac_try_echo=$ac_try;;
6366esac
6367eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6368 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006369 ac_status=$?
6370 grep -v '^ *+' conftest.er1 >conftest.err
6371 rm -f conftest.er1
6372 cat conftest.err >&5
6373 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6374 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006375 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
6376 { (case "(($ac_try" in
6377 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6378 *) ac_try_echo=$ac_try;;
6379esac
6380eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6381 (eval "$ac_try") 2>&5
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006382 ac_status=$?
6383 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6384 (exit $ac_status); }; } &&
6385 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006386 { (case "(($ac_try" in
6387 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6388 *) ac_try_echo=$ac_try;;
6389esac
6390eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6391 (eval "$ac_try") 2>&5
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006392 ac_status=$?
6393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6394 (exit $ac_status); }; }; then
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006395 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006396else
6397 echo "$as_me: failed program was:" >&5
6398sed 's/^/| /' conftest.$ac_ext >&5
6399
Thomas Wouters477c8d52006-05-27 19:21:47 +00006400 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006401fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00006402
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006403rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006404fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00006405ac_res=`eval echo '${'$as_ac_Header'}'`
6406 { echo "$as_me:$LINENO: result: $ac_res" >&5
6407echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006408if test `eval echo '${'$as_ac_Header'}'` = yes; then
6409 cat >>confdefs.h <<_ACEOF
6410#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6411_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006412
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006413fi
6414
6415done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006416
6417
Martin v. Löwis11017b12006-01-14 18:12:57 +00006418# On Linux, netlink.h requires asm/types.h
6419
6420for ac_header in linux/netlink.h
6421do
6422as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Thomas Wouters477c8d52006-05-27 19:21:47 +00006423{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6424echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6425if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006426 echo $ECHO_N "(cached) $ECHO_C" >&6
6427else
6428 cat >conftest.$ac_ext <<_ACEOF
6429/* confdefs.h. */
6430_ACEOF
6431cat confdefs.h >>conftest.$ac_ext
6432cat >>conftest.$ac_ext <<_ACEOF
6433/* end confdefs.h. */
6434
6435#ifdef HAVE_ASM_TYPES_H
6436#include <asm/types.h>
6437#endif
6438#ifdef HAVE_SYS_SOCKET_H
6439#include <sys/socket.h>
6440#endif
6441
6442
6443#include <$ac_header>
6444_ACEOF
6445rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006446if { (ac_try="$ac_compile"
6447case "(($ac_try" in
6448 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6449 *) ac_try_echo=$ac_try;;
6450esac
6451eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6452 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006453 ac_status=$?
6454 grep -v '^ *+' conftest.er1 >conftest.err
6455 rm -f conftest.er1
6456 cat conftest.err >&5
6457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6458 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006459 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
6460 { (case "(($ac_try" in
6461 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6462 *) ac_try_echo=$ac_try;;
6463esac
6464eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6465 (eval "$ac_try") 2>&5
Martin v. Löwis11017b12006-01-14 18:12:57 +00006466 ac_status=$?
6467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6468 (exit $ac_status); }; } &&
6469 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006470 { (case "(($ac_try" in
6471 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6472 *) ac_try_echo=$ac_try;;
6473esac
6474eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6475 (eval "$ac_try") 2>&5
Martin v. Löwis11017b12006-01-14 18:12:57 +00006476 ac_status=$?
6477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6478 (exit $ac_status); }; }; then
6479 eval "$as_ac_Header=yes"
6480else
6481 echo "$as_me: failed program was:" >&5
6482sed 's/^/| /' conftest.$ac_ext >&5
6483
Thomas Wouters477c8d52006-05-27 19:21:47 +00006484 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00006485fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00006486
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006487rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00006488fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00006489ac_res=`eval echo '${'$as_ac_Header'}'`
6490 { echo "$as_me:$LINENO: result: $ac_res" >&5
6491echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11017b12006-01-14 18:12:57 +00006492if test `eval echo '${'$as_ac_Header'}'` = yes; then
6493 cat >>confdefs.h <<_ACEOF
6494#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6495_ACEOF
6496
6497fi
6498
6499done
6500
6501
Guido van Rossum627b2d71993-12-24 10:39:16 +00006502# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006503was_it_defined=no
Thomas Wouters477c8d52006-05-27 19:21:47 +00006504{ echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
6505echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006506cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006507/* confdefs.h. */
6508_ACEOF
6509cat confdefs.h >>conftest.$ac_ext
6510cat >>conftest.$ac_ext <<_ACEOF
6511/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006512#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006513
6514_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006515if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006516 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006517 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006518else
Martin v. Löwis11437992002-04-12 09:54:03 +00006519
6520
6521cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006522#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00006523_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006524
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006525
Guido van Rossum627b2d71993-12-24 10:39:16 +00006526fi
6527rm -f conftest*
6528
Thomas Wouters477c8d52006-05-27 19:21:47 +00006529{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
6530echo "${ECHO_T}$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006531
Neal Norwitz11690112002-07-30 01:08:28 +00006532# Check whether using makedev requires defining _OSF_SOURCE
Thomas Wouters477c8d52006-05-27 19:21:47 +00006533{ echo "$as_me:$LINENO: checking for makedev" >&5
6534echo $ECHO_N "checking for makedev... $ECHO_C" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006535cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006536/* confdefs.h. */
6537_ACEOF
6538cat confdefs.h >>conftest.$ac_ext
6539cat >>conftest.$ac_ext <<_ACEOF
6540/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006541#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006542int
6543main ()
6544{
6545 makedev(0, 0)
6546 ;
6547 return 0;
6548}
6549_ACEOF
6550rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006551if { (ac_try="$ac_link"
6552case "(($ac_try" in
6553 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6554 *) ac_try_echo=$ac_try;;
6555esac
6556eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6557 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006558 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006559 grep -v '^ *+' conftest.er1 >conftest.err
6560 rm -f conftest.er1
6561 cat conftest.err >&5
Neal Norwitz11690112002-07-30 01:08:28 +00006562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6563 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006564 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
6565 { (case "(($ac_try" in
6566 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6567 *) ac_try_echo=$ac_try;;
6568esac
6569eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6570 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006571 ac_status=$?
6572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6573 (exit $ac_status); }; } &&
6574 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006575 { (case "(($ac_try" in
6576 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6577 *) ac_try_echo=$ac_try;;
6578esac
6579eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6580 (eval "$ac_try") 2>&5
Neal Norwitz11690112002-07-30 01:08:28 +00006581 ac_status=$?
6582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6583 (exit $ac_status); }; }; then
6584 ac_cv_has_makedev=yes
6585else
6586 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006587sed 's/^/| /' conftest.$ac_ext >&5
6588
Thomas Wouters477c8d52006-05-27 19:21:47 +00006589 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006590fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00006591
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006592rm -f core conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006593 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006594if test "$ac_cv_has_makedev" = "no"; then
6595 # we didn't link, try if _OSF_SOURCE will allow us to link
6596 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006597/* confdefs.h. */
6598_ACEOF
6599cat confdefs.h >>conftest.$ac_ext
6600cat >>conftest.$ac_ext <<_ACEOF
6601/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006602
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006603#define _OSF_SOURCE 1
6604#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006605
Neal Norwitz11690112002-07-30 01:08:28 +00006606int
6607main ()
6608{
6609 makedev(0, 0)
6610 ;
6611 return 0;
6612}
6613_ACEOF
6614rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006615if { (ac_try="$ac_link"
6616case "(($ac_try" in
6617 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6618 *) ac_try_echo=$ac_try;;
6619esac
6620eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6621 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006622 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006623 grep -v '^ *+' conftest.er1 >conftest.err
6624 rm -f conftest.er1
6625 cat conftest.err >&5
Neal Norwitz11690112002-07-30 01:08:28 +00006626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6627 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006628 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
6629 { (case "(($ac_try" in
6630 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6631 *) ac_try_echo=$ac_try;;
6632esac
6633eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6634 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006635 ac_status=$?
6636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6637 (exit $ac_status); }; } &&
6638 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006639 { (case "(($ac_try" in
6640 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6641 *) ac_try_echo=$ac_try;;
6642esac
6643eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6644 (eval "$ac_try") 2>&5
Neal Norwitz11690112002-07-30 01:08:28 +00006645 ac_status=$?
6646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6647 (exit $ac_status); }; }; then
6648 ac_cv_has_makedev=yes
6649else
6650 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006651sed 's/^/| /' conftest.$ac_ext >&5
6652
Thomas Wouters477c8d52006-05-27 19:21:47 +00006653 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006654fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00006655
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006656rm -f core conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006657 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006658 if test "$ac_cv_has_makedev" = "yes"; then
6659
6660cat >>confdefs.h <<\_ACEOF
6661#define _OSF_SOURCE 1
6662_ACEOF
6663
6664 fi
6665fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00006666{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
6667echo "${ECHO_T}$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006668if test "$ac_cv_has_makedev" = "yes"; then
6669
6670cat >>confdefs.h <<\_ACEOF
6671#define HAVE_MAKEDEV 1
6672_ACEOF
6673
6674fi
6675
Martin v. Löwis399a6892002-10-04 10:22:02 +00006676# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6677# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6678# defined, but the compiler does not support pragma redefine_extname,
6679# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6680# structures (such as rlimit64) without declaring them. As a
6681# work-around, disable LFS on such configurations
6682
6683use_lfs=yes
Thomas Wouters477c8d52006-05-27 19:21:47 +00006684{ echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
6685echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006686cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006687/* confdefs.h. */
6688_ACEOF
6689cat confdefs.h >>conftest.$ac_ext
6690cat >>conftest.$ac_ext <<_ACEOF
6691/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006692
6693#define _LARGEFILE_SOURCE 1
6694#define _FILE_OFFSET_BITS 64
6695#include <sys/resource.h>
6696
Martin v. Löwis399a6892002-10-04 10:22:02 +00006697int
6698main ()
6699{
6700struct rlimit foo;
6701 ;
6702 return 0;
6703}
6704_ACEOF
6705rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006706if { (ac_try="$ac_compile"
6707case "(($ac_try" in
6708 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6709 *) ac_try_echo=$ac_try;;
6710esac
6711eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6712 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00006713 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006714 grep -v '^ *+' conftest.er1 >conftest.err
6715 rm -f conftest.er1
6716 cat conftest.err >&5
Martin v. Löwis399a6892002-10-04 10:22:02 +00006717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6718 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006719 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
6720 { (case "(($ac_try" in
6721 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6722 *) ac_try_echo=$ac_try;;
6723esac
6724eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6725 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006726 ac_status=$?
6727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6728 (exit $ac_status); }; } &&
6729 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006730 { (case "(($ac_try" in
6731 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6732 *) ac_try_echo=$ac_try;;
6733esac
6734eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6735 (eval "$ac_try") 2>&5
Martin v. Löwis399a6892002-10-04 10:22:02 +00006736 ac_status=$?
6737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6738 (exit $ac_status); }; }; then
6739 sol_lfs_bug=no
6740else
6741 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006742sed 's/^/| /' conftest.$ac_ext >&5
6743
Thomas Wouters477c8d52006-05-27 19:21:47 +00006744 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006745fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00006746
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006747rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +00006748{ echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
6749echo "${ECHO_T}$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006750if test "$sol_lfs_bug" = "yes"; then
6751 use_lfs=no
6752fi
6753
6754if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006755# Two defines needed to enable largefile support on various platforms
6756# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006757
Martin v. Löwis11437992002-04-12 09:54:03 +00006758cat >>confdefs.h <<\_ACEOF
6759#define _LARGEFILE_SOURCE 1
6760_ACEOF
6761
6762
6763cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006764#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00006765_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006766
Martin v. Löwis399a6892002-10-04 10:22:02 +00006767fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006768
Guido van Rossum84e7b241996-08-19 21:59:00 +00006769# Add some code to confdefs.h so that the test for off_t works on SCO
6770cat >> confdefs.h <<\EOF
6771#if defined(SCO_DS)
6772#undef _OFF_T
6773#endif
6774EOF
6775
Guido van Rossumef2255b2000-03-10 22:30:29 +00006776# Type availability checks
Thomas Wouters477c8d52006-05-27 19:21:47 +00006777{ echo "$as_me:$LINENO: checking for mode_t" >&5
6778echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006779if test "${ac_cv_type_mode_t+set}" = set; then
6780 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006781else
Martin v. Löwis11437992002-04-12 09:54:03 +00006782 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006783/* confdefs.h. */
6784_ACEOF
6785cat confdefs.h >>conftest.$ac_ext
6786cat >>conftest.$ac_ext <<_ACEOF
6787/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006788$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00006789typedef mode_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006790int
6791main ()
6792{
Thomas Wouters477c8d52006-05-27 19:21:47 +00006793if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006794 return 0;
Thomas Wouters477c8d52006-05-27 19:21:47 +00006795if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006796 return 0;
6797 ;
6798 return 0;
6799}
6800_ACEOF
6801rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006802if { (ac_try="$ac_compile"
6803case "(($ac_try" in
6804 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6805 *) ac_try_echo=$ac_try;;
6806esac
6807eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6808 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006809 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006810 grep -v '^ *+' conftest.er1 >conftest.err
6811 rm -f conftest.er1
6812 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6814 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006815 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
6816 { (case "(($ac_try" in
6817 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6818 *) ac_try_echo=$ac_try;;
6819esac
6820eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6821 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006822 ac_status=$?
6823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6824 (exit $ac_status); }; } &&
6825 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006826 { (case "(($ac_try" in
6827 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6828 *) ac_try_echo=$ac_try;;
6829esac
6830eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6831 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006832 ac_status=$?
6833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6834 (exit $ac_status); }; }; then
Jack Jansendd19cf82001-12-06 22:36:17 +00006835 ac_cv_type_mode_t=yes
6836else
Martin v. Löwis11437992002-04-12 09:54:03 +00006837 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006838sed 's/^/| /' conftest.$ac_ext >&5
6839
Thomas Wouters477c8d52006-05-27 19:21:47 +00006840 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00006841fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00006842
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006843rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006844fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00006845{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
6846echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006847if test $ac_cv_type_mode_t = yes; then
6848 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006849else
Martin v. Löwis11437992002-04-12 09:54:03 +00006850
6851cat >>confdefs.h <<_ACEOF
6852#define mode_t int
6853_ACEOF
6854
6855fi
6856
Thomas Wouters477c8d52006-05-27 19:21:47 +00006857{ echo "$as_me:$LINENO: checking for off_t" >&5
6858echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006859if test "${ac_cv_type_off_t+set}" = set; then
6860 echo $ECHO_N "(cached) $ECHO_C" >&6
6861else
6862 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006863/* confdefs.h. */
6864_ACEOF
6865cat confdefs.h >>conftest.$ac_ext
6866cat >>conftest.$ac_ext <<_ACEOF
6867/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006868$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00006869typedef off_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006870int
6871main ()
6872{
Thomas Wouters477c8d52006-05-27 19:21:47 +00006873if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006874 return 0;
Thomas Wouters477c8d52006-05-27 19:21:47 +00006875if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006876 return 0;
6877 ;
6878 return 0;
6879}
6880_ACEOF
6881rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006882if { (ac_try="$ac_compile"
6883case "(($ac_try" in
6884 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6885 *) ac_try_echo=$ac_try;;
6886esac
6887eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6888 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006889 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006890 grep -v '^ *+' conftest.er1 >conftest.err
6891 rm -f conftest.er1
6892 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6894 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006895 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
6896 { (case "(($ac_try" in
6897 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6898 *) ac_try_echo=$ac_try;;
6899esac
6900eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6901 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006902 ac_status=$?
6903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6904 (exit $ac_status); }; } &&
6905 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006906 { (case "(($ac_try" in
6907 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6908 *) ac_try_echo=$ac_try;;
6909esac
6910eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6911 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006912 ac_status=$?
6913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6914 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006915 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006916else
Martin v. Löwis11437992002-04-12 09:54:03 +00006917 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006918sed 's/^/| /' conftest.$ac_ext >&5
6919
Thomas Wouters477c8d52006-05-27 19:21:47 +00006920 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006921fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00006922
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006923rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006924fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00006925{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6926echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006927if test $ac_cv_type_off_t = yes; then
6928 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006929else
Martin v. Löwis11437992002-04-12 09:54:03 +00006930
6931cat >>confdefs.h <<_ACEOF
Thomas Wouters477c8d52006-05-27 19:21:47 +00006932#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006933_ACEOF
6934
6935fi
6936
Thomas Wouters477c8d52006-05-27 19:21:47 +00006937{ echo "$as_me:$LINENO: checking for pid_t" >&5
6938echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006939if test "${ac_cv_type_pid_t+set}" = set; then
6940 echo $ECHO_N "(cached) $ECHO_C" >&6
6941else
6942 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006943/* confdefs.h. */
6944_ACEOF
6945cat confdefs.h >>conftest.$ac_ext
6946cat >>conftest.$ac_ext <<_ACEOF
6947/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006948$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00006949typedef pid_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006950int
6951main ()
6952{
Thomas Wouters477c8d52006-05-27 19:21:47 +00006953if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006954 return 0;
Thomas Wouters477c8d52006-05-27 19:21:47 +00006955if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006956 return 0;
6957 ;
6958 return 0;
6959}
6960_ACEOF
6961rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006962if { (ac_try="$ac_compile"
6963case "(($ac_try" in
6964 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6965 *) ac_try_echo=$ac_try;;
6966esac
6967eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6968 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006969 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006970 grep -v '^ *+' conftest.er1 >conftest.err
6971 rm -f conftest.er1
6972 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6974 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006975 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
6976 { (case "(($ac_try" in
6977 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6978 *) ac_try_echo=$ac_try;;
6979esac
6980eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6981 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006982 ac_status=$?
6983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6984 (exit $ac_status); }; } &&
6985 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006986 { (case "(($ac_try" in
6987 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6988 *) ac_try_echo=$ac_try;;
6989esac
6990eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6991 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006992 ac_status=$?
6993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6994 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006995 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006996else
Martin v. Löwis11437992002-04-12 09:54:03 +00006997 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006998sed 's/^/| /' conftest.$ac_ext >&5
6999
Thomas Wouters477c8d52006-05-27 19:21:47 +00007000 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007001fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00007002
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007003rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007004fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00007005{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
7006echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007007if test $ac_cv_type_pid_t = yes; then
7008 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007009else
Martin v. Löwis11437992002-04-12 09:54:03 +00007010
7011cat >>confdefs.h <<_ACEOF
7012#define pid_t int
7013_ACEOF
7014
7015fi
7016
Thomas Wouters477c8d52006-05-27 19:21:47 +00007017{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
7018echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007019if test "${ac_cv_type_signal+set}" = set; then
7020 echo $ECHO_N "(cached) $ECHO_C" >&6
7021else
7022 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007023/* confdefs.h. */
7024_ACEOF
7025cat confdefs.h >>conftest.$ac_ext
7026cat >>conftest.$ac_ext <<_ACEOF
7027/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00007028#include <sys/types.h>
7029#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007030
Martin v. Löwis11437992002-04-12 09:54:03 +00007031int
7032main ()
7033{
Thomas Wouters477c8d52006-05-27 19:21:47 +00007034return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007035 ;
7036 return 0;
7037}
7038_ACEOF
7039rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007040if { (ac_try="$ac_compile"
7041case "(($ac_try" in
7042 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7043 *) ac_try_echo=$ac_try;;
7044esac
7045eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7046 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007047 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007048 grep -v '^ *+' conftest.er1 >conftest.err
7049 rm -f conftest.er1
7050 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7052 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007053 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7054 { (case "(($ac_try" in
7055 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7056 *) ac_try_echo=$ac_try;;
7057esac
7058eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7059 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007060 ac_status=$?
7061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7062 (exit $ac_status); }; } &&
7063 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007064 { (case "(($ac_try" in
7065 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7066 *) ac_try_echo=$ac_try;;
7067esac
7068eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7069 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007070 ac_status=$?
7071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7072 (exit $ac_status); }; }; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00007073 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00007074else
Martin v. Löwis11437992002-04-12 09:54:03 +00007075 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007076sed 's/^/| /' conftest.$ac_ext >&5
7077
Thomas Wouters477c8d52006-05-27 19:21:47 +00007078 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00007079fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00007080
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007081rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007082fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00007083{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
7084echo "${ECHO_T}$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007085
Martin v. Löwis11437992002-04-12 09:54:03 +00007086cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007087#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00007088_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007089
Michael W. Hudson54241132001-12-07 15:38:26 +00007090
Thomas Wouters477c8d52006-05-27 19:21:47 +00007091{ echo "$as_me:$LINENO: checking for size_t" >&5
7092echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007093if test "${ac_cv_type_size_t+set}" = set; then
7094 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007095else
Martin v. Löwis11437992002-04-12 09:54:03 +00007096 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007097/* confdefs.h. */
7098_ACEOF
7099cat confdefs.h >>conftest.$ac_ext
7100cat >>conftest.$ac_ext <<_ACEOF
7101/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007102$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00007103typedef size_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007104int
7105main ()
7106{
Thomas Wouters477c8d52006-05-27 19:21:47 +00007107if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007108 return 0;
Thomas Wouters477c8d52006-05-27 19:21:47 +00007109if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00007110 return 0;
7111 ;
7112 return 0;
7113}
7114_ACEOF
7115rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007116if { (ac_try="$ac_compile"
7117case "(($ac_try" in
7118 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7119 *) ac_try_echo=$ac_try;;
7120esac
7121eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7122 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007123 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007124 grep -v '^ *+' conftest.er1 >conftest.err
7125 rm -f conftest.er1
7126 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7128 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007129 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7130 { (case "(($ac_try" in
7131 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7132 *) ac_try_echo=$ac_try;;
7133esac
7134eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7135 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007136 ac_status=$?
7137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7138 (exit $ac_status); }; } &&
7139 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007140 { (case "(($ac_try" in
7141 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7142 *) ac_try_echo=$ac_try;;
7143esac
7144eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7145 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007146 ac_status=$?
7147 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7148 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00007149 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007150else
Martin v. Löwis11437992002-04-12 09:54:03 +00007151 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007152sed 's/^/| /' conftest.$ac_ext >&5
7153
Thomas Wouters477c8d52006-05-27 19:21:47 +00007154 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007155fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00007156
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007157rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007158fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00007159{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
7160echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007161if test $ac_cv_type_size_t = yes; then
7162 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007163else
Martin v. Löwis11437992002-04-12 09:54:03 +00007164
7165cat >>confdefs.h <<_ACEOF
Thomas Wouters477c8d52006-05-27 19:21:47 +00007166#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007167_ACEOF
7168
7169fi
7170
Thomas Wouters477c8d52006-05-27 19:21:47 +00007171{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
7172echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007173if test "${ac_cv_type_uid_t+set}" = set; then
7174 echo $ECHO_N "(cached) $ECHO_C" >&6
7175else
7176 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007177/* confdefs.h. */
7178_ACEOF
7179cat confdefs.h >>conftest.$ac_ext
7180cat >>conftest.$ac_ext <<_ACEOF
7181/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007182#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007183
7184_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007185if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00007186 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007187 ac_cv_type_uid_t=yes
7188else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007189 ac_cv_type_uid_t=no
7190fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007191rm -f conftest*
7192
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007193fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00007194{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
7195echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007196if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007197
Martin v. Löwis11437992002-04-12 09:54:03 +00007198cat >>confdefs.h <<\_ACEOF
7199#define uid_t int
7200_ACEOF
7201
7202
7203cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007204#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00007205_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007206
7207fi
7208
Thomas Wouters477c8d52006-05-27 19:21:47 +00007209{ echo "$as_me:$LINENO: checking for ssize_t" >&5
7210echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00007211if test "${ac_cv_type_ssize_t+set}" = set; then
7212 echo $ECHO_N "(cached) $ECHO_C" >&6
7213else
7214 cat >conftest.$ac_ext <<_ACEOF
7215/* confdefs.h. */
7216_ACEOF
7217cat confdefs.h >>conftest.$ac_ext
7218cat >>conftest.$ac_ext <<_ACEOF
7219/* end confdefs.h. */
7220$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00007221typedef ssize_t ac__type_new_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00007222int
7223main ()
7224{
Thomas Wouters477c8d52006-05-27 19:21:47 +00007225if ((ac__type_new_ *) 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +00007226 return 0;
Thomas Wouters477c8d52006-05-27 19:21:47 +00007227if (sizeof (ac__type_new_))
Martin v. Löwis18e16552006-02-15 17:27:45 +00007228 return 0;
7229 ;
7230 return 0;
7231}
7232_ACEOF
7233rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007234if { (ac_try="$ac_compile"
7235case "(($ac_try" in
7236 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7237 *) ac_try_echo=$ac_try;;
7238esac
7239eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7240 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00007241 ac_status=$?
7242 grep -v '^ *+' conftest.er1 >conftest.err
7243 rm -f conftest.er1
7244 cat conftest.err >&5
7245 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7246 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007247 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7248 { (case "(($ac_try" in
7249 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7250 *) ac_try_echo=$ac_try;;
7251esac
7252eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7253 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +00007254 ac_status=$?
7255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7256 (exit $ac_status); }; } &&
7257 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007258 { (case "(($ac_try" in
7259 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7260 *) ac_try_echo=$ac_try;;
7261esac
7262eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7263 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +00007264 ac_status=$?
7265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7266 (exit $ac_status); }; }; then
7267 ac_cv_type_ssize_t=yes
7268else
7269 echo "$as_me: failed program was:" >&5
7270sed 's/^/| /' conftest.$ac_ext >&5
7271
Thomas Wouters477c8d52006-05-27 19:21:47 +00007272 ac_cv_type_ssize_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00007273fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00007274
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007275rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00007276fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00007277{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
7278echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00007279if test $ac_cv_type_ssize_t = yes; then
7280
7281cat >>confdefs.h <<\_ACEOF
7282#define HAVE_SSIZE_T 1
7283_ACEOF
7284
7285fi
7286
Jack Jansendd19cf82001-12-06 22:36:17 +00007287
Michael W. Hudson54241132001-12-07 15:38:26 +00007288# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007289# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters477c8d52006-05-27 19:21:47 +00007290{ echo "$as_me:$LINENO: checking for int" >&5
7291echo $ECHO_N "checking for int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007292if test "${ac_cv_type_int+set}" = set; then
7293 echo $ECHO_N "(cached) $ECHO_C" >&6
7294else
7295 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007296/* confdefs.h. */
7297_ACEOF
7298cat confdefs.h >>conftest.$ac_ext
7299cat >>conftest.$ac_ext <<_ACEOF
7300/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007301$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00007302typedef int ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007303int
7304main ()
7305{
Thomas Wouters477c8d52006-05-27 19:21:47 +00007306if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007307 return 0;
Thomas Wouters477c8d52006-05-27 19:21:47 +00007308if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00007309 return 0;
7310 ;
7311 return 0;
7312}
7313_ACEOF
7314rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007315if { (ac_try="$ac_compile"
7316case "(($ac_try" in
7317 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7318 *) ac_try_echo=$ac_try;;
7319esac
7320eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7321 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007322 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007323 grep -v '^ *+' conftest.er1 >conftest.err
7324 rm -f conftest.er1
7325 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007326 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7327 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007328 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7329 { (case "(($ac_try" in
7330 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7331 *) ac_try_echo=$ac_try;;
7332esac
7333eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7334 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007335 ac_status=$?
7336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7337 (exit $ac_status); }; } &&
7338 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007339 { (case "(($ac_try" in
7340 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7341 *) ac_try_echo=$ac_try;;
7342esac
7343eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7344 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007345 ac_status=$?
7346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7347 (exit $ac_status); }; }; then
7348 ac_cv_type_int=yes
7349else
7350 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007351sed 's/^/| /' conftest.$ac_ext >&5
7352
Thomas Wouters477c8d52006-05-27 19:21:47 +00007353 ac_cv_type_int=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007354fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00007355
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007356rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007357fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00007358{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
7359echo "${ECHO_T}$ac_cv_type_int" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007360
Thomas Wouters477c8d52006-05-27 19:21:47 +00007361{ echo "$as_me:$LINENO: checking size of int" >&5
7362echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007363if test "${ac_cv_sizeof_int+set}" = set; then
7364 echo $ECHO_N "(cached) $ECHO_C" >&6
7365else
7366 if test "$ac_cv_type_int" = yes; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00007367 # The cast to long int works around a bug in the HP C Compiler
Martin v. Löwis11437992002-04-12 09:54:03 +00007368 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7369 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7370 # This bug is HP SR number 8606223364.
7371 if test "$cross_compiling" = yes; then
7372 # Depending upon the size, compute the lo and hi bounds.
7373cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007374/* confdefs.h. */
7375_ACEOF
7376cat confdefs.h >>conftest.$ac_ext
7377cat >>conftest.$ac_ext <<_ACEOF
7378/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007379$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00007380 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007381int
7382main ()
7383{
Thomas Wouters477c8d52006-05-27 19:21:47 +00007384static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007385test_array [0] = 0
7386
7387 ;
7388 return 0;
7389}
7390_ACEOF
7391rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007392if { (ac_try="$ac_compile"
7393case "(($ac_try" in
7394 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7395 *) ac_try_echo=$ac_try;;
7396esac
7397eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7398 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007399 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007400 grep -v '^ *+' conftest.er1 >conftest.err
7401 rm -f conftest.er1
7402 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7404 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007405 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7406 { (case "(($ac_try" in
7407 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7408 *) ac_try_echo=$ac_try;;
7409esac
7410eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7411 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007412 ac_status=$?
7413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7414 (exit $ac_status); }; } &&
7415 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007416 { (case "(($ac_try" in
7417 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7418 *) ac_try_echo=$ac_try;;
7419esac
7420eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7421 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007422 ac_status=$?
7423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7424 (exit $ac_status); }; }; then
7425 ac_lo=0 ac_mid=0
7426 while :; do
7427 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007428/* confdefs.h. */
7429_ACEOF
7430cat confdefs.h >>conftest.$ac_ext
7431cat >>conftest.$ac_ext <<_ACEOF
7432/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007433$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00007434 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007435int
7436main ()
7437{
Thomas Wouters477c8d52006-05-27 19:21:47 +00007438static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007439test_array [0] = 0
7440
7441 ;
7442 return 0;
7443}
7444_ACEOF
7445rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007446if { (ac_try="$ac_compile"
7447case "(($ac_try" in
7448 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7449 *) ac_try_echo=$ac_try;;
7450esac
7451eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7452 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007453 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007454 grep -v '^ *+' conftest.er1 >conftest.err
7455 rm -f conftest.er1
7456 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7458 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007459 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7460 { (case "(($ac_try" in
7461 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7462 *) ac_try_echo=$ac_try;;
7463esac
7464eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7465 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007466 ac_status=$?
7467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7468 (exit $ac_status); }; } &&
7469 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007470 { (case "(($ac_try" in
7471 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7472 *) ac_try_echo=$ac_try;;
7473esac
7474eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7475 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007476 ac_status=$?
7477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7478 (exit $ac_status); }; }; then
7479 ac_hi=$ac_mid; break
7480else
7481 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007482sed 's/^/| /' conftest.$ac_ext >&5
7483
Thomas Wouters477c8d52006-05-27 19:21:47 +00007484 ac_lo=`expr $ac_mid + 1`
7485 if test $ac_lo -le $ac_mid; then
7486 ac_lo= ac_hi=
7487 break
7488 fi
7489 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007490fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00007491
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007492rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007493 done
7494else
7495 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007496sed 's/^/| /' conftest.$ac_ext >&5
7497
Thomas Wouters477c8d52006-05-27 19:21:47 +00007498 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007499/* confdefs.h. */
7500_ACEOF
7501cat confdefs.h >>conftest.$ac_ext
7502cat >>conftest.$ac_ext <<_ACEOF
7503/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007504$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00007505 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007506int
7507main ()
7508{
Thomas Wouters477c8d52006-05-27 19:21:47 +00007509static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007510test_array [0] = 0
7511
7512 ;
7513 return 0;
7514}
7515_ACEOF
7516rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007517if { (ac_try="$ac_compile"
7518case "(($ac_try" in
7519 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7520 *) ac_try_echo=$ac_try;;
7521esac
7522eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7523 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007524 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007525 grep -v '^ *+' conftest.er1 >conftest.err
7526 rm -f conftest.er1
7527 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7529 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007530 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7531 { (case "(($ac_try" in
7532 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7533 *) ac_try_echo=$ac_try;;
7534esac
7535eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7536 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007537 ac_status=$?
7538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7539 (exit $ac_status); }; } &&
7540 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007541 { (case "(($ac_try" in
7542 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7543 *) ac_try_echo=$ac_try;;
7544esac
7545eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7546 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007547 ac_status=$?
7548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7549 (exit $ac_status); }; }; then
7550 ac_hi=-1 ac_mid=-1
7551 while :; do
7552 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007553/* confdefs.h. */
7554_ACEOF
7555cat confdefs.h >>conftest.$ac_ext
7556cat >>conftest.$ac_ext <<_ACEOF
7557/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007558$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00007559 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007560int
7561main ()
7562{
Thomas Wouters477c8d52006-05-27 19:21:47 +00007563static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007564test_array [0] = 0
7565
7566 ;
7567 return 0;
7568}
7569_ACEOF
7570rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007571if { (ac_try="$ac_compile"
7572case "(($ac_try" in
7573 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7574 *) ac_try_echo=$ac_try;;
7575esac
7576eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7577 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007578 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007579 grep -v '^ *+' conftest.er1 >conftest.err
7580 rm -f conftest.er1
7581 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7583 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007584 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7585 { (case "(($ac_try" in
7586 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7587 *) ac_try_echo=$ac_try;;
7588esac
7589eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7590 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007591 ac_status=$?
7592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7593 (exit $ac_status); }; } &&
7594 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007595 { (case "(($ac_try" in
7596 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7597 *) ac_try_echo=$ac_try;;
7598esac
7599eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7600 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007601 ac_status=$?
7602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7603 (exit $ac_status); }; }; then
7604 ac_lo=$ac_mid; break
7605else
7606 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007607sed 's/^/| /' conftest.$ac_ext >&5
7608
Thomas Wouters477c8d52006-05-27 19:21:47 +00007609 ac_hi=`expr '(' $ac_mid ')' - 1`
7610 if test $ac_mid -le $ac_hi; then
7611 ac_lo= ac_hi=
7612 break
7613 fi
7614 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007615fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00007616
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007617rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007618 done
7619else
7620 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007621sed 's/^/| /' conftest.$ac_ext >&5
7622
Thomas Wouters477c8d52006-05-27 19:21:47 +00007623 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007624fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00007625
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007626rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007627fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00007628
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007629rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007630# Binary search between lo and hi bounds.
7631while test "x$ac_lo" != "x$ac_hi"; do
7632 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7633 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007634/* confdefs.h. */
7635_ACEOF
7636cat confdefs.h >>conftest.$ac_ext
7637cat >>conftest.$ac_ext <<_ACEOF
7638/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007639$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00007640 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007641int
7642main ()
7643{
Thomas Wouters477c8d52006-05-27 19:21:47 +00007644static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007645test_array [0] = 0
7646
7647 ;
7648 return 0;
7649}
7650_ACEOF
7651rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007652if { (ac_try="$ac_compile"
7653case "(($ac_try" in
7654 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7655 *) ac_try_echo=$ac_try;;
7656esac
7657eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7658 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007659 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007660 grep -v '^ *+' conftest.er1 >conftest.err
7661 rm -f conftest.er1
7662 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007663 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7664 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007665 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7666 { (case "(($ac_try" in
7667 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7668 *) ac_try_echo=$ac_try;;
7669esac
7670eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7671 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007672 ac_status=$?
7673 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7674 (exit $ac_status); }; } &&
7675 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007676 { (case "(($ac_try" in
7677 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7678 *) ac_try_echo=$ac_try;;
7679esac
7680eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7681 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007682 ac_status=$?
7683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7684 (exit $ac_status); }; }; then
7685 ac_hi=$ac_mid
7686else
7687 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007688sed 's/^/| /' conftest.$ac_ext >&5
7689
Thomas Wouters477c8d52006-05-27 19:21:47 +00007690 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007691fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00007692
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007693rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007694done
7695case $ac_lo in
7696?*) ac_cv_sizeof_int=$ac_lo;;
Thomas Wouters477c8d52006-05-27 19:21:47 +00007697'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007698See \`config.log' for more details." >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +00007699echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007700See \`config.log' for more details." >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +00007701 { (exit 77); exit 77; }; } ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007702esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007703else
Martin v. Löwis11437992002-04-12 09:54:03 +00007704 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007705/* confdefs.h. */
7706_ACEOF
7707cat confdefs.h >>conftest.$ac_ext
7708cat >>conftest.$ac_ext <<_ACEOF
7709/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007710$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00007711 typedef int ac__type_sizeof_;
7712static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7713static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007714#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007715#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007716int
7717main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007718{
Martin v. Löwis11437992002-04-12 09:54:03 +00007719
7720 FILE *f = fopen ("conftest.val", "w");
7721 if (! f)
Thomas Wouters477c8d52006-05-27 19:21:47 +00007722 return 1;
7723 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007724 {
Thomas Wouters477c8d52006-05-27 19:21:47 +00007725 long int i = longval ();
7726 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7727 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007728 fprintf (f, "%ld\n", i);
7729 }
7730 else
7731 {
Thomas Wouters477c8d52006-05-27 19:21:47 +00007732 unsigned long int i = ulongval ();
7733 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7734 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007735 fprintf (f, "%lu\n", i);
7736 }
Thomas Wouters477c8d52006-05-27 19:21:47 +00007737 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007738
7739 ;
7740 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007741}
Martin v. Löwis11437992002-04-12 09:54:03 +00007742_ACEOF
7743rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007744if { (ac_try="$ac_link"
7745case "(($ac_try" in
7746 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7747 *) ac_try_echo=$ac_try;;
7748esac
7749eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7750 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007751 ac_status=$?
7752 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7753 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007754 { (case "(($ac_try" in
7755 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7756 *) ac_try_echo=$ac_try;;
7757esac
7758eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7759 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007760 ac_status=$?
7761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7762 (exit $ac_status); }; }; then
7763 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007764else
Martin v. Löwis11437992002-04-12 09:54:03 +00007765 echo "$as_me: program exited with status $ac_status" >&5
7766echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007767sed 's/^/| /' conftest.$ac_ext >&5
7768
Martin v. Löwis11437992002-04-12 09:54:03 +00007769( exit $ac_status )
Thomas Wouters477c8d52006-05-27 19:21:47 +00007770{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007771See \`config.log' for more details." >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +00007772echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007773See \`config.log' for more details." >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +00007774 { (exit 77); exit 77; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007775fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00007776rm -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 +00007777fi
7778rm -f conftest.val
7779else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007780 ac_cv_sizeof_int=0
7781fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007782fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00007783{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
7784echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007785cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007786#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007787_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007788
7789
Thomas Wouters477c8d52006-05-27 19:21:47 +00007790{ echo "$as_me:$LINENO: checking for long" >&5
7791echo $ECHO_N "checking for long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007792if test "${ac_cv_type_long+set}" = set; then
7793 echo $ECHO_N "(cached) $ECHO_C" >&6
7794else
7795 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007796/* confdefs.h. */
7797_ACEOF
7798cat confdefs.h >>conftest.$ac_ext
7799cat >>conftest.$ac_ext <<_ACEOF
7800/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007801$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00007802typedef long ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007803int
7804main ()
7805{
Thomas Wouters477c8d52006-05-27 19:21:47 +00007806if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007807 return 0;
Thomas Wouters477c8d52006-05-27 19:21:47 +00007808if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00007809 return 0;
7810 ;
7811 return 0;
7812}
7813_ACEOF
7814rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007815if { (ac_try="$ac_compile"
7816case "(($ac_try" in
7817 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7818 *) ac_try_echo=$ac_try;;
7819esac
7820eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7821 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007822 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007823 grep -v '^ *+' conftest.er1 >conftest.err
7824 rm -f conftest.er1
7825 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7827 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007828 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7829 { (case "(($ac_try" in
7830 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7831 *) ac_try_echo=$ac_try;;
7832esac
7833eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7834 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007835 ac_status=$?
7836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7837 (exit $ac_status); }; } &&
7838 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007839 { (case "(($ac_try" in
7840 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7841 *) ac_try_echo=$ac_try;;
7842esac
7843eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7844 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007845 ac_status=$?
7846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7847 (exit $ac_status); }; }; then
7848 ac_cv_type_long=yes
7849else
7850 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007851sed 's/^/| /' conftest.$ac_ext >&5
7852
Thomas Wouters477c8d52006-05-27 19:21:47 +00007853 ac_cv_type_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007854fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00007855
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007856rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007857fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00007858{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
7859echo "${ECHO_T}$ac_cv_type_long" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007860
Thomas Wouters477c8d52006-05-27 19:21:47 +00007861{ echo "$as_me:$LINENO: checking size of long" >&5
7862echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007863if test "${ac_cv_sizeof_long+set}" = set; then
7864 echo $ECHO_N "(cached) $ECHO_C" >&6
7865else
7866 if test "$ac_cv_type_long" = yes; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00007867 # The cast to long int works around a bug in the HP C Compiler
Martin v. Löwis11437992002-04-12 09:54:03 +00007868 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7869 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7870 # This bug is HP SR number 8606223364.
7871 if test "$cross_compiling" = yes; then
7872 # Depending upon the size, compute the lo and hi bounds.
7873cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007874/* confdefs.h. */
7875_ACEOF
7876cat confdefs.h >>conftest.$ac_ext
7877cat >>conftest.$ac_ext <<_ACEOF
7878/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007879$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00007880 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007881int
7882main ()
7883{
Thomas Wouters477c8d52006-05-27 19:21:47 +00007884static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007885test_array [0] = 0
7886
7887 ;
7888 return 0;
7889}
7890_ACEOF
7891rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007892if { (ac_try="$ac_compile"
7893case "(($ac_try" in
7894 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7895 *) ac_try_echo=$ac_try;;
7896esac
7897eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7898 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007899 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007900 grep -v '^ *+' conftest.er1 >conftest.err
7901 rm -f conftest.er1
7902 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7904 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007905 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7906 { (case "(($ac_try" in
7907 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7908 *) ac_try_echo=$ac_try;;
7909esac
7910eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7911 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007912 ac_status=$?
7913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7914 (exit $ac_status); }; } &&
7915 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007916 { (case "(($ac_try" in
7917 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7918 *) ac_try_echo=$ac_try;;
7919esac
7920eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7921 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007922 ac_status=$?
7923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7924 (exit $ac_status); }; }; then
7925 ac_lo=0 ac_mid=0
7926 while :; do
7927 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007928/* confdefs.h. */
7929_ACEOF
7930cat confdefs.h >>conftest.$ac_ext
7931cat >>conftest.$ac_ext <<_ACEOF
7932/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007933$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00007934 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007935int
7936main ()
7937{
Thomas Wouters477c8d52006-05-27 19:21:47 +00007938static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007939test_array [0] = 0
7940
7941 ;
7942 return 0;
7943}
7944_ACEOF
7945rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007946if { (ac_try="$ac_compile"
7947case "(($ac_try" in
7948 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7949 *) ac_try_echo=$ac_try;;
7950esac
7951eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7952 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007953 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007954 grep -v '^ *+' conftest.er1 >conftest.err
7955 rm -f conftest.er1
7956 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7958 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007959 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7960 { (case "(($ac_try" in
7961 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7962 *) ac_try_echo=$ac_try;;
7963esac
7964eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7965 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007966 ac_status=$?
7967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7968 (exit $ac_status); }; } &&
7969 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007970 { (case "(($ac_try" in
7971 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7972 *) ac_try_echo=$ac_try;;
7973esac
7974eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7975 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007976 ac_status=$?
7977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7978 (exit $ac_status); }; }; then
7979 ac_hi=$ac_mid; break
7980else
7981 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007982sed 's/^/| /' conftest.$ac_ext >&5
7983
Thomas Wouters477c8d52006-05-27 19:21:47 +00007984 ac_lo=`expr $ac_mid + 1`
7985 if test $ac_lo -le $ac_mid; then
7986 ac_lo= ac_hi=
7987 break
7988 fi
7989 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007990fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00007991
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007992rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007993 done
7994else
7995 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007996sed 's/^/| /' conftest.$ac_ext >&5
7997
Thomas Wouters477c8d52006-05-27 19:21:47 +00007998 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007999/* confdefs.h. */
8000_ACEOF
8001cat confdefs.h >>conftest.$ac_ext
8002cat >>conftest.$ac_ext <<_ACEOF
8003/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008004$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00008005 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008006int
8007main ()
8008{
Thomas Wouters477c8d52006-05-27 19:21:47 +00008009static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008010test_array [0] = 0
8011
8012 ;
8013 return 0;
8014}
8015_ACEOF
8016rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008017if { (ac_try="$ac_compile"
8018case "(($ac_try" in
8019 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8020 *) ac_try_echo=$ac_try;;
8021esac
8022eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8023 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008024 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008025 grep -v '^ *+' conftest.er1 >conftest.err
8026 rm -f conftest.er1
8027 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8029 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008030 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
8031 { (case "(($ac_try" in
8032 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8033 *) ac_try_echo=$ac_try;;
8034esac
8035eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8036 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008037 ac_status=$?
8038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8039 (exit $ac_status); }; } &&
8040 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008041 { (case "(($ac_try" in
8042 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8043 *) ac_try_echo=$ac_try;;
8044esac
8045eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8046 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008047 ac_status=$?
8048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8049 (exit $ac_status); }; }; then
8050 ac_hi=-1 ac_mid=-1
8051 while :; do
8052 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008053/* confdefs.h. */
8054_ACEOF
8055cat confdefs.h >>conftest.$ac_ext
8056cat >>conftest.$ac_ext <<_ACEOF
8057/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008058$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00008059 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008060int
8061main ()
8062{
Thomas Wouters477c8d52006-05-27 19:21:47 +00008063static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008064test_array [0] = 0
8065
8066 ;
8067 return 0;
8068}
8069_ACEOF
8070rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008071if { (ac_try="$ac_compile"
8072case "(($ac_try" in
8073 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8074 *) ac_try_echo=$ac_try;;
8075esac
8076eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8077 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008078 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008079 grep -v '^ *+' conftest.er1 >conftest.err
8080 rm -f conftest.er1
8081 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8083 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008084 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
8085 { (case "(($ac_try" in
8086 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8087 *) ac_try_echo=$ac_try;;
8088esac
8089eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8090 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008091 ac_status=$?
8092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8093 (exit $ac_status); }; } &&
8094 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008095 { (case "(($ac_try" in
8096 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8097 *) ac_try_echo=$ac_try;;
8098esac
8099eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8100 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008101 ac_status=$?
8102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8103 (exit $ac_status); }; }; then
8104 ac_lo=$ac_mid; break
8105else
8106 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008107sed 's/^/| /' conftest.$ac_ext >&5
8108
Thomas Wouters477c8d52006-05-27 19:21:47 +00008109 ac_hi=`expr '(' $ac_mid ')' - 1`
8110 if test $ac_mid -le $ac_hi; then
8111 ac_lo= ac_hi=
8112 break
8113 fi
8114 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008115fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00008116
Thomas Wouters0e3f5912006-08-11 14:57:12 +00008117rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008118 done
8119else
8120 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008121sed 's/^/| /' conftest.$ac_ext >&5
8122
Thomas Wouters477c8d52006-05-27 19:21:47 +00008123 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008124fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00008125
Thomas Wouters0e3f5912006-08-11 14:57:12 +00008126rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008127fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00008128
Thomas Wouters0e3f5912006-08-11 14:57:12 +00008129rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008130# Binary search between lo and hi bounds.
8131while test "x$ac_lo" != "x$ac_hi"; do
8132 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8133 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008134/* confdefs.h. */
8135_ACEOF
8136cat confdefs.h >>conftest.$ac_ext
8137cat >>conftest.$ac_ext <<_ACEOF
8138/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008139$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00008140 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008141int
8142main ()
8143{
Thomas Wouters477c8d52006-05-27 19:21:47 +00008144static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008145test_array [0] = 0
8146
8147 ;
8148 return 0;
8149}
8150_ACEOF
8151rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008152if { (ac_try="$ac_compile"
8153case "(($ac_try" in
8154 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8155 *) ac_try_echo=$ac_try;;
8156esac
8157eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8158 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008159 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008160 grep -v '^ *+' conftest.er1 >conftest.err
8161 rm -f conftest.er1
8162 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008163 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8164 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008165 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
8166 { (case "(($ac_try" in
8167 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8168 *) ac_try_echo=$ac_try;;
8169esac
8170eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8171 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008172 ac_status=$?
8173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8174 (exit $ac_status); }; } &&
8175 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008176 { (case "(($ac_try" in
8177 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8178 *) ac_try_echo=$ac_try;;
8179esac
8180eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8181 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008182 ac_status=$?
8183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8184 (exit $ac_status); }; }; then
8185 ac_hi=$ac_mid
8186else
8187 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008188sed 's/^/| /' conftest.$ac_ext >&5
8189
Thomas Wouters477c8d52006-05-27 19:21:47 +00008190 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008191fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00008192
Thomas Wouters0e3f5912006-08-11 14:57:12 +00008193rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008194done
8195case $ac_lo in
8196?*) ac_cv_sizeof_long=$ac_lo;;
Thomas Wouters477c8d52006-05-27 19:21:47 +00008197'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008198See \`config.log' for more details." >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +00008199echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008200See \`config.log' for more details." >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +00008201 { (exit 77); exit 77; }; } ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008202esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008203else
Martin v. Löwis11437992002-04-12 09:54:03 +00008204 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008205/* confdefs.h. */
8206_ACEOF
8207cat confdefs.h >>conftest.$ac_ext
8208cat >>conftest.$ac_ext <<_ACEOF
8209/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008210$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00008211 typedef long ac__type_sizeof_;
8212static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8213static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008214#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008215#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008216int
8217main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008218{
Martin v. Löwis11437992002-04-12 09:54:03 +00008219
8220 FILE *f = fopen ("conftest.val", "w");
8221 if (! f)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008222 return 1;
8223 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008224 {
Thomas Wouters477c8d52006-05-27 19:21:47 +00008225 long int i = longval ();
8226 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8227 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008228 fprintf (f, "%ld\n", i);
8229 }
8230 else
8231 {
Thomas Wouters477c8d52006-05-27 19:21:47 +00008232 unsigned long int i = ulongval ();
8233 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8234 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008235 fprintf (f, "%lu\n", i);
8236 }
Thomas Wouters477c8d52006-05-27 19:21:47 +00008237 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008238
8239 ;
8240 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008241}
Martin v. Löwis11437992002-04-12 09:54:03 +00008242_ACEOF
8243rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008244if { (ac_try="$ac_link"
8245case "(($ac_try" in
8246 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8247 *) ac_try_echo=$ac_try;;
8248esac
8249eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8250 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008251 ac_status=$?
8252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8253 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008254 { (case "(($ac_try" in
8255 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8256 *) ac_try_echo=$ac_try;;
8257esac
8258eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8259 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008260 ac_status=$?
8261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8262 (exit $ac_status); }; }; then
8263 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008264else
Martin v. Löwis11437992002-04-12 09:54:03 +00008265 echo "$as_me: program exited with status $ac_status" >&5
8266echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008267sed 's/^/| /' conftest.$ac_ext >&5
8268
Martin v. Löwis11437992002-04-12 09:54:03 +00008269( exit $ac_status )
Thomas Wouters477c8d52006-05-27 19:21:47 +00008270{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008271See \`config.log' for more details." >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +00008272echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008273See \`config.log' for more details." >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +00008274 { (exit 77); exit 77; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008275fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00008276rm -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 +00008277fi
8278rm -f conftest.val
8279else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008280 ac_cv_sizeof_long=0
8281fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008282fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00008283{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
8284echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008285cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008286#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008287_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008288
8289
Thomas Wouters477c8d52006-05-27 19:21:47 +00008290{ echo "$as_me:$LINENO: checking for void *" >&5
8291echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008292if test "${ac_cv_type_void_p+set}" = set; then
8293 echo $ECHO_N "(cached) $ECHO_C" >&6
8294else
8295 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008296/* confdefs.h. */
8297_ACEOF
8298cat confdefs.h >>conftest.$ac_ext
8299cat >>conftest.$ac_ext <<_ACEOF
8300/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008301$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00008302typedef void * ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008303int
8304main ()
8305{
Thomas Wouters477c8d52006-05-27 19:21:47 +00008306if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008307 return 0;
Thomas Wouters477c8d52006-05-27 19:21:47 +00008308if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00008309 return 0;
8310 ;
8311 return 0;
8312}
8313_ACEOF
8314rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008315if { (ac_try="$ac_compile"
8316case "(($ac_try" in
8317 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8318 *) ac_try_echo=$ac_try;;
8319esac
8320eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8321 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008322 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008323 grep -v '^ *+' conftest.er1 >conftest.err
8324 rm -f conftest.er1
8325 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008326 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8327 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008328 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
8329 { (case "(($ac_try" in
8330 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8331 *) ac_try_echo=$ac_try;;
8332esac
8333eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8334 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008335 ac_status=$?
8336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8337 (exit $ac_status); }; } &&
8338 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008339 { (case "(($ac_try" in
8340 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8341 *) ac_try_echo=$ac_try;;
8342esac
8343eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8344 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008345 ac_status=$?
8346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8347 (exit $ac_status); }; }; then
8348 ac_cv_type_void_p=yes
8349else
8350 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008351sed 's/^/| /' conftest.$ac_ext >&5
8352
Thomas Wouters477c8d52006-05-27 19:21:47 +00008353 ac_cv_type_void_p=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008354fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00008355
Thomas Wouters0e3f5912006-08-11 14:57:12 +00008356rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008357fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00008358{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
8359echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008360
Thomas Wouters477c8d52006-05-27 19:21:47 +00008361{ echo "$as_me:$LINENO: checking size of void *" >&5
8362echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008363if test "${ac_cv_sizeof_void_p+set}" = set; then
8364 echo $ECHO_N "(cached) $ECHO_C" >&6
8365else
8366 if test "$ac_cv_type_void_p" = yes; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00008367 # The cast to long int works around a bug in the HP C Compiler
Martin v. Löwis11437992002-04-12 09:54:03 +00008368 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8369 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8370 # This bug is HP SR number 8606223364.
8371 if test "$cross_compiling" = yes; then
8372 # Depending upon the size, compute the lo and hi bounds.
8373cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008374/* confdefs.h. */
8375_ACEOF
8376cat confdefs.h >>conftest.$ac_ext
8377cat >>conftest.$ac_ext <<_ACEOF
8378/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008379$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00008380 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008381int
8382main ()
8383{
Thomas Wouters477c8d52006-05-27 19:21:47 +00008384static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008385test_array [0] = 0
8386
8387 ;
8388 return 0;
8389}
8390_ACEOF
8391rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008392if { (ac_try="$ac_compile"
8393case "(($ac_try" in
8394 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8395 *) ac_try_echo=$ac_try;;
8396esac
8397eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8398 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008399 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008400 grep -v '^ *+' conftest.er1 >conftest.err
8401 rm -f conftest.er1
8402 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8404 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008405 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
8406 { (case "(($ac_try" in
8407 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8408 *) ac_try_echo=$ac_try;;
8409esac
8410eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8411 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008412 ac_status=$?
8413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8414 (exit $ac_status); }; } &&
8415 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008416 { (case "(($ac_try" in
8417 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8418 *) ac_try_echo=$ac_try;;
8419esac
8420eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8421 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008422 ac_status=$?
8423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8424 (exit $ac_status); }; }; then
8425 ac_lo=0 ac_mid=0
8426 while :; do
8427 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008428/* confdefs.h. */
8429_ACEOF
8430cat confdefs.h >>conftest.$ac_ext
8431cat >>conftest.$ac_ext <<_ACEOF
8432/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008433$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00008434 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008435int
8436main ()
8437{
Thomas Wouters477c8d52006-05-27 19:21:47 +00008438static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008439test_array [0] = 0
8440
8441 ;
8442 return 0;
8443}
8444_ACEOF
8445rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008446if { (ac_try="$ac_compile"
8447case "(($ac_try" in
8448 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8449 *) ac_try_echo=$ac_try;;
8450esac
8451eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8452 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008453 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008454 grep -v '^ *+' conftest.er1 >conftest.err
8455 rm -f conftest.er1
8456 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8458 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008459 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
8460 { (case "(($ac_try" in
8461 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8462 *) ac_try_echo=$ac_try;;
8463esac
8464eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8465 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008466 ac_status=$?
8467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8468 (exit $ac_status); }; } &&
8469 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008470 { (case "(($ac_try" in
8471 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8472 *) ac_try_echo=$ac_try;;
8473esac
8474eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8475 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008476 ac_status=$?
8477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8478 (exit $ac_status); }; }; then
8479 ac_hi=$ac_mid; break
8480else
8481 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008482sed 's/^/| /' conftest.$ac_ext >&5
8483
Thomas Wouters477c8d52006-05-27 19:21:47 +00008484 ac_lo=`expr $ac_mid + 1`
8485 if test $ac_lo -le $ac_mid; then
8486 ac_lo= ac_hi=
8487 break
8488 fi
8489 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008490fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00008491
Thomas Wouters0e3f5912006-08-11 14:57:12 +00008492rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008493 done
8494else
8495 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008496sed 's/^/| /' conftest.$ac_ext >&5
8497
Thomas Wouters477c8d52006-05-27 19:21:47 +00008498 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008499/* confdefs.h. */
8500_ACEOF
8501cat confdefs.h >>conftest.$ac_ext
8502cat >>conftest.$ac_ext <<_ACEOF
8503/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008504$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00008505 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008506int
8507main ()
8508{
Thomas Wouters477c8d52006-05-27 19:21:47 +00008509static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008510test_array [0] = 0
8511
8512 ;
8513 return 0;
8514}
8515_ACEOF
8516rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008517if { (ac_try="$ac_compile"
8518case "(($ac_try" in
8519 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8520 *) ac_try_echo=$ac_try;;
8521esac
8522eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8523 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008524 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008525 grep -v '^ *+' conftest.er1 >conftest.err
8526 rm -f conftest.er1
8527 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8529 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008530 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
8531 { (case "(($ac_try" in
8532 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8533 *) ac_try_echo=$ac_try;;
8534esac
8535eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8536 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008537 ac_status=$?
8538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8539 (exit $ac_status); }; } &&
8540 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008541 { (case "(($ac_try" in
8542 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8543 *) ac_try_echo=$ac_try;;
8544esac
8545eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8546 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008547 ac_status=$?
8548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8549 (exit $ac_status); }; }; then
8550 ac_hi=-1 ac_mid=-1
8551 while :; do
8552 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008553/* confdefs.h. */
8554_ACEOF
8555cat confdefs.h >>conftest.$ac_ext
8556cat >>conftest.$ac_ext <<_ACEOF
8557/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008558$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00008559 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008560int
8561main ()
8562{
Thomas Wouters477c8d52006-05-27 19:21:47 +00008563static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008564test_array [0] = 0
8565
8566 ;
8567 return 0;
8568}
8569_ACEOF
8570rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008571if { (ac_try="$ac_compile"
8572case "(($ac_try" in
8573 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8574 *) ac_try_echo=$ac_try;;
8575esac
8576eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8577 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008578 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008579 grep -v '^ *+' conftest.er1 >conftest.err
8580 rm -f conftest.er1
8581 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8583 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008584 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
8585 { (case "(($ac_try" in
8586 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8587 *) ac_try_echo=$ac_try;;
8588esac
8589eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8590 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008591 ac_status=$?
8592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8593 (exit $ac_status); }; } &&
8594 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008595 { (case "(($ac_try" in
8596 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8597 *) ac_try_echo=$ac_try;;
8598esac
8599eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8600 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008601 ac_status=$?
8602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8603 (exit $ac_status); }; }; then
8604 ac_lo=$ac_mid; break
8605else
8606 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008607sed 's/^/| /' conftest.$ac_ext >&5
8608
Thomas Wouters477c8d52006-05-27 19:21:47 +00008609 ac_hi=`expr '(' $ac_mid ')' - 1`
8610 if test $ac_mid -le $ac_hi; then
8611 ac_lo= ac_hi=
8612 break
8613 fi
8614 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008615fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00008616
Thomas Wouters0e3f5912006-08-11 14:57:12 +00008617rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008618 done
8619else
8620 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008621sed 's/^/| /' conftest.$ac_ext >&5
8622
Thomas Wouters477c8d52006-05-27 19:21:47 +00008623 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008624fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00008625
Thomas Wouters0e3f5912006-08-11 14:57:12 +00008626rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008627fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00008628
Thomas Wouters0e3f5912006-08-11 14:57:12 +00008629rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008630# Binary search between lo and hi bounds.
8631while test "x$ac_lo" != "x$ac_hi"; do
8632 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8633 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008634/* confdefs.h. */
8635_ACEOF
8636cat confdefs.h >>conftest.$ac_ext
8637cat >>conftest.$ac_ext <<_ACEOF
8638/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008639$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00008640 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008641int
8642main ()
8643{
Thomas Wouters477c8d52006-05-27 19:21:47 +00008644static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008645test_array [0] = 0
8646
8647 ;
8648 return 0;
8649}
8650_ACEOF
8651rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008652if { (ac_try="$ac_compile"
8653case "(($ac_try" in
8654 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8655 *) ac_try_echo=$ac_try;;
8656esac
8657eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8658 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008659 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008660 grep -v '^ *+' conftest.er1 >conftest.err
8661 rm -f conftest.er1
8662 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008663 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8664 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008665 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
8666 { (case "(($ac_try" in
8667 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8668 *) ac_try_echo=$ac_try;;
8669esac
8670eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8671 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008672 ac_status=$?
8673 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8674 (exit $ac_status); }; } &&
8675 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008676 { (case "(($ac_try" in
8677 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8678 *) ac_try_echo=$ac_try;;
8679esac
8680eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8681 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008682 ac_status=$?
8683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8684 (exit $ac_status); }; }; then
8685 ac_hi=$ac_mid
8686else
8687 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008688sed 's/^/| /' conftest.$ac_ext >&5
8689
Thomas Wouters477c8d52006-05-27 19:21:47 +00008690 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008691fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00008692
Thomas Wouters0e3f5912006-08-11 14:57:12 +00008693rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008694done
8695case $ac_lo in
8696?*) ac_cv_sizeof_void_p=$ac_lo;;
Thomas Wouters477c8d52006-05-27 19:21:47 +00008697'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008698See \`config.log' for more details." >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +00008699echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008700See \`config.log' for more details." >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +00008701 { (exit 77); exit 77; }; } ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008702esac
Guido van Rossumad678af1998-10-02 14:42:15 +00008703else
Martin v. Löwis11437992002-04-12 09:54:03 +00008704 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008705/* confdefs.h. */
8706_ACEOF
8707cat confdefs.h >>conftest.$ac_ext
8708cat >>conftest.$ac_ext <<_ACEOF
8709/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008710$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00008711 typedef void * ac__type_sizeof_;
8712static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8713static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008714#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008715#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008716int
8717main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00008718{
Martin v. Löwis11437992002-04-12 09:54:03 +00008719
8720 FILE *f = fopen ("conftest.val", "w");
8721 if (! f)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008722 return 1;
8723 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008724 {
Thomas Wouters477c8d52006-05-27 19:21:47 +00008725 long int i = longval ();
8726 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8727 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008728 fprintf (f, "%ld\n", i);
8729 }
8730 else
8731 {
Thomas Wouters477c8d52006-05-27 19:21:47 +00008732 unsigned long int i = ulongval ();
8733 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8734 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008735 fprintf (f, "%lu\n", i);
8736 }
Thomas Wouters477c8d52006-05-27 19:21:47 +00008737 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008738
8739 ;
8740 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00008741}
Martin v. Löwis11437992002-04-12 09:54:03 +00008742_ACEOF
8743rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008744if { (ac_try="$ac_link"
8745case "(($ac_try" in
8746 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8747 *) ac_try_echo=$ac_try;;
8748esac
8749eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8750 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008751 ac_status=$?
8752 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8753 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008754 { (case "(($ac_try" in
8755 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8756 *) ac_try_echo=$ac_try;;
8757esac
8758eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8759 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008760 ac_status=$?
8761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8762 (exit $ac_status); }; }; then
8763 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00008764else
Martin v. Löwis11437992002-04-12 09:54:03 +00008765 echo "$as_me: program exited with status $ac_status" >&5
8766echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008767sed 's/^/| /' conftest.$ac_ext >&5
8768
Martin v. Löwis11437992002-04-12 09:54:03 +00008769( exit $ac_status )
Thomas Wouters477c8d52006-05-27 19:21:47 +00008770{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008771See \`config.log' for more details." >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +00008772echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008773See \`config.log' for more details." >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +00008774 { (exit 77); exit 77; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008775fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00008776rm -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 +00008777fi
8778rm -f conftest.val
8779else
Guido van Rossumad678af1998-10-02 14:42:15 +00008780 ac_cv_sizeof_void_p=0
8781fi
Guido van Rossumad678af1998-10-02 14:42:15 +00008782fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00008783{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
8784echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008785cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008786#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008787_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008788
8789
Thomas Wouters477c8d52006-05-27 19:21:47 +00008790{ echo "$as_me:$LINENO: checking for short" >&5
8791echo $ECHO_N "checking for short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008792if test "${ac_cv_type_short+set}" = set; then
8793 echo $ECHO_N "(cached) $ECHO_C" >&6
8794else
8795 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008796/* confdefs.h. */
8797_ACEOF
8798cat confdefs.h >>conftest.$ac_ext
8799cat >>conftest.$ac_ext <<_ACEOF
8800/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008801$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00008802typedef short ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008803int
8804main ()
8805{
Thomas Wouters477c8d52006-05-27 19:21:47 +00008806if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008807 return 0;
Thomas Wouters477c8d52006-05-27 19:21:47 +00008808if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00008809 return 0;
8810 ;
8811 return 0;
8812}
8813_ACEOF
8814rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008815if { (ac_try="$ac_compile"
8816case "(($ac_try" in
8817 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8818 *) ac_try_echo=$ac_try;;
8819esac
8820eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8821 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008822 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008823 grep -v '^ *+' conftest.er1 >conftest.err
8824 rm -f conftest.er1
8825 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8827 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008828 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
8829 { (case "(($ac_try" in
8830 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8831 *) ac_try_echo=$ac_try;;
8832esac
8833eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8834 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008835 ac_status=$?
8836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8837 (exit $ac_status); }; } &&
8838 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008839 { (case "(($ac_try" in
8840 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8841 *) ac_try_echo=$ac_try;;
8842esac
8843eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8844 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008845 ac_status=$?
8846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8847 (exit $ac_status); }; }; then
8848 ac_cv_type_short=yes
8849else
8850 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008851sed 's/^/| /' conftest.$ac_ext >&5
8852
Thomas Wouters477c8d52006-05-27 19:21:47 +00008853 ac_cv_type_short=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008854fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00008855
Thomas Wouters0e3f5912006-08-11 14:57:12 +00008856rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008857fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00008858{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
8859echo "${ECHO_T}$ac_cv_type_short" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008860
Thomas Wouters477c8d52006-05-27 19:21:47 +00008861{ echo "$as_me:$LINENO: checking size of short" >&5
8862echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008863if test "${ac_cv_sizeof_short+set}" = set; then
8864 echo $ECHO_N "(cached) $ECHO_C" >&6
8865else
8866 if test "$ac_cv_type_short" = yes; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00008867 # The cast to long int works around a bug in the HP C Compiler
Martin v. Löwis11437992002-04-12 09:54:03 +00008868 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8869 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8870 # This bug is HP SR number 8606223364.
8871 if test "$cross_compiling" = yes; then
8872 # Depending upon the size, compute the lo and hi bounds.
8873cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008874/* confdefs.h. */
8875_ACEOF
8876cat confdefs.h >>conftest.$ac_ext
8877cat >>conftest.$ac_ext <<_ACEOF
8878/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008879$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00008880 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008881int
8882main ()
8883{
Thomas Wouters477c8d52006-05-27 19:21:47 +00008884static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008885test_array [0] = 0
8886
8887 ;
8888 return 0;
8889}
8890_ACEOF
8891rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008892if { (ac_try="$ac_compile"
8893case "(($ac_try" in
8894 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8895 *) ac_try_echo=$ac_try;;
8896esac
8897eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8898 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008899 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008900 grep -v '^ *+' conftest.er1 >conftest.err
8901 rm -f conftest.er1
8902 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8904 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008905 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
8906 { (case "(($ac_try" in
8907 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8908 *) ac_try_echo=$ac_try;;
8909esac
8910eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8911 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008912 ac_status=$?
8913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8914 (exit $ac_status); }; } &&
8915 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008916 { (case "(($ac_try" in
8917 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8918 *) ac_try_echo=$ac_try;;
8919esac
8920eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8921 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008922 ac_status=$?
8923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8924 (exit $ac_status); }; }; then
8925 ac_lo=0 ac_mid=0
8926 while :; do
8927 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008928/* confdefs.h. */
8929_ACEOF
8930cat confdefs.h >>conftest.$ac_ext
8931cat >>conftest.$ac_ext <<_ACEOF
8932/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008933$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00008934 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008935int
8936main ()
8937{
Thomas Wouters477c8d52006-05-27 19:21:47 +00008938static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008939test_array [0] = 0
8940
8941 ;
8942 return 0;
8943}
8944_ACEOF
8945rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008946if { (ac_try="$ac_compile"
8947case "(($ac_try" in
8948 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8949 *) ac_try_echo=$ac_try;;
8950esac
8951eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8952 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008953 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008954 grep -v '^ *+' conftest.er1 >conftest.err
8955 rm -f conftest.er1
8956 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8958 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008959 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
8960 { (case "(($ac_try" in
8961 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8962 *) ac_try_echo=$ac_try;;
8963esac
8964eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8965 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008966 ac_status=$?
8967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8968 (exit $ac_status); }; } &&
8969 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008970 { (case "(($ac_try" in
8971 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8972 *) ac_try_echo=$ac_try;;
8973esac
8974eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8975 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008976 ac_status=$?
8977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8978 (exit $ac_status); }; }; then
8979 ac_hi=$ac_mid; break
8980else
8981 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008982sed 's/^/| /' conftest.$ac_ext >&5
8983
Thomas Wouters477c8d52006-05-27 19:21:47 +00008984 ac_lo=`expr $ac_mid + 1`
8985 if test $ac_lo -le $ac_mid; then
8986 ac_lo= ac_hi=
8987 break
8988 fi
8989 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008990fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00008991
Thomas Wouters0e3f5912006-08-11 14:57:12 +00008992rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008993 done
8994else
8995 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008996sed 's/^/| /' conftest.$ac_ext >&5
8997
Thomas Wouters477c8d52006-05-27 19:21:47 +00008998 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008999/* confdefs.h. */
9000_ACEOF
9001cat confdefs.h >>conftest.$ac_ext
9002cat >>conftest.$ac_ext <<_ACEOF
9003/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009004$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00009005 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009006int
9007main ()
9008{
Thomas Wouters477c8d52006-05-27 19:21:47 +00009009static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009010test_array [0] = 0
9011
9012 ;
9013 return 0;
9014}
9015_ACEOF
9016rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009017if { (ac_try="$ac_compile"
9018case "(($ac_try" in
9019 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9020 *) ac_try_echo=$ac_try;;
9021esac
9022eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9023 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009024 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009025 grep -v '^ *+' conftest.er1 >conftest.err
9026 rm -f conftest.er1
9027 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9029 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009030 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
9031 { (case "(($ac_try" in
9032 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9033 *) ac_try_echo=$ac_try;;
9034esac
9035eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9036 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009037 ac_status=$?
9038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9039 (exit $ac_status); }; } &&
9040 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009041 { (case "(($ac_try" in
9042 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9043 *) ac_try_echo=$ac_try;;
9044esac
9045eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9046 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009047 ac_status=$?
9048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9049 (exit $ac_status); }; }; then
9050 ac_hi=-1 ac_mid=-1
9051 while :; do
9052 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009053/* confdefs.h. */
9054_ACEOF
9055cat confdefs.h >>conftest.$ac_ext
9056cat >>conftest.$ac_ext <<_ACEOF
9057/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009058$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00009059 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009060int
9061main ()
9062{
Thomas Wouters477c8d52006-05-27 19:21:47 +00009063static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009064test_array [0] = 0
9065
9066 ;
9067 return 0;
9068}
9069_ACEOF
9070rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009071if { (ac_try="$ac_compile"
9072case "(($ac_try" in
9073 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9074 *) ac_try_echo=$ac_try;;
9075esac
9076eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9077 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009078 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009079 grep -v '^ *+' conftest.er1 >conftest.err
9080 rm -f conftest.er1
9081 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9083 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009084 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
9085 { (case "(($ac_try" in
9086 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9087 *) ac_try_echo=$ac_try;;
9088esac
9089eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9090 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009091 ac_status=$?
9092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9093 (exit $ac_status); }; } &&
9094 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009095 { (case "(($ac_try" in
9096 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9097 *) ac_try_echo=$ac_try;;
9098esac
9099eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9100 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009101 ac_status=$?
9102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9103 (exit $ac_status); }; }; then
9104 ac_lo=$ac_mid; break
9105else
9106 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009107sed 's/^/| /' conftest.$ac_ext >&5
9108
Thomas Wouters477c8d52006-05-27 19:21:47 +00009109 ac_hi=`expr '(' $ac_mid ')' - 1`
9110 if test $ac_mid -le $ac_hi; then
9111 ac_lo= ac_hi=
9112 break
9113 fi
9114 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009115fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00009116
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009117rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009118 done
9119else
9120 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009121sed 's/^/| /' conftest.$ac_ext >&5
9122
Thomas Wouters477c8d52006-05-27 19:21:47 +00009123 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009124fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00009125
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009126rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009127fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00009128
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009129rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009130# Binary search between lo and hi bounds.
9131while test "x$ac_lo" != "x$ac_hi"; do
9132 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9133 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009134/* confdefs.h. */
9135_ACEOF
9136cat confdefs.h >>conftest.$ac_ext
9137cat >>conftest.$ac_ext <<_ACEOF
9138/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009139$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00009140 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009141int
9142main ()
9143{
Thomas Wouters477c8d52006-05-27 19:21:47 +00009144static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009145test_array [0] = 0
9146
9147 ;
9148 return 0;
9149}
9150_ACEOF
9151rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009152if { (ac_try="$ac_compile"
9153case "(($ac_try" in
9154 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9155 *) ac_try_echo=$ac_try;;
9156esac
9157eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9158 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009159 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009160 grep -v '^ *+' conftest.er1 >conftest.err
9161 rm -f conftest.er1
9162 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009163 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9164 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009165 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
9166 { (case "(($ac_try" in
9167 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9168 *) ac_try_echo=$ac_try;;
9169esac
9170eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9171 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009172 ac_status=$?
9173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9174 (exit $ac_status); }; } &&
9175 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009176 { (case "(($ac_try" in
9177 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9178 *) ac_try_echo=$ac_try;;
9179esac
9180eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9181 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009182 ac_status=$?
9183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9184 (exit $ac_status); }; }; then
9185 ac_hi=$ac_mid
9186else
9187 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009188sed 's/^/| /' conftest.$ac_ext >&5
9189
Thomas Wouters477c8d52006-05-27 19:21:47 +00009190 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009191fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00009192
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009193rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009194done
9195case $ac_lo in
9196?*) ac_cv_sizeof_short=$ac_lo;;
Thomas Wouters477c8d52006-05-27 19:21:47 +00009197'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009198See \`config.log' for more details." >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +00009199echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009200See \`config.log' for more details." >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +00009201 { (exit 77); exit 77; }; } ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009202esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009203else
Martin v. Löwis11437992002-04-12 09:54:03 +00009204 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009205/* confdefs.h. */
9206_ACEOF
9207cat confdefs.h >>conftest.$ac_ext
9208cat >>conftest.$ac_ext <<_ACEOF
9209/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009210$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00009211 typedef short ac__type_sizeof_;
9212static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9213static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009214#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009215#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009216int
9217main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009218{
Martin v. Löwis11437992002-04-12 09:54:03 +00009219
9220 FILE *f = fopen ("conftest.val", "w");
9221 if (! f)
Thomas Wouters477c8d52006-05-27 19:21:47 +00009222 return 1;
9223 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009224 {
Thomas Wouters477c8d52006-05-27 19:21:47 +00009225 long int i = longval ();
9226 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9227 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009228 fprintf (f, "%ld\n", i);
9229 }
9230 else
9231 {
Thomas Wouters477c8d52006-05-27 19:21:47 +00009232 unsigned long int i = ulongval ();
9233 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9234 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009235 fprintf (f, "%lu\n", i);
9236 }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009237 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009238
9239 ;
9240 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009241}
Martin v. Löwis11437992002-04-12 09:54:03 +00009242_ACEOF
9243rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009244if { (ac_try="$ac_link"
9245case "(($ac_try" in
9246 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9247 *) ac_try_echo=$ac_try;;
9248esac
9249eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9250 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009251 ac_status=$?
9252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9253 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009254 { (case "(($ac_try" in
9255 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9256 *) ac_try_echo=$ac_try;;
9257esac
9258eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9259 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009260 ac_status=$?
9261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9262 (exit $ac_status); }; }; then
9263 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009264else
Martin v. Löwis11437992002-04-12 09:54:03 +00009265 echo "$as_me: program exited with status $ac_status" >&5
9266echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009267sed 's/^/| /' conftest.$ac_ext >&5
9268
Martin v. Löwis11437992002-04-12 09:54:03 +00009269( exit $ac_status )
Thomas Wouters477c8d52006-05-27 19:21:47 +00009270{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009271See \`config.log' for more details." >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +00009272echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009273See \`config.log' for more details." >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +00009274 { (exit 77); exit 77; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009275fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00009276rm -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 +00009277fi
9278rm -f conftest.val
9279else
Guido van Rossumef2255b2000-03-10 22:30:29 +00009280 ac_cv_sizeof_short=0
9281fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00009282fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00009283{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
9284echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009285cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009286#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00009287_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009288
9289
Thomas Wouters477c8d52006-05-27 19:21:47 +00009290{ echo "$as_me:$LINENO: checking for float" >&5
9291echo $ECHO_N "checking for float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009292if test "${ac_cv_type_float+set}" = set; then
9293 echo $ECHO_N "(cached) $ECHO_C" >&6
9294else
9295 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009296/* confdefs.h. */
9297_ACEOF
9298cat confdefs.h >>conftest.$ac_ext
9299cat >>conftest.$ac_ext <<_ACEOF
9300/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009301$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00009302typedef float ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009303int
9304main ()
9305{
Thomas Wouters477c8d52006-05-27 19:21:47 +00009306if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009307 return 0;
Thomas Wouters477c8d52006-05-27 19:21:47 +00009308if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00009309 return 0;
9310 ;
9311 return 0;
9312}
9313_ACEOF
9314rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009315if { (ac_try="$ac_compile"
9316case "(($ac_try" in
9317 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9318 *) ac_try_echo=$ac_try;;
9319esac
9320eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9321 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009322 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009323 grep -v '^ *+' conftest.er1 >conftest.err
9324 rm -f conftest.er1
9325 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009326 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9327 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009328 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
9329 { (case "(($ac_try" in
9330 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9331 *) ac_try_echo=$ac_try;;
9332esac
9333eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9334 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009335 ac_status=$?
9336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9337 (exit $ac_status); }; } &&
9338 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009339 { (case "(($ac_try" in
9340 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9341 *) ac_try_echo=$ac_try;;
9342esac
9343eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9344 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009345 ac_status=$?
9346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9347 (exit $ac_status); }; }; then
9348 ac_cv_type_float=yes
9349else
9350 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009351sed 's/^/| /' conftest.$ac_ext >&5
9352
Thomas Wouters477c8d52006-05-27 19:21:47 +00009353 ac_cv_type_float=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009354fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00009355
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009356rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009357fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00009358{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
9359echo "${ECHO_T}$ac_cv_type_float" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009360
Thomas Wouters477c8d52006-05-27 19:21:47 +00009361{ echo "$as_me:$LINENO: checking size of float" >&5
9362echo $ECHO_N "checking size of float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009363if test "${ac_cv_sizeof_float+set}" = set; then
9364 echo $ECHO_N "(cached) $ECHO_C" >&6
9365else
9366 if test "$ac_cv_type_float" = yes; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00009367 # The cast to long int works around a bug in the HP C Compiler
Martin v. Löwis11437992002-04-12 09:54:03 +00009368 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9369 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9370 # This bug is HP SR number 8606223364.
9371 if test "$cross_compiling" = yes; then
9372 # Depending upon the size, compute the lo and hi bounds.
9373cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009374/* confdefs.h. */
9375_ACEOF
9376cat confdefs.h >>conftest.$ac_ext
9377cat >>conftest.$ac_ext <<_ACEOF
9378/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009379$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00009380 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009381int
9382main ()
9383{
Thomas Wouters477c8d52006-05-27 19:21:47 +00009384static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009385test_array [0] = 0
9386
9387 ;
9388 return 0;
9389}
9390_ACEOF
9391rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009392if { (ac_try="$ac_compile"
9393case "(($ac_try" in
9394 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9395 *) ac_try_echo=$ac_try;;
9396esac
9397eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9398 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009399 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009400 grep -v '^ *+' conftest.er1 >conftest.err
9401 rm -f conftest.er1
9402 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9404 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009405 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
9406 { (case "(($ac_try" in
9407 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9408 *) ac_try_echo=$ac_try;;
9409esac
9410eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9411 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009412 ac_status=$?
9413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9414 (exit $ac_status); }; } &&
9415 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009416 { (case "(($ac_try" in
9417 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9418 *) ac_try_echo=$ac_try;;
9419esac
9420eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9421 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009422 ac_status=$?
9423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9424 (exit $ac_status); }; }; then
9425 ac_lo=0 ac_mid=0
9426 while :; do
9427 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009428/* confdefs.h. */
9429_ACEOF
9430cat confdefs.h >>conftest.$ac_ext
9431cat >>conftest.$ac_ext <<_ACEOF
9432/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009433$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00009434 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009435int
9436main ()
9437{
Thomas Wouters477c8d52006-05-27 19:21:47 +00009438static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009439test_array [0] = 0
9440
9441 ;
9442 return 0;
9443}
9444_ACEOF
9445rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009446if { (ac_try="$ac_compile"
9447case "(($ac_try" in
9448 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9449 *) ac_try_echo=$ac_try;;
9450esac
9451eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9452 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009453 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009454 grep -v '^ *+' conftest.er1 >conftest.err
9455 rm -f conftest.er1
9456 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9458 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009459 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
9460 { (case "(($ac_try" in
9461 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9462 *) ac_try_echo=$ac_try;;
9463esac
9464eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9465 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009466 ac_status=$?
9467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9468 (exit $ac_status); }; } &&
9469 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009470 { (case "(($ac_try" in
9471 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9472 *) ac_try_echo=$ac_try;;
9473esac
9474eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9475 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009476 ac_status=$?
9477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9478 (exit $ac_status); }; }; then
9479 ac_hi=$ac_mid; break
9480else
9481 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009482sed 's/^/| /' conftest.$ac_ext >&5
9483
Thomas Wouters477c8d52006-05-27 19:21:47 +00009484 ac_lo=`expr $ac_mid + 1`
9485 if test $ac_lo -le $ac_mid; then
9486 ac_lo= ac_hi=
9487 break
9488 fi
9489 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009490fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00009491
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009492rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009493 done
9494else
9495 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009496sed 's/^/| /' conftest.$ac_ext >&5
9497
Thomas Wouters477c8d52006-05-27 19:21:47 +00009498 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009499/* confdefs.h. */
9500_ACEOF
9501cat confdefs.h >>conftest.$ac_ext
9502cat >>conftest.$ac_ext <<_ACEOF
9503/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009504$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00009505 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009506int
9507main ()
9508{
Thomas Wouters477c8d52006-05-27 19:21:47 +00009509static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009510test_array [0] = 0
9511
9512 ;
9513 return 0;
9514}
9515_ACEOF
9516rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009517if { (ac_try="$ac_compile"
9518case "(($ac_try" in
9519 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9520 *) ac_try_echo=$ac_try;;
9521esac
9522eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9523 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009524 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009525 grep -v '^ *+' conftest.er1 >conftest.err
9526 rm -f conftest.er1
9527 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9529 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009530 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
9531 { (case "(($ac_try" in
9532 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9533 *) ac_try_echo=$ac_try;;
9534esac
9535eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9536 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009537 ac_status=$?
9538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9539 (exit $ac_status); }; } &&
9540 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009541 { (case "(($ac_try" in
9542 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9543 *) ac_try_echo=$ac_try;;
9544esac
9545eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9546 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009547 ac_status=$?
9548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9549 (exit $ac_status); }; }; then
9550 ac_hi=-1 ac_mid=-1
9551 while :; do
9552 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009553/* confdefs.h. */
9554_ACEOF
9555cat confdefs.h >>conftest.$ac_ext
9556cat >>conftest.$ac_ext <<_ACEOF
9557/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009558$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00009559 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009560int
9561main ()
9562{
Thomas Wouters477c8d52006-05-27 19:21:47 +00009563static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009564test_array [0] = 0
9565
9566 ;
9567 return 0;
9568}
9569_ACEOF
9570rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009571if { (ac_try="$ac_compile"
9572case "(($ac_try" in
9573 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9574 *) ac_try_echo=$ac_try;;
9575esac
9576eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9577 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009578 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009579 grep -v '^ *+' conftest.er1 >conftest.err
9580 rm -f conftest.er1
9581 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9583 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009584 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
9585 { (case "(($ac_try" in
9586 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9587 *) ac_try_echo=$ac_try;;
9588esac
9589eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9590 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009591 ac_status=$?
9592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9593 (exit $ac_status); }; } &&
9594 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009595 { (case "(($ac_try" in
9596 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9597 *) ac_try_echo=$ac_try;;
9598esac
9599eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9600 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009601 ac_status=$?
9602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9603 (exit $ac_status); }; }; then
9604 ac_lo=$ac_mid; break
9605else
9606 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009607sed 's/^/| /' conftest.$ac_ext >&5
9608
Thomas Wouters477c8d52006-05-27 19:21:47 +00009609 ac_hi=`expr '(' $ac_mid ')' - 1`
9610 if test $ac_mid -le $ac_hi; then
9611 ac_lo= ac_hi=
9612 break
9613 fi
9614 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009615fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00009616
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009617rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009618 done
9619else
9620 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009621sed 's/^/| /' conftest.$ac_ext >&5
9622
Thomas Wouters477c8d52006-05-27 19:21:47 +00009623 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009624fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00009625
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009626rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009627fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00009628
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009629rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009630# Binary search between lo and hi bounds.
9631while test "x$ac_lo" != "x$ac_hi"; do
9632 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9633 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009634/* confdefs.h. */
9635_ACEOF
9636cat confdefs.h >>conftest.$ac_ext
9637cat >>conftest.$ac_ext <<_ACEOF
9638/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009639$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00009640 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009641int
9642main ()
9643{
Thomas Wouters477c8d52006-05-27 19:21:47 +00009644static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009645test_array [0] = 0
9646
9647 ;
9648 return 0;
9649}
9650_ACEOF
9651rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009652if { (ac_try="$ac_compile"
9653case "(($ac_try" in
9654 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9655 *) ac_try_echo=$ac_try;;
9656esac
9657eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9658 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009659 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009660 grep -v '^ *+' conftest.er1 >conftest.err
9661 rm -f conftest.er1
9662 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009663 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9664 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009665 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
9666 { (case "(($ac_try" in
9667 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9668 *) ac_try_echo=$ac_try;;
9669esac
9670eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9671 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009672 ac_status=$?
9673 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9674 (exit $ac_status); }; } &&
9675 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009676 { (case "(($ac_try" in
9677 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9678 *) ac_try_echo=$ac_try;;
9679esac
9680eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9681 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009682 ac_status=$?
9683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9684 (exit $ac_status); }; }; then
9685 ac_hi=$ac_mid
9686else
9687 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009688sed 's/^/| /' conftest.$ac_ext >&5
9689
Thomas Wouters477c8d52006-05-27 19:21:47 +00009690 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009691fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00009692
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009693rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009694done
9695case $ac_lo in
9696?*) ac_cv_sizeof_float=$ac_lo;;
Thomas Wouters477c8d52006-05-27 19:21:47 +00009697'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009698See \`config.log' for more details." >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +00009699echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009700See \`config.log' for more details." >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +00009701 { (exit 77); exit 77; }; } ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009702esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009703else
Martin v. Löwis11437992002-04-12 09:54:03 +00009704 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009705/* confdefs.h. */
9706_ACEOF
9707cat confdefs.h >>conftest.$ac_ext
9708cat >>conftest.$ac_ext <<_ACEOF
9709/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009710$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00009711 typedef float ac__type_sizeof_;
9712static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9713static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009714#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009715#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009716int
9717main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009718{
Martin v. Löwis11437992002-04-12 09:54:03 +00009719
9720 FILE *f = fopen ("conftest.val", "w");
9721 if (! f)
Thomas Wouters477c8d52006-05-27 19:21:47 +00009722 return 1;
9723 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009724 {
Thomas Wouters477c8d52006-05-27 19:21:47 +00009725 long int i = longval ();
9726 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9727 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009728 fprintf (f, "%ld\n", i);
9729 }
9730 else
9731 {
Thomas Wouters477c8d52006-05-27 19:21:47 +00009732 unsigned long int i = ulongval ();
9733 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9734 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009735 fprintf (f, "%lu\n", i);
9736 }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009737 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009738
9739 ;
9740 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009741}
Martin v. Löwis11437992002-04-12 09:54:03 +00009742_ACEOF
9743rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009744if { (ac_try="$ac_link"
9745case "(($ac_try" in
9746 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9747 *) ac_try_echo=$ac_try;;
9748esac
9749eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9750 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009751 ac_status=$?
9752 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9753 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009754 { (case "(($ac_try" in
9755 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9756 *) ac_try_echo=$ac_try;;
9757esac
9758eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9759 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009760 ac_status=$?
9761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9762 (exit $ac_status); }; }; then
9763 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009764else
Martin v. Löwis11437992002-04-12 09:54:03 +00009765 echo "$as_me: program exited with status $ac_status" >&5
9766echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009767sed 's/^/| /' conftest.$ac_ext >&5
9768
Martin v. Löwis11437992002-04-12 09:54:03 +00009769( exit $ac_status )
Thomas Wouters477c8d52006-05-27 19:21:47 +00009770{ { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009771See \`config.log' for more details." >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +00009772echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009773See \`config.log' for more details." >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +00009774 { (exit 77); exit 77; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009775fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00009776rm -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 +00009777fi
9778rm -f conftest.val
9779else
Guido van Rossumef2255b2000-03-10 22:30:29 +00009780 ac_cv_sizeof_float=0
9781fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00009782fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00009783{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
9784echo "${ECHO_T}$ac_cv_sizeof_float" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009785cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009786#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00009787_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009788
9789
Thomas Wouters477c8d52006-05-27 19:21:47 +00009790{ echo "$as_me:$LINENO: checking for double" >&5
9791echo $ECHO_N "checking for double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009792if test "${ac_cv_type_double+set}" = set; then
9793 echo $ECHO_N "(cached) $ECHO_C" >&6
9794else
9795 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009796/* confdefs.h. */
9797_ACEOF
9798cat confdefs.h >>conftest.$ac_ext
9799cat >>conftest.$ac_ext <<_ACEOF
9800/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009801$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00009802typedef double ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009803int
9804main ()
9805{
Thomas Wouters477c8d52006-05-27 19:21:47 +00009806if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009807 return 0;
Thomas Wouters477c8d52006-05-27 19:21:47 +00009808if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00009809 return 0;
9810 ;
9811 return 0;
9812}
9813_ACEOF
9814rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009815if { (ac_try="$ac_compile"
9816case "(($ac_try" in
9817 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9818 *) ac_try_echo=$ac_try;;
9819esac
9820eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9821 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009822 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009823 grep -v '^ *+' conftest.er1 >conftest.err
9824 rm -f conftest.er1
9825 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9827 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009828 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
9829 { (case "(($ac_try" in
9830 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9831 *) ac_try_echo=$ac_try;;
9832esac
9833eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9834 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009835 ac_status=$?
9836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9837 (exit $ac_status); }; } &&
9838 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009839 { (case "(($ac_try" in
9840 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9841 *) ac_try_echo=$ac_try;;
9842esac
9843eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9844 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009845 ac_status=$?
9846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9847 (exit $ac_status); }; }; then
9848 ac_cv_type_double=yes
9849else
9850 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009851sed 's/^/| /' conftest.$ac_ext >&5
9852
Thomas Wouters477c8d52006-05-27 19:21:47 +00009853 ac_cv_type_double=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009854fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00009855
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009856rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009857fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00009858{ echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
9859echo "${ECHO_T}$ac_cv_type_double" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009860
Thomas Wouters477c8d52006-05-27 19:21:47 +00009861{ echo "$as_me:$LINENO: checking size of double" >&5
9862echo $ECHO_N "checking size of double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009863if test "${ac_cv_sizeof_double+set}" = set; then
9864 echo $ECHO_N "(cached) $ECHO_C" >&6
9865else
9866 if test "$ac_cv_type_double" = yes; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00009867 # The cast to long int works around a bug in the HP C Compiler
Martin v. Löwis11437992002-04-12 09:54:03 +00009868 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9869 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9870 # This bug is HP SR number 8606223364.
9871 if test "$cross_compiling" = yes; then
9872 # Depending upon the size, compute the lo and hi bounds.
9873cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009874/* confdefs.h. */
9875_ACEOF
9876cat confdefs.h >>conftest.$ac_ext
9877cat >>conftest.$ac_ext <<_ACEOF
9878/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009879$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00009880 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009881int
9882main ()
9883{
Thomas Wouters477c8d52006-05-27 19:21:47 +00009884static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009885test_array [0] = 0
9886
9887 ;
9888 return 0;
9889}
9890_ACEOF
9891rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009892if { (ac_try="$ac_compile"
9893case "(($ac_try" in
9894 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9895 *) ac_try_echo=$ac_try;;
9896esac
9897eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9898 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009899 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009900 grep -v '^ *+' conftest.er1 >conftest.err
9901 rm -f conftest.er1
9902 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9904 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009905 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
9906 { (case "(($ac_try" in
9907 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9908 *) ac_try_echo=$ac_try;;
9909esac
9910eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9911 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009912 ac_status=$?
9913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9914 (exit $ac_status); }; } &&
9915 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009916 { (case "(($ac_try" in
9917 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9918 *) ac_try_echo=$ac_try;;
9919esac
9920eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9921 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009922 ac_status=$?
9923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9924 (exit $ac_status); }; }; then
9925 ac_lo=0 ac_mid=0
9926 while :; do
9927 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009928/* confdefs.h. */
9929_ACEOF
9930cat confdefs.h >>conftest.$ac_ext
9931cat >>conftest.$ac_ext <<_ACEOF
9932/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009933$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00009934 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009935int
9936main ()
9937{
Thomas Wouters477c8d52006-05-27 19:21:47 +00009938static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009939test_array [0] = 0
9940
9941 ;
9942 return 0;
9943}
9944_ACEOF
9945rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009946if { (ac_try="$ac_compile"
9947case "(($ac_try" in
9948 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9949 *) ac_try_echo=$ac_try;;
9950esac
9951eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9952 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009953 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009954 grep -v '^ *+' conftest.er1 >conftest.err
9955 rm -f conftest.er1
9956 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9958 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009959 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
9960 { (case "(($ac_try" in
9961 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9962 *) ac_try_echo=$ac_try;;
9963esac
9964eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9965 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009966 ac_status=$?
9967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9968 (exit $ac_status); }; } &&
9969 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009970 { (case "(($ac_try" in
9971 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9972 *) ac_try_echo=$ac_try;;
9973esac
9974eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9975 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009976 ac_status=$?
9977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9978 (exit $ac_status); }; }; then
9979 ac_hi=$ac_mid; break
9980else
9981 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009982sed 's/^/| /' conftest.$ac_ext >&5
9983
Thomas Wouters477c8d52006-05-27 19:21:47 +00009984 ac_lo=`expr $ac_mid + 1`
9985 if test $ac_lo -le $ac_mid; then
9986 ac_lo= ac_hi=
9987 break
9988 fi
9989 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009990fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00009991
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009992rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009993 done
9994else
9995 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009996sed 's/^/| /' conftest.$ac_ext >&5
9997
Thomas Wouters477c8d52006-05-27 19:21:47 +00009998 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009999/* confdefs.h. */
10000_ACEOF
10001cat confdefs.h >>conftest.$ac_ext
10002cat >>conftest.$ac_ext <<_ACEOF
10003/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010004$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +000010005 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010006int
10007main ()
10008{
Thomas Wouters477c8d52006-05-27 19:21:47 +000010009static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010010test_array [0] = 0
10011
10012 ;
10013 return 0;
10014}
10015_ACEOF
10016rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010017if { (ac_try="$ac_compile"
10018case "(($ac_try" in
10019 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10020 *) ac_try_echo=$ac_try;;
10021esac
10022eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10023 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010024 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010025 grep -v '^ *+' conftest.er1 >conftest.err
10026 rm -f conftest.er1
10027 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10029 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010030 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
10031 { (case "(($ac_try" in
10032 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10033 *) ac_try_echo=$ac_try;;
10034esac
10035eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10036 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010037 ac_status=$?
10038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10039 (exit $ac_status); }; } &&
10040 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010041 { (case "(($ac_try" in
10042 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10043 *) ac_try_echo=$ac_try;;
10044esac
10045eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10046 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010047 ac_status=$?
10048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10049 (exit $ac_status); }; }; then
10050 ac_hi=-1 ac_mid=-1
10051 while :; do
10052 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010053/* confdefs.h. */
10054_ACEOF
10055cat confdefs.h >>conftest.$ac_ext
10056cat >>conftest.$ac_ext <<_ACEOF
10057/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010058$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +000010059 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010060int
10061main ()
10062{
Thomas Wouters477c8d52006-05-27 19:21:47 +000010063static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010064test_array [0] = 0
10065
10066 ;
10067 return 0;
10068}
10069_ACEOF
10070rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010071if { (ac_try="$ac_compile"
10072case "(($ac_try" in
10073 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10074 *) ac_try_echo=$ac_try;;
10075esac
10076eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10077 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010078 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010079 grep -v '^ *+' conftest.er1 >conftest.err
10080 rm -f conftest.er1
10081 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10083 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010084 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
10085 { (case "(($ac_try" in
10086 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10087 *) ac_try_echo=$ac_try;;
10088esac
10089eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10090 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010091 ac_status=$?
10092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10093 (exit $ac_status); }; } &&
10094 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010095 { (case "(($ac_try" in
10096 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10097 *) ac_try_echo=$ac_try;;
10098esac
10099eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10100 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010101 ac_status=$?
10102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10103 (exit $ac_status); }; }; then
10104 ac_lo=$ac_mid; break
10105else
10106 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010107sed 's/^/| /' conftest.$ac_ext >&5
10108
Thomas Wouters477c8d52006-05-27 19:21:47 +000010109 ac_hi=`expr '(' $ac_mid ')' - 1`
10110 if test $ac_mid -le $ac_hi; then
10111 ac_lo= ac_hi=
10112 break
10113 fi
10114 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010115fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000010116
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010117rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010118 done
10119else
10120 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010121sed 's/^/| /' conftest.$ac_ext >&5
10122
Thomas Wouters477c8d52006-05-27 19:21:47 +000010123 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010124fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000010125
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010126rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010127fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000010128
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010129rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010130# Binary search between lo and hi bounds.
10131while test "x$ac_lo" != "x$ac_hi"; do
10132 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10133 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010134/* confdefs.h. */
10135_ACEOF
10136cat confdefs.h >>conftest.$ac_ext
10137cat >>conftest.$ac_ext <<_ACEOF
10138/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010139$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +000010140 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010141int
10142main ()
10143{
Thomas Wouters477c8d52006-05-27 19:21:47 +000010144static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010145test_array [0] = 0
10146
10147 ;
10148 return 0;
10149}
10150_ACEOF
10151rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010152if { (ac_try="$ac_compile"
10153case "(($ac_try" in
10154 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10155 *) ac_try_echo=$ac_try;;
10156esac
10157eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10158 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010159 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010160 grep -v '^ *+' conftest.er1 >conftest.err
10161 rm -f conftest.er1
10162 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010163 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10164 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010165 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
10166 { (case "(($ac_try" in
10167 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10168 *) ac_try_echo=$ac_try;;
10169esac
10170eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10171 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010172 ac_status=$?
10173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10174 (exit $ac_status); }; } &&
10175 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010176 { (case "(($ac_try" in
10177 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10178 *) ac_try_echo=$ac_try;;
10179esac
10180eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10181 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010182 ac_status=$?
10183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10184 (exit $ac_status); }; }; then
10185 ac_hi=$ac_mid
10186else
10187 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010188sed 's/^/| /' conftest.$ac_ext >&5
10189
Thomas Wouters477c8d52006-05-27 19:21:47 +000010190 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010191fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000010192
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010193rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010194done
10195case $ac_lo in
10196?*) ac_cv_sizeof_double=$ac_lo;;
Thomas Wouters477c8d52006-05-27 19:21:47 +000010197'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +000010198See \`config.log' for more details." >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000010199echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +000010200See \`config.log' for more details." >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +000010201 { (exit 77); exit 77; }; } ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010202esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000010203else
Martin v. Löwis11437992002-04-12 09:54:03 +000010204 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010205/* confdefs.h. */
10206_ACEOF
10207cat confdefs.h >>conftest.$ac_ext
10208cat >>conftest.$ac_ext <<_ACEOF
10209/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010210$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +000010211 typedef double ac__type_sizeof_;
10212static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10213static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010214#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010215#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010216int
10217main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +000010218{
Martin v. Löwis11437992002-04-12 09:54:03 +000010219
10220 FILE *f = fopen ("conftest.val", "w");
10221 if (! f)
Thomas Wouters477c8d52006-05-27 19:21:47 +000010222 return 1;
10223 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010224 {
Thomas Wouters477c8d52006-05-27 19:21:47 +000010225 long int i = longval ();
10226 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10227 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000010228 fprintf (f, "%ld\n", i);
10229 }
10230 else
10231 {
Thomas Wouters477c8d52006-05-27 19:21:47 +000010232 unsigned long int i = ulongval ();
10233 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10234 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000010235 fprintf (f, "%lu\n", i);
10236 }
Thomas Wouters477c8d52006-05-27 19:21:47 +000010237 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010238
10239 ;
10240 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000010241}
Martin v. Löwis11437992002-04-12 09:54:03 +000010242_ACEOF
10243rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010244if { (ac_try="$ac_link"
10245case "(($ac_try" in
10246 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10247 *) ac_try_echo=$ac_try;;
10248esac
10249eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10250 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010251 ac_status=$?
10252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10253 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010254 { (case "(($ac_try" in
10255 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10256 *) ac_try_echo=$ac_try;;
10257esac
10258eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10259 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010260 ac_status=$?
10261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10262 (exit $ac_status); }; }; then
10263 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000010264else
Martin v. Löwis11437992002-04-12 09:54:03 +000010265 echo "$as_me: program exited with status $ac_status" >&5
10266echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010267sed 's/^/| /' conftest.$ac_ext >&5
10268
Martin v. Löwis11437992002-04-12 09:54:03 +000010269( exit $ac_status )
Thomas Wouters477c8d52006-05-27 19:21:47 +000010270{ { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +000010271See \`config.log' for more details." >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000010272echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +000010273See \`config.log' for more details." >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +000010274 { (exit 77); exit 77; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010275fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000010276rm -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 +000010277fi
10278rm -f conftest.val
10279else
Guido van Rossumef2255b2000-03-10 22:30:29 +000010280 ac_cv_sizeof_double=0
10281fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000010282fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000010283{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
10284echo "${ECHO_T}$ac_cv_sizeof_double" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010285cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000010286#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +000010287_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000010288
10289
Thomas Wouters477c8d52006-05-27 19:21:47 +000010290{ echo "$as_me:$LINENO: checking for fpos_t" >&5
10291echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010292if test "${ac_cv_type_fpos_t+set}" = set; then
10293 echo $ECHO_N "(cached) $ECHO_C" >&6
10294else
10295 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010296/* confdefs.h. */
10297_ACEOF
10298cat confdefs.h >>conftest.$ac_ext
10299cat >>conftest.$ac_ext <<_ACEOF
10300/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010301$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +000010302typedef fpos_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010303int
10304main ()
10305{
Thomas Wouters477c8d52006-05-27 19:21:47 +000010306if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010307 return 0;
Thomas Wouters477c8d52006-05-27 19:21:47 +000010308if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000010309 return 0;
10310 ;
10311 return 0;
10312}
10313_ACEOF
10314rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010315if { (ac_try="$ac_compile"
10316case "(($ac_try" in
10317 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10318 *) ac_try_echo=$ac_try;;
10319esac
10320eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10321 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010322 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010323 grep -v '^ *+' conftest.er1 >conftest.err
10324 rm -f conftest.er1
10325 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010326 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10327 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010328 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
10329 { (case "(($ac_try" in
10330 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10331 *) ac_try_echo=$ac_try;;
10332esac
10333eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10334 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010335 ac_status=$?
10336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10337 (exit $ac_status); }; } &&
10338 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010339 { (case "(($ac_try" in
10340 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10341 *) ac_try_echo=$ac_try;;
10342esac
10343eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10344 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010345 ac_status=$?
10346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10347 (exit $ac_status); }; }; then
10348 ac_cv_type_fpos_t=yes
10349else
10350 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010351sed 's/^/| /' conftest.$ac_ext >&5
10352
Thomas Wouters477c8d52006-05-27 19:21:47 +000010353 ac_cv_type_fpos_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010354fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000010355
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010356rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010357fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000010358{ echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
10359echo "${ECHO_T}$ac_cv_type_fpos_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010360
Thomas Wouters477c8d52006-05-27 19:21:47 +000010361{ echo "$as_me:$LINENO: checking size of fpos_t" >&5
10362echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010363if test "${ac_cv_sizeof_fpos_t+set}" = set; then
10364 echo $ECHO_N "(cached) $ECHO_C" >&6
10365else
10366 if test "$ac_cv_type_fpos_t" = yes; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000010367 # The cast to long int works around a bug in the HP C Compiler
Martin v. Löwis11437992002-04-12 09:54:03 +000010368 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10369 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10370 # This bug is HP SR number 8606223364.
10371 if test "$cross_compiling" = yes; then
10372 # Depending upon the size, compute the lo and hi bounds.
10373cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010374/* confdefs.h. */
10375_ACEOF
10376cat confdefs.h >>conftest.$ac_ext
10377cat >>conftest.$ac_ext <<_ACEOF
10378/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010379$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +000010380 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010381int
10382main ()
10383{
Thomas Wouters477c8d52006-05-27 19:21:47 +000010384static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010385test_array [0] = 0
10386
10387 ;
10388 return 0;
10389}
10390_ACEOF
10391rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010392if { (ac_try="$ac_compile"
10393case "(($ac_try" in
10394 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10395 *) ac_try_echo=$ac_try;;
10396esac
10397eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10398 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010399 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010400 grep -v '^ *+' conftest.er1 >conftest.err
10401 rm -f conftest.er1
10402 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10404 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010405 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
10406 { (case "(($ac_try" in
10407 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10408 *) ac_try_echo=$ac_try;;
10409esac
10410eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10411 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010412 ac_status=$?
10413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10414 (exit $ac_status); }; } &&
10415 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010416 { (case "(($ac_try" in
10417 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10418 *) ac_try_echo=$ac_try;;
10419esac
10420eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10421 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010422 ac_status=$?
10423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10424 (exit $ac_status); }; }; then
10425 ac_lo=0 ac_mid=0
10426 while :; do
10427 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010428/* confdefs.h. */
10429_ACEOF
10430cat confdefs.h >>conftest.$ac_ext
10431cat >>conftest.$ac_ext <<_ACEOF
10432/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010433$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +000010434 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010435int
10436main ()
10437{
Thomas Wouters477c8d52006-05-27 19:21:47 +000010438static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010439test_array [0] = 0
10440
10441 ;
10442 return 0;
10443}
10444_ACEOF
10445rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010446if { (ac_try="$ac_compile"
10447case "(($ac_try" in
10448 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10449 *) ac_try_echo=$ac_try;;
10450esac
10451eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10452 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010453 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010454 grep -v '^ *+' conftest.er1 >conftest.err
10455 rm -f conftest.er1
10456 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10458 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010459 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
10460 { (case "(($ac_try" in
10461 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10462 *) ac_try_echo=$ac_try;;
10463esac
10464eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10465 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010466 ac_status=$?
10467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10468 (exit $ac_status); }; } &&
10469 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010470 { (case "(($ac_try" in
10471 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10472 *) ac_try_echo=$ac_try;;
10473esac
10474eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10475 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010476 ac_status=$?
10477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10478 (exit $ac_status); }; }; then
10479 ac_hi=$ac_mid; break
10480else
10481 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010482sed 's/^/| /' conftest.$ac_ext >&5
10483
Thomas Wouters477c8d52006-05-27 19:21:47 +000010484 ac_lo=`expr $ac_mid + 1`
10485 if test $ac_lo -le $ac_mid; then
10486 ac_lo= ac_hi=
10487 break
10488 fi
10489 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010490fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000010491
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010492rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010493 done
10494else
10495 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010496sed 's/^/| /' conftest.$ac_ext >&5
10497
Thomas Wouters477c8d52006-05-27 19:21:47 +000010498 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010499/* confdefs.h. */
10500_ACEOF
10501cat confdefs.h >>conftest.$ac_ext
10502cat >>conftest.$ac_ext <<_ACEOF
10503/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010504$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +000010505 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010506int
10507main ()
10508{
Thomas Wouters477c8d52006-05-27 19:21:47 +000010509static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010510test_array [0] = 0
10511
10512 ;
10513 return 0;
10514}
10515_ACEOF
10516rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010517if { (ac_try="$ac_compile"
10518case "(($ac_try" in
10519 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10520 *) ac_try_echo=$ac_try;;
10521esac
10522eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10523 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010524 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010525 grep -v '^ *+' conftest.er1 >conftest.err
10526 rm -f conftest.er1
10527 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10529 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010530 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
10531 { (case "(($ac_try" in
10532 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10533 *) ac_try_echo=$ac_try;;
10534esac
10535eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10536 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010537 ac_status=$?
10538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10539 (exit $ac_status); }; } &&
10540 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010541 { (case "(($ac_try" in
10542 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10543 *) ac_try_echo=$ac_try;;
10544esac
10545eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10546 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010547 ac_status=$?
10548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10549 (exit $ac_status); }; }; then
10550 ac_hi=-1 ac_mid=-1
10551 while :; do
10552 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010553/* confdefs.h. */
10554_ACEOF
10555cat confdefs.h >>conftest.$ac_ext
10556cat >>conftest.$ac_ext <<_ACEOF
10557/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010558$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +000010559 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010560int
10561main ()
10562{
Thomas Wouters477c8d52006-05-27 19:21:47 +000010563static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010564test_array [0] = 0
10565
10566 ;
10567 return 0;
10568}
10569_ACEOF
10570rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010571if { (ac_try="$ac_compile"
10572case "(($ac_try" in
10573 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10574 *) ac_try_echo=$ac_try;;
10575esac
10576eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10577 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010578 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010579 grep -v '^ *+' conftest.er1 >conftest.err
10580 rm -f conftest.er1
10581 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10583 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010584 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
10585 { (case "(($ac_try" in
10586 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10587 *) ac_try_echo=$ac_try;;
10588esac
10589eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10590 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010591 ac_status=$?
10592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10593 (exit $ac_status); }; } &&
10594 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010595 { (case "(($ac_try" in
10596 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10597 *) ac_try_echo=$ac_try;;
10598esac
10599eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10600 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010601 ac_status=$?
10602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10603 (exit $ac_status); }; }; then
10604 ac_lo=$ac_mid; break
10605else
10606 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010607sed 's/^/| /' conftest.$ac_ext >&5
10608
Thomas Wouters477c8d52006-05-27 19:21:47 +000010609 ac_hi=`expr '(' $ac_mid ')' - 1`
10610 if test $ac_mid -le $ac_hi; then
10611 ac_lo= ac_hi=
10612 break
10613 fi
10614 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010615fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000010616
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010617rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010618 done
10619else
10620 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010621sed 's/^/| /' conftest.$ac_ext >&5
10622
Thomas Wouters477c8d52006-05-27 19:21:47 +000010623 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010624fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000010625
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010626rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010627fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000010628
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010629rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010630# Binary search between lo and hi bounds.
10631while test "x$ac_lo" != "x$ac_hi"; do
10632 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10633 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010634/* confdefs.h. */
10635_ACEOF
10636cat confdefs.h >>conftest.$ac_ext
10637cat >>conftest.$ac_ext <<_ACEOF
10638/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010639$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +000010640 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010641int
10642main ()
10643{
Thomas Wouters477c8d52006-05-27 19:21:47 +000010644static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010645test_array [0] = 0
10646
10647 ;
10648 return 0;
10649}
10650_ACEOF
10651rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010652if { (ac_try="$ac_compile"
10653case "(($ac_try" in
10654 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10655 *) ac_try_echo=$ac_try;;
10656esac
10657eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10658 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010659 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010660 grep -v '^ *+' conftest.er1 >conftest.err
10661 rm -f conftest.er1
10662 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010663 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10664 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010665 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
10666 { (case "(($ac_try" in
10667 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10668 *) ac_try_echo=$ac_try;;
10669esac
10670eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10671 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010672 ac_status=$?
10673 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10674 (exit $ac_status); }; } &&
10675 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010676 { (case "(($ac_try" in
10677 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10678 *) ac_try_echo=$ac_try;;
10679esac
10680eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10681 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010682 ac_status=$?
10683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10684 (exit $ac_status); }; }; then
10685 ac_hi=$ac_mid
10686else
10687 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010688sed 's/^/| /' conftest.$ac_ext >&5
10689
Thomas Wouters477c8d52006-05-27 19:21:47 +000010690 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010691fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000010692
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010693rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010694done
10695case $ac_lo in
10696?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Thomas Wouters477c8d52006-05-27 19:21:47 +000010697'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010698See \`config.log' for more details." >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000010699echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010700See \`config.log' for more details." >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +000010701 { (exit 77); exit 77; }; } ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010702esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010703else
Martin v. Löwis11437992002-04-12 09:54:03 +000010704 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010705/* confdefs.h. */
10706_ACEOF
10707cat confdefs.h >>conftest.$ac_ext
10708cat >>conftest.$ac_ext <<_ACEOF
10709/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010710$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +000010711 typedef fpos_t ac__type_sizeof_;
10712static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10713static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010714#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010715#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010716int
10717main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010718{
Martin v. Löwis11437992002-04-12 09:54:03 +000010719
10720 FILE *f = fopen ("conftest.val", "w");
10721 if (! f)
Thomas Wouters477c8d52006-05-27 19:21:47 +000010722 return 1;
10723 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010724 {
Thomas Wouters477c8d52006-05-27 19:21:47 +000010725 long int i = longval ();
10726 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10727 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000010728 fprintf (f, "%ld\n", i);
10729 }
10730 else
10731 {
Thomas Wouters477c8d52006-05-27 19:21:47 +000010732 unsigned long int i = ulongval ();
10733 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10734 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000010735 fprintf (f, "%lu\n", i);
10736 }
Thomas Wouters477c8d52006-05-27 19:21:47 +000010737 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010738
10739 ;
10740 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010741}
Martin v. Löwis11437992002-04-12 09:54:03 +000010742_ACEOF
10743rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010744if { (ac_try="$ac_link"
10745case "(($ac_try" in
10746 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10747 *) ac_try_echo=$ac_try;;
10748esac
10749eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10750 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010751 ac_status=$?
10752 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10753 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010754 { (case "(($ac_try" in
10755 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10756 *) ac_try_echo=$ac_try;;
10757esac
10758eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10759 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010760 ac_status=$?
10761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10762 (exit $ac_status); }; }; then
10763 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010764else
Martin v. Löwis11437992002-04-12 09:54:03 +000010765 echo "$as_me: program exited with status $ac_status" >&5
10766echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010767sed 's/^/| /' conftest.$ac_ext >&5
10768
Martin v. Löwis11437992002-04-12 09:54:03 +000010769( exit $ac_status )
Thomas Wouters477c8d52006-05-27 19:21:47 +000010770{ { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010771See \`config.log' for more details." >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000010772echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010773See \`config.log' for more details." >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +000010774 { (exit 77); exit 77; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010775fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000010776rm -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 +000010777fi
10778rm -f conftest.val
10779else
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010780 ac_cv_sizeof_fpos_t=0
10781fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010782fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000010783{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
10784echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010785cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010786#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010787_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010788
Michael W. Hudson54241132001-12-07 15:38:26 +000010789
Thomas Wouters477c8d52006-05-27 19:21:47 +000010790{ echo "$as_me:$LINENO: checking for size_t" >&5
10791echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010792if test "${ac_cv_type_size_t+set}" = set; then
10793 echo $ECHO_N "(cached) $ECHO_C" >&6
10794else
10795 cat >conftest.$ac_ext <<_ACEOF
10796/* confdefs.h. */
10797_ACEOF
10798cat confdefs.h >>conftest.$ac_ext
10799cat >>conftest.$ac_ext <<_ACEOF
10800/* end confdefs.h. */
10801$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +000010802typedef size_t ac__type_new_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010803int
10804main ()
10805{
Thomas Wouters477c8d52006-05-27 19:21:47 +000010806if ((ac__type_new_ *) 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010807 return 0;
Thomas Wouters477c8d52006-05-27 19:21:47 +000010808if (sizeof (ac__type_new_))
Martin v. Löwis18e16552006-02-15 17:27:45 +000010809 return 0;
10810 ;
10811 return 0;
10812}
10813_ACEOF
10814rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010815if { (ac_try="$ac_compile"
10816case "(($ac_try" in
10817 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10818 *) ac_try_echo=$ac_try;;
10819esac
10820eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10821 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010822 ac_status=$?
10823 grep -v '^ *+' conftest.er1 >conftest.err
10824 rm -f conftest.er1
10825 cat conftest.err >&5
10826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10827 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010828 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
10829 { (case "(($ac_try" in
10830 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10831 *) ac_try_echo=$ac_try;;
10832esac
10833eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10834 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010835 ac_status=$?
10836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10837 (exit $ac_status); }; } &&
10838 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010839 { (case "(($ac_try" in
10840 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10841 *) ac_try_echo=$ac_try;;
10842esac
10843eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10844 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010845 ac_status=$?
10846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10847 (exit $ac_status); }; }; then
10848 ac_cv_type_size_t=yes
10849else
10850 echo "$as_me: failed program was:" >&5
10851sed 's/^/| /' conftest.$ac_ext >&5
10852
Thomas Wouters477c8d52006-05-27 19:21:47 +000010853 ac_cv_type_size_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +000010854fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000010855
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010856rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010857fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000010858{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
10859echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010860
Thomas Wouters477c8d52006-05-27 19:21:47 +000010861{ echo "$as_me:$LINENO: checking size of size_t" >&5
10862echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010863if test "${ac_cv_sizeof_size_t+set}" = set; then
10864 echo $ECHO_N "(cached) $ECHO_C" >&6
10865else
10866 if test "$ac_cv_type_size_t" = yes; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000010867 # The cast to long int works around a bug in the HP C Compiler
Martin v. Löwis18e16552006-02-15 17:27:45 +000010868 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10869 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10870 # This bug is HP SR number 8606223364.
10871 if test "$cross_compiling" = yes; then
10872 # Depending upon the size, compute the lo and hi bounds.
10873cat >conftest.$ac_ext <<_ACEOF
10874/* confdefs.h. */
10875_ACEOF
10876cat confdefs.h >>conftest.$ac_ext
10877cat >>conftest.$ac_ext <<_ACEOF
10878/* end confdefs.h. */
10879$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +000010880 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010881int
10882main ()
10883{
Thomas Wouters477c8d52006-05-27 19:21:47 +000010884static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010885test_array [0] = 0
10886
10887 ;
10888 return 0;
10889}
10890_ACEOF
10891rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010892if { (ac_try="$ac_compile"
10893case "(($ac_try" in
10894 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10895 *) ac_try_echo=$ac_try;;
10896esac
10897eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10898 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010899 ac_status=$?
10900 grep -v '^ *+' conftest.er1 >conftest.err
10901 rm -f conftest.er1
10902 cat conftest.err >&5
10903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10904 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010905 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
10906 { (case "(($ac_try" in
10907 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10908 *) ac_try_echo=$ac_try;;
10909esac
10910eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10911 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010912 ac_status=$?
10913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10914 (exit $ac_status); }; } &&
10915 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010916 { (case "(($ac_try" in
10917 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10918 *) ac_try_echo=$ac_try;;
10919esac
10920eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10921 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010922 ac_status=$?
10923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10924 (exit $ac_status); }; }; then
10925 ac_lo=0 ac_mid=0
10926 while :; do
10927 cat >conftest.$ac_ext <<_ACEOF
10928/* confdefs.h. */
10929_ACEOF
10930cat confdefs.h >>conftest.$ac_ext
10931cat >>conftest.$ac_ext <<_ACEOF
10932/* end confdefs.h. */
10933$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +000010934 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010935int
10936main ()
10937{
Thomas Wouters477c8d52006-05-27 19:21:47 +000010938static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010939test_array [0] = 0
10940
10941 ;
10942 return 0;
10943}
10944_ACEOF
10945rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010946if { (ac_try="$ac_compile"
10947case "(($ac_try" in
10948 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10949 *) ac_try_echo=$ac_try;;
10950esac
10951eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10952 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010953 ac_status=$?
10954 grep -v '^ *+' conftest.er1 >conftest.err
10955 rm -f conftest.er1
10956 cat conftest.err >&5
10957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10958 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010959 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
10960 { (case "(($ac_try" in
10961 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10962 *) ac_try_echo=$ac_try;;
10963esac
10964eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10965 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010966 ac_status=$?
10967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10968 (exit $ac_status); }; } &&
10969 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010970 { (case "(($ac_try" in
10971 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10972 *) ac_try_echo=$ac_try;;
10973esac
10974eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10975 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010976 ac_status=$?
10977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10978 (exit $ac_status); }; }; then
10979 ac_hi=$ac_mid; break
10980else
10981 echo "$as_me: failed program was:" >&5
10982sed 's/^/| /' conftest.$ac_ext >&5
10983
Thomas Wouters477c8d52006-05-27 19:21:47 +000010984 ac_lo=`expr $ac_mid + 1`
10985 if test $ac_lo -le $ac_mid; then
10986 ac_lo= ac_hi=
10987 break
10988 fi
10989 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010990fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000010991
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010992rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010993 done
10994else
10995 echo "$as_me: failed program was:" >&5
10996sed 's/^/| /' conftest.$ac_ext >&5
10997
Thomas Wouters477c8d52006-05-27 19:21:47 +000010998 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +000010999/* confdefs.h. */
11000_ACEOF
11001cat confdefs.h >>conftest.$ac_ext
11002cat >>conftest.$ac_ext <<_ACEOF
11003/* end confdefs.h. */
11004$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +000011005 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000011006int
11007main ()
11008{
Thomas Wouters477c8d52006-05-27 19:21:47 +000011009static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000011010test_array [0] = 0
11011
11012 ;
11013 return 0;
11014}
11015_ACEOF
11016rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011017if { (ac_try="$ac_compile"
11018case "(($ac_try" in
11019 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11020 *) ac_try_echo=$ac_try;;
11021esac
11022eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11023 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000011024 ac_status=$?
11025 grep -v '^ *+' conftest.er1 >conftest.err
11026 rm -f conftest.er1
11027 cat conftest.err >&5
11028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11029 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011030 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
11031 { (case "(($ac_try" in
11032 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11033 *) ac_try_echo=$ac_try;;
11034esac
11035eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11036 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000011037 ac_status=$?
11038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11039 (exit $ac_status); }; } &&
11040 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011041 { (case "(($ac_try" in
11042 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11043 *) ac_try_echo=$ac_try;;
11044esac
11045eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11046 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000011047 ac_status=$?
11048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11049 (exit $ac_status); }; }; then
11050 ac_hi=-1 ac_mid=-1
11051 while :; do
11052 cat >conftest.$ac_ext <<_ACEOF
11053/* confdefs.h. */
11054_ACEOF
11055cat confdefs.h >>conftest.$ac_ext
11056cat >>conftest.$ac_ext <<_ACEOF
11057/* end confdefs.h. */
11058$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +000011059 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000011060int
11061main ()
11062{
Thomas Wouters477c8d52006-05-27 19:21:47 +000011063static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000011064test_array [0] = 0
11065
11066 ;
11067 return 0;
11068}
11069_ACEOF
11070rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011071if { (ac_try="$ac_compile"
11072case "(($ac_try" in
11073 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11074 *) ac_try_echo=$ac_try;;
11075esac
11076eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11077 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000011078 ac_status=$?
11079 grep -v '^ *+' conftest.er1 >conftest.err
11080 rm -f conftest.er1
11081 cat conftest.err >&5
11082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11083 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011084 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
11085 { (case "(($ac_try" in
11086 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11087 *) ac_try_echo=$ac_try;;
11088esac
11089eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11090 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000011091 ac_status=$?
11092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11093 (exit $ac_status); }; } &&
11094 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011095 { (case "(($ac_try" in
11096 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11097 *) ac_try_echo=$ac_try;;
11098esac
11099eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11100 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000011101 ac_status=$?
11102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11103 (exit $ac_status); }; }; then
11104 ac_lo=$ac_mid; break
11105else
11106 echo "$as_me: failed program was:" >&5
11107sed 's/^/| /' conftest.$ac_ext >&5
11108
Thomas Wouters477c8d52006-05-27 19:21:47 +000011109 ac_hi=`expr '(' $ac_mid ')' - 1`
11110 if test $ac_mid -le $ac_hi; then
11111 ac_lo= ac_hi=
11112 break
11113 fi
11114 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +000011115fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000011116
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011117rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000011118 done
11119else
11120 echo "$as_me: failed program was:" >&5
11121sed 's/^/| /' conftest.$ac_ext >&5
11122
Thomas Wouters477c8d52006-05-27 19:21:47 +000011123 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +000011124fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000011125
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011126rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000011127fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000011128
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011129rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000011130# Binary search between lo and hi bounds.
11131while test "x$ac_lo" != "x$ac_hi"; do
11132 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11133 cat >conftest.$ac_ext <<_ACEOF
11134/* confdefs.h. */
11135_ACEOF
11136cat confdefs.h >>conftest.$ac_ext
11137cat >>conftest.$ac_ext <<_ACEOF
11138/* end confdefs.h. */
11139$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +000011140 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000011141int
11142main ()
11143{
Thomas Wouters477c8d52006-05-27 19:21:47 +000011144static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000011145test_array [0] = 0
11146
11147 ;
11148 return 0;
11149}
11150_ACEOF
11151rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011152if { (ac_try="$ac_compile"
11153case "(($ac_try" in
11154 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11155 *) ac_try_echo=$ac_try;;
11156esac
11157eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11158 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000011159 ac_status=$?
11160 grep -v '^ *+' conftest.er1 >conftest.err
11161 rm -f conftest.er1
11162 cat conftest.err >&5
11163 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11164 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011165 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
11166 { (case "(($ac_try" in
11167 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11168 *) ac_try_echo=$ac_try;;
11169esac
11170eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11171 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000011172 ac_status=$?
11173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11174 (exit $ac_status); }; } &&
11175 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011176 { (case "(($ac_try" in
11177 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11178 *) ac_try_echo=$ac_try;;
11179esac
11180eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11181 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000011182 ac_status=$?
11183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11184 (exit $ac_status); }; }; then
11185 ac_hi=$ac_mid
11186else
11187 echo "$as_me: failed program was:" >&5
11188sed 's/^/| /' conftest.$ac_ext >&5
11189
Thomas Wouters477c8d52006-05-27 19:21:47 +000011190 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000011191fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000011192
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011193rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000011194done
11195case $ac_lo in
11196?*) ac_cv_sizeof_size_t=$ac_lo;;
Thomas Wouters477c8d52006-05-27 19:21:47 +000011197'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000011198See \`config.log' for more details." >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000011199echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000011200See \`config.log' for more details." >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +000011201 { (exit 77); exit 77; }; } ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000011202esac
11203else
Martin v. Löwis18e16552006-02-15 17:27:45 +000011204 cat >conftest.$ac_ext <<_ACEOF
11205/* confdefs.h. */
11206_ACEOF
11207cat confdefs.h >>conftest.$ac_ext
11208cat >>conftest.$ac_ext <<_ACEOF
11209/* end confdefs.h. */
11210$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +000011211 typedef size_t ac__type_sizeof_;
11212static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11213static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000011214#include <stdio.h>
11215#include <stdlib.h>
11216int
11217main ()
11218{
11219
11220 FILE *f = fopen ("conftest.val", "w");
11221 if (! f)
Thomas Wouters477c8d52006-05-27 19:21:47 +000011222 return 1;
11223 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000011224 {
Thomas Wouters477c8d52006-05-27 19:21:47 +000011225 long int i = longval ();
11226 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11227 return 1;
Martin v. Löwis18e16552006-02-15 17:27:45 +000011228 fprintf (f, "%ld\n", i);
11229 }
11230 else
11231 {
Thomas Wouters477c8d52006-05-27 19:21:47 +000011232 unsigned long int i = ulongval ();
11233 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11234 return 1;
Martin v. Löwis18e16552006-02-15 17:27:45 +000011235 fprintf (f, "%lu\n", i);
11236 }
Thomas Wouters477c8d52006-05-27 19:21:47 +000011237 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000011238
11239 ;
11240 return 0;
11241}
11242_ACEOF
11243rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011244if { (ac_try="$ac_link"
11245case "(($ac_try" in
11246 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11247 *) ac_try_echo=$ac_try;;
11248esac
11249eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11250 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000011251 ac_status=$?
11252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11253 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011254 { (case "(($ac_try" in
11255 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11256 *) ac_try_echo=$ac_try;;
11257esac
11258eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11259 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000011260 ac_status=$?
11261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11262 (exit $ac_status); }; }; then
11263 ac_cv_sizeof_size_t=`cat conftest.val`
11264else
11265 echo "$as_me: program exited with status $ac_status" >&5
11266echo "$as_me: failed program was:" >&5
11267sed 's/^/| /' conftest.$ac_ext >&5
11268
11269( exit $ac_status )
Thomas Wouters477c8d52006-05-27 19:21:47 +000011270{ { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000011271See \`config.log' for more details." >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000011272echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000011273See \`config.log' for more details." >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +000011274 { (exit 77); exit 77; }; }
Martin v. Löwis18e16552006-02-15 17:27:45 +000011275fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000011276rm -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 +000011277fi
11278rm -f conftest.val
11279else
11280 ac_cv_sizeof_size_t=0
11281fi
11282fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000011283{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
11284echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +000011285cat >>confdefs.h <<_ACEOF
11286#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
11287_ACEOF
11288
11289
Michael W. Hudson54241132001-12-07 15:38:26 +000011290
Thomas Wouters477c8d52006-05-27 19:21:47 +000011291{ echo "$as_me:$LINENO: checking for long long support" >&5
11292echo $ECHO_N "checking for long long support... $ECHO_C" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011293have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011294cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011295/* confdefs.h. */
11296_ACEOF
11297cat confdefs.h >>conftest.$ac_ext
11298cat >>conftest.$ac_ext <<_ACEOF
11299/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011300
Martin v. Löwis11437992002-04-12 09:54:03 +000011301int
11302main ()
11303{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011304long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011305 ;
11306 return 0;
11307}
11308_ACEOF
11309rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011310if { (ac_try="$ac_compile"
11311case "(($ac_try" in
11312 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11313 *) ac_try_echo=$ac_try;;
11314esac
11315eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11316 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011317 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011318 grep -v '^ *+' conftest.er1 >conftest.err
11319 rm -f conftest.er1
11320 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11322 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011323 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
11324 { (case "(($ac_try" in
11325 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11326 *) ac_try_echo=$ac_try;;
11327esac
11328eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11329 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011330 ac_status=$?
11331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11332 (exit $ac_status); }; } &&
11333 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011334 { (case "(($ac_try" in
11335 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11336 *) ac_try_echo=$ac_try;;
11337esac
11338eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11339 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011340 ac_status=$?
11341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11342 (exit $ac_status); }; }; then
11343
11344
11345cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011346#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011347_ACEOF
11348
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011349 have_long_long=yes
11350
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011351else
Martin v. Löwis11437992002-04-12 09:54:03 +000011352 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011353sed 's/^/| /' conftest.$ac_ext >&5
11354
Thomas Wouters477c8d52006-05-27 19:21:47 +000011355
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011356fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000011357
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011358rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000011359{ echo "$as_me:$LINENO: result: $have_long_long" >&5
11360echo "${ECHO_T}$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000011361if test "$have_long_long" = yes ; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000011362{ echo "$as_me:$LINENO: checking for long long" >&5
11363echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011364if test "${ac_cv_type_long_long+set}" = set; then
11365 echo $ECHO_N "(cached) $ECHO_C" >&6
11366else
11367 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011368/* confdefs.h. */
11369_ACEOF
11370cat confdefs.h >>conftest.$ac_ext
11371cat >>conftest.$ac_ext <<_ACEOF
11372/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011373$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +000011374typedef long long ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011375int
11376main ()
11377{
Thomas Wouters477c8d52006-05-27 19:21:47 +000011378if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011379 return 0;
Thomas Wouters477c8d52006-05-27 19:21:47 +000011380if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000011381 return 0;
11382 ;
11383 return 0;
11384}
11385_ACEOF
11386rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011387if { (ac_try="$ac_compile"
11388case "(($ac_try" in
11389 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11390 *) ac_try_echo=$ac_try;;
11391esac
11392eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11393 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011394 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011395 grep -v '^ *+' conftest.er1 >conftest.err
11396 rm -f conftest.er1
11397 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11399 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011400 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
11401 { (case "(($ac_try" in
11402 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11403 *) ac_try_echo=$ac_try;;
11404esac
11405eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11406 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011407 ac_status=$?
11408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11409 (exit $ac_status); }; } &&
11410 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011411 { (case "(($ac_try" in
11412 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11413 *) ac_try_echo=$ac_try;;
11414esac
11415eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11416 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011417 ac_status=$?
11418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11419 (exit $ac_status); }; }; then
11420 ac_cv_type_long_long=yes
11421else
11422 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011423sed 's/^/| /' conftest.$ac_ext >&5
11424
Thomas Wouters477c8d52006-05-27 19:21:47 +000011425 ac_cv_type_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011426fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000011427
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011428rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011429fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000011430{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
11431echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011432
Thomas Wouters477c8d52006-05-27 19:21:47 +000011433{ echo "$as_me:$LINENO: checking size of long long" >&5
11434echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011435if test "${ac_cv_sizeof_long_long+set}" = set; then
11436 echo $ECHO_N "(cached) $ECHO_C" >&6
11437else
11438 if test "$ac_cv_type_long_long" = yes; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000011439 # The cast to long int works around a bug in the HP C Compiler
Martin v. Löwis11437992002-04-12 09:54:03 +000011440 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11441 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11442 # This bug is HP SR number 8606223364.
11443 if test "$cross_compiling" = yes; then
11444 # Depending upon the size, compute the lo and hi bounds.
11445cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011446/* confdefs.h. */
11447_ACEOF
11448cat confdefs.h >>conftest.$ac_ext
11449cat >>conftest.$ac_ext <<_ACEOF
11450/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011451$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +000011452 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011453int
11454main ()
11455{
Thomas Wouters477c8d52006-05-27 19:21:47 +000011456static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011457test_array [0] = 0
11458
11459 ;
11460 return 0;
11461}
11462_ACEOF
11463rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011464if { (ac_try="$ac_compile"
11465case "(($ac_try" in
11466 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11467 *) ac_try_echo=$ac_try;;
11468esac
11469eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11470 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011471 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011472 grep -v '^ *+' conftest.er1 >conftest.err
11473 rm -f conftest.er1
11474 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11476 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011477 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
11478 { (case "(($ac_try" in
11479 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11480 *) ac_try_echo=$ac_try;;
11481esac
11482eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11483 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011484 ac_status=$?
11485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11486 (exit $ac_status); }; } &&
11487 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011488 { (case "(($ac_try" in
11489 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11490 *) ac_try_echo=$ac_try;;
11491esac
11492eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11493 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011494 ac_status=$?
11495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11496 (exit $ac_status); }; }; then
11497 ac_lo=0 ac_mid=0
11498 while :; do
11499 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011500/* confdefs.h. */
11501_ACEOF
11502cat confdefs.h >>conftest.$ac_ext
11503cat >>conftest.$ac_ext <<_ACEOF
11504/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011505$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +000011506 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011507int
11508main ()
11509{
Thomas Wouters477c8d52006-05-27 19:21:47 +000011510static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011511test_array [0] = 0
11512
11513 ;
11514 return 0;
11515}
11516_ACEOF
11517rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011518if { (ac_try="$ac_compile"
11519case "(($ac_try" in
11520 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11521 *) ac_try_echo=$ac_try;;
11522esac
11523eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11524 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011525 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011526 grep -v '^ *+' conftest.er1 >conftest.err
11527 rm -f conftest.er1
11528 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11530 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011531 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
11532 { (case "(($ac_try" in
11533 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11534 *) ac_try_echo=$ac_try;;
11535esac
11536eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11537 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011538 ac_status=$?
11539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11540 (exit $ac_status); }; } &&
11541 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011542 { (case "(($ac_try" in
11543 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11544 *) ac_try_echo=$ac_try;;
11545esac
11546eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11547 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011548 ac_status=$?
11549 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11550 (exit $ac_status); }; }; then
11551 ac_hi=$ac_mid; break
11552else
11553 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011554sed 's/^/| /' conftest.$ac_ext >&5
11555
Thomas Wouters477c8d52006-05-27 19:21:47 +000011556 ac_lo=`expr $ac_mid + 1`
11557 if test $ac_lo -le $ac_mid; then
11558 ac_lo= ac_hi=
11559 break
11560 fi
11561 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011562fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000011563
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011564rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011565 done
11566else
11567 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011568sed 's/^/| /' conftest.$ac_ext >&5
11569
Thomas Wouters477c8d52006-05-27 19:21:47 +000011570 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011571/* confdefs.h. */
11572_ACEOF
11573cat confdefs.h >>conftest.$ac_ext
11574cat >>conftest.$ac_ext <<_ACEOF
11575/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011576$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +000011577 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011578int
11579main ()
11580{
Thomas Wouters477c8d52006-05-27 19:21:47 +000011581static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011582test_array [0] = 0
11583
11584 ;
11585 return 0;
11586}
11587_ACEOF
11588rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011589if { (ac_try="$ac_compile"
11590case "(($ac_try" in
11591 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11592 *) ac_try_echo=$ac_try;;
11593esac
11594eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11595 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011596 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011597 grep -v '^ *+' conftest.er1 >conftest.err
11598 rm -f conftest.er1
11599 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011600 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11601 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011602 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
11603 { (case "(($ac_try" in
11604 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11605 *) ac_try_echo=$ac_try;;
11606esac
11607eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11608 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011609 ac_status=$?
11610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11611 (exit $ac_status); }; } &&
11612 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011613 { (case "(($ac_try" in
11614 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11615 *) ac_try_echo=$ac_try;;
11616esac
11617eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11618 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011619 ac_status=$?
11620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11621 (exit $ac_status); }; }; then
11622 ac_hi=-1 ac_mid=-1
11623 while :; do
11624 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011625/* confdefs.h. */
11626_ACEOF
11627cat confdefs.h >>conftest.$ac_ext
11628cat >>conftest.$ac_ext <<_ACEOF
11629/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011630$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +000011631 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011632int
11633main ()
11634{
Thomas Wouters477c8d52006-05-27 19:21:47 +000011635static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011636test_array [0] = 0
11637
11638 ;
11639 return 0;
11640}
11641_ACEOF
11642rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011643if { (ac_try="$ac_compile"
11644case "(($ac_try" in
11645 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11646 *) ac_try_echo=$ac_try;;
11647esac
11648eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11649 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011650 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011651 grep -v '^ *+' conftest.er1 >conftest.err
11652 rm -f conftest.er1
11653 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11655 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011656 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
11657 { (case "(($ac_try" in
11658 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11659 *) ac_try_echo=$ac_try;;
11660esac
11661eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11662 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011663 ac_status=$?
11664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11665 (exit $ac_status); }; } &&
11666 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011667 { (case "(($ac_try" in
11668 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11669 *) ac_try_echo=$ac_try;;
11670esac
11671eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11672 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011673 ac_status=$?
11674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11675 (exit $ac_status); }; }; then
11676 ac_lo=$ac_mid; break
11677else
11678 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011679sed 's/^/| /' conftest.$ac_ext >&5
11680
Thomas Wouters477c8d52006-05-27 19:21:47 +000011681 ac_hi=`expr '(' $ac_mid ')' - 1`
11682 if test $ac_mid -le $ac_hi; then
11683 ac_lo= ac_hi=
11684 break
11685 fi
11686 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000011687fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000011688
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011689rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011690 done
11691else
11692 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011693sed 's/^/| /' conftest.$ac_ext >&5
11694
Thomas Wouters477c8d52006-05-27 19:21:47 +000011695 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000011696fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000011697
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011698rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011699fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000011700
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011701rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011702# Binary search between lo and hi bounds.
11703while test "x$ac_lo" != "x$ac_hi"; do
11704 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11705 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011706/* confdefs.h. */
11707_ACEOF
11708cat confdefs.h >>conftest.$ac_ext
11709cat >>conftest.$ac_ext <<_ACEOF
11710/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011711$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +000011712 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011713int
11714main ()
11715{
Thomas Wouters477c8d52006-05-27 19:21:47 +000011716static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011717test_array [0] = 0
11718
11719 ;
11720 return 0;
11721}
11722_ACEOF
11723rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011724if { (ac_try="$ac_compile"
11725case "(($ac_try" in
11726 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11727 *) ac_try_echo=$ac_try;;
11728esac
11729eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11730 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011731 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011732 grep -v '^ *+' conftest.er1 >conftest.err
11733 rm -f conftest.er1
11734 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11736 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011737 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
11738 { (case "(($ac_try" in
11739 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11740 *) ac_try_echo=$ac_try;;
11741esac
11742eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11743 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011744 ac_status=$?
11745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11746 (exit $ac_status); }; } &&
11747 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011748 { (case "(($ac_try" in
11749 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11750 *) ac_try_echo=$ac_try;;
11751esac
11752eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11753 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011754 ac_status=$?
11755 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11756 (exit $ac_status); }; }; then
11757 ac_hi=$ac_mid
11758else
11759 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011760sed 's/^/| /' conftest.$ac_ext >&5
11761
Thomas Wouters477c8d52006-05-27 19:21:47 +000011762 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011763fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000011764
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011765rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011766done
11767case $ac_lo in
11768?*) ac_cv_sizeof_long_long=$ac_lo;;
Thomas Wouters477c8d52006-05-27 19:21:47 +000011769'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011770See \`config.log' for more details." >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000011771echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011772See \`config.log' for more details." >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +000011773 { (exit 77); exit 77; }; } ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011774esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011775else
Martin v. Löwis11437992002-04-12 09:54:03 +000011776 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011777/* confdefs.h. */
11778_ACEOF
11779cat confdefs.h >>conftest.$ac_ext
11780cat >>conftest.$ac_ext <<_ACEOF
11781/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011782$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +000011783 typedef long long ac__type_sizeof_;
11784static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11785static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011786#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011787#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011788int
11789main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011790{
Martin v. Löwis11437992002-04-12 09:54:03 +000011791
11792 FILE *f = fopen ("conftest.val", "w");
11793 if (! f)
Thomas Wouters477c8d52006-05-27 19:21:47 +000011794 return 1;
11795 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011796 {
Thomas Wouters477c8d52006-05-27 19:21:47 +000011797 long int i = longval ();
11798 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11799 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000011800 fprintf (f, "%ld\n", i);
11801 }
11802 else
11803 {
Thomas Wouters477c8d52006-05-27 19:21:47 +000011804 unsigned long int i = ulongval ();
11805 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11806 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000011807 fprintf (f, "%lu\n", i);
11808 }
Thomas Wouters477c8d52006-05-27 19:21:47 +000011809 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011810
11811 ;
11812 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011813}
Martin v. Löwis11437992002-04-12 09:54:03 +000011814_ACEOF
11815rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011816if { (ac_try="$ac_link"
11817case "(($ac_try" in
11818 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11819 *) ac_try_echo=$ac_try;;
11820esac
11821eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11822 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011823 ac_status=$?
11824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11825 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011826 { (case "(($ac_try" in
11827 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11828 *) ac_try_echo=$ac_try;;
11829esac
11830eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11831 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011832 ac_status=$?
11833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11834 (exit $ac_status); }; }; then
11835 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011836else
Martin v. Löwis11437992002-04-12 09:54:03 +000011837 echo "$as_me: program exited with status $ac_status" >&5
11838echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011839sed 's/^/| /' conftest.$ac_ext >&5
11840
Martin v. Löwis11437992002-04-12 09:54:03 +000011841( exit $ac_status )
Thomas Wouters477c8d52006-05-27 19:21:47 +000011842{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011843See \`config.log' for more details." >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000011844echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011845See \`config.log' for more details." >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +000011846 { (exit 77); exit 77; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011847fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000011848rm -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 +000011849fi
11850rm -f conftest.val
11851else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011852 ac_cv_sizeof_long_long=0
11853fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011854fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000011855{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
11856echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011857cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011858#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000011859_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011860
Michael W. Hudson54241132001-12-07 15:38:26 +000011861
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011862fi
11863
Thomas Wouters477c8d52006-05-27 19:21:47 +000011864{ echo "$as_me:$LINENO: checking for uintptr_t support" >&5
11865echo $ECHO_N "checking for uintptr_t support... $ECHO_C" >&6; }
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011866have_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011867cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011868/* confdefs.h. */
11869_ACEOF
11870cat confdefs.h >>conftest.$ac_ext
11871cat >>conftest.$ac_ext <<_ACEOF
11872/* end confdefs.h. */
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011873
Martin v. Löwis11437992002-04-12 09:54:03 +000011874int
11875main ()
11876{
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011877uintptr_t x; x = (uintptr_t)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011878 ;
11879 return 0;
11880}
11881_ACEOF
11882rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011883if { (ac_try="$ac_compile"
11884case "(($ac_try" in
11885 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11886 *) ac_try_echo=$ac_try;;
11887esac
11888eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11889 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011890 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011891 grep -v '^ *+' conftest.er1 >conftest.err
11892 rm -f conftest.er1
11893 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11895 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011896 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
11897 { (case "(($ac_try" in
11898 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11899 *) ac_try_echo=$ac_try;;
11900esac
11901eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11902 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011903 ac_status=$?
11904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11905 (exit $ac_status); }; } &&
11906 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011907 { (case "(($ac_try" in
11908 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11909 *) ac_try_echo=$ac_try;;
11910esac
11911eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11912 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011913 ac_status=$?
11914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11915 (exit $ac_status); }; }; then
11916
11917
11918cat >>confdefs.h <<\_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011919#define HAVE_UINTPTR_T 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011920_ACEOF
11921
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011922 have_uintptr_t=yes
11923
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011924else
Martin v. Löwis11437992002-04-12 09:54:03 +000011925 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011926sed 's/^/| /' conftest.$ac_ext >&5
11927
Thomas Wouters477c8d52006-05-27 19:21:47 +000011928
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011929fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000011930
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011931rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000011932{ echo "$as_me:$LINENO: result: $have_uintptr_t" >&5
11933echo "${ECHO_T}$have_uintptr_t" >&6; }
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011934if test "$have_uintptr_t" = yes ; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000011935{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
11936echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011937if test "${ac_cv_type_uintptr_t+set}" = set; then
11938 echo $ECHO_N "(cached) $ECHO_C" >&6
11939else
11940 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011941/* confdefs.h. */
11942_ACEOF
11943cat confdefs.h >>conftest.$ac_ext
11944cat >>conftest.$ac_ext <<_ACEOF
11945/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011946$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +000011947typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011948int
11949main ()
11950{
Thomas Wouters477c8d52006-05-27 19:21:47 +000011951if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011952 return 0;
Thomas Wouters477c8d52006-05-27 19:21:47 +000011953if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000011954 return 0;
11955 ;
11956 return 0;
11957}
11958_ACEOF
11959rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011960if { (ac_try="$ac_compile"
11961case "(($ac_try" in
11962 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11963 *) ac_try_echo=$ac_try;;
11964esac
11965eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11966 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011967 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011968 grep -v '^ *+' conftest.er1 >conftest.err
11969 rm -f conftest.er1
11970 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011971 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11972 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011973 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
11974 { (case "(($ac_try" in
11975 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11976 *) ac_try_echo=$ac_try;;
11977esac
11978eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11979 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011980 ac_status=$?
11981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11982 (exit $ac_status); }; } &&
11983 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011984 { (case "(($ac_try" in
11985 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11986 *) ac_try_echo=$ac_try;;
11987esac
11988eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11989 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011990 ac_status=$?
11991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11992 (exit $ac_status); }; }; then
11993 ac_cv_type_uintptr_t=yes
11994else
11995 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011996sed 's/^/| /' conftest.$ac_ext >&5
11997
Thomas Wouters477c8d52006-05-27 19:21:47 +000011998 ac_cv_type_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011999fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000012000
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012001rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012002fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000012003{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12004echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012005
Thomas Wouters477c8d52006-05-27 19:21:47 +000012006{ echo "$as_me:$LINENO: checking size of uintptr_t" >&5
12007echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012008if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
12009 echo $ECHO_N "(cached) $ECHO_C" >&6
12010else
12011 if test "$ac_cv_type_uintptr_t" = yes; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000012012 # The cast to long int works around a bug in the HP C Compiler
Martin v. Löwis11437992002-04-12 09:54:03 +000012013 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12014 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12015 # This bug is HP SR number 8606223364.
12016 if test "$cross_compiling" = yes; then
12017 # Depending upon the size, compute the lo and hi bounds.
12018cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012019/* confdefs.h. */
12020_ACEOF
12021cat confdefs.h >>conftest.$ac_ext
12022cat >>conftest.$ac_ext <<_ACEOF
12023/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012024$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +000012025 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012026int
12027main ()
12028{
Thomas Wouters477c8d52006-05-27 19:21:47 +000012029static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012030test_array [0] = 0
12031
12032 ;
12033 return 0;
12034}
12035_ACEOF
12036rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000012037if { (ac_try="$ac_compile"
12038case "(($ac_try" in
12039 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12040 *) ac_try_echo=$ac_try;;
12041esac
12042eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12043 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012044 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012045 grep -v '^ *+' conftest.er1 >conftest.err
12046 rm -f conftest.er1
12047 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12049 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000012050 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
12051 { (case "(($ac_try" in
12052 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12053 *) ac_try_echo=$ac_try;;
12054esac
12055eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12056 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012057 ac_status=$?
12058 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12059 (exit $ac_status); }; } &&
12060 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000012061 { (case "(($ac_try" in
12062 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12063 *) ac_try_echo=$ac_try;;
12064esac
12065eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12066 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012067 ac_status=$?
12068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12069 (exit $ac_status); }; }; then
12070 ac_lo=0 ac_mid=0
12071 while :; do
12072 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012073/* confdefs.h. */
12074_ACEOF
12075cat confdefs.h >>conftest.$ac_ext
12076cat >>conftest.$ac_ext <<_ACEOF
12077/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012078$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +000012079 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012080int
12081main ()
12082{
Thomas Wouters477c8d52006-05-27 19:21:47 +000012083static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012084test_array [0] = 0
12085
12086 ;
12087 return 0;
12088}
12089_ACEOF
12090rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000012091if { (ac_try="$ac_compile"
12092case "(($ac_try" in
12093 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12094 *) ac_try_echo=$ac_try;;
12095esac
12096eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12097 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012098 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012099 grep -v '^ *+' conftest.er1 >conftest.err
12100 rm -f conftest.er1
12101 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12103 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000012104 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
12105 { (case "(($ac_try" in
12106 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12107 *) ac_try_echo=$ac_try;;
12108esac
12109eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12110 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012111 ac_status=$?
12112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12113 (exit $ac_status); }; } &&
12114 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000012115 { (case "(($ac_try" in
12116 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12117 *) ac_try_echo=$ac_try;;
12118esac
12119eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12120 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012121 ac_status=$?
12122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12123 (exit $ac_status); }; }; then
12124 ac_hi=$ac_mid; break
12125else
12126 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012127sed 's/^/| /' conftest.$ac_ext >&5
12128
Thomas Wouters477c8d52006-05-27 19:21:47 +000012129 ac_lo=`expr $ac_mid + 1`
12130 if test $ac_lo -le $ac_mid; then
12131 ac_lo= ac_hi=
12132 break
12133 fi
12134 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012135fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000012136
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012137rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012138 done
12139else
12140 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012141sed 's/^/| /' conftest.$ac_ext >&5
12142
Thomas Wouters477c8d52006-05-27 19:21:47 +000012143 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012144/* confdefs.h. */
12145_ACEOF
12146cat confdefs.h >>conftest.$ac_ext
12147cat >>conftest.$ac_ext <<_ACEOF
12148/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012149$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +000012150 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012151int
12152main ()
12153{
Thomas Wouters477c8d52006-05-27 19:21:47 +000012154static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012155test_array [0] = 0
12156
12157 ;
12158 return 0;
12159}
12160_ACEOF
12161rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000012162if { (ac_try="$ac_compile"
12163case "(($ac_try" in
12164 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12165 *) ac_try_echo=$ac_try;;
12166esac
12167eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12168 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012169 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012170 grep -v '^ *+' conftest.er1 >conftest.err
12171 rm -f conftest.er1
12172 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12174 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000012175 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
12176 { (case "(($ac_try" in
12177 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12178 *) ac_try_echo=$ac_try;;
12179esac
12180eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12181 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012182 ac_status=$?
12183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12184 (exit $ac_status); }; } &&
12185 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000012186 { (case "(($ac_try" in
12187 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12188 *) ac_try_echo=$ac_try;;
12189esac
12190eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12191 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012192 ac_status=$?
12193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12194 (exit $ac_status); }; }; then
12195 ac_hi=-1 ac_mid=-1
12196 while :; do
12197 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012198/* confdefs.h. */
12199_ACEOF
12200cat confdefs.h >>conftest.$ac_ext
12201cat >>conftest.$ac_ext <<_ACEOF
12202/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012203$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +000012204 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012205int
12206main ()
12207{
Thomas Wouters477c8d52006-05-27 19:21:47 +000012208static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012209test_array [0] = 0
12210
12211 ;
12212 return 0;
12213}
12214_ACEOF
12215rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000012216if { (ac_try="$ac_compile"
12217case "(($ac_try" in
12218 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12219 *) ac_try_echo=$ac_try;;
12220esac
12221eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12222 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012223 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012224 grep -v '^ *+' conftest.er1 >conftest.err
12225 rm -f conftest.er1
12226 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12228 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000012229 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
12230 { (case "(($ac_try" in
12231 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12232 *) ac_try_echo=$ac_try;;
12233esac
12234eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12235 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012236 ac_status=$?
12237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12238 (exit $ac_status); }; } &&
12239 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000012240 { (case "(($ac_try" in
12241 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12242 *) ac_try_echo=$ac_try;;
12243esac
12244eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12245 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012246 ac_status=$?
12247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12248 (exit $ac_status); }; }; then
12249 ac_lo=$ac_mid; break
12250else
12251 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012252sed 's/^/| /' conftest.$ac_ext >&5
12253
Thomas Wouters477c8d52006-05-27 19:21:47 +000012254 ac_hi=`expr '(' $ac_mid ')' - 1`
12255 if test $ac_mid -le $ac_hi; then
12256 ac_lo= ac_hi=
12257 break
12258 fi
12259 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000012260fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000012261
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012262rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012263 done
12264else
12265 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012266sed 's/^/| /' conftest.$ac_ext >&5
12267
Thomas Wouters477c8d52006-05-27 19:21:47 +000012268 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000012269fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000012270
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012271rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012272fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000012273
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012274rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012275# Binary search between lo and hi bounds.
12276while test "x$ac_lo" != "x$ac_hi"; do
12277 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12278 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012279/* confdefs.h. */
12280_ACEOF
12281cat confdefs.h >>conftest.$ac_ext
12282cat >>conftest.$ac_ext <<_ACEOF
12283/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012284$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +000012285 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012286int
12287main ()
12288{
Thomas Wouters477c8d52006-05-27 19:21:47 +000012289static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012290test_array [0] = 0
12291
12292 ;
12293 return 0;
12294}
12295_ACEOF
12296rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000012297if { (ac_try="$ac_compile"
12298case "(($ac_try" in
12299 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12300 *) ac_try_echo=$ac_try;;
12301esac
12302eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12303 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012304 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012305 grep -v '^ *+' conftest.er1 >conftest.err
12306 rm -f conftest.er1
12307 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012308 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12309 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000012310 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
12311 { (case "(($ac_try" in
12312 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12313 *) ac_try_echo=$ac_try;;
12314esac
12315eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12316 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012317 ac_status=$?
12318 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12319 (exit $ac_status); }; } &&
12320 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000012321 { (case "(($ac_try" in
12322 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12323 *) ac_try_echo=$ac_try;;
12324esac
12325eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12326 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012327 ac_status=$?
12328 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12329 (exit $ac_status); }; }; then
12330 ac_hi=$ac_mid
12331else
12332 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012333sed 's/^/| /' conftest.$ac_ext >&5
12334
Thomas Wouters477c8d52006-05-27 19:21:47 +000012335 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012336fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000012337
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012338rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012339done
12340case $ac_lo in
12341?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Thomas Wouters477c8d52006-05-27 19:21:47 +000012342'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012343See \`config.log' for more details." >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000012344echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012345See \`config.log' for more details." >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +000012346 { (exit 77); exit 77; }; } ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012347esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012348else
Martin v. Löwis11437992002-04-12 09:54:03 +000012349 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012350/* confdefs.h. */
12351_ACEOF
12352cat confdefs.h >>conftest.$ac_ext
12353cat >>conftest.$ac_ext <<_ACEOF
12354/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012355$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +000012356 typedef uintptr_t ac__type_sizeof_;
12357static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12358static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000012359#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012360#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012361int
12362main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012363{
Martin v. Löwis11437992002-04-12 09:54:03 +000012364
12365 FILE *f = fopen ("conftest.val", "w");
12366 if (! f)
Thomas Wouters477c8d52006-05-27 19:21:47 +000012367 return 1;
12368 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000012369 {
Thomas Wouters477c8d52006-05-27 19:21:47 +000012370 long int i = longval ();
12371 if (i != ((long int) (sizeof (ac__type_sizeof_))))
12372 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000012373 fprintf (f, "%ld\n", i);
12374 }
12375 else
12376 {
Thomas Wouters477c8d52006-05-27 19:21:47 +000012377 unsigned long int i = ulongval ();
12378 if (i != ((long int) (sizeof (ac__type_sizeof_))))
12379 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000012380 fprintf (f, "%lu\n", i);
12381 }
Thomas Wouters477c8d52006-05-27 19:21:47 +000012382 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012383
12384 ;
12385 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012386}
Martin v. Löwis11437992002-04-12 09:54:03 +000012387_ACEOF
12388rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000012389if { (ac_try="$ac_link"
12390case "(($ac_try" in
12391 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12392 *) ac_try_echo=$ac_try;;
12393esac
12394eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12395 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012396 ac_status=$?
12397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12398 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000012399 { (case "(($ac_try" in
12400 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12401 *) ac_try_echo=$ac_try;;
12402esac
12403eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12404 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012405 ac_status=$?
12406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12407 (exit $ac_status); }; }; then
12408 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012409else
Martin v. Löwis11437992002-04-12 09:54:03 +000012410 echo "$as_me: program exited with status $ac_status" >&5
12411echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012412sed 's/^/| /' conftest.$ac_ext >&5
12413
Martin v. Löwis11437992002-04-12 09:54:03 +000012414( exit $ac_status )
Thomas Wouters477c8d52006-05-27 19:21:47 +000012415{ { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012416See \`config.log' for more details." >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000012417echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012418See \`config.log' for more details." >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +000012419 { (exit 77); exit 77; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012420fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000012421rm -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 +000012422fi
12423rm -f conftest.val
12424else
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012425 ac_cv_sizeof_uintptr_t=0
12426fi
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012427fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000012428{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
12429echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012430cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012431#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012432_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012433
Michael W. Hudson54241132001-12-07 15:38:26 +000012434
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012435fi
12436
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012437# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Thomas Wouters477c8d52006-05-27 19:21:47 +000012438{ echo "$as_me:$LINENO: checking size of off_t" >&5
12439echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012440if test "${ac_cv_sizeof_off_t+set}" = set; then
12441 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012442else
12443 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000012444 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012445else
Martin v. Löwis11437992002-04-12 09:54:03 +000012446 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012447/* confdefs.h. */
12448_ACEOF
12449cat confdefs.h >>conftest.$ac_ext
12450cat >>conftest.$ac_ext <<_ACEOF
12451/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012452#include <stdio.h>
12453#include <sys/types.h>
12454main()
12455{
12456 FILE *f=fopen("conftestval", "w");
12457 if (!f) exit(1);
12458 fprintf(f, "%d\n", sizeof(off_t));
12459 exit(0);
12460}
Martin v. Löwis11437992002-04-12 09:54:03 +000012461_ACEOF
12462rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000012463if { (ac_try="$ac_link"
12464case "(($ac_try" in
12465 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12466 *) ac_try_echo=$ac_try;;
12467esac
12468eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12469 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012470 ac_status=$?
12471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12472 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000012473 { (case "(($ac_try" in
12474 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12475 *) ac_try_echo=$ac_try;;
12476esac
12477eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12478 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012479 ac_status=$?
12480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12481 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012482 ac_cv_sizeof_off_t=`cat conftestval`
12483else
Martin v. Löwis11437992002-04-12 09:54:03 +000012484 echo "$as_me: program exited with status $ac_status" >&5
12485echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012486sed 's/^/| /' conftest.$ac_ext >&5
12487
Martin v. Löwis11437992002-04-12 09:54:03 +000012488( exit $ac_status )
12489ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012490fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000012491rm -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 +000012492fi
12493
Thomas Wouters477c8d52006-05-27 19:21:47 +000012494
12495
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012496fi
12497
Thomas Wouters477c8d52006-05-27 19:21:47 +000012498{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
12499echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012500
12501cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012502#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012503_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012504
Michael W. Hudson54241132001-12-07 15:38:26 +000012505
Thomas Wouters477c8d52006-05-27 19:21:47 +000012506{ echo "$as_me:$LINENO: checking whether to enable large file support" >&5
12507echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000012508if test "$have_long_long" = yes -a \
12509 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
12510 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012511
Martin v. Löwis11437992002-04-12 09:54:03 +000012512cat >>confdefs.h <<\_ACEOF
12513#define HAVE_LARGEFILE_SUPPORT 1
12514_ACEOF
12515
Thomas Wouters477c8d52006-05-27 19:21:47 +000012516 { echo "$as_me:$LINENO: result: yes" >&5
12517echo "${ECHO_T}yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012518else
Thomas Wouters477c8d52006-05-27 19:21:47 +000012519 { echo "$as_me:$LINENO: result: no" >&5
12520echo "${ECHO_T}no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012521fi
12522
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012523# AC_CHECK_SIZEOF() doesn't include <time.h>.
Thomas Wouters477c8d52006-05-27 19:21:47 +000012524{ echo "$as_me:$LINENO: checking size of time_t" >&5
12525echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012526if test "${ac_cv_sizeof_time_t+set}" = set; then
12527 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012528else
12529 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000012530 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012531else
Martin v. Löwis11437992002-04-12 09:54:03 +000012532 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012533/* confdefs.h. */
12534_ACEOF
12535cat confdefs.h >>conftest.$ac_ext
12536cat >>conftest.$ac_ext <<_ACEOF
12537/* end confdefs.h. */
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012538#include <stdio.h>
12539#include <time.h>
12540main()
12541{
12542 FILE *f=fopen("conftestval", "w");
12543 if (!f) exit(1);
12544 fprintf(f, "%d\n", sizeof(time_t));
12545 exit(0);
12546}
Martin v. Löwis11437992002-04-12 09:54:03 +000012547_ACEOF
12548rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000012549if { (ac_try="$ac_link"
12550case "(($ac_try" in
12551 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12552 *) ac_try_echo=$ac_try;;
12553esac
12554eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12555 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012556 ac_status=$?
12557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12558 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000012559 { (case "(($ac_try" in
12560 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12561 *) ac_try_echo=$ac_try;;
12562esac
12563eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12564 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012565 ac_status=$?
12566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12567 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012568 ac_cv_sizeof_time_t=`cat conftestval`
12569else
Martin v. Löwis11437992002-04-12 09:54:03 +000012570 echo "$as_me: program exited with status $ac_status" >&5
12571echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012572sed 's/^/| /' conftest.$ac_ext >&5
12573
Martin v. Löwis11437992002-04-12 09:54:03 +000012574( exit $ac_status )
12575ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012576fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000012577rm -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 +000012578fi
12579
Thomas Wouters477c8d52006-05-27 19:21:47 +000012580
12581
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012582fi
12583
Thomas Wouters477c8d52006-05-27 19:21:47 +000012584{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
12585echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012586
12587cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012588#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012589_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012590
Michael W. Hudson54241132001-12-07 15:38:26 +000012591
12592
Trent Mick635f6fb2000-08-23 21:33:05 +000012593# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000012594ac_save_cc="$CC"
12595if test "$ac_cv_kpthread" = "yes"
12596then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000012597elif test "$ac_cv_kthread" = "yes"
12598then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012599elif test "$ac_cv_pthread" = "yes"
12600then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000012601fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000012602{ echo "$as_me:$LINENO: checking for pthread_t" >&5
12603echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000012604have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012605cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012606/* confdefs.h. */
12607_ACEOF
12608cat confdefs.h >>conftest.$ac_ext
12609cat >>conftest.$ac_ext <<_ACEOF
12610/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000012611#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012612int
12613main ()
12614{
Guido van Rossum12580492000-09-24 16:47:19 +000012615pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012616 ;
12617 return 0;
12618}
12619_ACEOF
12620rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000012621if { (ac_try="$ac_compile"
12622case "(($ac_try" in
12623 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12624 *) ac_try_echo=$ac_try;;
12625esac
12626eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12627 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012628 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012629 grep -v '^ *+' conftest.er1 >conftest.err
12630 rm -f conftest.er1
12631 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12633 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000012634 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
12635 { (case "(($ac_try" in
12636 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12637 *) ac_try_echo=$ac_try;;
12638esac
12639eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12640 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012641 ac_status=$?
12642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12643 (exit $ac_status); }; } &&
12644 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000012645 { (case "(($ac_try" in
12646 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12647 *) ac_try_echo=$ac_try;;
12648esac
12649eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12650 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012651 ac_status=$?
12652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12653 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +000012654 have_pthread_t=yes
12655else
Martin v. Löwis11437992002-04-12 09:54:03 +000012656 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012657sed 's/^/| /' conftest.$ac_ext >&5
12658
Thomas Wouters477c8d52006-05-27 19:21:47 +000012659
Trent Mick635f6fb2000-08-23 21:33:05 +000012660fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000012661
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012662rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000012663{ echo "$as_me:$LINENO: result: $have_pthread_t" >&5
12664echo "${ECHO_T}$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000012665if test "$have_pthread_t" = yes ; then
12666 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Thomas Wouters477c8d52006-05-27 19:21:47 +000012667 { echo "$as_me:$LINENO: checking size of pthread_t" >&5
12668echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012669 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
12670 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000012671else
12672 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000012673 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +000012674else
Martin v. Löwis11437992002-04-12 09:54:03 +000012675 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012676/* confdefs.h. */
12677_ACEOF
12678cat confdefs.h >>conftest.$ac_ext
12679cat >>conftest.$ac_ext <<_ACEOF
12680/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000012681#include <stdio.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012682#include <pthread.h>
Trent Mick635f6fb2000-08-23 21:33:05 +000012683 main()
12684 {
12685 FILE *f=fopen("conftestval", "w");
12686 if (!f) exit(1);
12687 fprintf(f, "%d\n", sizeof(pthread_t));
12688 exit(0);
12689 }
Martin v. Löwis11437992002-04-12 09:54:03 +000012690_ACEOF
12691rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000012692if { (ac_try="$ac_link"
12693case "(($ac_try" in
12694 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12695 *) ac_try_echo=$ac_try;;
12696esac
12697eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12698 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012699 ac_status=$?
12700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12701 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000012702 { (case "(($ac_try" in
12703 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12704 *) ac_try_echo=$ac_try;;
12705esac
12706eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12707 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012708 ac_status=$?
12709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12710 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +000012711 ac_cv_sizeof_pthread_t=`cat conftestval`
12712else
Martin v. Löwis11437992002-04-12 09:54:03 +000012713 echo "$as_me: program exited with status $ac_status" >&5
12714echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012715sed 's/^/| /' conftest.$ac_ext >&5
12716
Martin v. Löwis11437992002-04-12 09:54:03 +000012717( exit $ac_status )
12718ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +000012719fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000012720rm -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 +000012721fi
12722
Thomas Wouters477c8d52006-05-27 19:21:47 +000012723
12724
Trent Mick635f6fb2000-08-23 21:33:05 +000012725fi
12726
Thomas Wouters477c8d52006-05-27 19:21:47 +000012727 { echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
12728echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012729
12730cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000012731#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012732_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000012733
12734fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000012735CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000012736
Thomas Wouters477c8d52006-05-27 19:21:47 +000012737{ echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
12738echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6; }
12739# Check whether --enable-toolbox-glue was given.
Jack Jansene578a632001-08-15 01:27:14 +000012740if test "${enable_toolbox_glue+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000012741 enableval=$enable_toolbox_glue;
12742fi
Jack Jansene578a632001-08-15 01:27:14 +000012743
12744
12745if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +000012746then
Jack Jansene578a632001-08-15 01:27:14 +000012747 case $ac_sys_system/$ac_sys_release in
12748 Darwin/*)
12749 enable_toolbox_glue="yes";;
12750 *)
12751 enable_toolbox_glue="no";;
12752 esac
12753fi
12754case "$enable_toolbox_glue" in
12755yes)
Jack Jansene578a632001-08-15 01:27:14 +000012756 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000012757 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +000012758
12759cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000012760#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012761_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000012762
12763 ;;
12764*)
Jack Jansene578a632001-08-15 01:27:14 +000012765 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +000012766 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +000012767 ;;
12768esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000012769{ echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
12770echo "${ECHO_T}$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012771
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012772
12773case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012774 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000012775 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
12776 ;;
12777 Darwin/*)
12778 OTHER_LIBTOOL_OPT=""
12779 ;;
12780esac
12781
12782
12783case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012784 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +000012785 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
12786 if test "${enable_universalsdk}"; then
12787 :
12788 else
12789 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`"
12790 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000012791 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000012792 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000012793 Darwin/*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000012794 gcc_version=`gcc -v 2>&1 | grep version | cut -d\ -f3`
12795 if test ${gcc_version} '<' 4.0
12796 then
12797 LIBTOOL_CRUFT="-lcc_dynamic"
12798 else
12799 LIBTOOL_CRUFT=""
12800 fi
Jack Jansen39fd2312006-02-23 15:12:19 +000012801 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only `arch`"
Jack Jansenb36687a2004-07-16 08:43:47 +000012802 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000012803 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012804esac
12805
Thomas Wouters477c8d52006-05-27 19:21:47 +000012806{ echo "$as_me:$LINENO: checking for --enable-framework" >&5
12807echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000012808if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012809then
Skip Montanarodecc6a42003-01-01 20:07:49 +000012810 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000012811 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000012812 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012813
Martin v. Löwis11437992002-04-12 09:54:03 +000012814cat >>confdefs.h <<\_ACEOF
12815#define WITH_NEXT_FRAMEWORK 1
12816_ACEOF
12817
Thomas Wouters477c8d52006-05-27 19:21:47 +000012818 { echo "$as_me:$LINENO: result: yes" >&5
12819echo "${ECHO_T}yes" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012820else
Thomas Wouters477c8d52006-05-27 19:21:47 +000012821 { echo "$as_me:$LINENO: result: no" >&5
12822echo "${ECHO_T}no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012823fi
12824
Thomas Wouters477c8d52006-05-27 19:21:47 +000012825{ echo "$as_me:$LINENO: checking for dyld" >&5
12826echo $ECHO_N "checking for dyld... $ECHO_C" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012827case $ac_sys_system/$ac_sys_release in
12828 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012829
Martin v. Löwis11437992002-04-12 09:54:03 +000012830cat >>confdefs.h <<\_ACEOF
12831#define WITH_DYLD 1
12832_ACEOF
12833
Thomas Wouters477c8d52006-05-27 19:21:47 +000012834 { echo "$as_me:$LINENO: result: always on for Darwin" >&5
12835echo "${ECHO_T}always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012836 ;;
12837 *)
Thomas Wouters477c8d52006-05-27 19:21:47 +000012838 { echo "$as_me:$LINENO: result: no" >&5
12839echo "${ECHO_T}no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000012840 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012841esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012842
Guido van Rossum0a516c91994-09-12 10:58:40 +000012843# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000012844
Michael W. Hudson54241132001-12-07 15:38:26 +000012845
12846
12847
12848
Guido van Rossum0a516c91994-09-12 10:58:40 +000012849# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000012850# -- usually .so, .sl on HP-UX, .dll on Cygwin
Thomas Wouters477c8d52006-05-27 19:21:47 +000012851{ echo "$as_me:$LINENO: checking SO" >&5
12852echo $ECHO_N "checking SO... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012853if test -z "$SO"
12854then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012855 case $ac_sys_system in
Thomas Wouters477c8d52006-05-27 19:21:47 +000012856 hp*|HP*)
12857 case `uname -m` in
12858 ia64) SO=.so;;
12859 *) SO=.sl;;
12860 esac
12861 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000012862 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000012863 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000012864 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000012865else
12866 # this might also be a termcap variable, see #610332
12867 echo
12868 echo '====================================================================='
12869 echo '+ +'
12870 echo '+ WARNING: You have set SO in your environment. +'
12871 echo '+ Do you really mean to change the extension for shared libraries? +'
12872 echo '+ Continuing in 10 seconds to let you to ponder. +'
12873 echo '+ +'
12874 echo '====================================================================='
12875 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000012876fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000012877{ echo "$as_me:$LINENO: result: $SO" >&5
12878echo "${ECHO_T}$SO" >&6; }
12879
12880cat >>confdefs.h <<_ACEOF
12881#define SHLIB_EXT "$SO"
12882_ACEOF
12883
Guido van Rossum0a516c91994-09-12 10:58:40 +000012884# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000012885# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012886# (Shared libraries in this instance are shared modules to be loaded into
12887# Python, as opposed to building Python itself as a shared library.)
Thomas Wouters477c8d52006-05-27 19:21:47 +000012888{ echo "$as_me:$LINENO: checking LDSHARED" >&5
12889echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012890if test -z "$LDSHARED"
12891then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012892 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000012893 AIX*)
12894 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000012895 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000012896 ;;
12897 BeOS*)
12898 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +000012899 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000012900 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000012901 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000012902 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000012903 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +000012904 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000012905 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000012906 else LDSHARED='$(CC) -G';
Greg Ward57c9a6632000-05-26 12:22:54 +000012907 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000012908 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +000012909 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000012910 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000012911 LDSHARED='$(CC) $(LDFLAGS) -bundle'
12912 if test "$enable_framework" ; then
12913 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000012914 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
12915 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000012916 else
12917 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000012918 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000012919 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000012920 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000012921 LDSHARED='$(CC) $(LDFLAGS) -bundle'
12922 if test "$enable_framework" ; then
12923 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000012924 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
12925 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000012926 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000012927 # No framework, use the Python app as bundle-loader
12928 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000012929 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012930 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000012931 Darwin/*)
12932 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
12933 # This allows an extension to be used in any Python
Jack Jansenbe954622004-12-26 23:07:48 +000012934 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
Thomas Wouters477c8d52006-05-27 19:21:47 +000012935 if test ${cur_target} '>' 10.2; then
12936 cur_target=10.3
12937 fi
Jack Jansenc110f862005-01-07 10:49:32 +000012938 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Thomas Wouters477c8d52006-05-27 19:21:47 +000012939 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
Jack Jansenbe954622004-12-26 23:07:48 +000012940 if test ${MACOSX_DEPLOYMENT_TARGET-${cur_target}} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000012941 then
Thomas Wouters477c8d52006-05-27 19:21:47 +000012942 if test "${enable_universalsdk}"; then
12943 LDFLAGS="-arch i386 -arch ppc -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
12944 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000012945 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
12946 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000012947 else
12948 LDSHARED='$(CC) $(LDFLAGS) -bundle'
12949 if test "$enable_framework" ; then
12950 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000012951 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
12952 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000012953 else
12954 # No framework, use the Python app as bundle-loader
12955 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
12956 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
12957 fi
12958 fi
12959 ;;
Martin v. Löwis3cba5c02002-09-16 17:50:59 +000012960 Linux*|GNU*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000012961 BSD/OS*/4*) LDSHARED="gcc -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000012962 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000012963 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000012964 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000012965 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000012966 else
12967 LDSHARED="ld -Bshareable ${LDFLAGS}"
12968 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000012969 OpenBSD*)
12970 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
12971 then
12972 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
12973 else
12974 case `uname -r` in
12975 [01].* | 2.[0-7] | 2.[0-7].*)
12976 LDSHARED="ld -Bshareable ${LDFLAGS}"
12977 ;;
12978 *)
12979 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
12980 ;;
12981 esac
12982 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000012983 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000012984 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000012985 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000012986 then LDSHARED='$(CC) -shared'
12987 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000012988 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000012989 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Trent Mick635f6fb2000-08-23 21:33:05 +000012990 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +000012991 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012992 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000012993 *) LDSHARED="ld";;
12994 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000012995fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000012996{ echo "$as_me:$LINENO: result: $LDSHARED" >&5
12997echo "${ECHO_T}$LDSHARED" >&6; }
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000012998BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000012999# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013000# library (module) -- this is only needed for a few systems
Thomas Wouters477c8d52006-05-27 19:21:47 +000013001{ echo "$as_me:$LINENO: checking CCSHARED" >&5
13002echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013003if test -z "$CCSHARED"
13004then
Guido van Rossum07397971997-04-29 21:49:50 +000013005 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000013006 SunOS*) if test "$GCC" = yes;
13007 then CCSHARED="-fPIC";
Martin v. Löwisd5845ec2005-12-30 12:31:38 +000013008 else CCSHARED="-xcode=pic32";
Neil Schemenauerc761fc82001-02-19 04:50:49 +000013009 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000013010 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000013011 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000013012 else CCSHARED="+z";
13013 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013014 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000013015 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013016 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013017 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000013018 if test "$GCC" = "yes"
13019 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000013020 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000013021 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000013022 SCO_SV*)
13023 if test "$GCC" = "yes"
13024 then CCSHARED="-fPIC"
13025 else CCSHARED="-Kpic -belf"
13026 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +000013027 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013028 IRIX*/6*) case $CC in
13029 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000013030 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013031 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013032 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013033 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013034fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000013035{ echo "$as_me:$LINENO: result: $CCSHARED" >&5
13036echo "${ECHO_T}$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013037# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013038# the python executable -- this is only needed for a few systems
Thomas Wouters477c8d52006-05-27 19:21:47 +000013039{ echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
13040echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013041if test -z "$LINKFORSHARED"
13042then
Guido van Rossum07397971997-04-29 21:49:50 +000013043 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013044 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000013045 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000013046 LINKFORSHARED="-Wl,-E -Wl,+s";;
13047# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000013048 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013049 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013050 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000013051 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000013052 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
13053 # which is
Jack Jansene578a632001-08-15 01:27:14 +000013054 # not used by the core itself but which needs to be in the core so
13055 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +000013056 # -prebind is no longer used, because it actually seems to give a
13057 # slowdown in stead of a speedup, maybe due to the large number of
13058 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000013059
13060 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +000013061 if test "$enable_framework"
13062 then
Jack Jansenda49e192005-01-07 13:08:22 +000013063 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000013064 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000013065 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013066 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000013067 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000013068 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013069 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000013070 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
13071 then
13072 LINKFORSHARED="-Wl,--export-dynamic"
13073 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013074 SunOS/5*) case $CC in
13075 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000013076 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000013077 then
13078 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013079 fi;;
13080 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000013081 CYGWIN*)
13082 if test $enable_shared = "no"
13083 then
13084 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
13085 fi;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013086 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013087fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000013088{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
13089echo "${ECHO_T}$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013090
Michael W. Hudson54241132001-12-07 15:38:26 +000013091
Thomas Wouters477c8d52006-05-27 19:21:47 +000013092{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
13093echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013094if test ! "$LIBRARY" = "$LDLIBRARY"
13095then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000013096 case $ac_sys_system in
13097 CYGWIN*)
13098 # Cygwin needs CCSHARED when building extension DLLs
13099 # but not when building the interpreter DLL.
13100 CFLAGSFORSHARED='';;
13101 *)
13102 CFLAGSFORSHARED='$(CCSHARED)'
13103 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013104fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000013105{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
13106echo "${ECHO_T}$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013107
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013108# SHLIBS are libraries (except -lc and -lm) to link to the python shared
13109# library (with --enable-shared).
13110# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000013111# symbols, this must be set to $(LIBS) (expanded by make). We do this even
13112# if it is not required, since it creates a dependency of the shared library
13113# to LIBS. This, in turn, means that applications linking the shared libpython
13114# don't need to link LIBS explicitly. The default should be only changed
13115# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013116
Thomas Wouters477c8d52006-05-27 19:21:47 +000013117{ echo "$as_me:$LINENO: checking SHLIBS" >&5
13118echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013119case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013120 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000013121 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013122esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000013123{ echo "$as_me:$LINENO: result: $SHLIBS" >&5
13124echo "${ECHO_T}$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013125
13126
Guido van Rossum627b2d71993-12-24 10:39:16 +000013127# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000013128
Thomas Wouters477c8d52006-05-27 19:21:47 +000013129{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
13130echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013131if test "${ac_cv_lib_dl_dlopen+set}" = set; then
13132 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013133else
Martin v. Löwis11437992002-04-12 09:54:03 +000013134 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013135LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013136cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013137/* confdefs.h. */
13138_ACEOF
13139cat confdefs.h >>conftest.$ac_ext
13140cat >>conftest.$ac_ext <<_ACEOF
13141/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013142
Thomas Wouters477c8d52006-05-27 19:21:47 +000013143/* Override any GCC internal prototype to avoid an error.
13144 Use char because int might match the return type of a GCC
13145 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013146#ifdef __cplusplus
13147extern "C"
13148#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013149char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013150int
13151main ()
13152{
Thomas Wouters477c8d52006-05-27 19:21:47 +000013153return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013154 ;
13155 return 0;
13156}
13157_ACEOF
13158rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013159if { (ac_try="$ac_link"
13160case "(($ac_try" in
13161 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13162 *) ac_try_echo=$ac_try;;
13163esac
13164eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13165 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013166 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013167 grep -v '^ *+' conftest.er1 >conftest.err
13168 rm -f conftest.er1
13169 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13171 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013172 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
13173 { (case "(($ac_try" in
13174 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13175 *) ac_try_echo=$ac_try;;
13176esac
13177eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13178 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013179 ac_status=$?
13180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13181 (exit $ac_status); }; } &&
13182 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013183 { (case "(($ac_try" in
13184 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13185 *) ac_try_echo=$ac_try;;
13186esac
13187eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13188 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013189 ac_status=$?
13190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13191 (exit $ac_status); }; }; then
13192 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013193else
Martin v. Löwis11437992002-04-12 09:54:03 +000013194 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013195sed 's/^/| /' conftest.$ac_ext >&5
13196
Thomas Wouters477c8d52006-05-27 19:21:47 +000013197 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013198fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000013199
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013200rm -f core conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013201 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013202LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000013203fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000013204{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
13205echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013206if test $ac_cv_lib_dl_dlopen = yes; then
13207 cat >>confdefs.h <<_ACEOF
13208#define HAVE_LIBDL 1
13209_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013210
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013211 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013212
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013213fi
13214 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000013215
Thomas Wouters477c8d52006-05-27 19:21:47 +000013216{ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
13217echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013218if test "${ac_cv_lib_dld_shl_load+set}" = set; then
13219 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013220else
Martin v. Löwis11437992002-04-12 09:54:03 +000013221 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013222LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013223cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013224/* confdefs.h. */
13225_ACEOF
13226cat confdefs.h >>conftest.$ac_ext
13227cat >>conftest.$ac_ext <<_ACEOF
13228/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013229
Thomas Wouters477c8d52006-05-27 19:21:47 +000013230/* Override any GCC internal prototype to avoid an error.
13231 Use char because int might match the return type of a GCC
13232 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013233#ifdef __cplusplus
13234extern "C"
13235#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013236char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013237int
13238main ()
13239{
Thomas Wouters477c8d52006-05-27 19:21:47 +000013240return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013241 ;
13242 return 0;
13243}
13244_ACEOF
13245rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013246if { (ac_try="$ac_link"
13247case "(($ac_try" in
13248 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13249 *) ac_try_echo=$ac_try;;
13250esac
13251eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13252 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013253 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013254 grep -v '^ *+' conftest.er1 >conftest.err
13255 rm -f conftest.er1
13256 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13258 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013259 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
13260 { (case "(($ac_try" in
13261 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13262 *) ac_try_echo=$ac_try;;
13263esac
13264eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13265 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013266 ac_status=$?
13267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13268 (exit $ac_status); }; } &&
13269 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013270 { (case "(($ac_try" in
13271 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13272 *) ac_try_echo=$ac_try;;
13273esac
13274eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13275 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013276 ac_status=$?
13277 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13278 (exit $ac_status); }; }; then
13279 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013280else
Martin v. Löwis11437992002-04-12 09:54:03 +000013281 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013282sed 's/^/| /' conftest.$ac_ext >&5
13283
Thomas Wouters477c8d52006-05-27 19:21:47 +000013284 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013285fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000013286
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013287rm -f core conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013288 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013289LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000013290fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000013291{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
13292echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013293if test $ac_cv_lib_dld_shl_load = yes; then
13294 cat >>confdefs.h <<_ACEOF
13295#define HAVE_LIBDLD 1
13296_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013297
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013298 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013299
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013300fi
13301 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000013302
13303# only check for sem_ini if thread support is requested
13304if test "$with_threads" = "yes" -o -z "$with_threads"; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000013305 { echo "$as_me:$LINENO: checking for library containing sem_init" >&5
13306echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013307if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013308 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000013309else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013310 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000013311cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013312/* confdefs.h. */
13313_ACEOF
13314cat confdefs.h >>conftest.$ac_ext
13315cat >>conftest.$ac_ext <<_ACEOF
13316/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013317
Thomas Wouters477c8d52006-05-27 19:21:47 +000013318/* Override any GCC internal prototype to avoid an error.
13319 Use char because int might match the return type of a GCC
13320 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013321#ifdef __cplusplus
13322extern "C"
13323#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013324char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013325int
13326main ()
13327{
Thomas Wouters477c8d52006-05-27 19:21:47 +000013328return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013329 ;
13330 return 0;
13331}
13332_ACEOF
Thomas Wouters477c8d52006-05-27 19:21:47 +000013333for ac_lib in '' pthread rt posix4; do
13334 if test -z "$ac_lib"; then
13335 ac_res="none required"
13336 else
13337 ac_res=-l$ac_lib
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013338 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters477c8d52006-05-27 19:21:47 +000013339 fi
13340 rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013341if { (ac_try="$ac_link"
13342case "(($ac_try" in
13343 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13344 *) ac_try_echo=$ac_try;;
13345esac
13346eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13347 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013348 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013349 grep -v '^ *+' conftest.er1 >conftest.err
13350 rm -f conftest.er1
13351 cat conftest.err >&5
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13353 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013354 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
13355 { (case "(($ac_try" in
13356 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13357 *) ac_try_echo=$ac_try;;
13358esac
13359eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13360 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013361 ac_status=$?
13362 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13363 (exit $ac_status); }; } &&
13364 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013365 { (case "(($ac_try" in
13366 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13367 *) ac_try_echo=$ac_try;;
13368esac
13369eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13370 (eval "$ac_try") 2>&5
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013371 ac_status=$?
13372 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13373 (exit $ac_status); }; }; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000013374 ac_cv_search_sem_init=$ac_res
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013375else
13376 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013377sed 's/^/| /' conftest.$ac_ext >&5
13378
Thomas Wouters477c8d52006-05-27 19:21:47 +000013379
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013380fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000013381
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013382rm -f core conftest.err conftest.$ac_objext \
Thomas Wouters477c8d52006-05-27 19:21:47 +000013383 conftest$ac_exeext
13384 if test "${ac_cv_search_sem_init+set}" = set; then
13385 break
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013386fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000013387done
13388if test "${ac_cv_search_sem_init+set}" = set; then
13389 :
13390else
13391 ac_cv_search_sem_init=no
13392fi
13393rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013394LIBS=$ac_func_search_save_LIBS
13395fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000013396{ echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
13397echo "${ECHO_T}$ac_cv_search_sem_init" >&6; }
13398ac_res=$ac_cv_search_sem_init
13399if test "$ac_res" != no; then
13400 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000013401
Martin v. Löwis41933dd2002-03-21 15:10:58 +000013402fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000013403 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000013404 # posix4 on Solaris 2.6
13405 # pthread (first!) on Linux
13406fi
13407
Martin v. Löwis19d17342003-06-14 21:03:05 +000013408# check if we need libintl for locale functions
Thomas Wouters477c8d52006-05-27 19:21:47 +000013409{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
13410echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000013411if test "${ac_cv_lib_intl_textdomain+set}" = set; then
13412 echo $ECHO_N "(cached) $ECHO_C" >&6
13413else
13414 ac_check_lib_save_LIBS=$LIBS
13415LIBS="-lintl $LIBS"
13416cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013417/* confdefs.h. */
13418_ACEOF
13419cat confdefs.h >>conftest.$ac_ext
13420cat >>conftest.$ac_ext <<_ACEOF
13421/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000013422
Thomas Wouters477c8d52006-05-27 19:21:47 +000013423/* Override any GCC internal prototype to avoid an error.
13424 Use char because int might match the return type of a GCC
13425 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000013426#ifdef __cplusplus
13427extern "C"
13428#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000013429char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000013430int
13431main ()
13432{
Thomas Wouters477c8d52006-05-27 19:21:47 +000013433return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000013434 ;
13435 return 0;
13436}
13437_ACEOF
13438rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013439if { (ac_try="$ac_link"
13440case "(($ac_try" in
13441 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13442 *) ac_try_echo=$ac_try;;
13443esac
13444eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13445 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000013446 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013447 grep -v '^ *+' conftest.er1 >conftest.err
13448 rm -f conftest.er1
13449 cat conftest.err >&5
Martin v. Löwis19d17342003-06-14 21:03:05 +000013450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13451 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013452 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
13453 { (case "(($ac_try" in
13454 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13455 *) ac_try_echo=$ac_try;;
13456esac
13457eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13458 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013459 ac_status=$?
13460 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13461 (exit $ac_status); }; } &&
13462 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013463 { (case "(($ac_try" in
13464 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13465 *) ac_try_echo=$ac_try;;
13466esac
13467eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13468 (eval "$ac_try") 2>&5
Martin v. Löwis19d17342003-06-14 21:03:05 +000013469 ac_status=$?
13470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13471 (exit $ac_status); }; }; then
13472 ac_cv_lib_intl_textdomain=yes
13473else
13474 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013475sed 's/^/| /' conftest.$ac_ext >&5
13476
Thomas Wouters477c8d52006-05-27 19:21:47 +000013477 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000013478fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000013479
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013480rm -f core conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013481 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000013482LIBS=$ac_check_lib_save_LIBS
13483fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000013484{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
13485echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000013486if test $ac_cv_lib_intl_textdomain = yes; then
13487
13488cat >>confdefs.h <<\_ACEOF
13489#define WITH_LIBINTL 1
13490_ACEOF
13491
13492fi
13493
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013494
13495# checks for system dependent C++ extensions support
13496case "$ac_sys_system" in
Thomas Wouters477c8d52006-05-27 19:21:47 +000013497 AIX*) { echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
13498echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013499 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013500/* confdefs.h. */
13501_ACEOF
13502cat confdefs.h >>conftest.$ac_ext
13503cat >>conftest.$ac_ext <<_ACEOF
13504/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013505#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013506int
13507main ()
13508{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013509loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000013510 ;
13511 return 0;
13512}
13513_ACEOF
13514rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013515if { (ac_try="$ac_link"
13516case "(($ac_try" in
13517 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13518 *) ac_try_echo=$ac_try;;
13519esac
13520eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13521 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013522 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013523 grep -v '^ *+' conftest.er1 >conftest.err
13524 rm -f conftest.er1
13525 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13527 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013528 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
13529 { (case "(($ac_try" in
13530 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13531 *) ac_try_echo=$ac_try;;
13532esac
13533eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13534 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013535 ac_status=$?
13536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13537 (exit $ac_status); }; } &&
13538 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013539 { (case "(($ac_try" in
13540 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13541 *) ac_try_echo=$ac_try;;
13542esac
13543eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13544 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013545 ac_status=$?
13546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13547 (exit $ac_status); }; }; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013548
Martin v. Löwis11437992002-04-12 09:54:03 +000013549cat >>confdefs.h <<\_ACEOF
13550#define AIX_GENUINE_CPLUSPLUS 1
13551_ACEOF
13552
Thomas Wouters477c8d52006-05-27 19:21:47 +000013553 { echo "$as_me:$LINENO: result: yes" >&5
13554echo "${ECHO_T}yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013555else
Martin v. Löwis11437992002-04-12 09:54:03 +000013556 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013557sed 's/^/| /' conftest.$ac_ext >&5
13558
Thomas Wouters477c8d52006-05-27 19:21:47 +000013559 { echo "$as_me:$LINENO: result: no" >&5
13560echo "${ECHO_T}no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013561fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000013562
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013563rm -f core conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013564 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013565 *) ;;
13566esac
13567
Guido van Rossum70c7f481998-03-26 18:44:10 +000013568# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013569# BeOS' sockets are stashed in libnet.
Thomas Wouters477c8d52006-05-27 19:21:47 +000013570{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
13571echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013572if test "${ac_cv_lib_nsl_t_open+set}" = set; then
13573 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013574else
Martin v. Löwis11437992002-04-12 09:54:03 +000013575 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013576LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013577cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013578/* confdefs.h. */
13579_ACEOF
13580cat confdefs.h >>conftest.$ac_ext
13581cat >>conftest.$ac_ext <<_ACEOF
13582/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013583
Thomas Wouters477c8d52006-05-27 19:21:47 +000013584/* Override any GCC internal prototype to avoid an error.
13585 Use char because int might match the return type of a GCC
13586 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013587#ifdef __cplusplus
13588extern "C"
13589#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013590char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013591int
13592main ()
13593{
Thomas Wouters477c8d52006-05-27 19:21:47 +000013594return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013595 ;
13596 return 0;
13597}
13598_ACEOF
13599rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013600if { (ac_try="$ac_link"
13601case "(($ac_try" in
13602 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13603 *) ac_try_echo=$ac_try;;
13604esac
13605eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13606 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013607 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013608 grep -v '^ *+' conftest.er1 >conftest.err
13609 rm -f conftest.er1
13610 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13612 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013613 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
13614 { (case "(($ac_try" in
13615 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13616 *) ac_try_echo=$ac_try;;
13617esac
13618eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13619 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013620 ac_status=$?
13621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13622 (exit $ac_status); }; } &&
13623 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013624 { (case "(($ac_try" in
13625 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13626 *) ac_try_echo=$ac_try;;
13627esac
13628eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13629 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013630 ac_status=$?
13631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13632 (exit $ac_status); }; }; then
13633 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013634else
Martin v. Löwis11437992002-04-12 09:54:03 +000013635 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013636sed 's/^/| /' conftest.$ac_ext >&5
13637
Thomas Wouters477c8d52006-05-27 19:21:47 +000013638 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013639fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000013640
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013641rm -f core conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013642 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013643LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013644fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000013645{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
13646echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013647if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013648 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013649fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000013650 # SVR4
Thomas Wouters477c8d52006-05-27 19:21:47 +000013651{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
13652echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013653if test "${ac_cv_lib_socket_socket+set}" = set; then
13654 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013655else
Martin v. Löwis11437992002-04-12 09:54:03 +000013656 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013657LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013658cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013659/* confdefs.h. */
13660_ACEOF
13661cat confdefs.h >>conftest.$ac_ext
13662cat >>conftest.$ac_ext <<_ACEOF
13663/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013664
Thomas Wouters477c8d52006-05-27 19:21:47 +000013665/* Override any GCC internal prototype to avoid an error.
13666 Use char because int might match the return type of a GCC
13667 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013668#ifdef __cplusplus
13669extern "C"
13670#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013671char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013672int
13673main ()
13674{
Thomas Wouters477c8d52006-05-27 19:21:47 +000013675return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013676 ;
13677 return 0;
13678}
13679_ACEOF
13680rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013681if { (ac_try="$ac_link"
13682case "(($ac_try" in
13683 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13684 *) ac_try_echo=$ac_try;;
13685esac
13686eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13687 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013688 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013689 grep -v '^ *+' conftest.er1 >conftest.err
13690 rm -f conftest.er1
13691 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13693 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013694 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
13695 { (case "(($ac_try" in
13696 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13697 *) ac_try_echo=$ac_try;;
13698esac
13699eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13700 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013701 ac_status=$?
13702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13703 (exit $ac_status); }; } &&
13704 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013705 { (case "(($ac_try" in
13706 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13707 *) ac_try_echo=$ac_try;;
13708esac
13709eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13710 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013711 ac_status=$?
13712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13713 (exit $ac_status); }; }; then
13714 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013715else
Martin v. Löwis11437992002-04-12 09:54:03 +000013716 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013717sed 's/^/| /' conftest.$ac_ext >&5
13718
Thomas Wouters477c8d52006-05-27 19:21:47 +000013719 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013720fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000013721
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013722rm -f core conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013723 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013724LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013725fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000013726{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
13727echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013728if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000013729 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000013730fi
13731 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000013732
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000013733case "$ac_sys_system" in
13734BeOS*)
Thomas Wouters477c8d52006-05-27 19:21:47 +000013735{ echo "$as_me:$LINENO: checking for socket in -lnet" >&5
13736echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013737if test "${ac_cv_lib_net_socket+set}" = set; then
13738 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000013739else
Martin v. Löwis11437992002-04-12 09:54:03 +000013740 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000013741LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013742cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013743/* confdefs.h. */
13744_ACEOF
13745cat confdefs.h >>conftest.$ac_ext
13746cat >>conftest.$ac_ext <<_ACEOF
13747/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013748
Thomas Wouters477c8d52006-05-27 19:21:47 +000013749/* Override any GCC internal prototype to avoid an error.
13750 Use char because int might match the return type of a GCC
13751 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013752#ifdef __cplusplus
13753extern "C"
13754#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013755char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013756int
13757main ()
13758{
Thomas Wouters477c8d52006-05-27 19:21:47 +000013759return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013760 ;
13761 return 0;
13762}
13763_ACEOF
13764rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013765if { (ac_try="$ac_link"
13766case "(($ac_try" in
13767 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13768 *) ac_try_echo=$ac_try;;
13769esac
13770eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13771 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013772 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013773 grep -v '^ *+' conftest.er1 >conftest.err
13774 rm -f conftest.er1
13775 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13777 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013778 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
13779 { (case "(($ac_try" in
13780 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13781 *) ac_try_echo=$ac_try;;
13782esac
13783eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13784 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013785 ac_status=$?
13786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13787 (exit $ac_status); }; } &&
13788 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013789 { (case "(($ac_try" in
13790 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13791 *) ac_try_echo=$ac_try;;
13792esac
13793eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13794 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013795 ac_status=$?
13796 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13797 (exit $ac_status); }; }; then
13798 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000013799else
Martin v. Löwis11437992002-04-12 09:54:03 +000013800 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013801sed 's/^/| /' conftest.$ac_ext >&5
13802
Thomas Wouters477c8d52006-05-27 19:21:47 +000013803 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000013804fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000013805
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013806rm -f core conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013807 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013808LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000013809fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000013810{ echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
13811echo "${ECHO_T}$ac_cv_lib_net_socket" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013812if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013813 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013814fi
13815 # BeOS
13816;;
13817esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000013818
Thomas Wouters477c8d52006-05-27 19:21:47 +000013819{ echo "$as_me:$LINENO: checking for --with-libs" >&5
13820echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013821
Thomas Wouters477c8d52006-05-27 19:21:47 +000013822# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000013823if test "${with_libs+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000013824 withval=$with_libs;
13825{ echo "$as_me:$LINENO: result: $withval" >&5
13826echo "${ECHO_T}$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000013827LIBS="$withval $LIBS"
13828
13829else
Thomas Wouters477c8d52006-05-27 19:21:47 +000013830 { echo "$as_me:$LINENO: result: no" >&5
13831echo "${ECHO_T}no" >&6; }
13832fi
13833
Guido van Rossum7f43da71994-08-01 12:15:30 +000013834
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013835# Check for use of the system libffi library
Thomas Wouters477c8d52006-05-27 19:21:47 +000013836{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
13837echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013838
Thomas Wouters477c8d52006-05-27 19:21:47 +000013839# Check whether --with-system_ffi was given.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013840if test "${with_system_ffi+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000013841 withval=$with_system_ffi;
13842fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013843
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013844
13845if test -z "$with_system_ffi"
13846then with_system_ffi="no"
13847fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000013848{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5
13849echo "${ECHO_T}$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013850
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000013851# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013852
13853
Thomas Wouters477c8d52006-05-27 19:21:47 +000013854{ echo "$as_me:$LINENO: checking for --with-signal-module" >&5
13855echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013856
Thomas Wouters477c8d52006-05-27 19:21:47 +000013857# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013858if test "${with_signal_module+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000013859 withval=$with_signal_module;
13860fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013861
13862
13863if test -z "$with_signal_module"
13864then with_signal_module="yes"
13865fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000013866{ echo "$as_me:$LINENO: result: $with_signal_module" >&5
13867echo "${ECHO_T}$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013868
13869if test "${with_signal_module}" = "yes"; then
13870 USE_SIGNAL_MODULE=""
13871 SIGNAL_OBJS=""
13872else
13873 USE_SIGNAL_MODULE="#"
13874 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
13875fi
13876
Guido van Rossum3d15bd82001-01-10 18:53:48 +000013877# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000013878
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000013879USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000013880
Thomas Wouters477c8d52006-05-27 19:21:47 +000013881{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
13882echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013883
Guido van Rossumec2f0731997-01-22 20:54:01 +000013884
Thomas Wouters477c8d52006-05-27 19:21:47 +000013885# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000013886if test "${with_dec_threads+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000013887 withval=$with_dec_threads;
13888{ echo "$as_me:$LINENO: result: $withval" >&5
13889echo "${ECHO_T}$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000013890LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000013891if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000013892 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000013893fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000013894else
Thomas Wouters477c8d52006-05-27 19:21:47 +000013895 { echo "$as_me:$LINENO: result: no" >&5
13896echo "${ECHO_T}no" >&6; }
13897fi
13898
Martin v. Löwis11437992002-04-12 09:54:03 +000013899
13900# Templates for things AC_DEFINEd more than once.
13901# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000013902
13903
Martin v. Löwis11437992002-04-12 09:54:03 +000013904
13905
13906
13907
13908
Thomas Wouters477c8d52006-05-27 19:21:47 +000013909{ echo "$as_me:$LINENO: checking for --with-threads" >&5
13910echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013911
Thomas Wouters477c8d52006-05-27 19:21:47 +000013912# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000013913if test "${with_threads+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000013914 withval=$with_threads;
13915fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000013916
13917
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000013918# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000013919
Thomas Wouters477c8d52006-05-27 19:21:47 +000013920# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013921if test "${with_thread+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000013922 withval=$with_thread; with_threads=$with_thread
13923fi
13924
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000013925
13926if test -z "$with_threads"
13927then with_threads="yes"
13928fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000013929{ echo "$as_me:$LINENO: result: $with_threads" >&5
13930echo "${ECHO_T}$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000013931
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013932
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000013933if test "$with_threads" = "no"
13934then
13935 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013936elif test "$ac_cv_pthread_is_default" = yes
13937then
Martin v. Löwis11437992002-04-12 09:54:03 +000013938 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013939#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013940_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013941
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013942 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000013943 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013944#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013945_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013946
13947 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000013948 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000013949elif test "$ac_cv_kpthread" = "yes"
13950then
13951 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000013952 if test "$ac_cv_cxx_thread" = "yes"; then
13953 CXX="$CXX -Kpthread"
13954 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013955 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000013956#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013957_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000013958
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013959 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013960 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013961elif test "$ac_cv_kthread" = "yes"
13962then
13963 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000013964 if test "$ac_cv_cxx_thread" = "yes"; then
13965 CXX="$CXX -Kthread"
13966 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013967 cat >>confdefs.h <<\_ACEOF
13968#define WITH_THREAD 1
13969_ACEOF
13970
13971 posix_threads=yes
13972 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013973elif test "$ac_cv_pthread" = "yes"
13974then
13975 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000013976 if test "$ac_cv_cxx_thread" = "yes"; then
13977 CXX="$CXX -pthread"
13978 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013979 cat >>confdefs.h <<\_ACEOF
13980#define WITH_THREAD 1
13981_ACEOF
13982
13983 posix_threads=yes
13984 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000013985else
13986 if test ! -z "$with_threads" -a -d "$with_threads"
13987 then LDFLAGS="$LDFLAGS -L$with_threads"
13988 fi
13989 if test ! -z "$withval" -a -d "$withval"
13990 then LDFLAGS="$LDFLAGS -L$withval"
13991 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013992
13993 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000013994 # define _POSIX_THREADS in unistd.h. Some apparently don't
13995 # (e.g. gnu pth with pthread emulation)
Thomas Wouters477c8d52006-05-27 19:21:47 +000013996 { echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
13997echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013998 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013999/* confdefs.h. */
14000_ACEOF
14001cat confdefs.h >>conftest.$ac_ext
14002cat >>conftest.$ac_ext <<_ACEOF
14003/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000014004
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014005#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000014006#ifdef _POSIX_THREADS
14007yes
14008#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014009
14010_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014011if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000014012 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014013 unistd_defines_pthreads=yes
14014else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014015 unistd_defines_pthreads=no
14016fi
14017rm -f conftest*
14018
Thomas Wouters477c8d52006-05-27 19:21:47 +000014019 { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
14020echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014021
Martin v. Löwis11437992002-04-12 09:54:03 +000014022 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000014023#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014024_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000014025
Martin v. Löwis11437992002-04-12 09:54:03 +000014026 if test "${ac_cv_header_cthreads_h+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000014027 { echo "$as_me:$LINENO: checking for cthreads.h" >&5
14028echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014029if test "${ac_cv_header_cthreads_h+set}" = set; then
14030 echo $ECHO_N "(cached) $ECHO_C" >&6
14031fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000014032{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
14033echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014034else
Martin v. Löwis11437992002-04-12 09:54:03 +000014035 # Is the header compilable?
Thomas Wouters477c8d52006-05-27 19:21:47 +000014036{ echo "$as_me:$LINENO: checking cthreads.h usability" >&5
14037echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014038cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014039/* confdefs.h. */
14040_ACEOF
14041cat confdefs.h >>conftest.$ac_ext
14042cat >>conftest.$ac_ext <<_ACEOF
14043/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014044$ac_includes_default
14045#include <cthreads.h>
14046_ACEOF
14047rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014048if { (ac_try="$ac_compile"
14049case "(($ac_try" in
14050 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14051 *) ac_try_echo=$ac_try;;
14052esac
14053eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14054 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014055 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014056 grep -v '^ *+' conftest.er1 >conftest.err
14057 rm -f conftest.er1
14058 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14060 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014061 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
14062 { (case "(($ac_try" in
14063 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14064 *) ac_try_echo=$ac_try;;
14065esac
14066eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14067 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014068 ac_status=$?
14069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14070 (exit $ac_status); }; } &&
14071 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014072 { (case "(($ac_try" in
14073 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14074 *) ac_try_echo=$ac_try;;
14075esac
14076eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14077 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014078 ac_status=$?
14079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14080 (exit $ac_status); }; }; then
14081 ac_header_compiler=yes
14082else
14083 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014084sed 's/^/| /' conftest.$ac_ext >&5
14085
Thomas Wouters477c8d52006-05-27 19:21:47 +000014086 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014087fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000014088
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000014090{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14091echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014092
14093# Is the header present?
Thomas Wouters477c8d52006-05-27 19:21:47 +000014094{ echo "$as_me:$LINENO: checking cthreads.h presence" >&5
14095echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014096cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014097/* confdefs.h. */
14098_ACEOF
14099cat confdefs.h >>conftest.$ac_ext
14100cat >>conftest.$ac_ext <<_ACEOF
14101/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014102#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014103_ACEOF
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014104if { (ac_try="$ac_cpp conftest.$ac_ext"
14105case "(($ac_try" in
14106 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14107 *) ac_try_echo=$ac_try;;
14108esac
14109eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14110 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014111 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014112 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000014113 rm -f conftest.er1
14114 cat conftest.err >&5
14115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14116 (exit $ac_status); } >/dev/null; then
14117 if test -s conftest.err; then
14118 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000014119 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +000014120 else
14121 ac_cpp_err=
14122 fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014123else
Martin v. Löwis11437992002-04-12 09:54:03 +000014124 ac_cpp_err=yes
14125fi
14126if test -z "$ac_cpp_err"; then
14127 ac_header_preproc=yes
14128else
14129 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014130sed 's/^/| /' conftest.$ac_ext >&5
14131
Martin v. Löwis11437992002-04-12 09:54:03 +000014132 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014133fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000014134
Martin v. Löwis11437992002-04-12 09:54:03 +000014135rm -f conftest.err conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000014136{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14137echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014138
14139# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014140case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14141 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000014142 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
14143echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014144 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
14145echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
14146 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014147 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014148 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014149 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
14150echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014151 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
14152echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
14153 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
14154echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
14155 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
14156echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014157 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
14158echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014159 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
14160echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +000014161 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000014162## ------------------------------------------------ ##
14163## Report this to http://www.python.org/python-bugs ##
14164## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014165_ASBOX
Thomas Wouters477c8d52006-05-27 19:21:47 +000014166 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014167 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014168esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000014169{ echo "$as_me:$LINENO: checking for cthreads.h" >&5
14170echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014171if test "${ac_cv_header_cthreads_h+set}" = set; then
14172 echo $ECHO_N "(cached) $ECHO_C" >&6
14173else
14174 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014175fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000014176{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
14177echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014178
14179fi
14180if test $ac_cv_header_cthreads_h = yes; then
14181 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014182#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014183_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014184
Martin v. Löwis11437992002-04-12 09:54:03 +000014185 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014186#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014187_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014188
Martin v. Löwis11437992002-04-12 09:54:03 +000014189
14190cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014191#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014192_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014193
14194 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014195 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014196else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014197
Martin v. Löwis11437992002-04-12 09:54:03 +000014198 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000014199 { echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
14200echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014201if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
14202 echo $ECHO_N "(cached) $ECHO_C" >&6
14203fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000014204{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
14205echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014206else
Martin v. Löwis11437992002-04-12 09:54:03 +000014207 # Is the header compilable?
Thomas Wouters477c8d52006-05-27 19:21:47 +000014208{ echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
14209echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014210cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014211/* confdefs.h. */
14212_ACEOF
14213cat confdefs.h >>conftest.$ac_ext
14214cat >>conftest.$ac_ext <<_ACEOF
14215/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014216$ac_includes_default
14217#include <mach/cthreads.h>
14218_ACEOF
14219rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014220if { (ac_try="$ac_compile"
14221case "(($ac_try" in
14222 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14223 *) ac_try_echo=$ac_try;;
14224esac
14225eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14226 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014227 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014228 grep -v '^ *+' conftest.er1 >conftest.err
14229 rm -f conftest.er1
14230 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014231 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14232 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014233 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
14234 { (case "(($ac_try" in
14235 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14236 *) ac_try_echo=$ac_try;;
14237esac
14238eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14239 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014240 ac_status=$?
14241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14242 (exit $ac_status); }; } &&
14243 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014244 { (case "(($ac_try" in
14245 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14246 *) ac_try_echo=$ac_try;;
14247esac
14248eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14249 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014250 ac_status=$?
14251 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14252 (exit $ac_status); }; }; then
14253 ac_header_compiler=yes
14254else
14255 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014256sed 's/^/| /' conftest.$ac_ext >&5
14257
Thomas Wouters477c8d52006-05-27 19:21:47 +000014258 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014259fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000014260
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014261rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000014262{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14263echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014264
14265# Is the header present?
Thomas Wouters477c8d52006-05-27 19:21:47 +000014266{ echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
14267echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014268cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014269/* confdefs.h. */
14270_ACEOF
14271cat confdefs.h >>conftest.$ac_ext
14272cat >>conftest.$ac_ext <<_ACEOF
14273/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014274#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014275_ACEOF
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014276if { (ac_try="$ac_cpp conftest.$ac_ext"
14277case "(($ac_try" in
14278 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14279 *) ac_try_echo=$ac_try;;
14280esac
14281eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14282 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014283 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014284 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000014285 rm -f conftest.er1
14286 cat conftest.err >&5
14287 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14288 (exit $ac_status); } >/dev/null; then
14289 if test -s conftest.err; then
14290 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000014291 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +000014292 else
14293 ac_cpp_err=
14294 fi
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014295else
Martin v. Löwis11437992002-04-12 09:54:03 +000014296 ac_cpp_err=yes
14297fi
14298if test -z "$ac_cpp_err"; then
14299 ac_header_preproc=yes
14300else
14301 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014302sed 's/^/| /' conftest.$ac_ext >&5
14303
Martin v. Löwis11437992002-04-12 09:54:03 +000014304 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014305fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000014306
Martin v. Löwis11437992002-04-12 09:54:03 +000014307rm -f conftest.err conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000014308{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14309echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014310
14311# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014312case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14313 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000014314 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
14315echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014316 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
14317echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
14318 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014319 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014320 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014321 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
14322echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014323 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
14324echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
14325 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
14326echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
14327 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
14328echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014329 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
14330echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014331 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
14332echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +000014333 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000014334## ------------------------------------------------ ##
14335## Report this to http://www.python.org/python-bugs ##
14336## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014337_ASBOX
Thomas Wouters477c8d52006-05-27 19:21:47 +000014338 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014339 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014340esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000014341{ echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
14342echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014343if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
14344 echo $ECHO_N "(cached) $ECHO_C" >&6
14345else
14346 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014347fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000014348{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
14349echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014350
14351fi
14352if test $ac_cv_header_mach_cthreads_h = yes; then
14353 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014354#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014355_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014356
Martin v. Löwis11437992002-04-12 09:54:03 +000014357 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014358#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014359_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014360
Martin v. Löwis11437992002-04-12 09:54:03 +000014361
14362cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014363#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014364_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014365
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014366 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014367else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014368
Thomas Wouters477c8d52006-05-27 19:21:47 +000014369 { echo "$as_me:$LINENO: checking for --with-pth" >&5
14370echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014371
Thomas Wouters477c8d52006-05-27 19:21:47 +000014372# Check whether --with-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014373if test "${with_pth+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000014374 withval=$with_pth; { echo "$as_me:$LINENO: result: $withval" >&5
14375echo "${ECHO_T}$withval" >&6; }
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000014376 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014377#define WITH_THREAD 1
14378_ACEOF
14379
14380
14381cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014382#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014383_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014384
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000014385 LIBS="-lpth $LIBS"
14386 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014387else
Thomas Wouters477c8d52006-05-27 19:21:47 +000014388 { echo "$as_me:$LINENO: result: no" >&5
14389echo "${ECHO_T}no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014390
14391 # Just looking for pthread_create in libpthread is not enough:
14392 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
14393 # So we really have to include pthread.h, and then link.
14394 _libs=$LIBS
14395 LIBS="$LIBS -lpthread"
Thomas Wouters477c8d52006-05-27 19:21:47 +000014396 { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
14397echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014398 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014399/* confdefs.h. */
14400_ACEOF
14401cat confdefs.h >>conftest.$ac_ext
14402cat >>conftest.$ac_ext <<_ACEOF
14403/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014404#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000014405
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014406void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000014407int
14408main ()
14409{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014410
14411pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000014412 ;
14413 return 0;
14414}
14415_ACEOF
14416rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014417if { (ac_try="$ac_link"
14418case "(($ac_try" in
14419 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14420 *) ac_try_echo=$ac_try;;
14421esac
14422eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14423 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014424 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014425 grep -v '^ *+' conftest.er1 >conftest.err
14426 rm -f conftest.er1
14427 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14429 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014430 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
14431 { (case "(($ac_try" in
14432 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14433 *) ac_try_echo=$ac_try;;
14434esac
14435eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14436 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014437 ac_status=$?
14438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14439 (exit $ac_status); }; } &&
14440 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014441 { (case "(($ac_try" in
14442 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14443 *) ac_try_echo=$ac_try;;
14444esac
14445eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14446 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014447 ac_status=$?
14448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14449 (exit $ac_status); }; }; then
14450
Thomas Wouters477c8d52006-05-27 19:21:47 +000014451 { echo "$as_me:$LINENO: result: yes" >&5
14452echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014453 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000014454#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014455_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000014456
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014457 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014458 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000014459else
Martin v. Löwis11437992002-04-12 09:54:03 +000014460 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014461sed 's/^/| /' conftest.$ac_ext >&5
14462
Martin v. Löwis11437992002-04-12 09:54:03 +000014463
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014464 LIBS=$_libs
Thomas Wouters477c8d52006-05-27 19:21:47 +000014465 { echo "$as_me:$LINENO: checking for pthread_detach" >&5
14466echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014467if test "${ac_cv_func_pthread_detach+set}" = set; then
14468 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000014469else
Martin v. Löwis11437992002-04-12 09:54:03 +000014470 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014471/* confdefs.h. */
14472_ACEOF
14473cat confdefs.h >>conftest.$ac_ext
14474cat >>conftest.$ac_ext <<_ACEOF
14475/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014476/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
14477 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14478#define pthread_detach innocuous_pthread_detach
14479
Guido van Rossumad678af1998-10-02 14:42:15 +000014480/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014481 which can conflict with char pthread_detach (); below.
14482 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014483 <limits.h> exists even on freestanding compilers. */
14484
14485#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000014486# include <limits.h>
14487#else
14488# include <assert.h>
14489#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014490
14491#undef pthread_detach
14492
Thomas Wouters477c8d52006-05-27 19:21:47 +000014493/* Override any GCC internal prototype to avoid an error.
14494 Use char because int might match the return type of a GCC
14495 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014496#ifdef __cplusplus
14497extern "C"
14498#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014499char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000014500/* The GNU C library defines this for functions which it implements
14501 to always fail with ENOSYS. Some functions are actually named
14502 something starting with __ and the normal name is an alias. */
Thomas Wouters477c8d52006-05-27 19:21:47 +000014503#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000014504choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000014505#endif
14506
Skip Montanaro6dead952003-09-25 14:50:04 +000014507int
14508main ()
14509{
Thomas Wouters477c8d52006-05-27 19:21:47 +000014510return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014511 ;
14512 return 0;
14513}
14514_ACEOF
14515rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014516if { (ac_try="$ac_link"
14517case "(($ac_try" in
14518 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14519 *) ac_try_echo=$ac_try;;
14520esac
14521eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14522 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014523 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014524 grep -v '^ *+' conftest.er1 >conftest.err
14525 rm -f conftest.er1
14526 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14528 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014529 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
14530 { (case "(($ac_try" in
14531 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14532 *) ac_try_echo=$ac_try;;
14533esac
14534eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14535 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014536 ac_status=$?
14537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14538 (exit $ac_status); }; } &&
14539 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014540 { (case "(($ac_try" in
14541 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14542 *) ac_try_echo=$ac_try;;
14543esac
14544eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14545 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014546 ac_status=$?
14547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14548 (exit $ac_status); }; }; then
14549 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000014550else
Martin v. Löwis11437992002-04-12 09:54:03 +000014551 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014552sed 's/^/| /' conftest.$ac_ext >&5
14553
Thomas Wouters477c8d52006-05-27 19:21:47 +000014554 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000014555fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000014556
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014557rm -f core conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014558 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000014559fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000014560{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
14561echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014562if test $ac_cv_func_pthread_detach = yes; then
14563 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000014564#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014565_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000014566
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014567 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014568 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000014569else
Guido van Rossumad678af1998-10-02 14:42:15 +000014570
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014571 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000014572 { echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
14573echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014574if test "${ac_cv_header_atheos_threads_h+set}" = set; then
14575 echo $ECHO_N "(cached) $ECHO_C" >&6
14576fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000014577{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
14578echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014579else
14580 # Is the header compilable?
Thomas Wouters477c8d52006-05-27 19:21:47 +000014581{ echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
14582echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014583cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014584/* confdefs.h. */
14585_ACEOF
14586cat confdefs.h >>conftest.$ac_ext
14587cat >>conftest.$ac_ext <<_ACEOF
14588/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014589$ac_includes_default
14590#include <atheos/threads.h>
14591_ACEOF
14592rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014593if { (ac_try="$ac_compile"
14594case "(($ac_try" in
14595 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14596 *) ac_try_echo=$ac_try;;
14597esac
14598eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14599 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014600 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014601 grep -v '^ *+' conftest.er1 >conftest.err
14602 rm -f conftest.er1
14603 cat conftest.err >&5
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014604 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14605 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014606 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
14607 { (case "(($ac_try" in
14608 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14609 *) ac_try_echo=$ac_try;;
14610esac
14611eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14612 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014613 ac_status=$?
14614 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14615 (exit $ac_status); }; } &&
14616 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014617 { (case "(($ac_try" in
14618 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14619 *) ac_try_echo=$ac_try;;
14620esac
14621eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14622 (eval "$ac_try") 2>&5
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014623 ac_status=$?
14624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14625 (exit $ac_status); }; }; then
14626 ac_header_compiler=yes
14627else
14628 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014629sed 's/^/| /' conftest.$ac_ext >&5
14630
Thomas Wouters477c8d52006-05-27 19:21:47 +000014631 ac_header_compiler=no
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014632fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000014633
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014634rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000014635{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14636echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014637
14638# Is the header present?
Thomas Wouters477c8d52006-05-27 19:21:47 +000014639{ echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
14640echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014641cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014642/* confdefs.h. */
14643_ACEOF
14644cat confdefs.h >>conftest.$ac_ext
14645cat >>conftest.$ac_ext <<_ACEOF
14646/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014647#include <atheos/threads.h>
14648_ACEOF
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014649if { (ac_try="$ac_cpp conftest.$ac_ext"
14650case "(($ac_try" in
14651 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14652 *) ac_try_echo=$ac_try;;
14653esac
14654eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14655 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014656 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014657 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014658 rm -f conftest.er1
14659 cat conftest.err >&5
14660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14661 (exit $ac_status); } >/dev/null; then
14662 if test -s conftest.err; then
14663 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000014664 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014665 else
14666 ac_cpp_err=
14667 fi
14668else
14669 ac_cpp_err=yes
14670fi
14671if test -z "$ac_cpp_err"; then
14672 ac_header_preproc=yes
14673else
14674 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014675sed 's/^/| /' conftest.$ac_ext >&5
14676
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014677 ac_header_preproc=no
14678fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000014679
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014680rm -f conftest.err conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000014681{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14682echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014683
14684# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014685case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14686 yes:no: )
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014687 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
14688echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014689 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
14690echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
14691 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014692 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014693 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014694 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
14695echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014696 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
14697echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
14698 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
14699echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
14700 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5
14701echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014702 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
14703echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014704 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
14705echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +000014706 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000014707## ------------------------------------------------ ##
14708## Report this to http://www.python.org/python-bugs ##
14709## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014710_ASBOX
Thomas Wouters477c8d52006-05-27 19:21:47 +000014711 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014712 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014713esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000014714{ echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
14715echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014716if test "${ac_cv_header_atheos_threads_h+set}" = set; then
14717 echo $ECHO_N "(cached) $ECHO_C" >&6
14718else
14719 ac_cv_header_atheos_threads_h=$ac_header_preproc
14720fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000014721{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
14722echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014723
14724fi
14725if test $ac_cv_header_atheos_threads_h = yes; then
14726 cat >>confdefs.h <<\_ACEOF
14727#define WITH_THREAD 1
14728_ACEOF
14729
14730
14731cat >>confdefs.h <<\_ACEOF
14732#define ATHEOS_THREADS 1
14733_ACEOF
14734
14735 THREADOBJ="Python/thread.o"
14736else
14737
Martin v. Löwis11437992002-04-12 09:54:03 +000014738 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000014739 { echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
14740echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014741if test "${ac_cv_header_kernel_OS_h+set}" = set; then
14742 echo $ECHO_N "(cached) $ECHO_C" >&6
14743fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000014744{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
14745echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014746else
Martin v. Löwis11437992002-04-12 09:54:03 +000014747 # Is the header compilable?
Thomas Wouters477c8d52006-05-27 19:21:47 +000014748{ echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
14749echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014750cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014751/* confdefs.h. */
14752_ACEOF
14753cat confdefs.h >>conftest.$ac_ext
14754cat >>conftest.$ac_ext <<_ACEOF
14755/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014756$ac_includes_default
14757#include <kernel/OS.h>
14758_ACEOF
14759rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014760if { (ac_try="$ac_compile"
14761case "(($ac_try" in
14762 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14763 *) ac_try_echo=$ac_try;;
14764esac
14765eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14766 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014767 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014768 grep -v '^ *+' conftest.er1 >conftest.err
14769 rm -f conftest.er1
14770 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14772 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014773 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
14774 { (case "(($ac_try" in
14775 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14776 *) ac_try_echo=$ac_try;;
14777esac
14778eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14779 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014780 ac_status=$?
14781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14782 (exit $ac_status); }; } &&
14783 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014784 { (case "(($ac_try" in
14785 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14786 *) ac_try_echo=$ac_try;;
14787esac
14788eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14789 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014790 ac_status=$?
14791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14792 (exit $ac_status); }; }; then
14793 ac_header_compiler=yes
14794else
14795 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014796sed 's/^/| /' conftest.$ac_ext >&5
14797
Thomas Wouters477c8d52006-05-27 19:21:47 +000014798 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014799fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000014800
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014801rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000014802{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14803echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014804
14805# Is the header present?
Thomas Wouters477c8d52006-05-27 19:21:47 +000014806{ echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
14807echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014808cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014809/* confdefs.h. */
14810_ACEOF
14811cat confdefs.h >>conftest.$ac_ext
14812cat >>conftest.$ac_ext <<_ACEOF
14813/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014814#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014815_ACEOF
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014816if { (ac_try="$ac_cpp conftest.$ac_ext"
14817case "(($ac_try" in
14818 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14819 *) ac_try_echo=$ac_try;;
14820esac
14821eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14822 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014823 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014824 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000014825 rm -f conftest.er1
14826 cat conftest.err >&5
14827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14828 (exit $ac_status); } >/dev/null; then
14829 if test -s conftest.err; then
14830 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000014831 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +000014832 else
14833 ac_cpp_err=
14834 fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014835else
Martin v. Löwis11437992002-04-12 09:54:03 +000014836 ac_cpp_err=yes
14837fi
14838if test -z "$ac_cpp_err"; then
14839 ac_header_preproc=yes
14840else
14841 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014842sed 's/^/| /' conftest.$ac_ext >&5
14843
Martin v. Löwis11437992002-04-12 09:54:03 +000014844 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014845fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000014846
Martin v. Löwis11437992002-04-12 09:54:03 +000014847rm -f conftest.err conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000014848{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14849echo "${ECHO_T}$ac_header_preproc" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014850
Martin v. Löwis11437992002-04-12 09:54:03 +000014851# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014852case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14853 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000014854 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
14855echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014856 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the compiler's result" >&5
14857echo "$as_me: WARNING: kernel/OS.h: proceeding with the compiler's result" >&2;}
14858 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014859 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014860 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014861 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
14862echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014863 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
14864echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
14865 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: see the Autoconf documentation" >&5
14866echo "$as_me: WARNING: kernel/OS.h: see the Autoconf documentation" >&2;}
14867 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&5
14868echo "$as_me: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014869 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
14870echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014871 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&5
14872echo "$as_me: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +000014873 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000014874## ------------------------------------------------ ##
14875## Report this to http://www.python.org/python-bugs ##
14876## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014877_ASBOX
Thomas Wouters477c8d52006-05-27 19:21:47 +000014878 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014879 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014880esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000014881{ echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
14882echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014883if test "${ac_cv_header_kernel_OS_h+set}" = set; then
14884 echo $ECHO_N "(cached) $ECHO_C" >&6
14885else
14886 ac_cv_header_kernel_OS_h=$ac_header_preproc
14887fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000014888{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
14889echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014890
14891fi
14892if test $ac_cv_header_kernel_OS_h = yes; then
14893 cat >>confdefs.h <<\_ACEOF
14894#define WITH_THREAD 1
14895_ACEOF
14896
14897
14898cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014899#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014900_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014901
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014902 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014903else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014904
Thomas Wouters477c8d52006-05-27 19:21:47 +000014905 { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
14906echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014907if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
14908 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014909else
Martin v. Löwis11437992002-04-12 09:54:03 +000014910 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014911LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014912cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014913/* confdefs.h. */
14914_ACEOF
14915cat confdefs.h >>conftest.$ac_ext
14916cat >>conftest.$ac_ext <<_ACEOF
14917/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014918
Thomas Wouters477c8d52006-05-27 19:21:47 +000014919/* Override any GCC internal prototype to avoid an error.
14920 Use char because int might match the return type of a GCC
14921 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014922#ifdef __cplusplus
14923extern "C"
14924#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014925char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014926int
14927main ()
14928{
Thomas Wouters477c8d52006-05-27 19:21:47 +000014929return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014930 ;
14931 return 0;
14932}
14933_ACEOF
14934rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014935if { (ac_try="$ac_link"
14936case "(($ac_try" in
14937 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14938 *) ac_try_echo=$ac_try;;
14939esac
14940eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14941 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014942 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014943 grep -v '^ *+' conftest.er1 >conftest.err
14944 rm -f conftest.er1
14945 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14947 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014948 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
14949 { (case "(($ac_try" in
14950 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14951 *) ac_try_echo=$ac_try;;
14952esac
14953eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14954 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014955 ac_status=$?
14956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14957 (exit $ac_status); }; } &&
14958 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014959 { (case "(($ac_try" in
14960 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14961 *) ac_try_echo=$ac_try;;
14962esac
14963eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14964 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014965 ac_status=$?
14966 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14967 (exit $ac_status); }; }; then
14968 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000014969else
Martin v. Löwis11437992002-04-12 09:54:03 +000014970 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014971sed 's/^/| /' conftest.$ac_ext >&5
14972
Thomas Wouters477c8d52006-05-27 19:21:47 +000014973 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000014974fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000014975
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014976rm -f core conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014977 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014978LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000014979fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000014980{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
14981echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014982if test $ac_cv_lib_pthreads_pthread_create = yes; then
14983 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000014984#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014985_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000014986
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014987 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000014988 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014989 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000014990else
Greg Steinadf63d62000-07-05 10:38:09 +000014991
Thomas Wouters477c8d52006-05-27 19:21:47 +000014992 { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
14993echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014994if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
14995 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000014996else
Martin v. Löwis11437992002-04-12 09:54:03 +000014997 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000014998LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014999cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015000/* confdefs.h. */
15001_ACEOF
15002cat confdefs.h >>conftest.$ac_ext
15003cat >>conftest.$ac_ext <<_ACEOF
15004/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015005
Thomas Wouters477c8d52006-05-27 19:21:47 +000015006/* Override any GCC internal prototype to avoid an error.
15007 Use char because int might match the return type of a GCC
15008 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015009#ifdef __cplusplus
15010extern "C"
15011#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015012char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015013int
15014main ()
15015{
Thomas Wouters477c8d52006-05-27 19:21:47 +000015016return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015017 ;
15018 return 0;
15019}
15020_ACEOF
15021rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015022if { (ac_try="$ac_link"
15023case "(($ac_try" in
15024 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15025 *) ac_try_echo=$ac_try;;
15026esac
15027eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15028 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015029 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015030 grep -v '^ *+' conftest.er1 >conftest.err
15031 rm -f conftest.er1
15032 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15034 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015035 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
15036 { (case "(($ac_try" in
15037 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15038 *) ac_try_echo=$ac_try;;
15039esac
15040eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15041 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015042 ac_status=$?
15043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15044 (exit $ac_status); }; } &&
15045 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015046 { (case "(($ac_try" in
15047 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15048 *) ac_try_echo=$ac_try;;
15049esac
15050eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15051 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015052 ac_status=$?
15053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15054 (exit $ac_status); }; }; then
15055 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000015056else
Martin v. Löwis11437992002-04-12 09:54:03 +000015057 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015058sed 's/^/| /' conftest.$ac_ext >&5
15059
Thomas Wouters477c8d52006-05-27 19:21:47 +000015060 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000015061fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000015062
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015063rm -f core conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015064 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015065LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000015066fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000015067{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
15068echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015069if test $ac_cv_lib_c_r_pthread_create = yes; then
15070 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000015071#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015072_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000015073
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015074 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015075 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015076 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000015077else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000015078
Thomas Wouters477c8d52006-05-27 19:21:47 +000015079 { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
15080echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015081if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
15082 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015083else
Martin v. Löwis11437992002-04-12 09:54:03 +000015084 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015085LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015086cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015087/* confdefs.h. */
15088_ACEOF
15089cat confdefs.h >>conftest.$ac_ext
15090cat >>conftest.$ac_ext <<_ACEOF
15091/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015092
Thomas Wouters477c8d52006-05-27 19:21:47 +000015093/* Override any GCC internal prototype to avoid an error.
15094 Use char because int might match the return type of a GCC
15095 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015096#ifdef __cplusplus
15097extern "C"
15098#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015099char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015100int
15101main ()
15102{
Thomas Wouters477c8d52006-05-27 19:21:47 +000015103return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015104 ;
15105 return 0;
15106}
15107_ACEOF
15108rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015109if { (ac_try="$ac_link"
15110case "(($ac_try" in
15111 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15112 *) ac_try_echo=$ac_try;;
15113esac
15114eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15115 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015116 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015117 grep -v '^ *+' conftest.er1 >conftest.err
15118 rm -f conftest.er1
15119 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15121 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015122 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
15123 { (case "(($ac_try" in
15124 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15125 *) ac_try_echo=$ac_try;;
15126esac
15127eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15128 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015129 ac_status=$?
15130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15131 (exit $ac_status); }; } &&
15132 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015133 { (case "(($ac_try" in
15134 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15135 *) ac_try_echo=$ac_try;;
15136esac
15137eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15138 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015139 ac_status=$?
15140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15141 (exit $ac_status); }; }; then
15142 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015143else
Martin v. Löwis11437992002-04-12 09:54:03 +000015144 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015145sed 's/^/| /' conftest.$ac_ext >&5
15146
Thomas Wouters477c8d52006-05-27 19:21:47 +000015147 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015148fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000015149
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015150rm -f core conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015151 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015152LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015153fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000015154{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
15155echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015156if test $ac_cv_lib_pthread___pthread_create_system = yes; then
15157 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015158#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015159_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015160
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015161 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015162 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015163 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015164else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015165
Thomas Wouters477c8d52006-05-27 19:21:47 +000015166 { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
15167echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015168if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
15169 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000015170else
Martin v. Löwis11437992002-04-12 09:54:03 +000015171 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000015172LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015173cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015174/* confdefs.h. */
15175_ACEOF
15176cat confdefs.h >>conftest.$ac_ext
15177cat >>conftest.$ac_ext <<_ACEOF
15178/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015179
Thomas Wouters477c8d52006-05-27 19:21:47 +000015180/* Override any GCC internal prototype to avoid an error.
15181 Use char because int might match the return type of a GCC
15182 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015183#ifdef __cplusplus
15184extern "C"
15185#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015186char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015187int
15188main ()
15189{
Thomas Wouters477c8d52006-05-27 19:21:47 +000015190return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015191 ;
15192 return 0;
15193}
15194_ACEOF
15195rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015196if { (ac_try="$ac_link"
15197case "(($ac_try" in
15198 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15199 *) ac_try_echo=$ac_try;;
15200esac
15201eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15202 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015203 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015204 grep -v '^ *+' conftest.er1 >conftest.err
15205 rm -f conftest.er1
15206 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15208 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015209 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
15210 { (case "(($ac_try" in
15211 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15212 *) ac_try_echo=$ac_try;;
15213esac
15214eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15215 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015216 ac_status=$?
15217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15218 (exit $ac_status); }; } &&
15219 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015220 { (case "(($ac_try" in
15221 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15222 *) ac_try_echo=$ac_try;;
15223esac
15224eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15225 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015226 ac_status=$?
15227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15228 (exit $ac_status); }; }; then
15229 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000015230else
Martin v. Löwis11437992002-04-12 09:54:03 +000015231 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015232sed 's/^/| /' conftest.$ac_ext >&5
15233
Thomas Wouters477c8d52006-05-27 19:21:47 +000015234 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000015235fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000015236
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015237rm -f core conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015238 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015239LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000015240fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000015241{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
15242echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015243if test $ac_cv_lib_cma_pthread_create = yes; then
15244 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000015245#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015246_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000015247
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015248 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015249 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015250 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000015251else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000015252
Martin v. Löwis130fb172001-07-19 11:00:41 +000015253 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000015254fi
15255
Guido van Rossum627b2d71993-12-24 10:39:16 +000015256
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015257fi
15258
Guido van Rossum0be3e491997-05-22 20:33:33 +000015259fi
15260
Guido van Rossum49545951997-12-02 19:28:29 +000015261fi
15262
Guido van Rossumb93a8621998-05-07 13:27:32 +000015263fi
15264
Guido van Rossum07bd90e2000-05-08 13:41:38 +000015265
Michael W. Hudson54241132001-12-07 15:38:26 +000015266fi
15267
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015268
15269fi
15270
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015271fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000015272
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015273rm -f core conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015274 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000015275fi
15276
Martin v. Löwis11437992002-04-12 09:54:03 +000015277fi
15278
15279
15280fi
15281
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015282
Michael W. Hudson54241132001-12-07 15:38:26 +000015283
Thomas Wouters477c8d52006-05-27 19:21:47 +000015284 { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
15285echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015286if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
15287 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015288else
Martin v. Löwis11437992002-04-12 09:54:03 +000015289 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015290LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015291cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015292/* confdefs.h. */
15293_ACEOF
15294cat confdefs.h >>conftest.$ac_ext
15295cat >>conftest.$ac_ext <<_ACEOF
15296/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015297
Thomas Wouters477c8d52006-05-27 19:21:47 +000015298/* Override any GCC internal prototype to avoid an error.
15299 Use char because int might match the return type of a GCC
15300 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015301#ifdef __cplusplus
15302extern "C"
15303#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015304char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015305int
15306main ()
15307{
Thomas Wouters477c8d52006-05-27 19:21:47 +000015308return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015309 ;
15310 return 0;
15311}
15312_ACEOF
15313rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015314if { (ac_try="$ac_link"
15315case "(($ac_try" in
15316 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15317 *) ac_try_echo=$ac_try;;
15318esac
15319eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15320 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015321 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015322 grep -v '^ *+' conftest.er1 >conftest.err
15323 rm -f conftest.er1
15324 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015325 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15326 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015327 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
15328 { (case "(($ac_try" in
15329 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15330 *) ac_try_echo=$ac_try;;
15331esac
15332eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15333 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015334 ac_status=$?
15335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15336 (exit $ac_status); }; } &&
15337 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015338 { (case "(($ac_try" in
15339 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15340 *) ac_try_echo=$ac_try;;
15341esac
15342eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15343 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015344 ac_status=$?
15345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15346 (exit $ac_status); }; }; then
15347 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015348else
Martin v. Löwis11437992002-04-12 09:54:03 +000015349 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015350sed 's/^/| /' conftest.$ac_ext >&5
15351
Thomas Wouters477c8d52006-05-27 19:21:47 +000015352 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015353fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000015354
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015355rm -f core conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015356 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015357LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015358fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000015359{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
15360echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015361if test $ac_cv_lib_mpc_usconfig = yes; then
15362 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015363#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015364_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015365
Martin v. Löwis130fb172001-07-19 11:00:41 +000015366 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015367 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015368 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000015369fi
15370
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015371
Neal Norwitza978ab02002-11-02 16:58:05 +000015372 if test "$posix_threads" != "yes"; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000015373 { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
15374echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015375if test "${ac_cv_lib_thread_thr_create+set}" = set; then
15376 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015377else
Martin v. Löwis11437992002-04-12 09:54:03 +000015378 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015379LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015380cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015381/* confdefs.h. */
15382_ACEOF
15383cat confdefs.h >>conftest.$ac_ext
15384cat >>conftest.$ac_ext <<_ACEOF
15385/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015386
Thomas Wouters477c8d52006-05-27 19:21:47 +000015387/* Override any GCC internal prototype to avoid an error.
15388 Use char because int might match the return type of a GCC
15389 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015390#ifdef __cplusplus
15391extern "C"
15392#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015393char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015394int
15395main ()
15396{
Thomas Wouters477c8d52006-05-27 19:21:47 +000015397return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015398 ;
15399 return 0;
15400}
15401_ACEOF
15402rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015403if { (ac_try="$ac_link"
15404case "(($ac_try" in
15405 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15406 *) ac_try_echo=$ac_try;;
15407esac
15408eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15409 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015410 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015411 grep -v '^ *+' conftest.er1 >conftest.err
15412 rm -f conftest.er1
15413 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15415 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015416 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
15417 { (case "(($ac_try" in
15418 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15419 *) ac_try_echo=$ac_try;;
15420esac
15421eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15422 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015423 ac_status=$?
15424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15425 (exit $ac_status); }; } &&
15426 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015427 { (case "(($ac_try" in
15428 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15429 *) ac_try_echo=$ac_try;;
15430esac
15431eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15432 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015433 ac_status=$?
15434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15435 (exit $ac_status); }; }; then
15436 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015437else
Martin v. Löwis11437992002-04-12 09:54:03 +000015438 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015439sed 's/^/| /' conftest.$ac_ext >&5
15440
Thomas Wouters477c8d52006-05-27 19:21:47 +000015441 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015442fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000015443
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015444rm -f core conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015445 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015446LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015447fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000015448{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
15449echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015450if test $ac_cv_lib_thread_thr_create = yes; then
15451 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015452#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015453_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015454
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015455 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015456 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015457 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000015458fi
15459
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015460 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015461
Martin v. Löwis130fb172001-07-19 11:00:41 +000015462 if test "$USE_THREAD_MODULE" != "#"
15463 then
15464 # If the above checks didn't disable threads, (at least) OSF1
15465 # needs this '-threads' argument during linking.
15466 case $ac_sys_system in
15467 OSF1) LDLAST=-threads;;
15468 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000015469 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015470fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015471
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015472if test "$posix_threads" = "yes"; then
15473 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015474
15475cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015476#define _POSIX_THREADS 1
15477_ACEOF
15478
15479 fi
15480
15481 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
15482 case $ac_sys_system/$ac_sys_release in
15483 SunOS/5.6)
15484cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015485#define HAVE_PTHREAD_DESTRUCTOR 1
15486_ACEOF
15487
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015488 ;;
15489 SunOS/5.8)
15490cat >>confdefs.h <<\_ACEOF
15491#define HAVE_BROKEN_POSIX_SEMAPHORES 1
15492_ACEOF
15493
15494 ;;
15495 esac
15496
Thomas Wouters477c8d52006-05-27 19:21:47 +000015497 { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
15498echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015499 if test "${ac_cv_pthread_system_supported+set}" = set; then
15500 echo $ECHO_N "(cached) $ECHO_C" >&6
15501else
15502 if test "$cross_compiling" = yes; then
15503 ac_cv_pthread_system_supported=no
15504else
15505 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015506/* confdefs.h. */
15507_ACEOF
15508cat confdefs.h >>conftest.$ac_ext
15509cat >>conftest.$ac_ext <<_ACEOF
15510/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015511#include <pthread.h>
15512 void *foo(void *parm) {
15513 return NULL;
15514 }
15515 main() {
15516 pthread_attr_t attr;
15517 pthread_t id;
15518 if (pthread_attr_init(&attr)) exit(-1);
15519 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
15520 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
15521 exit(0);
15522 }
15523_ACEOF
15524rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015525if { (ac_try="$ac_link"
15526case "(($ac_try" in
15527 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15528 *) ac_try_echo=$ac_try;;
15529esac
15530eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15531 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015532 ac_status=$?
15533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15534 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015535 { (case "(($ac_try" in
15536 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15537 *) ac_try_echo=$ac_try;;
15538esac
15539eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15540 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015541 ac_status=$?
15542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15543 (exit $ac_status); }; }; then
15544 ac_cv_pthread_system_supported=yes
15545else
15546 echo "$as_me: program exited with status $ac_status" >&5
15547echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015548sed 's/^/| /' conftest.$ac_ext >&5
15549
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015550( exit $ac_status )
15551ac_cv_pthread_system_supported=no
15552fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000015553rm -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 +000015554fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015555
Thomas Wouters477c8d52006-05-27 19:21:47 +000015556
15557
Guido van Rossum627b2d71993-12-24 10:39:16 +000015558fi
15559
Thomas Wouters477c8d52006-05-27 19:21:47 +000015560 { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
15561echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015562 if test "$ac_cv_pthread_system_supported" = "yes"; then
15563
15564cat >>confdefs.h <<\_ACEOF
15565#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
15566_ACEOF
15567
15568 fi
15569
15570for ac_func in pthread_sigmask
15571do
15572as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Thomas Wouters477c8d52006-05-27 19:21:47 +000015573{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15574echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15575if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015576 echo $ECHO_N "(cached) $ECHO_C" >&6
15577else
15578 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015579/* confdefs.h. */
15580_ACEOF
15581cat confdefs.h >>conftest.$ac_ext
15582cat >>conftest.$ac_ext <<_ACEOF
15583/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015584/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15585 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15586#define $ac_func innocuous_$ac_func
15587
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015588/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015589 which can conflict with char $ac_func (); below.
15590 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015591 <limits.h> exists even on freestanding compilers. */
15592
15593#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015594# include <limits.h>
15595#else
15596# include <assert.h>
15597#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015598
15599#undef $ac_func
15600
Thomas Wouters477c8d52006-05-27 19:21:47 +000015601/* Override any GCC internal prototype to avoid an error.
15602 Use char because int might match the return type of a GCC
15603 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015604#ifdef __cplusplus
15605extern "C"
15606#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015607char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015608/* The GNU C library defines this for functions which it implements
15609 to always fail with ENOSYS. Some functions are actually named
15610 something starting with __ and the normal name is an alias. */
Thomas Wouters477c8d52006-05-27 19:21:47 +000015611#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015612choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015613#endif
15614
Skip Montanaro6dead952003-09-25 14:50:04 +000015615int
15616main ()
15617{
Thomas Wouters477c8d52006-05-27 19:21:47 +000015618return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015619 ;
15620 return 0;
15621}
15622_ACEOF
15623rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015624if { (ac_try="$ac_link"
15625case "(($ac_try" in
15626 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15627 *) ac_try_echo=$ac_try;;
15628esac
15629eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15630 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015631 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015632 grep -v '^ *+' conftest.er1 >conftest.err
15633 rm -f conftest.er1
15634 cat conftest.err >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15636 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015637 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
15638 { (case "(($ac_try" in
15639 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15640 *) ac_try_echo=$ac_try;;
15641esac
15642eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15643 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015644 ac_status=$?
15645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15646 (exit $ac_status); }; } &&
15647 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015648 { (case "(($ac_try" in
15649 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15650 *) ac_try_echo=$ac_try;;
15651esac
15652eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15653 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015654 ac_status=$?
15655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15656 (exit $ac_status); }; }; then
15657 eval "$as_ac_var=yes"
15658else
15659 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015660sed 's/^/| /' conftest.$ac_ext >&5
15661
Thomas Wouters477c8d52006-05-27 19:21:47 +000015662 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015663fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000015664
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015665rm -f core conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015666 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015667fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000015668ac_res=`eval echo '${'$as_ac_var'}'`
15669 { echo "$as_me:$LINENO: result: $ac_res" >&5
15670echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015671if test `eval echo '${'$as_ac_var'}'` = yes; then
15672 cat >>confdefs.h <<_ACEOF
15673#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15674_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000015675 case $ac_sys_system in
15676 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015677
Jason Tishlerfac083d2003-07-22 15:20:49 +000015678cat >>confdefs.h <<\_ACEOF
15679#define HAVE_BROKEN_PTHREAD_SIGMASK 1
15680_ACEOF
15681
15682 ;;
15683 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015684fi
15685done
15686
15687fi
15688
15689
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015690# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000015691
15692
Thomas Wouters477c8d52006-05-27 19:21:47 +000015693{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
15694echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
15695# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015696if test "${enable_ipv6+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000015697 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015698 no)
Thomas Wouters477c8d52006-05-27 19:21:47 +000015699 { echo "$as_me:$LINENO: result: no" >&5
15700echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015701 ipv6=no
15702 ;;
Thomas Wouters477c8d52006-05-27 19:21:47 +000015703 *) { echo "$as_me:$LINENO: result: yes" >&5
15704echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015705 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015706#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015707_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015708
15709 ipv6=yes
15710 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015711 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015712else
Martin v. Löwis11437992002-04-12 09:54:03 +000015713
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015714 if test "$cross_compiling" = yes; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000015715 { echo "$as_me:$LINENO: result: no" >&5
15716echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015717 ipv6=no
15718
15719else
Martin v. Löwis11437992002-04-12 09:54:03 +000015720 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015721/* confdefs.h. */
15722_ACEOF
15723cat confdefs.h >>conftest.$ac_ext
15724cat >>conftest.$ac_ext <<_ACEOF
15725/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015726 /* AF_INET6 available check */
15727#include <sys/types.h>
15728#include <sys/socket.h>
15729main()
15730{
15731 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
15732 exit(1);
15733 else
15734 exit(0);
15735}
15736
Martin v. Löwis11437992002-04-12 09:54:03 +000015737_ACEOF
15738rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015739if { (ac_try="$ac_link"
15740case "(($ac_try" in
15741 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15742 *) ac_try_echo=$ac_try;;
15743esac
15744eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15745 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015746 ac_status=$?
15747 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15748 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015749 { (case "(($ac_try" in
15750 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15751 *) ac_try_echo=$ac_try;;
15752esac
15753eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15754 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015755 ac_status=$?
15756 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15757 (exit $ac_status); }; }; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000015758 { echo "$as_me:$LINENO: result: yes" >&5
15759echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015760 ipv6=yes
15761else
Martin v. Löwis11437992002-04-12 09:54:03 +000015762 echo "$as_me: program exited with status $ac_status" >&5
15763echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015764sed 's/^/| /' conftest.$ac_ext >&5
15765
Martin v. Löwis11437992002-04-12 09:54:03 +000015766( exit $ac_status )
Thomas Wouters477c8d52006-05-27 19:21:47 +000015767{ echo "$as_me:$LINENO: result: no" >&5
15768echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015769 ipv6=no
15770fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000015771rm -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 +000015772fi
15773
Thomas Wouters477c8d52006-05-27 19:21:47 +000015774
15775
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015776if test "$ipv6" = "yes"; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000015777 { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
15778echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015779 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015780/* confdefs.h. */
15781_ACEOF
15782cat confdefs.h >>conftest.$ac_ext
15783cat >>conftest.$ac_ext <<_ACEOF
15784/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015785#include <sys/types.h>
15786#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015787int
15788main ()
15789{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015790struct sockaddr_in6 x;
15791x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000015792 ;
15793 return 0;
15794}
15795_ACEOF
15796rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015797if { (ac_try="$ac_compile"
15798case "(($ac_try" in
15799 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15800 *) ac_try_echo=$ac_try;;
15801esac
15802eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15803 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015804 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015805 grep -v '^ *+' conftest.er1 >conftest.err
15806 rm -f conftest.er1
15807 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15809 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015810 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
15811 { (case "(($ac_try" in
15812 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15813 *) ac_try_echo=$ac_try;;
15814esac
15815eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15816 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015817 ac_status=$?
15818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15819 (exit $ac_status); }; } &&
15820 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015821 { (case "(($ac_try" in
15822 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15823 *) ac_try_echo=$ac_try;;
15824esac
15825eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15826 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015827 ac_status=$?
15828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15829 (exit $ac_status); }; }; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000015830 { echo "$as_me:$LINENO: result: yes" >&5
15831echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015832 ipv6=yes
15833else
Martin v. Löwis11437992002-04-12 09:54:03 +000015834 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015835sed 's/^/| /' conftest.$ac_ext >&5
15836
Thomas Wouters477c8d52006-05-27 19:21:47 +000015837 { echo "$as_me:$LINENO: result: no" >&5
15838echo "${ECHO_T}no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015839 ipv6=no
15840fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000015841
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015842rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015843fi
15844
15845if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015846 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015847#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015848_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015849
15850fi
15851
Thomas Wouters477c8d52006-05-27 19:21:47 +000015852fi
15853
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015854
15855ipv6type=unknown
15856ipv6lib=none
15857ipv6trylibc=no
15858
15859if test "$ipv6" = "yes"; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000015860 { echo "$as_me:$LINENO: checking ipv6 stack type" >&5
15861echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000015862 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
15863 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015864 case $i in
15865 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000015866 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015867/* confdefs.h. */
15868_ACEOF
15869cat confdefs.h >>conftest.$ac_ext
15870cat >>conftest.$ac_ext <<_ACEOF
15871/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015872
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015873#include <netinet/in.h>
15874#ifdef IPV6_INRIA_VERSION
15875yes
15876#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015877_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015878if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015879 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000015880 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015881fi
15882rm -f conftest*
15883
15884 ;;
15885 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000015886 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015887/* confdefs.h. */
15888_ACEOF
15889cat confdefs.h >>conftest.$ac_ext
15890cat >>conftest.$ac_ext <<_ACEOF
15891/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015892
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015893#include <netinet/in.h>
15894#ifdef __KAME__
15895yes
15896#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015897_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015898if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015899 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015900 ipv6type=$i;
15901 ipv6lib=inet6
15902 ipv6libdir=/usr/local/v6/lib
15903 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015904fi
15905rm -f conftest*
15906
15907 ;;
15908 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000015909 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015910/* confdefs.h. */
15911_ACEOF
15912cat confdefs.h >>conftest.$ac_ext
15913cat >>conftest.$ac_ext <<_ACEOF
15914/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015915
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015916#include <features.h>
15917#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
15918yes
15919#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015920_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015921if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015922 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015923 ipv6type=$i;
15924 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015925fi
15926rm -f conftest*
15927
15928 ;;
15929 linux-inet6)
15930 if test -d /usr/inet6; then
15931 ipv6type=$i
15932 ipv6lib=inet6
15933 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000015934 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015935 fi
15936 ;;
15937 solaris)
15938 if test -f /etc/netconfig; then
15939 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
15940 ipv6type=$i
15941 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015942 fi
15943 fi
15944 ;;
15945 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000015946 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015947/* confdefs.h. */
15948_ACEOF
15949cat confdefs.h >>conftest.$ac_ext
15950cat >>conftest.$ac_ext <<_ACEOF
15951/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015952
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015953#include <sys/param.h>
15954#ifdef _TOSHIBA_INET6
15955yes
15956#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015957_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015958if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015959 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015960 ipv6type=$i;
15961 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000015962 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015963fi
15964rm -f conftest*
15965
15966 ;;
15967 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000015968 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015969/* confdefs.h. */
15970_ACEOF
15971cat confdefs.h >>conftest.$ac_ext
15972cat >>conftest.$ac_ext <<_ACEOF
15973/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015974
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015975#include </usr/local/v6/include/sys/v6config.h>
15976#ifdef __V6D__
15977yes
15978#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015979_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015980if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015981 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015982 ipv6type=$i;
15983 ipv6lib=v6;
15984 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000015985 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015986fi
15987rm -f conftest*
15988
15989 ;;
15990 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000015991 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015992/* confdefs.h. */
15993_ACEOF
15994cat confdefs.h >>conftest.$ac_ext
15995cat >>conftest.$ac_ext <<_ACEOF
15996/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015997
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015998#include <sys/param.h>
15999#ifdef _ZETA_MINAMI_INET6
16000yes
16001#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016002_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016003if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016004 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016005 ipv6type=$i;
16006 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000016007 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016008fi
16009rm -f conftest*
16010
16011 ;;
16012 esac
16013 if test "$ipv6type" != "unknown"; then
16014 break
16015 fi
16016 done
Thomas Wouters477c8d52006-05-27 19:21:47 +000016017 { echo "$as_me:$LINENO: result: $ipv6type" >&5
16018echo "${ECHO_T}$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016019fi
16020
16021if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
16022 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
16023 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
16024 echo "using lib$ipv6lib"
16025 else
16026 if test $ipv6trylibc = "yes"; then
16027 echo "using libc"
16028 else
16029 echo 'Fatal: no $ipv6lib library found. cannot continue.'
16030 echo "You need to fetch lib$ipv6lib.a from appropriate"
16031 echo 'ipv6 kit and compile beforehand.'
16032 exit 1
16033 fi
16034 fi
16035fi
16036
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016037# Check for --with-doc-strings
Thomas Wouters477c8d52006-05-27 19:21:47 +000016038{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
16039echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016040
Thomas Wouters477c8d52006-05-27 19:21:47 +000016041# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016042if test "${with_doc_strings+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000016043 withval=$with_doc_strings;
16044fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016045
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016046
16047if test -z "$with_doc_strings"
16048then with_doc_strings="yes"
16049fi
16050if test "$with_doc_strings" != "no"
16051then
16052
16053cat >>confdefs.h <<\_ACEOF
16054#define WITH_DOC_STRINGS 1
16055_ACEOF
16056
16057fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000016058{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
16059echo "${ECHO_T}$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016060
Neil Schemenauera35c6882001-02-27 04:45:05 +000016061# Check for Python-specific malloc support
Thomas Wouters477c8d52006-05-27 19:21:47 +000016062{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
16063echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016064
Thomas Wouters477c8d52006-05-27 19:21:47 +000016065# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016066if test "${with_tsc+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000016067 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016068if test "$withval" != no
16069then
16070
16071cat >>confdefs.h <<\_ACEOF
16072#define WITH_TSC 1
16073_ACEOF
16074
Thomas Wouters477c8d52006-05-27 19:21:47 +000016075 { echo "$as_me:$LINENO: result: yes" >&5
16076echo "${ECHO_T}yes" >&6; }
16077else { echo "$as_me:$LINENO: result: no" >&5
16078echo "${ECHO_T}no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016079fi
16080else
Thomas Wouters477c8d52006-05-27 19:21:47 +000016081 { echo "$as_me:$LINENO: result: no" >&5
16082echo "${ECHO_T}no" >&6; }
16083fi
16084
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016085
16086# Check for Python-specific malloc support
Thomas Wouters477c8d52006-05-27 19:21:47 +000016087{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
16088echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016089
Thomas Wouters477c8d52006-05-27 19:21:47 +000016090# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000016091if test "${with_pymalloc+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000016092 withval=$with_pymalloc;
16093fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016094
Neil Schemenauera35c6882001-02-27 04:45:05 +000016095
Neil Schemenauer16c22972002-03-22 15:34:49 +000016096if test -z "$with_pymalloc"
16097then with_pymalloc="yes"
16098fi
16099if test "$with_pymalloc" != "no"
16100then
Martin v. Löwis11437992002-04-12 09:54:03 +000016101
16102cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000016103#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016104_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000016105
16106fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000016107{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
16108echo "${ECHO_T}$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000016109
Barry Warsawef82cd72000-06-30 16:21:01 +000016110# Check for --with-wctype-functions
Thomas Wouters477c8d52006-05-27 19:21:47 +000016111{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
16112echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016113
Thomas Wouters477c8d52006-05-27 19:21:47 +000016114# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000016115if test "${with_wctype_functions+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000016116 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000016117if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000016118then
16119
16120cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000016121#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016122_ACEOF
16123
Thomas Wouters477c8d52006-05-27 19:21:47 +000016124 { echo "$as_me:$LINENO: result: yes" >&5
16125echo "${ECHO_T}yes" >&6; }
16126else { echo "$as_me:$LINENO: result: no" >&5
16127echo "${ECHO_T}no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000016128fi
16129else
Thomas Wouters477c8d52006-05-27 19:21:47 +000016130 { echo "$as_me:$LINENO: result: no" >&5
16131echo "${ECHO_T}no" >&6; }
16132fi
16133
Barry Warsawef82cd72000-06-30 16:21:01 +000016134
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016135# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000016136
Guido van Rossum98935bf2001-09-05 19:13:16 +000016137DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000016138
Guido van Rossume97ee181999-12-20 21:27:22 +000016139# the dlopen() function means we might want to use dynload_shlib.o. some
16140# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000016141
Thomas Wouters3a584202000-08-05 23:28:51 +000016142for ac_func in dlopen
16143do
Martin v. Löwis11437992002-04-12 09:54:03 +000016144as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Thomas Wouters477c8d52006-05-27 19:21:47 +000016145{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16146echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16147if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016148 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000016149else
Martin v. Löwis11437992002-04-12 09:54:03 +000016150 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016151/* confdefs.h. */
16152_ACEOF
16153cat confdefs.h >>conftest.$ac_ext
16154cat >>conftest.$ac_ext <<_ACEOF
16155/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016156/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16157 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16158#define $ac_func innocuous_$ac_func
16159
Guido van Rossume97ee181999-12-20 21:27:22 +000016160/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016161 which can conflict with char $ac_func (); below.
16162 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016163 <limits.h> exists even on freestanding compilers. */
16164
16165#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016166# include <limits.h>
16167#else
16168# include <assert.h>
16169#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016170
16171#undef $ac_func
16172
Thomas Wouters477c8d52006-05-27 19:21:47 +000016173/* Override any GCC internal prototype to avoid an error.
16174 Use char because int might match the return type of a GCC
16175 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016176#ifdef __cplusplus
16177extern "C"
16178#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016179char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000016180/* The GNU C library defines this for functions which it implements
16181 to always fail with ENOSYS. Some functions are actually named
16182 something starting with __ and the normal name is an alias. */
Thomas Wouters477c8d52006-05-27 19:21:47 +000016183#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000016184choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000016185#endif
16186
Skip Montanaro6dead952003-09-25 14:50:04 +000016187int
16188main ()
16189{
Thomas Wouters477c8d52006-05-27 19:21:47 +000016190return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016191 ;
16192 return 0;
16193}
16194_ACEOF
16195rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016196if { (ac_try="$ac_link"
16197case "(($ac_try" in
16198 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16199 *) ac_try_echo=$ac_try;;
16200esac
16201eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16202 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016203 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016204 grep -v '^ *+' conftest.er1 >conftest.err
16205 rm -f conftest.er1
16206 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16208 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016209 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
16210 { (case "(($ac_try" in
16211 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16212 *) ac_try_echo=$ac_try;;
16213esac
16214eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16215 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016216 ac_status=$?
16217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16218 (exit $ac_status); }; } &&
16219 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016220 { (case "(($ac_try" in
16221 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16222 *) ac_try_echo=$ac_try;;
16223esac
16224eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16225 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016226 ac_status=$?
16227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16228 (exit $ac_status); }; }; then
16229 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016230else
Martin v. Löwis11437992002-04-12 09:54:03 +000016231 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016232sed 's/^/| /' conftest.$ac_ext >&5
16233
Thomas Wouters477c8d52006-05-27 19:21:47 +000016234 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016235fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000016236
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016237rm -f core conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016238 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016239fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000016240ac_res=`eval echo '${'$as_ac_var'}'`
16241 { echo "$as_me:$LINENO: result: $ac_res" >&5
16242echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016243if test `eval echo '${'$as_ac_var'}'` = yes; then
16244 cat >>confdefs.h <<_ACEOF
16245#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16246_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016247
Guido van Rossume97ee181999-12-20 21:27:22 +000016248fi
Thomas Wouters3a584202000-08-05 23:28:51 +000016249done
Guido van Rossume97ee181999-12-20 21:27:22 +000016250
Michael W. Hudson54241132001-12-07 15:38:26 +000016251
Guido van Rossume97ee181999-12-20 21:27:22 +000016252# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
16253# loading of modules.
16254
Thomas Wouters477c8d52006-05-27 19:21:47 +000016255{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
16256echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000016257if test -z "$DYNLOADFILE"
16258then
16259 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000016260 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
16261 if test "$ac_cv_func_dlopen" = yes
16262 then DYNLOADFILE="dynload_shlib.o"
16263 else DYNLOADFILE="dynload_aix.o"
16264 fi
16265 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000016266 BeOS*) DYNLOADFILE="dynload_beos.o";;
16267 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016268 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
16269 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016270 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000016271 *)
16272 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
16273 # out any dynamic loading
16274 if test "$ac_cv_func_dlopen" = yes
16275 then DYNLOADFILE="dynload_shlib.o"
16276 else DYNLOADFILE="dynload_stub.o"
16277 fi
16278 ;;
16279 esac
16280fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000016281{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
16282echo "${ECHO_T}$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000016283if test "$DYNLOADFILE" != "dynload_stub.o"
16284then
Martin v. Löwis11437992002-04-12 09:54:03 +000016285
16286cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016287#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016288_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016289
16290fi
16291
Neil Schemenauer4e425612001-06-19 15:44:15 +000016292# MACHDEP_OBJS can be set to platform-specific object files needed by Python
16293
Michael W. Hudson54241132001-12-07 15:38:26 +000016294
Thomas Wouters477c8d52006-05-27 19:21:47 +000016295{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
16296echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000016297if test -z "$MACHDEP_OBJS"
16298then
Jack Jansene578a632001-08-15 01:27:14 +000016299 MACHDEP_OBJS=$extra_machdep_objs
16300else
16301 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000016302fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000016303{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
16304echo "${ECHO_T}MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000016305
Guido van Rossum627b2d71993-12-24 10:39:16 +000016306# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000016307
16308
16309
16310
16311
16312
16313
16314
16315
16316
16317
16318
16319
16320
16321
16322
16323
16324
16325
16326
16327
16328
16329
16330
16331
16332
16333
16334
16335
16336
16337
16338
16339
16340
16341
16342
16343
16344
16345
16346
16347
16348
16349
16350
16351
16352
16353
16354
16355
16356
16357
16358
16359
16360
16361
16362
16363
16364
16365
16366
16367
16368
16369
16370
16371
16372
16373
16374
16375
16376
16377
Martin v. Löwisd6320502004-08-12 13:45:08 +000016378
Martin v. Löwisc3001752005-01-23 09:27:24 +000016379
16380
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016381
16382
Martin v. Löwisd6320502004-08-12 13:45:08 +000016383for ac_func in alarm bind_textdomain_codeset chown clock confstr ctermid \
16384 execv fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000016385 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwisc3001752005-01-23 09:27:24 +000016386 getpriority getpwent getspnam getspent getsid getwd \
Martin v. Löwise9416172003-05-03 10:12:45 +000016387 kill killpg lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000016388 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000016389 putenv readlink realpath \
Martin v. Löwisd5843682002-11-21 20:41:28 +000016390 select setegid seteuid setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000016391 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000016392 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000016393 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016394 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000016395do
Martin v. Löwis11437992002-04-12 09:54:03 +000016396as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Thomas Wouters477c8d52006-05-27 19:21:47 +000016397{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16398echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16399if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016400 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016401else
Martin v. Löwis11437992002-04-12 09:54:03 +000016402 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016403/* confdefs.h. */
16404_ACEOF
16405cat confdefs.h >>conftest.$ac_ext
16406cat >>conftest.$ac_ext <<_ACEOF
16407/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016408/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16409 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16410#define $ac_func innocuous_$ac_func
16411
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016412/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016413 which can conflict with char $ac_func (); below.
16414 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016415 <limits.h> exists even on freestanding compilers. */
16416
16417#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016418# include <limits.h>
16419#else
16420# include <assert.h>
16421#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016422
16423#undef $ac_func
16424
Thomas Wouters477c8d52006-05-27 19:21:47 +000016425/* Override any GCC internal prototype to avoid an error.
16426 Use char because int might match the return type of a GCC
16427 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016428#ifdef __cplusplus
16429extern "C"
16430#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016431char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000016432/* The GNU C library defines this for functions which it implements
16433 to always fail with ENOSYS. Some functions are actually named
16434 something starting with __ and the normal name is an alias. */
Thomas Wouters477c8d52006-05-27 19:21:47 +000016435#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000016436choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000016437#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016438
Skip Montanaro6dead952003-09-25 14:50:04 +000016439int
16440main ()
16441{
Thomas Wouters477c8d52006-05-27 19:21:47 +000016442return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016443 ;
16444 return 0;
16445}
16446_ACEOF
16447rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016448if { (ac_try="$ac_link"
16449case "(($ac_try" in
16450 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16451 *) ac_try_echo=$ac_try;;
16452esac
16453eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16454 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016455 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016456 grep -v '^ *+' conftest.er1 >conftest.err
16457 rm -f conftest.er1
16458 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16460 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016461 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
16462 { (case "(($ac_try" in
16463 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16464 *) ac_try_echo=$ac_try;;
16465esac
16466eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16467 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016468 ac_status=$?
16469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16470 (exit $ac_status); }; } &&
16471 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016472 { (case "(($ac_try" in
16473 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16474 *) ac_try_echo=$ac_try;;
16475esac
16476eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16477 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016478 ac_status=$?
16479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16480 (exit $ac_status); }; }; then
16481 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016482else
Martin v. Löwis11437992002-04-12 09:54:03 +000016483 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016484sed 's/^/| /' conftest.$ac_ext >&5
16485
Thomas Wouters477c8d52006-05-27 19:21:47 +000016486 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016487fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000016488
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016489rm -f core conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016490 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016491fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000016492ac_res=`eval echo '${'$as_ac_var'}'`
16493 { echo "$as_me:$LINENO: result: $ac_res" >&5
16494echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016495if test `eval echo '${'$as_ac_var'}'` = yes; then
16496 cat >>confdefs.h <<_ACEOF
16497#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16498_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000016499
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016500fi
16501done
16502
Michael W. Hudson54241132001-12-07 15:38:26 +000016503
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016504# For some functions, having a definition is not sufficient, since
16505# we want to take their address.
Thomas Wouters477c8d52006-05-27 19:21:47 +000016506{ echo "$as_me:$LINENO: checking for chroot" >&5
16507echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016508cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016509/* confdefs.h. */
16510_ACEOF
16511cat confdefs.h >>conftest.$ac_ext
16512cat >>conftest.$ac_ext <<_ACEOF
16513/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016514#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016515int
16516main ()
16517{
16518void *x=chroot
16519 ;
16520 return 0;
16521}
16522_ACEOF
16523rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016524if { (ac_try="$ac_compile"
16525case "(($ac_try" in
16526 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16527 *) ac_try_echo=$ac_try;;
16528esac
16529eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16530 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016531 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016532 grep -v '^ *+' conftest.er1 >conftest.err
16533 rm -f conftest.er1
16534 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16536 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016537 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
16538 { (case "(($ac_try" in
16539 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16540 *) ac_try_echo=$ac_try;;
16541esac
16542eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16543 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016544 ac_status=$?
16545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16546 (exit $ac_status); }; } &&
16547 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016548 { (case "(($ac_try" in
16549 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16550 *) ac_try_echo=$ac_try;;
16551esac
16552eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16553 (eval "$ac_try") 2>&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016554 ac_status=$?
16555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16556 (exit $ac_status); }; }; then
16557
16558cat >>confdefs.h <<\_ACEOF
16559#define HAVE_CHROOT 1
16560_ACEOF
16561
Thomas Wouters477c8d52006-05-27 19:21:47 +000016562 { echo "$as_me:$LINENO: result: yes" >&5
16563echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016564else
16565 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016566sed 's/^/| /' conftest.$ac_ext >&5
16567
Thomas Wouters477c8d52006-05-27 19:21:47 +000016568 { echo "$as_me:$LINENO: result: no" >&5
16569echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016570
16571fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000016572
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016573rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016574{ echo "$as_me:$LINENO: checking for link" >&5
16575echo $ECHO_N "checking for link... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016576cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016577/* confdefs.h. */
16578_ACEOF
16579cat confdefs.h >>conftest.$ac_ext
16580cat >>conftest.$ac_ext <<_ACEOF
16581/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016582#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016583int
16584main ()
16585{
16586void *x=link
16587 ;
16588 return 0;
16589}
16590_ACEOF
16591rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016592if { (ac_try="$ac_compile"
16593case "(($ac_try" in
16594 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16595 *) ac_try_echo=$ac_try;;
16596esac
16597eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16598 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016599 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016600 grep -v '^ *+' conftest.er1 >conftest.err
16601 rm -f conftest.er1
16602 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16604 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016605 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
16606 { (case "(($ac_try" in
16607 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16608 *) ac_try_echo=$ac_try;;
16609esac
16610eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16611 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016612 ac_status=$?
16613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16614 (exit $ac_status); }; } &&
16615 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016616 { (case "(($ac_try" in
16617 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16618 *) ac_try_echo=$ac_try;;
16619esac
16620eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16621 (eval "$ac_try") 2>&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016622 ac_status=$?
16623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16624 (exit $ac_status); }; }; then
16625
16626cat >>confdefs.h <<\_ACEOF
16627#define HAVE_LINK 1
16628_ACEOF
16629
Thomas Wouters477c8d52006-05-27 19:21:47 +000016630 { echo "$as_me:$LINENO: result: yes" >&5
16631echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016632else
16633 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016634sed 's/^/| /' conftest.$ac_ext >&5
16635
Thomas Wouters477c8d52006-05-27 19:21:47 +000016636 { echo "$as_me:$LINENO: result: no" >&5
16637echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016638
16639fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000016640
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016641rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016642{ echo "$as_me:$LINENO: checking for symlink" >&5
16643echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016644cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016645/* confdefs.h. */
16646_ACEOF
16647cat confdefs.h >>conftest.$ac_ext
16648cat >>conftest.$ac_ext <<_ACEOF
16649/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016650#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016651int
16652main ()
16653{
16654void *x=symlink
16655 ;
16656 return 0;
16657}
16658_ACEOF
16659rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016660if { (ac_try="$ac_compile"
16661case "(($ac_try" in
16662 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16663 *) ac_try_echo=$ac_try;;
16664esac
16665eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16666 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016667 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016668 grep -v '^ *+' conftest.er1 >conftest.err
16669 rm -f conftest.er1
16670 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16672 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016673 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
16674 { (case "(($ac_try" in
16675 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16676 *) ac_try_echo=$ac_try;;
16677esac
16678eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16679 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016680 ac_status=$?
16681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16682 (exit $ac_status); }; } &&
16683 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016684 { (case "(($ac_try" in
16685 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16686 *) ac_try_echo=$ac_try;;
16687esac
16688eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16689 (eval "$ac_try") 2>&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016690 ac_status=$?
16691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16692 (exit $ac_status); }; }; then
16693
16694cat >>confdefs.h <<\_ACEOF
16695#define HAVE_SYMLINK 1
16696_ACEOF
16697
Thomas Wouters477c8d52006-05-27 19:21:47 +000016698 { echo "$as_me:$LINENO: result: yes" >&5
16699echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016700else
16701 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016702sed 's/^/| /' conftest.$ac_ext >&5
16703
Thomas Wouters477c8d52006-05-27 19:21:47 +000016704 { echo "$as_me:$LINENO: result: no" >&5
16705echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016706
16707fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000016708
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016709rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016710{ echo "$as_me:$LINENO: checking for fchdir" >&5
16711echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016712cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016713/* confdefs.h. */
16714_ACEOF
16715cat confdefs.h >>conftest.$ac_ext
16716cat >>conftest.$ac_ext <<_ACEOF
16717/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016718#include <unistd.h>
16719int
16720main ()
16721{
16722void *x=fchdir
16723 ;
16724 return 0;
16725}
16726_ACEOF
16727rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016728if { (ac_try="$ac_compile"
16729case "(($ac_try" in
16730 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16731 *) ac_try_echo=$ac_try;;
16732esac
16733eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16734 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016735 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016736 grep -v '^ *+' conftest.er1 >conftest.err
16737 rm -f conftest.er1
16738 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16740 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016741 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
16742 { (case "(($ac_try" in
16743 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16744 *) ac_try_echo=$ac_try;;
16745esac
16746eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16747 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016748 ac_status=$?
16749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16750 (exit $ac_status); }; } &&
16751 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016752 { (case "(($ac_try" in
16753 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16754 *) ac_try_echo=$ac_try;;
16755esac
16756eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16757 (eval "$ac_try") 2>&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016758 ac_status=$?
16759 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16760 (exit $ac_status); }; }; then
16761
16762cat >>confdefs.h <<\_ACEOF
16763#define HAVE_FCHDIR 1
16764_ACEOF
16765
Thomas Wouters477c8d52006-05-27 19:21:47 +000016766 { echo "$as_me:$LINENO: result: yes" >&5
16767echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016768else
16769 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016770sed 's/^/| /' conftest.$ac_ext >&5
16771
Thomas Wouters477c8d52006-05-27 19:21:47 +000016772 { echo "$as_me:$LINENO: result: no" >&5
16773echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016774
16775fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000016776
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016777rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016778{ echo "$as_me:$LINENO: checking for fsync" >&5
16779echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016780cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016781/* confdefs.h. */
16782_ACEOF
16783cat confdefs.h >>conftest.$ac_ext
16784cat >>conftest.$ac_ext <<_ACEOF
16785/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016786#include <unistd.h>
16787int
16788main ()
16789{
16790void *x=fsync
16791 ;
16792 return 0;
16793}
16794_ACEOF
16795rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016796if { (ac_try="$ac_compile"
16797case "(($ac_try" in
16798 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16799 *) ac_try_echo=$ac_try;;
16800esac
16801eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16802 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016803 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016804 grep -v '^ *+' conftest.er1 >conftest.err
16805 rm -f conftest.er1
16806 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16808 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016809 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
16810 { (case "(($ac_try" in
16811 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16812 *) ac_try_echo=$ac_try;;
16813esac
16814eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16815 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016816 ac_status=$?
16817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16818 (exit $ac_status); }; } &&
16819 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016820 { (case "(($ac_try" in
16821 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16822 *) ac_try_echo=$ac_try;;
16823esac
16824eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16825 (eval "$ac_try") 2>&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016826 ac_status=$?
16827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16828 (exit $ac_status); }; }; then
16829
16830cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016831#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016832_ACEOF
16833
Thomas Wouters477c8d52006-05-27 19:21:47 +000016834 { echo "$as_me:$LINENO: result: yes" >&5
16835echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016836else
16837 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016838sed 's/^/| /' conftest.$ac_ext >&5
16839
Thomas Wouters477c8d52006-05-27 19:21:47 +000016840 { echo "$as_me:$LINENO: result: no" >&5
16841echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016842
16843fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000016844
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016845rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016846{ echo "$as_me:$LINENO: checking for fdatasync" >&5
16847echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016848cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016849/* confdefs.h. */
16850_ACEOF
16851cat confdefs.h >>conftest.$ac_ext
16852cat >>conftest.$ac_ext <<_ACEOF
16853/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016854#include <unistd.h>
16855int
16856main ()
16857{
16858void *x=fdatasync
16859 ;
16860 return 0;
16861}
16862_ACEOF
16863rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016864if { (ac_try="$ac_compile"
16865case "(($ac_try" in
16866 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16867 *) ac_try_echo=$ac_try;;
16868esac
16869eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16870 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016871 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016872 grep -v '^ *+' conftest.er1 >conftest.err
16873 rm -f conftest.er1
16874 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16876 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016877 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
16878 { (case "(($ac_try" in
16879 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16880 *) ac_try_echo=$ac_try;;
16881esac
16882eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16883 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016884 ac_status=$?
16885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16886 (exit $ac_status); }; } &&
16887 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016888 { (case "(($ac_try" in
16889 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16890 *) ac_try_echo=$ac_try;;
16891esac
16892eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16893 (eval "$ac_try") 2>&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016894 ac_status=$?
16895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16896 (exit $ac_status); }; }; then
16897
16898cat >>confdefs.h <<\_ACEOF
16899#define HAVE_FDATASYNC 1
16900_ACEOF
16901
Thomas Wouters477c8d52006-05-27 19:21:47 +000016902 { echo "$as_me:$LINENO: result: yes" >&5
16903echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016904else
16905 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016906sed 's/^/| /' conftest.$ac_ext >&5
16907
Thomas Wouters477c8d52006-05-27 19:21:47 +000016908 { echo "$as_me:$LINENO: result: no" >&5
16909echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016910
16911fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000016912
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016913rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016914
Martin v. Löwisd5843682002-11-21 20:41:28 +000016915# On some systems (eg. FreeBSD 5), we would find a definition of the
16916# functions ctermid_r, setgroups in the library, but no prototype
16917# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
16918# address to avoid compiler warnings and potential miscompilations
16919# because of the missing prototypes.
16920
Thomas Wouters477c8d52006-05-27 19:21:47 +000016921{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
16922echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016923cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016924/* confdefs.h. */
16925_ACEOF
16926cat confdefs.h >>conftest.$ac_ext
16927cat >>conftest.$ac_ext <<_ACEOF
16928/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000016929
16930#include "confdefs.h"
16931#include <stdio.h>
16932
Martin v. Löwisd5843682002-11-21 20:41:28 +000016933int
16934main ()
16935{
16936void* p = ctermid_r
16937 ;
16938 return 0;
16939}
16940_ACEOF
16941rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016942if { (ac_try="$ac_compile"
16943case "(($ac_try" in
16944 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16945 *) ac_try_echo=$ac_try;;
16946esac
16947eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16948 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000016949 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016950 grep -v '^ *+' conftest.er1 >conftest.err
16951 rm -f conftest.er1
16952 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000016953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16954 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016955 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
16956 { (case "(($ac_try" in
16957 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16958 *) ac_try_echo=$ac_try;;
16959esac
16960eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16961 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016962 ac_status=$?
16963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16964 (exit $ac_status); }; } &&
16965 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016966 { (case "(($ac_try" in
16967 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16968 *) ac_try_echo=$ac_try;;
16969esac
16970eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16971 (eval "$ac_try") 2>&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000016972 ac_status=$?
16973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16974 (exit $ac_status); }; }; then
16975
16976cat >>confdefs.h <<\_ACEOF
16977#define HAVE_CTERMID_R 1
16978_ACEOF
16979
Thomas Wouters477c8d52006-05-27 19:21:47 +000016980 { echo "$as_me:$LINENO: result: yes" >&5
16981echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016982else
16983 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016984sed 's/^/| /' conftest.$ac_ext >&5
16985
Thomas Wouters477c8d52006-05-27 19:21:47 +000016986 { echo "$as_me:$LINENO: result: no" >&5
16987echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016988
16989fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000016990
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016991rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000016992
Thomas Wouters477c8d52006-05-27 19:21:47 +000016993{ echo "$as_me:$LINENO: checking for flock" >&5
16994echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016995cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016996/* confdefs.h. */
16997_ACEOF
16998cat confdefs.h >>conftest.$ac_ext
16999cat >>conftest.$ac_ext <<_ACEOF
17000/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017001
17002#include "confdefs.h"
17003#include <sys/file.h>
17004
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017005int
17006main ()
17007{
17008void* p = flock
17009 ;
17010 return 0;
17011}
17012_ACEOF
17013rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017014if { (ac_try="$ac_compile"
17015case "(($ac_try" in
17016 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17017 *) ac_try_echo=$ac_try;;
17018esac
17019eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17020 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017021 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017022 grep -v '^ *+' conftest.er1 >conftest.err
17023 rm -f conftest.er1
17024 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17026 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017027 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
17028 { (case "(($ac_try" in
17029 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17030 *) ac_try_echo=$ac_try;;
17031esac
17032eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17033 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017034 ac_status=$?
17035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17036 (exit $ac_status); }; } &&
17037 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017038 { (case "(($ac_try" in
17039 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17040 *) ac_try_echo=$ac_try;;
17041esac
17042eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17043 (eval "$ac_try") 2>&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017044 ac_status=$?
17045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17046 (exit $ac_status); }; }; then
17047
17048cat >>confdefs.h <<\_ACEOF
17049#define HAVE_FLOCK 1
17050_ACEOF
17051
Thomas Wouters477c8d52006-05-27 19:21:47 +000017052 { echo "$as_me:$LINENO: result: yes" >&5
17053echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017054else
17055 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017056sed 's/^/| /' conftest.$ac_ext >&5
17057
Thomas Wouters477c8d52006-05-27 19:21:47 +000017058 { echo "$as_me:$LINENO: result: no" >&5
17059echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017060
17061fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017062
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017063rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017064
Thomas Wouters477c8d52006-05-27 19:21:47 +000017065{ echo "$as_me:$LINENO: checking for getpagesize" >&5
17066echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017067cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017068/* confdefs.h. */
17069_ACEOF
17070cat confdefs.h >>conftest.$ac_ext
17071cat >>conftest.$ac_ext <<_ACEOF
17072/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017073
17074#include "confdefs.h"
17075#include <unistd.h>
17076
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017077int
17078main ()
17079{
17080void* p = getpagesize
17081 ;
17082 return 0;
17083}
17084_ACEOF
17085rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017086if { (ac_try="$ac_compile"
17087case "(($ac_try" in
17088 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17089 *) ac_try_echo=$ac_try;;
17090esac
17091eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17092 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017093 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017094 grep -v '^ *+' conftest.er1 >conftest.err
17095 rm -f conftest.er1
17096 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017097 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17098 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017099 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
17100 { (case "(($ac_try" in
17101 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17102 *) ac_try_echo=$ac_try;;
17103esac
17104eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17105 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017106 ac_status=$?
17107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17108 (exit $ac_status); }; } &&
17109 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017110 { (case "(($ac_try" in
17111 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17112 *) ac_try_echo=$ac_try;;
17113esac
17114eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17115 (eval "$ac_try") 2>&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017116 ac_status=$?
17117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17118 (exit $ac_status); }; }; then
17119
17120cat >>confdefs.h <<\_ACEOF
17121#define HAVE_GETPAGESIZE 1
17122_ACEOF
17123
Thomas Wouters477c8d52006-05-27 19:21:47 +000017124 { echo "$as_me:$LINENO: result: yes" >&5
17125echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017126else
17127 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017128sed 's/^/| /' conftest.$ac_ext >&5
17129
Thomas Wouters477c8d52006-05-27 19:21:47 +000017130 { echo "$as_me:$LINENO: result: no" >&5
17131echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017132
17133fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017134
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017135rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017136
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017137for ac_prog in true
17138do
17139 # Extract the first word of "$ac_prog", so it can be a program name with args.
17140set dummy $ac_prog; ac_word=$2
Thomas Wouters477c8d52006-05-27 19:21:47 +000017141{ echo "$as_me:$LINENO: checking for $ac_word" >&5
17142echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017143if test "${ac_cv_prog_TRUE+set}" = set; then
17144 echo $ECHO_N "(cached) $ECHO_C" >&6
17145else
17146 if test -n "$TRUE"; then
17147 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
17148else
17149as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17150for as_dir in $PATH
17151do
17152 IFS=$as_save_IFS
17153 test -z "$as_dir" && as_dir=.
17154 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters477c8d52006-05-27 19:21:47 +000017155 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 +000017156 ac_cv_prog_TRUE="$ac_prog"
17157 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
17158 break 2
17159 fi
17160done
17161done
Thomas Wouters477c8d52006-05-27 19:21:47 +000017162IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017163
17164fi
17165fi
17166TRUE=$ac_cv_prog_TRUE
17167if test -n "$TRUE"; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000017168 { echo "$as_me:$LINENO: result: $TRUE" >&5
17169echo "${ECHO_T}$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017170else
Thomas Wouters477c8d52006-05-27 19:21:47 +000017171 { echo "$as_me:$LINENO: result: no" >&5
17172echo "${ECHO_T}no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017173fi
17174
Thomas Wouters477c8d52006-05-27 19:21:47 +000017175
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017176 test -n "$TRUE" && break
17177done
17178test -n "$TRUE" || TRUE="/bin/true"
17179
17180
Thomas Wouters477c8d52006-05-27 19:21:47 +000017181{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
17182echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017183if test "${ac_cv_lib_c_inet_aton+set}" = set; then
17184 echo $ECHO_N "(cached) $ECHO_C" >&6
17185else
17186 ac_check_lib_save_LIBS=$LIBS
17187LIBS="-lc $LIBS"
17188cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017189/* confdefs.h. */
17190_ACEOF
17191cat confdefs.h >>conftest.$ac_ext
17192cat >>conftest.$ac_ext <<_ACEOF
17193/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017194
Thomas Wouters477c8d52006-05-27 19:21:47 +000017195/* Override any GCC internal prototype to avoid an error.
17196 Use char because int might match the return type of a GCC
17197 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017198#ifdef __cplusplus
17199extern "C"
17200#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017201char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017202int
17203main ()
17204{
Thomas Wouters477c8d52006-05-27 19:21:47 +000017205return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017206 ;
17207 return 0;
17208}
17209_ACEOF
17210rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017211if { (ac_try="$ac_link"
17212case "(($ac_try" in
17213 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17214 *) ac_try_echo=$ac_try;;
17215esac
17216eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17217 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017218 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017219 grep -v '^ *+' conftest.er1 >conftest.err
17220 rm -f conftest.er1
17221 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17223 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017224 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
17225 { (case "(($ac_try" in
17226 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17227 *) ac_try_echo=$ac_try;;
17228esac
17229eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17230 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017231 ac_status=$?
17232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17233 (exit $ac_status); }; } &&
17234 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017235 { (case "(($ac_try" in
17236 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17237 *) ac_try_echo=$ac_try;;
17238esac
17239eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17240 (eval "$ac_try") 2>&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017241 ac_status=$?
17242 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17243 (exit $ac_status); }; }; then
17244 ac_cv_lib_c_inet_aton=yes
17245else
17246 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017247sed 's/^/| /' conftest.$ac_ext >&5
17248
Thomas Wouters477c8d52006-05-27 19:21:47 +000017249 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017250fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017251
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017252rm -f core conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017253 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017254LIBS=$ac_check_lib_save_LIBS
17255fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017256{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
17257echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017258if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017259 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017260else
17261
Thomas Wouters477c8d52006-05-27 19:21:47 +000017262{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
17263echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017264if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
17265 echo $ECHO_N "(cached) $ECHO_C" >&6
17266else
17267 ac_check_lib_save_LIBS=$LIBS
17268LIBS="-lresolv $LIBS"
17269cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017270/* confdefs.h. */
17271_ACEOF
17272cat confdefs.h >>conftest.$ac_ext
17273cat >>conftest.$ac_ext <<_ACEOF
17274/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017275
Thomas Wouters477c8d52006-05-27 19:21:47 +000017276/* Override any GCC internal prototype to avoid an error.
17277 Use char because int might match the return type of a GCC
17278 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017279#ifdef __cplusplus
17280extern "C"
17281#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017282char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017283int
17284main ()
17285{
Thomas Wouters477c8d52006-05-27 19:21:47 +000017286return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017287 ;
17288 return 0;
17289}
17290_ACEOF
17291rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017292if { (ac_try="$ac_link"
17293case "(($ac_try" in
17294 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17295 *) ac_try_echo=$ac_try;;
17296esac
17297eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17298 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017299 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017300 grep -v '^ *+' conftest.er1 >conftest.err
17301 rm -f conftest.er1
17302 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17304 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017305 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
17306 { (case "(($ac_try" in
17307 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17308 *) ac_try_echo=$ac_try;;
17309esac
17310eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17311 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017312 ac_status=$?
17313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17314 (exit $ac_status); }; } &&
17315 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017316 { (case "(($ac_try" in
17317 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17318 *) ac_try_echo=$ac_try;;
17319esac
17320eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17321 (eval "$ac_try") 2>&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017322 ac_status=$?
17323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17324 (exit $ac_status); }; }; then
17325 ac_cv_lib_resolv_inet_aton=yes
17326else
17327 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017328sed 's/^/| /' conftest.$ac_ext >&5
17329
Thomas Wouters477c8d52006-05-27 19:21:47 +000017330 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017331fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017332
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017333rm -f core conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017334 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017335LIBS=$ac_check_lib_save_LIBS
17336fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017337{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
17338echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017339if test $ac_cv_lib_resolv_inet_aton = yes; then
17340 cat >>confdefs.h <<_ACEOF
17341#define HAVE_LIBRESOLV 1
17342_ACEOF
17343
17344 LIBS="-lresolv $LIBS"
17345
17346fi
17347
17348
17349fi
17350
17351
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017352case $ac_sys_system/$ac_sys_release in
17353Darwin/*)
17354 _CUR_CFLAGS="${CFLAGS}"
17355 _CUR_LDFLAGS="${LDFLAGS}"
17356 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
17357 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
17358 ;;
17359esac
17360
17361{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
17362echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; }
17363if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
17364 echo $ECHO_N "(cached) $ECHO_C" >&6
17365else
17366 ac_check_lib_save_LIBS=$LIBS
17367LIBS="-lz $LIBS"
17368cat >conftest.$ac_ext <<_ACEOF
17369/* confdefs.h. */
17370_ACEOF
17371cat confdefs.h >>conftest.$ac_ext
17372cat >>conftest.$ac_ext <<_ACEOF
17373/* end confdefs.h. */
17374
17375/* Override any GCC internal prototype to avoid an error.
17376 Use char because int might match the return type of a GCC
17377 builtin and then its argument prototype would still apply. */
17378#ifdef __cplusplus
17379extern "C"
17380#endif
17381char inflateCopy ();
17382int
17383main ()
17384{
17385return inflateCopy ();
17386 ;
17387 return 0;
17388}
17389_ACEOF
17390rm -f conftest.$ac_objext conftest$ac_exeext
17391if { (ac_try="$ac_link"
17392case "(($ac_try" in
17393 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17394 *) ac_try_echo=$ac_try;;
17395esac
17396eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17397 (eval "$ac_link") 2>conftest.er1
17398 ac_status=$?
17399 grep -v '^ *+' conftest.er1 >conftest.err
17400 rm -f conftest.er1
17401 cat conftest.err >&5
17402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17403 (exit $ac_status); } &&
17404 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
17405 { (case "(($ac_try" in
17406 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17407 *) ac_try_echo=$ac_try;;
17408esac
17409eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17410 (eval "$ac_try") 2>&5
17411 ac_status=$?
17412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17413 (exit $ac_status); }; } &&
17414 { ac_try='test -s conftest$ac_exeext'
17415 { (case "(($ac_try" in
17416 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17417 *) ac_try_echo=$ac_try;;
17418esac
17419eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17420 (eval "$ac_try") 2>&5
17421 ac_status=$?
17422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17423 (exit $ac_status); }; }; then
17424 ac_cv_lib_z_inflateCopy=yes
17425else
17426 echo "$as_me: failed program was:" >&5
17427sed 's/^/| /' conftest.$ac_ext >&5
17428
17429 ac_cv_lib_z_inflateCopy=no
17430fi
17431
17432rm -f core conftest.err conftest.$ac_objext \
17433 conftest$ac_exeext conftest.$ac_ext
17434LIBS=$ac_check_lib_save_LIBS
17435fi
17436{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
17437echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6; }
17438if test $ac_cv_lib_z_inflateCopy = yes; then
17439
17440cat >>confdefs.h <<\_ACEOF
17441#define HAVE_ZLIB_COPY 1
17442_ACEOF
17443
17444fi
17445
17446
17447case $ac_sys_system/$ac_sys_release in
17448Darwin/*)
17449 CFLAGS="${_CUR_CFLAGS}"
17450 LDFLAGS="${_CUR_LDFLAGS}"
17451 ;;
17452esac
17453
Thomas Wouters477c8d52006-05-27 19:21:47 +000017454{ echo "$as_me:$LINENO: checking for hstrerror" >&5
17455echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017456cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017457/* confdefs.h. */
17458_ACEOF
17459cat confdefs.h >>conftest.$ac_ext
17460cat >>conftest.$ac_ext <<_ACEOF
17461/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000017462
17463#include "confdefs.h"
17464#include <netdb.h>
17465
Martin v. Löwise9416172003-05-03 10:12:45 +000017466int
17467main ()
17468{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017469void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000017470 ;
17471 return 0;
17472}
17473_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017474rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017475if { (ac_try="$ac_link"
17476case "(($ac_try" in
17477 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17478 *) ac_try_echo=$ac_try;;
17479esac
17480eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17481 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000017482 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017483 grep -v '^ *+' conftest.er1 >conftest.err
17484 rm -f conftest.er1
17485 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000017486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17487 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017488 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
17489 { (case "(($ac_try" in
17490 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17491 *) ac_try_echo=$ac_try;;
17492esac
17493eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17494 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017495 ac_status=$?
17496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17497 (exit $ac_status); }; } &&
17498 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017499 { (case "(($ac_try" in
17500 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17501 *) ac_try_echo=$ac_try;;
17502esac
17503eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17504 (eval "$ac_try") 2>&5
Martin v. Löwise9416172003-05-03 10:12:45 +000017505 ac_status=$?
17506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17507 (exit $ac_status); }; }; then
17508
17509cat >>confdefs.h <<\_ACEOF
17510#define HAVE_HSTRERROR 1
17511_ACEOF
17512
Thomas Wouters477c8d52006-05-27 19:21:47 +000017513 { echo "$as_me:$LINENO: result: yes" >&5
17514echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017515else
17516 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017517sed 's/^/| /' conftest.$ac_ext >&5
17518
Thomas Wouters477c8d52006-05-27 19:21:47 +000017519 { echo "$as_me:$LINENO: result: no" >&5
17520echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017521
17522fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017523
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017524rm -f core conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017525 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000017526
Thomas Wouters477c8d52006-05-27 19:21:47 +000017527{ echo "$as_me:$LINENO: checking for inet_aton" >&5
17528echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017529cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017530/* confdefs.h. */
17531_ACEOF
17532cat confdefs.h >>conftest.$ac_ext
17533cat >>conftest.$ac_ext <<_ACEOF
17534/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000017535
17536#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000017537#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000017538#include <sys/socket.h>
17539#include <netinet/in.h>
17540#include <arpa/inet.h>
17541
Martin v. Löwise9416172003-05-03 10:12:45 +000017542int
17543main ()
17544{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017545void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000017546 ;
17547 return 0;
17548}
17549_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017550rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017551if { (ac_try="$ac_link"
17552case "(($ac_try" in
17553 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17554 *) ac_try_echo=$ac_try;;
17555esac
17556eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17557 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000017558 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017559 grep -v '^ *+' conftest.er1 >conftest.err
17560 rm -f conftest.er1
17561 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000017562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17563 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017564 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
17565 { (case "(($ac_try" in
17566 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17567 *) ac_try_echo=$ac_try;;
17568esac
17569eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17570 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017571 ac_status=$?
17572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17573 (exit $ac_status); }; } &&
17574 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017575 { (case "(($ac_try" in
17576 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17577 *) ac_try_echo=$ac_try;;
17578esac
17579eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17580 (eval "$ac_try") 2>&5
Martin v. Löwise9416172003-05-03 10:12:45 +000017581 ac_status=$?
17582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17583 (exit $ac_status); }; }; then
17584
17585cat >>confdefs.h <<\_ACEOF
17586#define HAVE_INET_ATON 1
17587_ACEOF
17588
Thomas Wouters477c8d52006-05-27 19:21:47 +000017589 { echo "$as_me:$LINENO: result: yes" >&5
17590echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017591else
17592 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017593sed 's/^/| /' conftest.$ac_ext >&5
17594
Thomas Wouters477c8d52006-05-27 19:21:47 +000017595 { echo "$as_me:$LINENO: result: no" >&5
17596echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017597
17598fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017599
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017600rm -f core conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017601 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000017602
Thomas Wouters477c8d52006-05-27 19:21:47 +000017603{ echo "$as_me:$LINENO: checking for inet_pton" >&5
17604echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017605cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017606/* confdefs.h. */
17607_ACEOF
17608cat confdefs.h >>conftest.$ac_ext
17609cat >>conftest.$ac_ext <<_ACEOF
17610/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000017611
17612#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000017613#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000017614#include <sys/socket.h>
17615#include <netinet/in.h>
17616#include <arpa/inet.h>
17617
Martin v. Löwise9416172003-05-03 10:12:45 +000017618int
17619main ()
17620{
17621void* p = inet_pton
17622 ;
17623 return 0;
17624}
17625_ACEOF
17626rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017627if { (ac_try="$ac_compile"
17628case "(($ac_try" in
17629 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17630 *) ac_try_echo=$ac_try;;
17631esac
17632eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17633 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000017634 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017635 grep -v '^ *+' conftest.er1 >conftest.err
17636 rm -f conftest.er1
17637 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000017638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17639 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017640 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
17641 { (case "(($ac_try" in
17642 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17643 *) ac_try_echo=$ac_try;;
17644esac
17645eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17646 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017647 ac_status=$?
17648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17649 (exit $ac_status); }; } &&
17650 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017651 { (case "(($ac_try" in
17652 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17653 *) ac_try_echo=$ac_try;;
17654esac
17655eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17656 (eval "$ac_try") 2>&5
Martin v. Löwise9416172003-05-03 10:12:45 +000017657 ac_status=$?
17658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17659 (exit $ac_status); }; }; then
17660
17661cat >>confdefs.h <<\_ACEOF
17662#define HAVE_INET_PTON 1
17663_ACEOF
17664
Thomas Wouters477c8d52006-05-27 19:21:47 +000017665 { echo "$as_me:$LINENO: result: yes" >&5
17666echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017667else
17668 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017669sed 's/^/| /' conftest.$ac_ext >&5
17670
Thomas Wouters477c8d52006-05-27 19:21:47 +000017671 { echo "$as_me:$LINENO: result: no" >&5
17672echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017673
17674fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017675
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017676rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000017677
Martin v. Löwisd6640d42003-07-06 09:29:52 +000017678# On some systems, setgroups is in unistd.h, on others, in grp.h
Thomas Wouters477c8d52006-05-27 19:21:47 +000017679{ echo "$as_me:$LINENO: checking for setgroups" >&5
17680echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017681cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017682/* confdefs.h. */
17683_ACEOF
17684cat confdefs.h >>conftest.$ac_ext
17685cat >>conftest.$ac_ext <<_ACEOF
17686/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000017687
17688#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000017689#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000017690#ifdef HAVE_GRP_H
17691#include <grp.h>
17692#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000017693
Martin v. Löwisd5843682002-11-21 20:41:28 +000017694int
17695main ()
17696{
17697void* p = setgroups
17698 ;
17699 return 0;
17700}
17701_ACEOF
17702rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017703if { (ac_try="$ac_compile"
17704case "(($ac_try" in
17705 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17706 *) ac_try_echo=$ac_try;;
17707esac
17708eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17709 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000017710 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017711 grep -v '^ *+' conftest.er1 >conftest.err
17712 rm -f conftest.er1
17713 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000017714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17715 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017716 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
17717 { (case "(($ac_try" in
17718 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17719 *) ac_try_echo=$ac_try;;
17720esac
17721eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17722 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017723 ac_status=$?
17724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17725 (exit $ac_status); }; } &&
17726 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017727 { (case "(($ac_try" in
17728 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17729 *) ac_try_echo=$ac_try;;
17730esac
17731eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17732 (eval "$ac_try") 2>&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000017733 ac_status=$?
17734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17735 (exit $ac_status); }; }; then
17736
17737cat >>confdefs.h <<\_ACEOF
17738#define HAVE_SETGROUPS 1
17739_ACEOF
17740
Thomas Wouters477c8d52006-05-27 19:21:47 +000017741 { echo "$as_me:$LINENO: result: yes" >&5
17742echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017743else
17744 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017745sed 's/^/| /' conftest.$ac_ext >&5
17746
Thomas Wouters477c8d52006-05-27 19:21:47 +000017747 { echo "$as_me:$LINENO: result: no" >&5
17748echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017749
17750fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017751
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017752rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000017753
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017754# check for openpty and forkpty
17755
Martin v. Löwis11437992002-04-12 09:54:03 +000017756
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017757for ac_func in openpty
17758do
Martin v. Löwis11437992002-04-12 09:54:03 +000017759as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Thomas Wouters477c8d52006-05-27 19:21:47 +000017760{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17761echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17762if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017763 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017764else
Martin v. Löwis11437992002-04-12 09:54:03 +000017765 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017766/* confdefs.h. */
17767_ACEOF
17768cat confdefs.h >>conftest.$ac_ext
17769cat >>conftest.$ac_ext <<_ACEOF
17770/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017771/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17772 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17773#define $ac_func innocuous_$ac_func
17774
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017775/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017776 which can conflict with char $ac_func (); below.
17777 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017778 <limits.h> exists even on freestanding compilers. */
17779
17780#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017781# include <limits.h>
17782#else
17783# include <assert.h>
17784#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017785
17786#undef $ac_func
17787
Thomas Wouters477c8d52006-05-27 19:21:47 +000017788/* Override any GCC internal prototype to avoid an error.
17789 Use char because int might match the return type of a GCC
17790 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017791#ifdef __cplusplus
17792extern "C"
17793#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017794char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017795/* The GNU C library defines this for functions which it implements
17796 to always fail with ENOSYS. Some functions are actually named
17797 something starting with __ and the normal name is an alias. */
Thomas Wouters477c8d52006-05-27 19:21:47 +000017798#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017799choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017800#endif
17801
Skip Montanaro6dead952003-09-25 14:50:04 +000017802int
17803main ()
17804{
Thomas Wouters477c8d52006-05-27 19:21:47 +000017805return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017806 ;
17807 return 0;
17808}
17809_ACEOF
17810rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017811if { (ac_try="$ac_link"
17812case "(($ac_try" in
17813 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17814 *) ac_try_echo=$ac_try;;
17815esac
17816eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17817 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017818 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017819 grep -v '^ *+' conftest.er1 >conftest.err
17820 rm -f conftest.er1
17821 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17823 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017824 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
17825 { (case "(($ac_try" in
17826 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17827 *) ac_try_echo=$ac_try;;
17828esac
17829eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17830 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017831 ac_status=$?
17832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17833 (exit $ac_status); }; } &&
17834 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017835 { (case "(($ac_try" in
17836 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17837 *) ac_try_echo=$ac_try;;
17838esac
17839eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17840 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017841 ac_status=$?
17842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17843 (exit $ac_status); }; }; then
17844 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017845else
Martin v. Löwis11437992002-04-12 09:54:03 +000017846 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017847sed 's/^/| /' conftest.$ac_ext >&5
17848
Thomas Wouters477c8d52006-05-27 19:21:47 +000017849 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017850fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017851
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017852rm -f core conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017853 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017854fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017855ac_res=`eval echo '${'$as_ac_var'}'`
17856 { echo "$as_me:$LINENO: result: $ac_res" >&5
17857echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017858if test `eval echo '${'$as_ac_var'}'` = yes; then
17859 cat >>confdefs.h <<_ACEOF
17860#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17861_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017862
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017863else
Thomas Wouters477c8d52006-05-27 19:21:47 +000017864 { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
17865echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017866if test "${ac_cv_lib_util_openpty+set}" = set; then
17867 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000017868else
Martin v. Löwis11437992002-04-12 09:54:03 +000017869 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000017870LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017871cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017872/* confdefs.h. */
17873_ACEOF
17874cat confdefs.h >>conftest.$ac_ext
17875cat >>conftest.$ac_ext <<_ACEOF
17876/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017877
Thomas Wouters477c8d52006-05-27 19:21:47 +000017878/* Override any GCC internal prototype to avoid an error.
17879 Use char because int might match the return type of a GCC
17880 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017881#ifdef __cplusplus
17882extern "C"
17883#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017884char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017885int
17886main ()
17887{
Thomas Wouters477c8d52006-05-27 19:21:47 +000017888return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017889 ;
17890 return 0;
17891}
17892_ACEOF
17893rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017894if { (ac_try="$ac_link"
17895case "(($ac_try" in
17896 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17897 *) ac_try_echo=$ac_try;;
17898esac
17899eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17900 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017901 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017902 grep -v '^ *+' conftest.er1 >conftest.err
17903 rm -f conftest.er1
17904 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17906 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017907 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
17908 { (case "(($ac_try" in
17909 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17910 *) ac_try_echo=$ac_try;;
17911esac
17912eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17913 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017914 ac_status=$?
17915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17916 (exit $ac_status); }; } &&
17917 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017918 { (case "(($ac_try" in
17919 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17920 *) ac_try_echo=$ac_try;;
17921esac
17922eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17923 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017924 ac_status=$?
17925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17926 (exit $ac_status); }; }; then
17927 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000017928else
Martin v. Löwis11437992002-04-12 09:54:03 +000017929 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017930sed 's/^/| /' conftest.$ac_ext >&5
17931
Thomas Wouters477c8d52006-05-27 19:21:47 +000017932 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000017933fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017934
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017935rm -f core conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017936 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017937LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000017938fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017939{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
17940echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017941if test $ac_cv_lib_util_openpty = yes; then
17942 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017943#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017944_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017945 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017946else
Thomas Wouters477c8d52006-05-27 19:21:47 +000017947 { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
17948echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017949if test "${ac_cv_lib_bsd_openpty+set}" = set; then
17950 echo $ECHO_N "(cached) $ECHO_C" >&6
17951else
17952 ac_check_lib_save_LIBS=$LIBS
17953LIBS="-lbsd $LIBS"
17954cat >conftest.$ac_ext <<_ACEOF
17955/* confdefs.h. */
17956_ACEOF
17957cat confdefs.h >>conftest.$ac_ext
17958cat >>conftest.$ac_ext <<_ACEOF
17959/* end confdefs.h. */
17960
Thomas Wouters477c8d52006-05-27 19:21:47 +000017961/* Override any GCC internal prototype to avoid an error.
17962 Use char because int might match the return type of a GCC
17963 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017964#ifdef __cplusplus
17965extern "C"
17966#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017967char openpty ();
17968int
17969main ()
17970{
Thomas Wouters477c8d52006-05-27 19:21:47 +000017971return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017972 ;
17973 return 0;
17974}
17975_ACEOF
17976rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017977if { (ac_try="$ac_link"
17978case "(($ac_try" in
17979 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17980 *) ac_try_echo=$ac_try;;
17981esac
17982eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17983 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017984 ac_status=$?
17985 grep -v '^ *+' conftest.er1 >conftest.err
17986 rm -f conftest.er1
17987 cat conftest.err >&5
17988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17989 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017990 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
17991 { (case "(($ac_try" in
17992 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17993 *) ac_try_echo=$ac_try;;
17994esac
17995eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17996 (eval "$ac_try") 2>&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017997 ac_status=$?
17998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17999 (exit $ac_status); }; } &&
18000 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018001 { (case "(($ac_try" in
18002 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18003 *) ac_try_echo=$ac_try;;
18004esac
18005eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18006 (eval "$ac_try") 2>&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018007 ac_status=$?
18008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18009 (exit $ac_status); }; }; then
18010 ac_cv_lib_bsd_openpty=yes
18011else
18012 echo "$as_me: failed program was:" >&5
18013sed 's/^/| /' conftest.$ac_ext >&5
18014
Thomas Wouters477c8d52006-05-27 19:21:47 +000018015 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018016fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018017
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018018rm -f core conftest.err conftest.$ac_objext \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018019 conftest$ac_exeext conftest.$ac_ext
18020LIBS=$ac_check_lib_save_LIBS
18021fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018022{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
18023echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018024if test $ac_cv_lib_bsd_openpty = yes; then
18025 cat >>confdefs.h <<\_ACEOF
18026#define HAVE_OPENPTY 1
18027_ACEOF
18028 LIBS="$LIBS -lbsd"
18029fi
18030
18031
18032fi
18033
Fred Drake8cef4cf2000-06-28 16:40:38 +000018034
18035fi
18036done
18037
Martin v. Löwis11437992002-04-12 09:54:03 +000018038
Fred Drake8cef4cf2000-06-28 16:40:38 +000018039for ac_func in forkpty
18040do
Martin v. Löwis11437992002-04-12 09:54:03 +000018041as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Thomas Wouters477c8d52006-05-27 19:21:47 +000018042{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18043echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18044if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018045 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000018046else
Martin v. Löwis11437992002-04-12 09:54:03 +000018047 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018048/* confdefs.h. */
18049_ACEOF
18050cat confdefs.h >>conftest.$ac_ext
18051cat >>conftest.$ac_ext <<_ACEOF
18052/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018053/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18054 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18055#define $ac_func innocuous_$ac_func
18056
Fred Drake8cef4cf2000-06-28 16:40:38 +000018057/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018058 which can conflict with char $ac_func (); below.
18059 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018060 <limits.h> exists even on freestanding compilers. */
18061
18062#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018063# include <limits.h>
18064#else
18065# include <assert.h>
18066#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018067
18068#undef $ac_func
18069
Thomas Wouters477c8d52006-05-27 19:21:47 +000018070/* Override any GCC internal prototype to avoid an error.
18071 Use char because int might match the return type of a GCC
18072 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018073#ifdef __cplusplus
18074extern "C"
18075#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018076char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000018077/* The GNU C library defines this for functions which it implements
18078 to always fail with ENOSYS. Some functions are actually named
18079 something starting with __ and the normal name is an alias. */
Thomas Wouters477c8d52006-05-27 19:21:47 +000018080#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000018081choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000018082#endif
18083
Skip Montanaro6dead952003-09-25 14:50:04 +000018084int
18085main ()
18086{
Thomas Wouters477c8d52006-05-27 19:21:47 +000018087return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018088 ;
18089 return 0;
18090}
18091_ACEOF
18092rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018093if { (ac_try="$ac_link"
18094case "(($ac_try" in
18095 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18096 *) ac_try_echo=$ac_try;;
18097esac
18098eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18099 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018100 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018101 grep -v '^ *+' conftest.er1 >conftest.err
18102 rm -f conftest.er1
18103 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18105 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018106 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
18107 { (case "(($ac_try" in
18108 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18109 *) ac_try_echo=$ac_try;;
18110esac
18111eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18112 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018113 ac_status=$?
18114 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18115 (exit $ac_status); }; } &&
18116 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018117 { (case "(($ac_try" in
18118 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18119 *) ac_try_echo=$ac_try;;
18120esac
18121eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18122 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018123 ac_status=$?
18124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18125 (exit $ac_status); }; }; then
18126 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018127else
Martin v. Löwis11437992002-04-12 09:54:03 +000018128 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018129sed 's/^/| /' conftest.$ac_ext >&5
18130
Thomas Wouters477c8d52006-05-27 19:21:47 +000018131 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018132fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018133
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018134rm -f core conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018135 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018136fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018137ac_res=`eval echo '${'$as_ac_var'}'`
18138 { echo "$as_me:$LINENO: result: $ac_res" >&5
18139echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018140if test `eval echo '${'$as_ac_var'}'` = yes; then
18141 cat >>confdefs.h <<_ACEOF
18142#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18143_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018144
Fred Drake8cef4cf2000-06-28 16:40:38 +000018145else
Thomas Wouters477c8d52006-05-27 19:21:47 +000018146 { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
18147echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018148if test "${ac_cv_lib_util_forkpty+set}" = set; then
18149 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000018150else
Martin v. Löwis11437992002-04-12 09:54:03 +000018151 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018152LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000018153cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018154/* confdefs.h. */
18155_ACEOF
18156cat confdefs.h >>conftest.$ac_ext
18157cat >>conftest.$ac_ext <<_ACEOF
18158/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018159
Thomas Wouters477c8d52006-05-27 19:21:47 +000018160/* Override any GCC internal prototype to avoid an error.
18161 Use char because int might match the return type of a GCC
18162 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018163#ifdef __cplusplus
18164extern "C"
18165#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018166char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018167int
18168main ()
18169{
Thomas Wouters477c8d52006-05-27 19:21:47 +000018170return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018171 ;
18172 return 0;
18173}
18174_ACEOF
18175rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018176if { (ac_try="$ac_link"
18177case "(($ac_try" in
18178 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18179 *) ac_try_echo=$ac_try;;
18180esac
18181eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18182 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018183 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018184 grep -v '^ *+' conftest.er1 >conftest.err
18185 rm -f conftest.er1
18186 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18188 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018189 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
18190 { (case "(($ac_try" in
18191 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18192 *) ac_try_echo=$ac_try;;
18193esac
18194eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18195 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018196 ac_status=$?
18197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18198 (exit $ac_status); }; } &&
18199 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018200 { (case "(($ac_try" in
18201 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18202 *) ac_try_echo=$ac_try;;
18203esac
18204eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18205 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018206 ac_status=$?
18207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18208 (exit $ac_status); }; }; then
18209 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000018210else
Martin v. Löwis11437992002-04-12 09:54:03 +000018211 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018212sed 's/^/| /' conftest.$ac_ext >&5
18213
Thomas Wouters477c8d52006-05-27 19:21:47 +000018214 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018215fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018216
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018217rm -f core conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018218 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018219LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018220fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018221{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
18222echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018223if test $ac_cv_lib_util_forkpty = yes; then
18224 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018225#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018226_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018227 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018228else
Thomas Wouters477c8d52006-05-27 19:21:47 +000018229 { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
18230echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018231if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
18232 echo $ECHO_N "(cached) $ECHO_C" >&6
18233else
18234 ac_check_lib_save_LIBS=$LIBS
18235LIBS="-lbsd $LIBS"
18236cat >conftest.$ac_ext <<_ACEOF
18237/* confdefs.h. */
18238_ACEOF
18239cat confdefs.h >>conftest.$ac_ext
18240cat >>conftest.$ac_ext <<_ACEOF
18241/* end confdefs.h. */
18242
Thomas Wouters477c8d52006-05-27 19:21:47 +000018243/* Override any GCC internal prototype to avoid an error.
18244 Use char because int might match the return type of a GCC
18245 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018246#ifdef __cplusplus
18247extern "C"
18248#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018249char forkpty ();
18250int
18251main ()
18252{
Thomas Wouters477c8d52006-05-27 19:21:47 +000018253return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018254 ;
18255 return 0;
18256}
18257_ACEOF
18258rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018259if { (ac_try="$ac_link"
18260case "(($ac_try" in
18261 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18262 *) ac_try_echo=$ac_try;;
18263esac
18264eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18265 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018266 ac_status=$?
18267 grep -v '^ *+' conftest.er1 >conftest.err
18268 rm -f conftest.er1
18269 cat conftest.err >&5
18270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18271 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018272 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
18273 { (case "(($ac_try" in
18274 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18275 *) ac_try_echo=$ac_try;;
18276esac
18277eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18278 (eval "$ac_try") 2>&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018279 ac_status=$?
18280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18281 (exit $ac_status); }; } &&
18282 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018283 { (case "(($ac_try" in
18284 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18285 *) ac_try_echo=$ac_try;;
18286esac
18287eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18288 (eval "$ac_try") 2>&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018289 ac_status=$?
18290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18291 (exit $ac_status); }; }; then
18292 ac_cv_lib_bsd_forkpty=yes
18293else
18294 echo "$as_me: failed program was:" >&5
18295sed 's/^/| /' conftest.$ac_ext >&5
18296
Thomas Wouters477c8d52006-05-27 19:21:47 +000018297 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018298fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018299
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018300rm -f core conftest.err conftest.$ac_objext \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018301 conftest$ac_exeext conftest.$ac_ext
18302LIBS=$ac_check_lib_save_LIBS
18303fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018304{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
18305echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018306if test $ac_cv_lib_bsd_forkpty = yes; then
18307 cat >>confdefs.h <<\_ACEOF
18308#define HAVE_FORKPTY 1
18309_ACEOF
18310 LIBS="$LIBS -lbsd"
18311fi
18312
18313
18314fi
18315
Fred Drake8cef4cf2000-06-28 16:40:38 +000018316
18317fi
18318done
18319
Jack Jansendd19cf82001-12-06 22:36:17 +000018320
Michael W. Hudson54241132001-12-07 15:38:26 +000018321# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000018322
18323
18324
18325
18326
18327
Fred Drake8cef4cf2000-06-28 16:40:38 +000018328for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
18329do
Martin v. Löwis11437992002-04-12 09:54:03 +000018330as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Thomas Wouters477c8d52006-05-27 19:21:47 +000018331{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18332echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18333if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018334 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018335else
Martin v. Löwis11437992002-04-12 09:54:03 +000018336 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018337/* confdefs.h. */
18338_ACEOF
18339cat confdefs.h >>conftest.$ac_ext
18340cat >>conftest.$ac_ext <<_ACEOF
18341/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018342/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18343 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18344#define $ac_func innocuous_$ac_func
18345
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018346/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018347 which can conflict with char $ac_func (); below.
18348 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018349 <limits.h> exists even on freestanding compilers. */
18350
18351#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018352# include <limits.h>
18353#else
18354# include <assert.h>
18355#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018356
18357#undef $ac_func
18358
Thomas Wouters477c8d52006-05-27 19:21:47 +000018359/* Override any GCC internal prototype to avoid an error.
18360 Use char because int might match the return type of a GCC
18361 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018362#ifdef __cplusplus
18363extern "C"
18364#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018365char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018366/* The GNU C library defines this for functions which it implements
18367 to always fail with ENOSYS. Some functions are actually named
18368 something starting with __ and the normal name is an alias. */
Thomas Wouters477c8d52006-05-27 19:21:47 +000018369#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018370choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018371#endif
18372
Skip Montanaro6dead952003-09-25 14:50:04 +000018373int
18374main ()
18375{
Thomas Wouters477c8d52006-05-27 19:21:47 +000018376return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018377 ;
18378 return 0;
18379}
18380_ACEOF
18381rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018382if { (ac_try="$ac_link"
18383case "(($ac_try" in
18384 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18385 *) ac_try_echo=$ac_try;;
18386esac
18387eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18388 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018389 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018390 grep -v '^ *+' conftest.er1 >conftest.err
18391 rm -f conftest.er1
18392 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18394 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018395 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
18396 { (case "(($ac_try" in
18397 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18398 *) ac_try_echo=$ac_try;;
18399esac
18400eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18401 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018402 ac_status=$?
18403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18404 (exit $ac_status); }; } &&
18405 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018406 { (case "(($ac_try" in
18407 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18408 *) ac_try_echo=$ac_try;;
18409esac
18410eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18411 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018412 ac_status=$?
18413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18414 (exit $ac_status); }; }; then
18415 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018416else
Martin v. Löwis11437992002-04-12 09:54:03 +000018417 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018418sed 's/^/| /' conftest.$ac_ext >&5
18419
Thomas Wouters477c8d52006-05-27 19:21:47 +000018420 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018421fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018422
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018423rm -f core conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018424 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018425fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018426ac_res=`eval echo '${'$as_ac_var'}'`
18427 { echo "$as_me:$LINENO: result: $ac_res" >&5
18428echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018429if test `eval echo '${'$as_ac_var'}'` = yes; then
18430 cat >>confdefs.h <<_ACEOF
18431#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18432_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000018433
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018434fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018435done
18436
Michael W. Hudson54241132001-12-07 15:38:26 +000018437
Martin v. Löwis11437992002-04-12 09:54:03 +000018438
18439
18440
18441
18442
Martin v. Löwis1142de32002-03-29 16:28:31 +000018443for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000018444do
Martin v. Löwis11437992002-04-12 09:54:03 +000018445as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Thomas Wouters477c8d52006-05-27 19:21:47 +000018446{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18447echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18448if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018449 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018450else
Martin v. Löwis11437992002-04-12 09:54:03 +000018451 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018452/* confdefs.h. */
18453_ACEOF
18454cat confdefs.h >>conftest.$ac_ext
18455cat >>conftest.$ac_ext <<_ACEOF
18456/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018457/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18458 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18459#define $ac_func innocuous_$ac_func
18460
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018461/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018462 which can conflict with char $ac_func (); below.
18463 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018464 <limits.h> exists even on freestanding compilers. */
18465
18466#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018467# include <limits.h>
18468#else
18469# include <assert.h>
18470#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018471
18472#undef $ac_func
18473
Thomas Wouters477c8d52006-05-27 19:21:47 +000018474/* Override any GCC internal prototype to avoid an error.
18475 Use char because int might match the return type of a GCC
18476 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018477#ifdef __cplusplus
18478extern "C"
18479#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018480char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000018481/* The GNU C library defines this for functions which it implements
18482 to always fail with ENOSYS. Some functions are actually named
18483 something starting with __ and the normal name is an alias. */
Thomas Wouters477c8d52006-05-27 19:21:47 +000018484#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000018485choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000018486#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018487
Skip Montanaro6dead952003-09-25 14:50:04 +000018488int
18489main ()
18490{
Thomas Wouters477c8d52006-05-27 19:21:47 +000018491return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018492 ;
18493 return 0;
18494}
18495_ACEOF
18496rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018497if { (ac_try="$ac_link"
18498case "(($ac_try" in
18499 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18500 *) ac_try_echo=$ac_try;;
18501esac
18502eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18503 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018504 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018505 grep -v '^ *+' conftest.er1 >conftest.err
18506 rm -f conftest.er1
18507 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18509 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018510 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
18511 { (case "(($ac_try" in
18512 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18513 *) ac_try_echo=$ac_try;;
18514esac
18515eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18516 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018517 ac_status=$?
18518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18519 (exit $ac_status); }; } &&
18520 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018521 { (case "(($ac_try" in
18522 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18523 *) ac_try_echo=$ac_try;;
18524esac
18525eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18526 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018527 ac_status=$?
18528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18529 (exit $ac_status); }; }; then
18530 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000018531else
Martin v. Löwis11437992002-04-12 09:54:03 +000018532 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018533sed 's/^/| /' conftest.$ac_ext >&5
18534
Thomas Wouters477c8d52006-05-27 19:21:47 +000018535 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000018536fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018537
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018538rm -f core conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018539 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000018540fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018541ac_res=`eval echo '${'$as_ac_var'}'`
18542 { echo "$as_me:$LINENO: result: $ac_res" >&5
18543echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018544if test `eval echo '${'$as_ac_var'}'` = yes; then
18545 cat >>confdefs.h <<_ACEOF
18546#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18547_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000018548
Martin v. Löwis1142de32002-03-29 16:28:31 +000018549else
Thomas Wouters477c8d52006-05-27 19:21:47 +000018550 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000018551 *" $ac_func.$ac_objext "* ) ;;
Thomas Wouters477c8d52006-05-27 19:21:47 +000018552 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
18553 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000018554esac
18555
Martin v. Löwis1142de32002-03-29 16:28:31 +000018556fi
18557done
18558
18559
Martin v. Löwis11437992002-04-12 09:54:03 +000018560
Martin v. Löwis1142de32002-03-29 16:28:31 +000018561for ac_func in getpgrp
18562do
Martin v. Löwis11437992002-04-12 09:54:03 +000018563as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Thomas Wouters477c8d52006-05-27 19:21:47 +000018564{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18565echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18566if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018567 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000018568else
Martin v. Löwis11437992002-04-12 09:54:03 +000018569 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018570/* confdefs.h. */
18571_ACEOF
18572cat confdefs.h >>conftest.$ac_ext
18573cat >>conftest.$ac_ext <<_ACEOF
18574/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018575/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18576 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18577#define $ac_func innocuous_$ac_func
18578
Martin v. Löwis1142de32002-03-29 16:28:31 +000018579/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018580 which can conflict with char $ac_func (); below.
18581 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018582 <limits.h> exists even on freestanding compilers. */
18583
18584#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018585# include <limits.h>
18586#else
18587# include <assert.h>
18588#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018589
18590#undef $ac_func
18591
Thomas Wouters477c8d52006-05-27 19:21:47 +000018592/* Override any GCC internal prototype to avoid an error.
18593 Use char because int might match the return type of a GCC
18594 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018595#ifdef __cplusplus
18596extern "C"
18597#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018598char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000018599/* The GNU C library defines this for functions which it implements
18600 to always fail with ENOSYS. Some functions are actually named
18601 something starting with __ and the normal name is an alias. */
Thomas Wouters477c8d52006-05-27 19:21:47 +000018602#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000018603choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000018604#endif
18605
Skip Montanaro6dead952003-09-25 14:50:04 +000018606int
18607main ()
18608{
Thomas Wouters477c8d52006-05-27 19:21:47 +000018609return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018610 ;
18611 return 0;
18612}
18613_ACEOF
18614rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018615if { (ac_try="$ac_link"
18616case "(($ac_try" in
18617 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18618 *) ac_try_echo=$ac_try;;
18619esac
18620eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18621 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018622 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018623 grep -v '^ *+' conftest.er1 >conftest.err
18624 rm -f conftest.er1
18625 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18627 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018628 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
18629 { (case "(($ac_try" in
18630 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18631 *) ac_try_echo=$ac_try;;
18632esac
18633eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18634 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018635 ac_status=$?
18636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18637 (exit $ac_status); }; } &&
18638 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018639 { (case "(($ac_try" in
18640 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18641 *) ac_try_echo=$ac_try;;
18642esac
18643eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18644 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018645 ac_status=$?
18646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18647 (exit $ac_status); }; }; then
18648 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018649else
Martin v. Löwis11437992002-04-12 09:54:03 +000018650 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018651sed 's/^/| /' conftest.$ac_ext >&5
18652
Thomas Wouters477c8d52006-05-27 19:21:47 +000018653 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018654fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018655
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018656rm -f core conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018657 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018658fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018659ac_res=`eval echo '${'$as_ac_var'}'`
18660 { echo "$as_me:$LINENO: result: $ac_res" >&5
18661echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018662if test `eval echo '${'$as_ac_var'}'` = yes; then
18663 cat >>confdefs.h <<_ACEOF
18664#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18665_ACEOF
18666 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018667/* confdefs.h. */
18668_ACEOF
18669cat confdefs.h >>conftest.$ac_ext
18670cat >>conftest.$ac_ext <<_ACEOF
18671/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018672#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018673int
18674main ()
18675{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018676getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000018677 ;
18678 return 0;
18679}
18680_ACEOF
18681rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018682if { (ac_try="$ac_compile"
18683case "(($ac_try" in
18684 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18685 *) ac_try_echo=$ac_try;;
18686esac
18687eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18688 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018689 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018690 grep -v '^ *+' conftest.er1 >conftest.err
18691 rm -f conftest.er1
18692 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18694 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018695 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
18696 { (case "(($ac_try" in
18697 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18698 *) ac_try_echo=$ac_try;;
18699esac
18700eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18701 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018702 ac_status=$?
18703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18704 (exit $ac_status); }; } &&
18705 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018706 { (case "(($ac_try" in
18707 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18708 *) ac_try_echo=$ac_try;;
18709esac
18710eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18711 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018712 ac_status=$?
18713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18714 (exit $ac_status); }; }; then
18715
18716cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018717#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018718_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000018719
Martin v. Löwis11437992002-04-12 09:54:03 +000018720
Guido van Rossumf78abae1997-01-21 22:02:36 +000018721else
Martin v. Löwis11437992002-04-12 09:54:03 +000018722 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018723sed 's/^/| /' conftest.$ac_ext >&5
18724
Thomas Wouters477c8d52006-05-27 19:21:47 +000018725
Guido van Rossum627b2d71993-12-24 10:39:16 +000018726fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018727
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018728rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000018729
Guido van Rossum627b2d71993-12-24 10:39:16 +000018730fi
Thomas Wouters3a584202000-08-05 23:28:51 +000018731done
Guido van Rossum627b2d71993-12-24 10:39:16 +000018732
Jack Jansen150753c2003-03-29 22:07:47 +000018733
18734for ac_func in setpgrp
18735do
18736as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Thomas Wouters477c8d52006-05-27 19:21:47 +000018737{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18738echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18739if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018740 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018741else
Martin v. Löwis11437992002-04-12 09:54:03 +000018742 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018743/* confdefs.h. */
18744_ACEOF
18745cat confdefs.h >>conftest.$ac_ext
18746cat >>conftest.$ac_ext <<_ACEOF
18747/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018748/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18749 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18750#define $ac_func innocuous_$ac_func
18751
Jack Jansen150753c2003-03-29 22:07:47 +000018752/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018753 which can conflict with char $ac_func (); below.
18754 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018755 <limits.h> exists even on freestanding compilers. */
18756
18757#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018758# include <limits.h>
18759#else
18760# include <assert.h>
18761#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018762
18763#undef $ac_func
18764
Thomas Wouters477c8d52006-05-27 19:21:47 +000018765/* Override any GCC internal prototype to avoid an error.
18766 Use char because int might match the return type of a GCC
18767 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000018768#ifdef __cplusplus
18769extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000018770#endif
Jack Jansen150753c2003-03-29 22:07:47 +000018771char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000018772/* The GNU C library defines this for functions which it implements
18773 to always fail with ENOSYS. Some functions are actually named
18774 something starting with __ and the normal name is an alias. */
Thomas Wouters477c8d52006-05-27 19:21:47 +000018775#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000018776choke me
Jack Jansen150753c2003-03-29 22:07:47 +000018777#endif
18778
Skip Montanaro6dead952003-09-25 14:50:04 +000018779int
18780main ()
18781{
Thomas Wouters477c8d52006-05-27 19:21:47 +000018782return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018783 ;
18784 return 0;
18785}
18786_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000018787rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018788if { (ac_try="$ac_link"
18789case "(($ac_try" in
18790 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18791 *) ac_try_echo=$ac_try;;
18792esac
18793eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18794 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018795 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018796 grep -v '^ *+' conftest.er1 >conftest.err
18797 rm -f conftest.er1
18798 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Jack Jansen150753c2003-03-29 22:07:47 +000018800 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018801 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
18802 { (case "(($ac_try" in
18803 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18804 *) ac_try_echo=$ac_try;;
18805esac
18806eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18807 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018808 ac_status=$?
18809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18810 (exit $ac_status); }; } &&
18811 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018812 { (case "(($ac_try" in
18813 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18814 *) ac_try_echo=$ac_try;;
18815esac
18816eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18817 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018818 ac_status=$?
18819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18820 (exit $ac_status); }; }; then
Jack Jansen150753c2003-03-29 22:07:47 +000018821 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018822else
Jack Jansen150753c2003-03-29 22:07:47 +000018823 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018824sed 's/^/| /' conftest.$ac_ext >&5
18825
Thomas Wouters477c8d52006-05-27 19:21:47 +000018826 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018827fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018828
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018829rm -f core conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018830 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018831fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018832ac_res=`eval echo '${'$as_ac_var'}'`
18833 { echo "$as_me:$LINENO: result: $ac_res" >&5
18834echo "${ECHO_T}$ac_res" >&6; }
Jack Jansen150753c2003-03-29 22:07:47 +000018835if test `eval echo '${'$as_ac_var'}'` = yes; then
18836 cat >>confdefs.h <<_ACEOF
18837#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18838_ACEOF
18839 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018840/* confdefs.h. */
18841_ACEOF
18842cat confdefs.h >>conftest.$ac_ext
18843cat >>conftest.$ac_ext <<_ACEOF
18844/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000018845#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000018846int
18847main ()
18848{
18849setpgrp(0,0);
18850 ;
18851 return 0;
18852}
18853_ACEOF
18854rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018855if { (ac_try="$ac_compile"
18856case "(($ac_try" in
18857 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18858 *) ac_try_echo=$ac_try;;
18859esac
18860eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18861 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000018862 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018863 grep -v '^ *+' conftest.er1 >conftest.err
18864 rm -f conftest.er1
18865 cat conftest.err >&5
Jack Jansen150753c2003-03-29 22:07:47 +000018866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18867 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018868 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
18869 { (case "(($ac_try" in
18870 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18871 *) ac_try_echo=$ac_try;;
18872esac
18873eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18874 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018875 ac_status=$?
18876 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18877 (exit $ac_status); }; } &&
18878 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018879 { (case "(($ac_try" in
18880 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18881 *) ac_try_echo=$ac_try;;
18882esac
18883eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18884 (eval "$ac_try") 2>&5
Jack Jansen150753c2003-03-29 22:07:47 +000018885 ac_status=$?
18886 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18887 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018888
18889cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000018890#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018891_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000018892
Jack Jansen150753c2003-03-29 22:07:47 +000018893
18894else
18895 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018896sed 's/^/| /' conftest.$ac_ext >&5
18897
Thomas Wouters477c8d52006-05-27 19:21:47 +000018898
Guido van Rossum8eee56f1994-10-20 22:18:37 +000018899fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018900
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018901rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000018902
18903fi
18904done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000018905
Martin v. Löwis11437992002-04-12 09:54:03 +000018906
Thomas Wouters3a584202000-08-05 23:28:51 +000018907for ac_func in gettimeofday
18908do
Martin v. Löwis11437992002-04-12 09:54:03 +000018909as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Thomas Wouters477c8d52006-05-27 19:21:47 +000018910{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18911echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18912if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018913 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018914else
Martin v. Löwis11437992002-04-12 09:54:03 +000018915 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018916/* confdefs.h. */
18917_ACEOF
18918cat confdefs.h >>conftest.$ac_ext
18919cat >>conftest.$ac_ext <<_ACEOF
18920/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018921/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18922 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18923#define $ac_func innocuous_$ac_func
18924
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018925/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018926 which can conflict with char $ac_func (); below.
18927 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018928 <limits.h> exists even on freestanding compilers. */
18929
18930#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018931# include <limits.h>
18932#else
18933# include <assert.h>
18934#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018935
18936#undef $ac_func
18937
Thomas Wouters477c8d52006-05-27 19:21:47 +000018938/* Override any GCC internal prototype to avoid an error.
18939 Use char because int might match the return type of a GCC
18940 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018941#ifdef __cplusplus
18942extern "C"
18943#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018944char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018945/* The GNU C library defines this for functions which it implements
18946 to always fail with ENOSYS. Some functions are actually named
18947 something starting with __ and the normal name is an alias. */
Thomas Wouters477c8d52006-05-27 19:21:47 +000018948#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018949choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018950#endif
18951
Skip Montanaro6dead952003-09-25 14:50:04 +000018952int
18953main ()
18954{
Thomas Wouters477c8d52006-05-27 19:21:47 +000018955return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018956 ;
18957 return 0;
18958}
18959_ACEOF
18960rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018961if { (ac_try="$ac_link"
18962case "(($ac_try" in
18963 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18964 *) ac_try_echo=$ac_try;;
18965esac
18966eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18967 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018968 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018969 grep -v '^ *+' conftest.er1 >conftest.err
18970 rm -f conftest.er1
18971 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18973 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018974 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
18975 { (case "(($ac_try" in
18976 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18977 *) ac_try_echo=$ac_try;;
18978esac
18979eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18980 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018981 ac_status=$?
18982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18983 (exit $ac_status); }; } &&
18984 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018985 { (case "(($ac_try" in
18986 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18987 *) ac_try_echo=$ac_try;;
18988esac
18989eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18990 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018991 ac_status=$?
18992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18993 (exit $ac_status); }; }; then
18994 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018995else
Martin v. Löwis11437992002-04-12 09:54:03 +000018996 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018997sed 's/^/| /' conftest.$ac_ext >&5
18998
Thomas Wouters477c8d52006-05-27 19:21:47 +000018999 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019000fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000019001
Thomas Wouters0e3f5912006-08-11 14:57:12 +000019002rm -f core conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019003 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019004fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000019005ac_res=`eval echo '${'$as_ac_var'}'`
19006 { echo "$as_me:$LINENO: result: $ac_res" >&5
19007echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019008if test `eval echo '${'$as_ac_var'}'` = yes; then
19009 cat >>confdefs.h <<_ACEOF
19010#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19011_ACEOF
19012 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019013/* confdefs.h. */
19014_ACEOF
19015cat confdefs.h >>conftest.$ac_ext
19016cat >>conftest.$ac_ext <<_ACEOF
19017/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000019018#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019019int
19020main ()
19021{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019022gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000019023 ;
19024 return 0;
19025}
19026_ACEOF
19027rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019028if { (ac_try="$ac_compile"
19029case "(($ac_try" in
19030 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19031 *) ac_try_echo=$ac_try;;
19032esac
19033eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19034 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019035 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019036 grep -v '^ *+' conftest.er1 >conftest.err
19037 rm -f conftest.er1
19038 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19040 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019041 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
19042 { (case "(($ac_try" in
19043 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19044 *) ac_try_echo=$ac_try;;
19045esac
19046eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19047 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019048 ac_status=$?
19049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19050 (exit $ac_status); }; } &&
19051 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019052 { (case "(($ac_try" in
19053 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19054 *) ac_try_echo=$ac_try;;
19055esac
19056eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19057 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019058 ac_status=$?
19059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19060 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000019061 :
19062else
Martin v. Löwis11437992002-04-12 09:54:03 +000019063 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019064sed 's/^/| /' conftest.$ac_ext >&5
19065
Martin v. Löwis11437992002-04-12 09:54:03 +000019066
19067cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019068#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019069_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019070
Martin v. Löwis11437992002-04-12 09:54:03 +000019071
Guido van Rossum627b2d71993-12-24 10:39:16 +000019072fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000019073
Thomas Wouters0e3f5912006-08-11 14:57:12 +000019074rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019075
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019076fi
Thomas Wouters3a584202000-08-05 23:28:51 +000019077done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019078
Michael W. Hudson54241132001-12-07 15:38:26 +000019079
Thomas Wouters477c8d52006-05-27 19:21:47 +000019080{ echo "$as_me:$LINENO: checking for major" >&5
19081echo $ECHO_N "checking for major... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019082cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019083/* confdefs.h. */
19084_ACEOF
19085cat confdefs.h >>conftest.$ac_ext
19086cat >>conftest.$ac_ext <<_ACEOF
19087/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019088
Neal Norwitz6eb37f02003-02-23 23:28:15 +000019089#if defined(MAJOR_IN_MKDEV)
19090#include <sys/mkdev.h>
19091#elif defined(MAJOR_IN_SYSMACROS)
19092#include <sys/sysmacros.h>
19093#else
19094#include <sys/types.h>
19095#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019096
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019097int
19098main ()
19099{
19100
19101 makedev(major(0),minor(0));
19102
19103 ;
19104 return 0;
19105}
19106_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000019107rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019108if { (ac_try="$ac_link"
19109case "(($ac_try" in
19110 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19111 *) ac_try_echo=$ac_try;;
19112esac
19113eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19114 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019115 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019116 grep -v '^ *+' conftest.er1 >conftest.err
19117 rm -f conftest.er1
19118 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19120 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019121 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
19122 { (case "(($ac_try" in
19123 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19124 *) ac_try_echo=$ac_try;;
19125esac
19126eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19127 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019128 ac_status=$?
19129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19130 (exit $ac_status); }; } &&
19131 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019132 { (case "(($ac_try" in
19133 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19134 *) ac_try_echo=$ac_try;;
19135esac
19136eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19137 (eval "$ac_try") 2>&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019138 ac_status=$?
19139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19140 (exit $ac_status); }; }; then
19141
19142
19143cat >>confdefs.h <<\_ACEOF
19144#define HAVE_DEVICE_MACROS 1
19145_ACEOF
19146
Thomas Wouters477c8d52006-05-27 19:21:47 +000019147 { echo "$as_me:$LINENO: result: yes" >&5
19148echo "${ECHO_T}yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019149
19150else
19151 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019152sed 's/^/| /' conftest.$ac_ext >&5
19153
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019154
Thomas Wouters477c8d52006-05-27 19:21:47 +000019155 { echo "$as_me:$LINENO: result: no" >&5
19156echo "${ECHO_T}no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019157
19158fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000019159
Thomas Wouters0e3f5912006-08-11 14:57:12 +000019160rm -f core conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019161 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019162
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019163# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000019164# for [no]getaddrinfo in netdb.h.
Thomas Wouters477c8d52006-05-27 19:21:47 +000019165{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
19166echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019167cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019168/* confdefs.h. */
19169_ACEOF
19170cat confdefs.h >>conftest.$ac_ext
19171cat >>conftest.$ac_ext <<_ACEOF
19172/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019173
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000019174#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019175#include <sys/socket.h>
19176#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000019177#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019178
Martin v. Löwis11437992002-04-12 09:54:03 +000019179int
19180main ()
19181{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019182
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019183getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019184
Martin v. Löwis11437992002-04-12 09:54:03 +000019185 ;
19186 return 0;
19187}
19188_ACEOF
19189rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019190if { (ac_try="$ac_link"
19191case "(($ac_try" in
19192 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19193 *) ac_try_echo=$ac_try;;
19194esac
19195eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19196 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019197 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019198 grep -v '^ *+' conftest.er1 >conftest.err
19199 rm -f conftest.er1
19200 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19202 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019203 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
19204 { (case "(($ac_try" in
19205 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19206 *) ac_try_echo=$ac_try;;
19207esac
19208eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19209 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019210 ac_status=$?
19211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19212 (exit $ac_status); }; } &&
19213 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019214 { (case "(($ac_try" in
19215 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19216 *) ac_try_echo=$ac_try;;
19217esac
19218eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19219 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019220 ac_status=$?
19221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19222 (exit $ac_status); }; }; then
19223
Thomas Wouters477c8d52006-05-27 19:21:47 +000019224{ echo "$as_me:$LINENO: result: yes" >&5
19225echo "${ECHO_T}yes" >&6; }
19226{ echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
19227echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019228if test "$cross_compiling" = yes; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000019229 { echo "$as_me:$LINENO: result: buggy" >&5
19230echo "${ECHO_T}buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019231buggygetaddrinfo=yes
19232else
Martin v. Löwis11437992002-04-12 09:54:03 +000019233 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019234/* confdefs.h. */
19235_ACEOF
19236cat confdefs.h >>conftest.$ac_ext
19237cat >>conftest.$ac_ext <<_ACEOF
19238/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019239
19240#include <sys/types.h>
19241#include <netdb.h>
19242#include <string.h>
19243#include <sys/socket.h>
19244#include <netinet/in.h>
19245
19246main()
19247{
19248 int passive, gaierr, inet4 = 0, inet6 = 0;
19249 struct addrinfo hints, *ai, *aitop;
19250 char straddr[INET6_ADDRSTRLEN], strport[16];
19251
19252 for (passive = 0; passive <= 1; passive++) {
19253 memset(&hints, 0, sizeof(hints));
19254 hints.ai_family = AF_UNSPEC;
19255 hints.ai_flags = passive ? AI_PASSIVE : 0;
19256 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000019257 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019258 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
19259 (void)gai_strerror(gaierr);
19260 goto bad;
19261 }
19262 for (ai = aitop; ai; ai = ai->ai_next) {
19263 if (ai->ai_addr == NULL ||
19264 ai->ai_addrlen == 0 ||
19265 getnameinfo(ai->ai_addr, ai->ai_addrlen,
19266 straddr, sizeof(straddr), strport, sizeof(strport),
19267 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
19268 goto bad;
19269 }
19270 switch (ai->ai_family) {
19271 case AF_INET:
19272 if (strcmp(strport, "54321") != 0) {
19273 goto bad;
19274 }
19275 if (passive) {
19276 if (strcmp(straddr, "0.0.0.0") != 0) {
19277 goto bad;
19278 }
19279 } else {
19280 if (strcmp(straddr, "127.0.0.1") != 0) {
19281 goto bad;
19282 }
19283 }
19284 inet4++;
19285 break;
19286 case AF_INET6:
19287 if (strcmp(strport, "54321") != 0) {
19288 goto bad;
19289 }
19290 if (passive) {
19291 if (strcmp(straddr, "::") != 0) {
19292 goto bad;
19293 }
19294 } else {
19295 if (strcmp(straddr, "::1") != 0) {
19296 goto bad;
19297 }
19298 }
19299 inet6++;
19300 break;
19301 case AF_UNSPEC:
19302 goto bad;
19303 break;
19304 default:
19305 /* another family support? */
19306 break;
19307 }
19308 }
19309 }
19310
19311 if (!(inet4 == 0 || inet4 == 2))
19312 goto bad;
19313 if (!(inet6 == 0 || inet6 == 2))
19314 goto bad;
19315
19316 if (aitop)
19317 freeaddrinfo(aitop);
19318 exit(0);
19319
19320 bad:
19321 if (aitop)
19322 freeaddrinfo(aitop);
19323 exit(1);
19324}
19325
Martin v. Löwis11437992002-04-12 09:54:03 +000019326_ACEOF
19327rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019328if { (ac_try="$ac_link"
19329case "(($ac_try" in
19330 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19331 *) ac_try_echo=$ac_try;;
19332esac
19333eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19334 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019335 ac_status=$?
19336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19337 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019338 { (case "(($ac_try" in
19339 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19340 *) ac_try_echo=$ac_try;;
19341esac
19342eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19343 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019344 ac_status=$?
19345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19346 (exit $ac_status); }; }; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000019347 { echo "$as_me:$LINENO: result: good" >&5
19348echo "${ECHO_T}good" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019349buggygetaddrinfo=no
19350else
Martin v. Löwis11437992002-04-12 09:54:03 +000019351 echo "$as_me: program exited with status $ac_status" >&5
19352echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019353sed 's/^/| /' conftest.$ac_ext >&5
19354
Martin v. Löwis11437992002-04-12 09:54:03 +000019355( exit $ac_status )
Thomas Wouters477c8d52006-05-27 19:21:47 +000019356{ echo "$as_me:$LINENO: result: buggy" >&5
19357echo "${ECHO_T}buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019358buggygetaddrinfo=yes
19359fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000019360rm -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 +000019361fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000019362
19363
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019364else
Martin v. Löwis11437992002-04-12 09:54:03 +000019365 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019366sed 's/^/| /' conftest.$ac_ext >&5
19367
Martin v. Löwis11437992002-04-12 09:54:03 +000019368
Thomas Wouters477c8d52006-05-27 19:21:47 +000019369{ echo "$as_me:$LINENO: result: no" >&5
19370echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019371buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019372
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019373fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000019374
Thomas Wouters0e3f5912006-08-11 14:57:12 +000019375rm -f core conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019376 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019377
19378if test "$buggygetaddrinfo" = "yes"; then
19379 if test "$ipv6" = "yes"; then
19380 echo 'Fatal: You must get working getaddrinfo() function.'
19381 echo ' or you can specify "--disable-ipv6"'.
19382 exit 1
19383 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019384else
Martin v. Löwis11437992002-04-12 09:54:03 +000019385
19386cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019387#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019388_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019389
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019390fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019391
Jack Jansen9a66b6d2001-08-08 13:56:14 +000019392for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019393do
Martin v. Löwis11437992002-04-12 09:54:03 +000019394as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Thomas Wouters477c8d52006-05-27 19:21:47 +000019395{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19396echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
19397if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019398 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019399else
Martin v. Löwis11437992002-04-12 09:54:03 +000019400 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019401/* confdefs.h. */
19402_ACEOF
19403cat confdefs.h >>conftest.$ac_ext
19404cat >>conftest.$ac_ext <<_ACEOF
19405/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019406/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19407 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19408#define $ac_func innocuous_$ac_func
19409
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019410/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019411 which can conflict with char $ac_func (); below.
19412 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019413 <limits.h> exists even on freestanding compilers. */
19414
19415#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019416# include <limits.h>
19417#else
19418# include <assert.h>
19419#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019420
19421#undef $ac_func
19422
Thomas Wouters477c8d52006-05-27 19:21:47 +000019423/* Override any GCC internal prototype to avoid an error.
19424 Use char because int might match the return type of a GCC
19425 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019426#ifdef __cplusplus
19427extern "C"
19428#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019429char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019430/* The GNU C library defines this for functions which it implements
19431 to always fail with ENOSYS. Some functions are actually named
19432 something starting with __ and the normal name is an alias. */
Thomas Wouters477c8d52006-05-27 19:21:47 +000019433#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019434choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019435#endif
19436
Skip Montanaro6dead952003-09-25 14:50:04 +000019437int
19438main ()
19439{
Thomas Wouters477c8d52006-05-27 19:21:47 +000019440return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019441 ;
19442 return 0;
19443}
19444_ACEOF
19445rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019446if { (ac_try="$ac_link"
19447case "(($ac_try" in
19448 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19449 *) ac_try_echo=$ac_try;;
19450esac
19451eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19452 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019453 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019454 grep -v '^ *+' conftest.er1 >conftest.err
19455 rm -f conftest.er1
19456 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19458 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019459 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
19460 { (case "(($ac_try" in
19461 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19462 *) ac_try_echo=$ac_try;;
19463esac
19464eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19465 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019466 ac_status=$?
19467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19468 (exit $ac_status); }; } &&
19469 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019470 { (case "(($ac_try" in
19471 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19472 *) ac_try_echo=$ac_try;;
19473esac
19474eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19475 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019476 ac_status=$?
19477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19478 (exit $ac_status); }; }; then
19479 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019480else
Martin v. Löwis11437992002-04-12 09:54:03 +000019481 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019482sed 's/^/| /' conftest.$ac_ext >&5
19483
Thomas Wouters477c8d52006-05-27 19:21:47 +000019484 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019485fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000019486
Thomas Wouters0e3f5912006-08-11 14:57:12 +000019487rm -f core conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019488 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019489fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000019490ac_res=`eval echo '${'$as_ac_var'}'`
19491 { echo "$as_me:$LINENO: result: $ac_res" >&5
19492echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019493if test `eval echo '${'$as_ac_var'}'` = yes; then
19494 cat >>confdefs.h <<_ACEOF
19495#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19496_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019497
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019498fi
19499done
19500
Michael W. Hudson54241132001-12-07 15:38:26 +000019501
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019502# checks for structures
Thomas Wouters477c8d52006-05-27 19:21:47 +000019503{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
19504echo $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 +000019505if test "${ac_cv_header_time+set}" = set; then
19506 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019507else
Martin v. Löwis11437992002-04-12 09:54:03 +000019508 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019509/* confdefs.h. */
19510_ACEOF
19511cat confdefs.h >>conftest.$ac_ext
19512cat >>conftest.$ac_ext <<_ACEOF
19513/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019514#include <sys/types.h>
19515#include <sys/time.h>
19516#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019517
Martin v. Löwis11437992002-04-12 09:54:03 +000019518int
19519main ()
19520{
19521if ((struct tm *) 0)
19522return 0;
19523 ;
19524 return 0;
19525}
19526_ACEOF
19527rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019528if { (ac_try="$ac_compile"
19529case "(($ac_try" in
19530 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19531 *) ac_try_echo=$ac_try;;
19532esac
19533eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19534 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019535 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019536 grep -v '^ *+' conftest.er1 >conftest.err
19537 rm -f conftest.er1
19538 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19540 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019541 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
19542 { (case "(($ac_try" in
19543 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19544 *) ac_try_echo=$ac_try;;
19545esac
19546eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19547 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019548 ac_status=$?
19549 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19550 (exit $ac_status); }; } &&
19551 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019552 { (case "(($ac_try" in
19553 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19554 *) ac_try_echo=$ac_try;;
19555esac
19556eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19557 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019558 ac_status=$?
19559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19560 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019561 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000019562else
Martin v. Löwis11437992002-04-12 09:54:03 +000019563 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019564sed 's/^/| /' conftest.$ac_ext >&5
19565
Thomas Wouters477c8d52006-05-27 19:21:47 +000019566 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000019567fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000019568
Thomas Wouters0e3f5912006-08-11 14:57:12 +000019569rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019570fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000019571{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
19572echo "${ECHO_T}$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019573if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019574
19575cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019576#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019577_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019578
19579fi
19580
Thomas Wouters477c8d52006-05-27 19:21:47 +000019581{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
19582echo $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 +000019583if test "${ac_cv_struct_tm+set}" = set; then
19584 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019585else
Martin v. Löwis11437992002-04-12 09:54:03 +000019586 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019587/* confdefs.h. */
19588_ACEOF
19589cat confdefs.h >>conftest.$ac_ext
19590cat >>conftest.$ac_ext <<_ACEOF
19591/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019592#include <sys/types.h>
19593#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019594
Martin v. Löwis11437992002-04-12 09:54:03 +000019595int
19596main ()
19597{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019598struct tm *tp; tp->tm_sec;
Martin v. Löwis11437992002-04-12 09:54:03 +000019599 ;
19600 return 0;
19601}
19602_ACEOF
19603rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019604if { (ac_try="$ac_compile"
19605case "(($ac_try" in
19606 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19607 *) ac_try_echo=$ac_try;;
19608esac
19609eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19610 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019611 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019612 grep -v '^ *+' conftest.er1 >conftest.err
19613 rm -f conftest.er1
19614 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19616 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019617 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
19618 { (case "(($ac_try" in
19619 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19620 *) ac_try_echo=$ac_try;;
19621esac
19622eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19623 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019624 ac_status=$?
19625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19626 (exit $ac_status); }; } &&
19627 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019628 { (case "(($ac_try" in
19629 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19630 *) ac_try_echo=$ac_try;;
19631esac
19632eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19633 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019634 ac_status=$?
19635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19636 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019637 ac_cv_struct_tm=time.h
19638else
Martin v. Löwis11437992002-04-12 09:54:03 +000019639 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019640sed 's/^/| /' conftest.$ac_ext >&5
19641
Thomas Wouters477c8d52006-05-27 19:21:47 +000019642 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019643fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000019644
Thomas Wouters0e3f5912006-08-11 14:57:12 +000019645rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019646fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000019647{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
19648echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019649if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019650
19651cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019652#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019653_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019654
19655fi
19656
Thomas Wouters477c8d52006-05-27 19:21:47 +000019657{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
19658echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019659if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
19660 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019661else
Martin v. Löwis11437992002-04-12 09:54:03 +000019662 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019663/* confdefs.h. */
19664_ACEOF
19665cat confdefs.h >>conftest.$ac_ext
19666cat >>conftest.$ac_ext <<_ACEOF
19667/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019668#include <sys/types.h>
19669#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000019670
19671
Martin v. Löwis11437992002-04-12 09:54:03 +000019672int
19673main ()
19674{
19675static struct tm ac_aggr;
19676if (ac_aggr.tm_zone)
19677return 0;
19678 ;
19679 return 0;
19680}
19681_ACEOF
19682rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019683if { (ac_try="$ac_compile"
19684case "(($ac_try" in
19685 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19686 *) ac_try_echo=$ac_try;;
19687esac
19688eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19689 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019690 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019691 grep -v '^ *+' conftest.er1 >conftest.err
19692 rm -f conftest.er1
19693 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19695 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019696 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
19697 { (case "(($ac_try" in
19698 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19699 *) ac_try_echo=$ac_try;;
19700esac
19701eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19702 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019703 ac_status=$?
19704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19705 (exit $ac_status); }; } &&
19706 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019707 { (case "(($ac_try" in
19708 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19709 *) ac_try_echo=$ac_try;;
19710esac
19711eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19712 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019713 ac_status=$?
19714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19715 (exit $ac_status); }; }; then
19716 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000019717else
Martin v. Löwis11437992002-04-12 09:54:03 +000019718 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019719sed 's/^/| /' conftest.$ac_ext >&5
19720
Thomas Wouters477c8d52006-05-27 19:21:47 +000019721 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019722/* confdefs.h. */
19723_ACEOF
19724cat confdefs.h >>conftest.$ac_ext
19725cat >>conftest.$ac_ext <<_ACEOF
19726/* end confdefs.h. */
19727#include <sys/types.h>
19728#include <$ac_cv_struct_tm>
19729
19730
19731int
19732main ()
19733{
19734static struct tm ac_aggr;
19735if (sizeof ac_aggr.tm_zone)
19736return 0;
19737 ;
19738 return 0;
19739}
19740_ACEOF
19741rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019742if { (ac_try="$ac_compile"
19743case "(($ac_try" in
19744 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19745 *) ac_try_echo=$ac_try;;
19746esac
19747eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19748 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000019749 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019750 grep -v '^ *+' conftest.er1 >conftest.err
19751 rm -f conftest.er1
19752 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19754 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019755 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
19756 { (case "(($ac_try" in
19757 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19758 *) ac_try_echo=$ac_try;;
19759esac
19760eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19761 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019762 ac_status=$?
19763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19764 (exit $ac_status); }; } &&
19765 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019766 { (case "(($ac_try" in
19767 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19768 *) ac_try_echo=$ac_try;;
19769esac
19770eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19771 (eval "$ac_try") 2>&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019772 ac_status=$?
19773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19774 (exit $ac_status); }; }; then
19775 ac_cv_member_struct_tm_tm_zone=yes
19776else
19777 echo "$as_me: failed program was:" >&5
19778sed 's/^/| /' conftest.$ac_ext >&5
19779
Thomas Wouters477c8d52006-05-27 19:21:47 +000019780 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000019781fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000019782
Thomas Wouters0e3f5912006-08-11 14:57:12 +000019783rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019784fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000019785
Thomas Wouters0e3f5912006-08-11 14:57:12 +000019786rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000019787fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000019788{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
19789echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019790if test $ac_cv_member_struct_tm_tm_zone = yes; then
19791
19792cat >>confdefs.h <<_ACEOF
19793#define HAVE_STRUCT_TM_TM_ZONE 1
19794_ACEOF
19795
19796
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019797fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000019798
Martin v. Löwis11437992002-04-12 09:54:03 +000019799if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
19800
19801cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019802#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019803_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019804
19805else
Thomas Wouters477c8d52006-05-27 19:21:47 +000019806 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
19807echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
19808if test "${ac_cv_have_decl_tzname+set}" = set; then
19809 echo $ECHO_N "(cached) $ECHO_C" >&6
19810else
19811 cat >conftest.$ac_ext <<_ACEOF
19812/* confdefs.h. */
19813_ACEOF
19814cat confdefs.h >>conftest.$ac_ext
19815cat >>conftest.$ac_ext <<_ACEOF
19816/* end confdefs.h. */
19817#include <time.h>
19818
19819int
19820main ()
19821{
19822#ifndef tzname
19823 char *p = (char *) tzname;
19824 return !p;
19825#endif
19826
19827 ;
19828 return 0;
19829}
19830_ACEOF
19831rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019832if { (ac_try="$ac_compile"
19833case "(($ac_try" in
19834 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19835 *) ac_try_echo=$ac_try;;
19836esac
19837eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19838 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters477c8d52006-05-27 19:21:47 +000019839 ac_status=$?
19840 grep -v '^ *+' conftest.er1 >conftest.err
19841 rm -f conftest.er1
19842 cat conftest.err >&5
19843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19844 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019845 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
19846 { (case "(($ac_try" in
19847 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19848 *) ac_try_echo=$ac_try;;
19849esac
19850eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19851 (eval "$ac_try") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000019852 ac_status=$?
19853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19854 (exit $ac_status); }; } &&
19855 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019856 { (case "(($ac_try" in
19857 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19858 *) ac_try_echo=$ac_try;;
19859esac
19860eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19861 (eval "$ac_try") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000019862 ac_status=$?
19863 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19864 (exit $ac_status); }; }; then
19865 ac_cv_have_decl_tzname=yes
19866else
19867 echo "$as_me: failed program was:" >&5
19868sed 's/^/| /' conftest.$ac_ext >&5
19869
19870 ac_cv_have_decl_tzname=no
19871fi
19872
Thomas Wouters0e3f5912006-08-11 14:57:12 +000019873rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000019874fi
19875{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
19876echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
19877if test $ac_cv_have_decl_tzname = yes; then
19878
19879cat >>confdefs.h <<_ACEOF
19880#define HAVE_DECL_TZNAME 1
19881_ACEOF
19882
19883
19884else
19885 cat >>confdefs.h <<_ACEOF
19886#define HAVE_DECL_TZNAME 0
19887_ACEOF
19888
19889
19890fi
19891
19892
19893 { echo "$as_me:$LINENO: checking for tzname" >&5
19894echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019895if test "${ac_cv_var_tzname+set}" = set; then
19896 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019897else
Martin v. Löwis11437992002-04-12 09:54:03 +000019898 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019899/* confdefs.h. */
19900_ACEOF
19901cat confdefs.h >>conftest.$ac_ext
19902cat >>conftest.$ac_ext <<_ACEOF
19903/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000019904#include <time.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +000019905#if !HAVE_DECL_TZNAME
19906extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000019907#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019908
Martin v. Löwis11437992002-04-12 09:54:03 +000019909int
19910main ()
19911{
Thomas Wouters477c8d52006-05-27 19:21:47 +000019912return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000019913 ;
19914 return 0;
19915}
19916_ACEOF
19917rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019918if { (ac_try="$ac_link"
19919case "(($ac_try" in
19920 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19921 *) ac_try_echo=$ac_try;;
19922esac
19923eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19924 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019925 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019926 grep -v '^ *+' conftest.er1 >conftest.err
19927 rm -f conftest.er1
19928 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19930 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019931 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
19932 { (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 Montanarof0d5f792004-08-15 14:08:23 +000019938 ac_status=$?
19939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19940 (exit $ac_status); }; } &&
19941 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019942 { (case "(($ac_try" in
19943 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19944 *) ac_try_echo=$ac_try;;
19945esac
19946eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19947 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019948 ac_status=$?
19949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19950 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019951 ac_cv_var_tzname=yes
19952else
Martin v. Löwis11437992002-04-12 09:54:03 +000019953 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019954sed 's/^/| /' conftest.$ac_ext >&5
19955
Thomas Wouters477c8d52006-05-27 19:21:47 +000019956 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000019957fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000019958
Thomas Wouters0e3f5912006-08-11 14:57:12 +000019959rm -f core conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019960 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000019961fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000019962{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
19963echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019964 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019965
19966cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019967#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019968_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019969
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019970 fi
19971fi
19972
Thomas Wouters477c8d52006-05-27 19:21:47 +000019973{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
19974echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019975if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
19976 echo $ECHO_N "(cached) $ECHO_C" >&6
19977else
19978 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019979/* confdefs.h. */
19980_ACEOF
19981cat confdefs.h >>conftest.$ac_ext
19982cat >>conftest.$ac_ext <<_ACEOF
19983/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019984$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000019985int
19986main ()
19987{
19988static struct stat ac_aggr;
19989if (ac_aggr.st_rdev)
19990return 0;
19991 ;
19992 return 0;
19993}
19994_ACEOF
19995rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019996if { (ac_try="$ac_compile"
19997case "(($ac_try" in
19998 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19999 *) ac_try_echo=$ac_try;;
20000esac
20001eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20002 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020003 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020004 grep -v '^ *+' conftest.er1 >conftest.err
20005 rm -f conftest.er1
20006 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020007 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20008 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020009 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
20010 { (case "(($ac_try" in
20011 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20012 *) ac_try_echo=$ac_try;;
20013esac
20014eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20015 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000020016 ac_status=$?
20017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20018 (exit $ac_status); }; } &&
20019 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020020 { (case "(($ac_try" in
20021 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20022 *) ac_try_echo=$ac_try;;
20023esac
20024eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20025 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020026 ac_status=$?
20027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20028 (exit $ac_status); }; }; then
20029 ac_cv_member_struct_stat_st_rdev=yes
20030else
20031 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020032sed 's/^/| /' conftest.$ac_ext >&5
20033
Thomas Wouters477c8d52006-05-27 19:21:47 +000020034 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020035/* confdefs.h. */
20036_ACEOF
20037cat confdefs.h >>conftest.$ac_ext
20038cat >>conftest.$ac_ext <<_ACEOF
20039/* end confdefs.h. */
20040$ac_includes_default
20041int
20042main ()
20043{
20044static struct stat ac_aggr;
20045if (sizeof ac_aggr.st_rdev)
20046return 0;
20047 ;
20048 return 0;
20049}
20050_ACEOF
20051rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020052if { (ac_try="$ac_compile"
20053case "(($ac_try" in
20054 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20055 *) ac_try_echo=$ac_try;;
20056esac
20057eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20058 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020059 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020060 grep -v '^ *+' conftest.er1 >conftest.err
20061 rm -f conftest.er1
20062 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20064 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020065 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
20066 { (case "(($ac_try" in
20067 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20068 *) ac_try_echo=$ac_try;;
20069esac
20070eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20071 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000020072 ac_status=$?
20073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20074 (exit $ac_status); }; } &&
20075 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020076 { (case "(($ac_try" in
20077 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20078 *) ac_try_echo=$ac_try;;
20079esac
20080eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20081 (eval "$ac_try") 2>&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020082 ac_status=$?
20083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20084 (exit $ac_status); }; }; then
20085 ac_cv_member_struct_stat_st_rdev=yes
20086else
20087 echo "$as_me: failed program was:" >&5
20088sed 's/^/| /' conftest.$ac_ext >&5
20089
Thomas Wouters477c8d52006-05-27 19:21:47 +000020090 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000020091fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020092
Thomas Wouters0e3f5912006-08-11 14:57:12 +000020093rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020094fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020095
Thomas Wouters0e3f5912006-08-11 14:57:12 +000020096rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020097fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020098{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
20099echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020100if test $ac_cv_member_struct_stat_st_rdev = yes; then
20101
20102cat >>confdefs.h <<_ACEOF
20103#define HAVE_STRUCT_STAT_ST_RDEV 1
20104_ACEOF
20105
20106
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020107fi
20108
Thomas Wouters477c8d52006-05-27 19:21:47 +000020109{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
20110echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020111if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
20112 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020113else
Martin v. Löwis11437992002-04-12 09:54:03 +000020114 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020115/* confdefs.h. */
20116_ACEOF
20117cat confdefs.h >>conftest.$ac_ext
20118cat >>conftest.$ac_ext <<_ACEOF
20119/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020120$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020121int
20122main ()
20123{
20124static struct stat ac_aggr;
20125if (ac_aggr.st_blksize)
20126return 0;
20127 ;
20128 return 0;
20129}
20130_ACEOF
20131rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020132if { (ac_try="$ac_compile"
20133case "(($ac_try" in
20134 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20135 *) ac_try_echo=$ac_try;;
20136esac
20137eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20138 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020139 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020140 grep -v '^ *+' conftest.er1 >conftest.err
20141 rm -f conftest.er1
20142 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20144 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020145 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
20146 { (case "(($ac_try" in
20147 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20148 *) ac_try_echo=$ac_try;;
20149esac
20150eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20151 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000020152 ac_status=$?
20153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20154 (exit $ac_status); }; } &&
20155 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020156 { (case "(($ac_try" in
20157 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20158 *) ac_try_echo=$ac_try;;
20159esac
20160eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20161 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020162 ac_status=$?
20163 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20164 (exit $ac_status); }; }; then
20165 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000020166else
Martin v. Löwis11437992002-04-12 09:54:03 +000020167 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020168sed 's/^/| /' conftest.$ac_ext >&5
20169
Thomas Wouters477c8d52006-05-27 19:21:47 +000020170 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020171/* confdefs.h. */
20172_ACEOF
20173cat confdefs.h >>conftest.$ac_ext
20174cat >>conftest.$ac_ext <<_ACEOF
20175/* end confdefs.h. */
20176$ac_includes_default
20177int
20178main ()
20179{
20180static struct stat ac_aggr;
20181if (sizeof ac_aggr.st_blksize)
20182return 0;
20183 ;
20184 return 0;
20185}
20186_ACEOF
20187rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020188if { (ac_try="$ac_compile"
20189case "(($ac_try" in
20190 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20191 *) ac_try_echo=$ac_try;;
20192esac
20193eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20194 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020195 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020196 grep -v '^ *+' conftest.er1 >conftest.err
20197 rm -f conftest.er1
20198 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20200 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020201 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
20202 { (case "(($ac_try" in
20203 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20204 *) ac_try_echo=$ac_try;;
20205esac
20206eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20207 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000020208 ac_status=$?
20209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20210 (exit $ac_status); }; } &&
20211 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020212 { (case "(($ac_try" in
20213 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20214 *) ac_try_echo=$ac_try;;
20215esac
20216eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20217 (eval "$ac_try") 2>&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020218 ac_status=$?
20219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20220 (exit $ac_status); }; }; then
20221 ac_cv_member_struct_stat_st_blksize=yes
20222else
20223 echo "$as_me: failed program was:" >&5
20224sed 's/^/| /' conftest.$ac_ext >&5
20225
Thomas Wouters477c8d52006-05-27 19:21:47 +000020226 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000020227fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020228
Thomas Wouters0e3f5912006-08-11 14:57:12 +000020229rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020230fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020231
Thomas Wouters0e3f5912006-08-11 14:57:12 +000020232rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020233fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020234{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
20235echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020236if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000020237
Martin v. Löwis11437992002-04-12 09:54:03 +000020238cat >>confdefs.h <<_ACEOF
20239#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
20240_ACEOF
20241
20242
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020243fi
20244
Thomas Wouters477c8d52006-05-27 19:21:47 +000020245{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
20246echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020247if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
20248 echo $ECHO_N "(cached) $ECHO_C" >&6
20249else
20250 cat >conftest.$ac_ext <<_ACEOF
20251/* confdefs.h. */
20252_ACEOF
20253cat confdefs.h >>conftest.$ac_ext
20254cat >>conftest.$ac_ext <<_ACEOF
20255/* end confdefs.h. */
20256$ac_includes_default
20257int
20258main ()
20259{
20260static struct stat ac_aggr;
20261if (ac_aggr.st_flags)
20262return 0;
20263 ;
20264 return 0;
20265}
20266_ACEOF
20267rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020268if { (ac_try="$ac_compile"
20269case "(($ac_try" in
20270 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20271 *) ac_try_echo=$ac_try;;
20272esac
20273eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20274 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020275 ac_status=$?
20276 grep -v '^ *+' conftest.er1 >conftest.err
20277 rm -f conftest.er1
20278 cat conftest.err >&5
20279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20280 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020281 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
20282 { (case "(($ac_try" in
20283 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20284 *) ac_try_echo=$ac_try;;
20285esac
20286eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20287 (eval "$ac_try") 2>&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020288 ac_status=$?
20289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20290 (exit $ac_status); }; } &&
20291 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020292 { (case "(($ac_try" in
20293 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20294 *) ac_try_echo=$ac_try;;
20295esac
20296eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20297 (eval "$ac_try") 2>&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020298 ac_status=$?
20299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20300 (exit $ac_status); }; }; then
20301 ac_cv_member_struct_stat_st_flags=yes
20302else
20303 echo "$as_me: failed program was:" >&5
20304sed 's/^/| /' conftest.$ac_ext >&5
20305
Thomas Wouters477c8d52006-05-27 19:21:47 +000020306 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020307/* confdefs.h. */
20308_ACEOF
20309cat confdefs.h >>conftest.$ac_ext
20310cat >>conftest.$ac_ext <<_ACEOF
20311/* end confdefs.h. */
20312$ac_includes_default
20313int
20314main ()
20315{
20316static struct stat ac_aggr;
20317if (sizeof ac_aggr.st_flags)
20318return 0;
20319 ;
20320 return 0;
20321}
20322_ACEOF
20323rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020324if { (ac_try="$ac_compile"
20325case "(($ac_try" in
20326 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20327 *) ac_try_echo=$ac_try;;
20328esac
20329eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20330 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020331 ac_status=$?
20332 grep -v '^ *+' conftest.er1 >conftest.err
20333 rm -f conftest.er1
20334 cat conftest.err >&5
20335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20336 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020337 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
20338 { (case "(($ac_try" in
20339 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20340 *) ac_try_echo=$ac_try;;
20341esac
20342eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20343 (eval "$ac_try") 2>&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020344 ac_status=$?
20345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20346 (exit $ac_status); }; } &&
20347 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020348 { (case "(($ac_try" in
20349 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20350 *) ac_try_echo=$ac_try;;
20351esac
20352eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20353 (eval "$ac_try") 2>&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020354 ac_status=$?
20355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20356 (exit $ac_status); }; }; then
20357 ac_cv_member_struct_stat_st_flags=yes
20358else
20359 echo "$as_me: failed program was:" >&5
20360sed 's/^/| /' conftest.$ac_ext >&5
20361
Thomas Wouters477c8d52006-05-27 19:21:47 +000020362 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020363fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020364
Thomas Wouters0e3f5912006-08-11 14:57:12 +000020365rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020366fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020367
Thomas Wouters0e3f5912006-08-11 14:57:12 +000020368rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020369fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020370{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
20371echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020372if test $ac_cv_member_struct_stat_st_flags = yes; then
20373
20374cat >>confdefs.h <<_ACEOF
20375#define HAVE_STRUCT_STAT_ST_FLAGS 1
20376_ACEOF
20377
20378
20379fi
20380
Thomas Wouters477c8d52006-05-27 19:21:47 +000020381{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
20382echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020383if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
20384 echo $ECHO_N "(cached) $ECHO_C" >&6
20385else
20386 cat >conftest.$ac_ext <<_ACEOF
20387/* confdefs.h. */
20388_ACEOF
20389cat confdefs.h >>conftest.$ac_ext
20390cat >>conftest.$ac_ext <<_ACEOF
20391/* end confdefs.h. */
20392$ac_includes_default
20393int
20394main ()
20395{
20396static struct stat ac_aggr;
20397if (ac_aggr.st_gen)
20398return 0;
20399 ;
20400 return 0;
20401}
20402_ACEOF
20403rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020404if { (ac_try="$ac_compile"
20405case "(($ac_try" in
20406 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20407 *) ac_try_echo=$ac_try;;
20408esac
20409eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20410 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020411 ac_status=$?
20412 grep -v '^ *+' conftest.er1 >conftest.err
20413 rm -f conftest.er1
20414 cat conftest.err >&5
20415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20416 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020417 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
20418 { (case "(($ac_try" in
20419 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20420 *) ac_try_echo=$ac_try;;
20421esac
20422eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20423 (eval "$ac_try") 2>&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020424 ac_status=$?
20425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20426 (exit $ac_status); }; } &&
20427 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020428 { (case "(($ac_try" in
20429 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20430 *) ac_try_echo=$ac_try;;
20431esac
20432eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20433 (eval "$ac_try") 2>&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020434 ac_status=$?
20435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20436 (exit $ac_status); }; }; then
20437 ac_cv_member_struct_stat_st_gen=yes
20438else
20439 echo "$as_me: failed program was:" >&5
20440sed 's/^/| /' conftest.$ac_ext >&5
20441
Thomas Wouters477c8d52006-05-27 19:21:47 +000020442 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020443/* confdefs.h. */
20444_ACEOF
20445cat confdefs.h >>conftest.$ac_ext
20446cat >>conftest.$ac_ext <<_ACEOF
20447/* end confdefs.h. */
20448$ac_includes_default
20449int
20450main ()
20451{
20452static struct stat ac_aggr;
20453if (sizeof ac_aggr.st_gen)
20454return 0;
20455 ;
20456 return 0;
20457}
20458_ACEOF
20459rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020460if { (ac_try="$ac_compile"
20461case "(($ac_try" in
20462 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20463 *) ac_try_echo=$ac_try;;
20464esac
20465eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20466 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020467 ac_status=$?
20468 grep -v '^ *+' conftest.er1 >conftest.err
20469 rm -f conftest.er1
20470 cat conftest.err >&5
20471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20472 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020473 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
20474 { (case "(($ac_try" in
20475 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20476 *) ac_try_echo=$ac_try;;
20477esac
20478eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20479 (eval "$ac_try") 2>&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020480 ac_status=$?
20481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20482 (exit $ac_status); }; } &&
20483 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020484 { (case "(($ac_try" in
20485 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20486 *) ac_try_echo=$ac_try;;
20487esac
20488eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20489 (eval "$ac_try") 2>&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020490 ac_status=$?
20491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20492 (exit $ac_status); }; }; then
20493 ac_cv_member_struct_stat_st_gen=yes
20494else
20495 echo "$as_me: failed program was:" >&5
20496sed 's/^/| /' conftest.$ac_ext >&5
20497
Thomas Wouters477c8d52006-05-27 19:21:47 +000020498 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020499fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020500
Thomas Wouters0e3f5912006-08-11 14:57:12 +000020501rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020502fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020503
Thomas Wouters0e3f5912006-08-11 14:57:12 +000020504rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020505fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020506{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
20507echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020508if test $ac_cv_member_struct_stat_st_gen = yes; then
20509
20510cat >>confdefs.h <<_ACEOF
20511#define HAVE_STRUCT_STAT_ST_GEN 1
20512_ACEOF
20513
20514
20515fi
20516
Thomas Wouters477c8d52006-05-27 19:21:47 +000020517{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
20518echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020519if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
20520 echo $ECHO_N "(cached) $ECHO_C" >&6
20521else
20522 cat >conftest.$ac_ext <<_ACEOF
20523/* confdefs.h. */
20524_ACEOF
20525cat confdefs.h >>conftest.$ac_ext
20526cat >>conftest.$ac_ext <<_ACEOF
20527/* end confdefs.h. */
20528$ac_includes_default
20529int
20530main ()
20531{
20532static struct stat ac_aggr;
20533if (ac_aggr.st_birthtime)
20534return 0;
20535 ;
20536 return 0;
20537}
20538_ACEOF
20539rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020540if { (ac_try="$ac_compile"
20541case "(($ac_try" in
20542 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20543 *) ac_try_echo=$ac_try;;
20544esac
20545eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20546 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020547 ac_status=$?
20548 grep -v '^ *+' conftest.er1 >conftest.err
20549 rm -f conftest.er1
20550 cat conftest.err >&5
20551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20552 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020553 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
20554 { (case "(($ac_try" in
20555 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20556 *) ac_try_echo=$ac_try;;
20557esac
20558eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20559 (eval "$ac_try") 2>&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020560 ac_status=$?
20561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20562 (exit $ac_status); }; } &&
20563 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020564 { (case "(($ac_try" in
20565 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20566 *) ac_try_echo=$ac_try;;
20567esac
20568eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20569 (eval "$ac_try") 2>&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020570 ac_status=$?
20571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20572 (exit $ac_status); }; }; then
20573 ac_cv_member_struct_stat_st_birthtime=yes
20574else
20575 echo "$as_me: failed program was:" >&5
20576sed 's/^/| /' conftest.$ac_ext >&5
20577
Thomas Wouters477c8d52006-05-27 19:21:47 +000020578 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020579/* confdefs.h. */
20580_ACEOF
20581cat confdefs.h >>conftest.$ac_ext
20582cat >>conftest.$ac_ext <<_ACEOF
20583/* end confdefs.h. */
20584$ac_includes_default
20585int
20586main ()
20587{
20588static struct stat ac_aggr;
20589if (sizeof ac_aggr.st_birthtime)
20590return 0;
20591 ;
20592 return 0;
20593}
20594_ACEOF
20595rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020596if { (ac_try="$ac_compile"
20597case "(($ac_try" in
20598 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20599 *) ac_try_echo=$ac_try;;
20600esac
20601eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20602 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020603 ac_status=$?
20604 grep -v '^ *+' conftest.er1 >conftest.err
20605 rm -f conftest.er1
20606 cat conftest.err >&5
20607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20608 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020609 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
20610 { (case "(($ac_try" in
20611 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20612 *) ac_try_echo=$ac_try;;
20613esac
20614eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20615 (eval "$ac_try") 2>&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020616 ac_status=$?
20617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20618 (exit $ac_status); }; } &&
20619 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020620 { (case "(($ac_try" in
20621 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20622 *) ac_try_echo=$ac_try;;
20623esac
20624eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20625 (eval "$ac_try") 2>&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020626 ac_status=$?
20627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20628 (exit $ac_status); }; }; then
20629 ac_cv_member_struct_stat_st_birthtime=yes
20630else
20631 echo "$as_me: failed program was:" >&5
20632sed 's/^/| /' conftest.$ac_ext >&5
20633
Thomas Wouters477c8d52006-05-27 19:21:47 +000020634 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020635fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020636
Thomas Wouters0e3f5912006-08-11 14:57:12 +000020637rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020638fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020639
Thomas Wouters0e3f5912006-08-11 14:57:12 +000020640rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020641fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020642{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
20643echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020644if test $ac_cv_member_struct_stat_st_birthtime = yes; then
20645
20646cat >>confdefs.h <<_ACEOF
20647#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
20648_ACEOF
20649
20650
20651fi
20652
Thomas Wouters477c8d52006-05-27 19:21:47 +000020653{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
20654echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020655if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
20656 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020657else
Martin v. Löwis11437992002-04-12 09:54:03 +000020658 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020659/* confdefs.h. */
20660_ACEOF
20661cat confdefs.h >>conftest.$ac_ext
20662cat >>conftest.$ac_ext <<_ACEOF
20663/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020664$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020665int
20666main ()
20667{
20668static struct stat ac_aggr;
20669if (ac_aggr.st_blocks)
20670return 0;
20671 ;
20672 return 0;
20673}
20674_ACEOF
20675rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020676if { (ac_try="$ac_compile"
20677case "(($ac_try" in
20678 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20679 *) ac_try_echo=$ac_try;;
20680esac
20681eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20682 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020683 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020684 grep -v '^ *+' conftest.er1 >conftest.err
20685 rm -f conftest.er1
20686 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020687 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20688 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020689 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
20690 { (case "(($ac_try" in
20691 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20692 *) ac_try_echo=$ac_try;;
20693esac
20694eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20695 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000020696 ac_status=$?
20697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20698 (exit $ac_status); }; } &&
20699 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020700 { (case "(($ac_try" in
20701 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20702 *) ac_try_echo=$ac_try;;
20703esac
20704eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20705 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020706 ac_status=$?
20707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20708 (exit $ac_status); }; }; then
20709 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000020710else
Martin v. Löwis11437992002-04-12 09:54:03 +000020711 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020712sed 's/^/| /' conftest.$ac_ext >&5
20713
Thomas Wouters477c8d52006-05-27 19:21:47 +000020714 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020715/* confdefs.h. */
20716_ACEOF
20717cat confdefs.h >>conftest.$ac_ext
20718cat >>conftest.$ac_ext <<_ACEOF
20719/* end confdefs.h. */
20720$ac_includes_default
20721int
20722main ()
20723{
20724static struct stat ac_aggr;
20725if (sizeof ac_aggr.st_blocks)
20726return 0;
20727 ;
20728 return 0;
20729}
20730_ACEOF
20731rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020732if { (ac_try="$ac_compile"
20733case "(($ac_try" in
20734 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20735 *) ac_try_echo=$ac_try;;
20736esac
20737eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20738 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020739 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020740 grep -v '^ *+' conftest.er1 >conftest.err
20741 rm -f conftest.er1
20742 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20744 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020745 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
20746 { (case "(($ac_try" in
20747 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20748 *) ac_try_echo=$ac_try;;
20749esac
20750eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20751 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000020752 ac_status=$?
20753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20754 (exit $ac_status); }; } &&
20755 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020756 { (case "(($ac_try" in
20757 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20758 *) ac_try_echo=$ac_try;;
20759esac
20760eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20761 (eval "$ac_try") 2>&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020762 ac_status=$?
20763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20764 (exit $ac_status); }; }; then
20765 ac_cv_member_struct_stat_st_blocks=yes
20766else
20767 echo "$as_me: failed program was:" >&5
20768sed 's/^/| /' conftest.$ac_ext >&5
20769
Thomas Wouters477c8d52006-05-27 19:21:47 +000020770 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000020771fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020772
Thomas Wouters0e3f5912006-08-11 14:57:12 +000020773rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020774fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020775
Thomas Wouters0e3f5912006-08-11 14:57:12 +000020776rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020777fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020778{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
20779echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020780if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000020781
Martin v. Löwis11437992002-04-12 09:54:03 +000020782cat >>confdefs.h <<_ACEOF
20783#define HAVE_STRUCT_STAT_ST_BLOCKS 1
20784_ACEOF
20785
20786
20787cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020788#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020789_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020790
20791else
Thomas Wouters477c8d52006-05-27 19:21:47 +000020792 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000020793 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters477c8d52006-05-27 19:21:47 +000020794 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
20795 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000020796esac
20797
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020798fi
20799
Michael W. Hudson54241132001-12-07 15:38:26 +000020800
Martin v. Löwis11437992002-04-12 09:54:03 +000020801
Thomas Wouters477c8d52006-05-27 19:21:47 +000020802{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
20803echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020804if test "${ac_cv_header_time_altzone+set}" = set; then
20805 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020806else
Martin v. Löwis11437992002-04-12 09:54:03 +000020807 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020808/* confdefs.h. */
20809_ACEOF
20810cat confdefs.h >>conftest.$ac_ext
20811cat >>conftest.$ac_ext <<_ACEOF
20812/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020813#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020814int
20815main ()
20816{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020817return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000020818 ;
20819 return 0;
20820}
20821_ACEOF
20822rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020823if { (ac_try="$ac_compile"
20824case "(($ac_try" in
20825 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20826 *) ac_try_echo=$ac_try;;
20827esac
20828eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20829 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020830 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020831 grep -v '^ *+' conftest.er1 >conftest.err
20832 rm -f conftest.er1
20833 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20835 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020836 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
20837 { (case "(($ac_try" in
20838 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20839 *) ac_try_echo=$ac_try;;
20840esac
20841eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20842 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000020843 ac_status=$?
20844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20845 (exit $ac_status); }; } &&
20846 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020847 { (case "(($ac_try" in
20848 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20849 *) ac_try_echo=$ac_try;;
20850esac
20851eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20852 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020853 ac_status=$?
20854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20855 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020856 ac_cv_header_time_altzone=yes
20857else
Martin v. Löwis11437992002-04-12 09:54:03 +000020858 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020859sed 's/^/| /' conftest.$ac_ext >&5
20860
Thomas Wouters477c8d52006-05-27 19:21:47 +000020861 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000020862fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020863
Thomas Wouters0e3f5912006-08-11 14:57:12 +000020864rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020865fi
20866
Thomas Wouters477c8d52006-05-27 19:21:47 +000020867{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
20868echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020869if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020870
20871cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020872#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020873_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020874
20875fi
20876
Guido van Rossumda88dad1995-01-26 00:46:29 +000020877was_it_defined=no
Thomas Wouters477c8d52006-05-27 19:21:47 +000020878{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
20879echo $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 +000020880cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020881/* confdefs.h. */
20882_ACEOF
20883cat confdefs.h >>conftest.$ac_ext
20884cat >>conftest.$ac_ext <<_ACEOF
20885/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020886
20887#include <sys/types.h>
20888#include <sys/select.h>
20889#include <sys/time.h>
20890
Martin v. Löwis11437992002-04-12 09:54:03 +000020891int
20892main ()
20893{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020894;
Martin v. Löwis11437992002-04-12 09:54:03 +000020895 ;
20896 return 0;
20897}
20898_ACEOF
20899rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020900if { (ac_try="$ac_compile"
20901case "(($ac_try" in
20902 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20903 *) ac_try_echo=$ac_try;;
20904esac
20905eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20906 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020907 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020908 grep -v '^ *+' conftest.er1 >conftest.err
20909 rm -f conftest.er1
20910 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20912 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020913 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
20914 { (case "(($ac_try" in
20915 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20916 *) ac_try_echo=$ac_try;;
20917esac
20918eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20919 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000020920 ac_status=$?
20921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20922 (exit $ac_status); }; } &&
20923 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020924 { (case "(($ac_try" in
20925 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20926 *) ac_try_echo=$ac_try;;
20927esac
20928eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20929 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020930 ac_status=$?
20931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20932 (exit $ac_status); }; }; then
20933
20934
20935cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020936#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020937_ACEOF
20938
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020939 was_it_defined=yes
20940
Guido van Rossumf78abae1997-01-21 22:02:36 +000020941else
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
Guido van Rossum627b2d71993-12-24 10:39:16 +000020945
Thomas Wouters477c8d52006-05-27 19:21:47 +000020946fi
20947
Thomas Wouters0e3f5912006-08-11 14:57:12 +000020948rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000020949{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
20950echo "${ECHO_T}$was_it_defined" >&6; }
20951
20952{ echo "$as_me:$LINENO: checking for addrinfo" >&5
20953echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020954if test "${ac_cv_struct_addrinfo+set}" = set; then
20955 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020956else
Martin v. Löwis11437992002-04-12 09:54:03 +000020957 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020958/* confdefs.h. */
20959_ACEOF
20960cat confdefs.h >>conftest.$ac_ext
20961cat >>conftest.$ac_ext <<_ACEOF
20962/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020963
20964# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020965int
20966main ()
20967{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020968struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000020969 ;
20970 return 0;
20971}
20972_ACEOF
20973rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020974if { (ac_try="$ac_compile"
20975case "(($ac_try" in
20976 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20977 *) ac_try_echo=$ac_try;;
20978esac
20979eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20980 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020981 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020982 grep -v '^ *+' conftest.er1 >conftest.err
20983 rm -f conftest.er1
20984 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20986 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020987 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
20988 { (case "(($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_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000020994 ac_status=$?
20995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20996 (exit $ac_status); }; } &&
20997 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020998 { (case "(($ac_try" in
20999 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21000 *) ac_try_echo=$ac_try;;
21001esac
21002eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21003 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021004 ac_status=$?
21005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21006 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021007 ac_cv_struct_addrinfo=yes
21008else
Martin v. Löwis11437992002-04-12 09:54:03 +000021009 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021010sed 's/^/| /' conftest.$ac_ext >&5
21011
Thomas Wouters477c8d52006-05-27 19:21:47 +000021012 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021013fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021014
Thomas Wouters0e3f5912006-08-11 14:57:12 +000021015rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021016fi
21017
Thomas Wouters477c8d52006-05-27 19:21:47 +000021018{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
21019echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021020if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021021
21022cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021023#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021024_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021025
21026fi
21027
Thomas Wouters477c8d52006-05-27 19:21:47 +000021028{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
21029echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021030if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
21031 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021032else
Martin v. Löwis11437992002-04-12 09:54:03 +000021033 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021034/* confdefs.h. */
21035_ACEOF
21036cat confdefs.h >>conftest.$ac_ext
21037cat >>conftest.$ac_ext <<_ACEOF
21038/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021039
21040# include <sys/types.h>
21041# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021042int
21043main ()
21044{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021045struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000021046 ;
21047 return 0;
21048}
21049_ACEOF
21050rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021051if { (ac_try="$ac_compile"
21052case "(($ac_try" in
21053 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21054 *) ac_try_echo=$ac_try;;
21055esac
21056eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21057 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021058 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021059 grep -v '^ *+' conftest.er1 >conftest.err
21060 rm -f conftest.er1
21061 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21063 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021064 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
21065 { (case "(($ac_try" in
21066 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21067 *) ac_try_echo=$ac_try;;
21068esac
21069eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21070 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000021071 ac_status=$?
21072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21073 (exit $ac_status); }; } &&
21074 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021075 { (case "(($ac_try" in
21076 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21077 *) ac_try_echo=$ac_try;;
21078esac
21079eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21080 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021081 ac_status=$?
21082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21083 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021084 ac_cv_struct_sockaddr_storage=yes
21085else
Martin v. Löwis11437992002-04-12 09:54:03 +000021086 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021087sed 's/^/| /' conftest.$ac_ext >&5
21088
Thomas Wouters477c8d52006-05-27 19:21:47 +000021089 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021090fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021091
Thomas Wouters0e3f5912006-08-11 14:57:12 +000021092rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021093fi
21094
Thomas Wouters477c8d52006-05-27 19:21:47 +000021095{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
21096echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021097if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021098
21099cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021100#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021101_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021102
21103fi
21104
Guido van Rossum627b2d71993-12-24 10:39:16 +000021105# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000021106
Michael W. Hudson54241132001-12-07 15:38:26 +000021107
Thomas Wouters477c8d52006-05-27 19:21:47 +000021108{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
21109echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021110if test "${ac_cv_c_char_unsigned+set}" = set; then
21111 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000021112else
Martin v. Löwis11437992002-04-12 09:54:03 +000021113 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021114/* confdefs.h. */
21115_ACEOF
21116cat confdefs.h >>conftest.$ac_ext
21117cat >>conftest.$ac_ext <<_ACEOF
21118/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021119$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021120int
21121main ()
21122{
21123static int test_array [1 - 2 * !(((char) -1) < 0)];
21124test_array [0] = 0
21125
21126 ;
21127 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000021128}
Martin v. Löwis11437992002-04-12 09:54:03 +000021129_ACEOF
21130rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021131if { (ac_try="$ac_compile"
21132case "(($ac_try" in
21133 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21134 *) ac_try_echo=$ac_try;;
21135esac
21136eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21137 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021138 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021139 grep -v '^ *+' conftest.er1 >conftest.err
21140 rm -f conftest.er1
21141 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021142 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21143 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021144 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
21145 { (case "(($ac_try" in
21146 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21147 *) ac_try_echo=$ac_try;;
21148esac
21149eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21150 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000021151 ac_status=$?
21152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21153 (exit $ac_status); }; } &&
21154 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021155 { (case "(($ac_try" in
21156 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21157 *) ac_try_echo=$ac_try;;
21158esac
21159eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21160 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021161 ac_status=$?
21162 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21163 (exit $ac_status); }; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +000021164 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000021165else
21166 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021167sed 's/^/| /' conftest.$ac_ext >&5
21168
Thomas Wouters477c8d52006-05-27 19:21:47 +000021169 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021170fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021171
Thomas Wouters0e3f5912006-08-11 14:57:12 +000021172rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021173fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021174{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
21175echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021176if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021177 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021178#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021179_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021180
21181fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000021182
Thomas Wouters477c8d52006-05-27 19:21:47 +000021183{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
21184echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021185if test "${ac_cv_c_const+set}" = set; then
21186 echo $ECHO_N "(cached) $ECHO_C" >&6
21187else
21188 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021189/* confdefs.h. */
21190_ACEOF
21191cat confdefs.h >>conftest.$ac_ext
21192cat >>conftest.$ac_ext <<_ACEOF
21193/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021194
Martin v. Löwis11437992002-04-12 09:54:03 +000021195int
21196main ()
21197{
21198/* FIXME: Include the comments suggested by Paul. */
21199#ifndef __cplusplus
21200 /* Ultrix mips cc rejects this. */
21201 typedef int charset[2];
21202 const charset x;
21203 /* SunOS 4.1.1 cc rejects this. */
21204 char const *const *ccp;
21205 char **p;
21206 /* NEC SVR4.0.2 mips cc rejects this. */
21207 struct point {int x, y;};
21208 static struct point const zero = {0,0};
21209 /* AIX XL C 1.02.0.0 rejects this.
21210 It does not let you subtract one const X* pointer from another in
21211 an arm of an if-expression whose if-part is not a constant
21212 expression */
21213 const char *g = "string";
21214 ccp = &g + (g ? g-g : 0);
21215 /* HPUX 7.0 cc rejects these. */
21216 ++ccp;
21217 p = (char**) ccp;
21218 ccp = (char const *const *) p;
21219 { /* SCO 3.2v4 cc rejects this. */
21220 char *t;
21221 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021222
Martin v. Löwis11437992002-04-12 09:54:03 +000021223 *t++ = 0;
Thomas Wouters477c8d52006-05-27 19:21:47 +000021224 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021225 }
21226 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
21227 int x[] = {25, 17};
21228 const int *foo = &x[0];
21229 ++foo;
21230 }
21231 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
21232 typedef const int *iptr;
21233 iptr p = 0;
21234 ++p;
21235 }
21236 { /* AIX XL C 1.02.0.0 rejects this saying
21237 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
21238 struct s { int j; const int *ap[3]; };
21239 struct s *b; b->j = 5;
21240 }
21241 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
21242 const int foo = 10;
Thomas Wouters477c8d52006-05-27 19:21:47 +000021243 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021244 }
Thomas Wouters477c8d52006-05-27 19:21:47 +000021245 return !x[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000021246#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000021247
Martin v. Löwis11437992002-04-12 09:54:03 +000021248 ;
21249 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000021250}
Martin v. Löwis11437992002-04-12 09:54:03 +000021251_ACEOF
21252rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021253if { (ac_try="$ac_compile"
21254case "(($ac_try" in
21255 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21256 *) ac_try_echo=$ac_try;;
21257esac
21258eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21259 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021260 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021261 grep -v '^ *+' conftest.er1 >conftest.err
21262 rm -f conftest.er1
21263 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21265 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021266 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
21267 { (case "(($ac_try" in
21268 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21269 *) ac_try_echo=$ac_try;;
21270esac
21271eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21272 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000021273 ac_status=$?
21274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21275 (exit $ac_status); }; } &&
21276 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021277 { (case "(($ac_try" in
21278 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21279 *) ac_try_echo=$ac_try;;
21280esac
21281eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21282 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021283 ac_status=$?
21284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21285 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021286 ac_cv_c_const=yes
21287else
Martin v. Löwis11437992002-04-12 09:54:03 +000021288 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021289sed 's/^/| /' conftest.$ac_ext >&5
21290
Thomas Wouters477c8d52006-05-27 19:21:47 +000021291 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021292fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021293
Thomas Wouters0e3f5912006-08-11 14:57:12 +000021294rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021295fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021296{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
21297echo "${ECHO_T}$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021298if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021299
21300cat >>confdefs.h <<\_ACEOF
21301#define const
21302_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021303
21304fi
21305
Michael W. Hudson54241132001-12-07 15:38:26 +000021306
Guido van Rossumda88dad1995-01-26 00:46:29 +000021307works=no
Thomas Wouters477c8d52006-05-27 19:21:47 +000021308{ echo "$as_me:$LINENO: checking for working volatile" >&5
21309echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021310cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021311/* confdefs.h. */
21312_ACEOF
21313cat confdefs.h >>conftest.$ac_ext
21314cat >>conftest.$ac_ext <<_ACEOF
21315/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000021316
Martin v. Löwis11437992002-04-12 09:54:03 +000021317int
21318main ()
21319{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021320volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021321 ;
21322 return 0;
21323}
21324_ACEOF
21325rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021326if { (ac_try="$ac_compile"
21327case "(($ac_try" in
21328 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21329 *) ac_try_echo=$ac_try;;
21330esac
21331eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21332 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021333 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021334 grep -v '^ *+' conftest.er1 >conftest.err
21335 rm -f conftest.er1
21336 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21338 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021339 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
21340 { (case "(($ac_try" in
21341 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21342 *) ac_try_echo=$ac_try;;
21343esac
21344eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21345 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000021346 ac_status=$?
21347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21348 (exit $ac_status); }; } &&
21349 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021350 { (case "(($ac_try" in
21351 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21352 *) ac_try_echo=$ac_try;;
21353esac
21354eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21355 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021356 ac_status=$?
21357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21358 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000021359 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000021360else
Martin v. Löwis11437992002-04-12 09:54:03 +000021361 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021362sed 's/^/| /' conftest.$ac_ext >&5
21363
Martin v. Löwis11437992002-04-12 09:54:03 +000021364
21365cat >>confdefs.h <<\_ACEOF
21366#define volatile
21367_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000021368
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021369
Guido van Rossum627b2d71993-12-24 10:39:16 +000021370fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021371
Thomas Wouters0e3f5912006-08-11 14:57:12 +000021372rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000021373{ echo "$as_me:$LINENO: result: $works" >&5
21374echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021375
Guido van Rossumda88dad1995-01-26 00:46:29 +000021376works=no
Thomas Wouters477c8d52006-05-27 19:21:47 +000021377{ echo "$as_me:$LINENO: checking for working signed char" >&5
21378echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021379cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021380/* confdefs.h. */
21381_ACEOF
21382cat confdefs.h >>conftest.$ac_ext
21383cat >>conftest.$ac_ext <<_ACEOF
21384/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000021385
Martin v. Löwis11437992002-04-12 09:54:03 +000021386int
21387main ()
21388{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021389signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000021390 ;
21391 return 0;
21392}
21393_ACEOF
21394rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021395if { (ac_try="$ac_compile"
21396case "(($ac_try" in
21397 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21398 *) ac_try_echo=$ac_try;;
21399esac
21400eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21401 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021402 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021403 grep -v '^ *+' conftest.er1 >conftest.err
21404 rm -f conftest.er1
21405 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21407 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021408 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
21409 { (case "(($ac_try" in
21410 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21411 *) ac_try_echo=$ac_try;;
21412esac
21413eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21414 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000021415 ac_status=$?
21416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21417 (exit $ac_status); }; } &&
21418 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021419 { (case "(($ac_try" in
21420 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21421 *) ac_try_echo=$ac_try;;
21422esac
21423eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21424 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021425 ac_status=$?
21426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21427 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000021428 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000021429else
Martin v. Löwis11437992002-04-12 09:54:03 +000021430 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021431sed 's/^/| /' conftest.$ac_ext >&5
21432
Martin v. Löwis11437992002-04-12 09:54:03 +000021433
21434cat >>confdefs.h <<\_ACEOF
21435#define signed
21436_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000021437
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021438
Guido van Rossum7f43da71994-08-01 12:15:30 +000021439fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021440
Thomas Wouters0e3f5912006-08-11 14:57:12 +000021441rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000021442{ echo "$as_me:$LINENO: result: $works" >&5
21443echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021444
Guido van Rossumda88dad1995-01-26 00:46:29 +000021445have_prototypes=no
Thomas Wouters477c8d52006-05-27 19:21:47 +000021446{ echo "$as_me:$LINENO: checking for prototypes" >&5
21447echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021448cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021449/* confdefs.h. */
21450_ACEOF
21451cat confdefs.h >>conftest.$ac_ext
21452cat >>conftest.$ac_ext <<_ACEOF
21453/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021454int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021455int
21456main ()
21457{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021458return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000021459 ;
21460 return 0;
21461}
21462_ACEOF
21463rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021464if { (ac_try="$ac_compile"
21465case "(($ac_try" in
21466 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21467 *) ac_try_echo=$ac_try;;
21468esac
21469eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21470 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021471 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021472 grep -v '^ *+' conftest.er1 >conftest.err
21473 rm -f conftest.er1
21474 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21476 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021477 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
21478 { (case "(($ac_try" in
21479 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21480 *) ac_try_echo=$ac_try;;
21481esac
21482eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21483 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000021484 ac_status=$?
21485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21486 (exit $ac_status); }; } &&
21487 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021488 { (case "(($ac_try" in
21489 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21490 *) ac_try_echo=$ac_try;;
21491esac
21492eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21493 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021494 ac_status=$?
21495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21496 (exit $ac_status); }; }; then
21497
21498
21499cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021500#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021501_ACEOF
21502
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021503 have_prototypes=yes
21504
Guido van Rossumf78abae1997-01-21 22:02:36 +000021505else
Martin v. Löwis11437992002-04-12 09:54:03 +000021506 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021507sed 's/^/| /' conftest.$ac_ext >&5
21508
Thomas Wouters477c8d52006-05-27 19:21:47 +000021509
Guido van Rossum7f43da71994-08-01 12:15:30 +000021510fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021511
Thomas Wouters0e3f5912006-08-11 14:57:12 +000021512rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000021513{ echo "$as_me:$LINENO: result: $have_prototypes" >&5
21514echo "${ECHO_T}$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021515
Guido van Rossumda88dad1995-01-26 00:46:29 +000021516works=no
Thomas Wouters477c8d52006-05-27 19:21:47 +000021517{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
21518echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021519cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021520/* confdefs.h. */
21521_ACEOF
21522cat confdefs.h >>conftest.$ac_ext
21523cat >>conftest.$ac_ext <<_ACEOF
21524/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021525
21526#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000021527int foo(int x, ...) {
21528 va_list va;
21529 va_start(va, x);
21530 va_arg(va, int);
21531 va_arg(va, char *);
21532 va_arg(va, double);
21533 return 0;
21534}
Guido van Rossum7f43da71994-08-01 12:15:30 +000021535
Martin v. Löwis11437992002-04-12 09:54:03 +000021536int
21537main ()
21538{
Guido van Rossum90eea071996-08-30 20:58:57 +000021539return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000021540 ;
21541 return 0;
21542}
21543_ACEOF
21544rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021545if { (ac_try="$ac_compile"
21546case "(($ac_try" in
21547 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21548 *) ac_try_echo=$ac_try;;
21549esac
21550eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21551 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021552 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021553 grep -v '^ *+' conftest.er1 >conftest.err
21554 rm -f conftest.er1
21555 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021556 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21557 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021558 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
21559 { (case "(($ac_try" in
21560 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21561 *) ac_try_echo=$ac_try;;
21562esac
21563eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21564 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000021565 ac_status=$?
21566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21567 (exit $ac_status); }; } &&
21568 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021569 { (case "(($ac_try" in
21570 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21571 *) ac_try_echo=$ac_try;;
21572esac
21573eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21574 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021575 ac_status=$?
21576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21577 (exit $ac_status); }; }; then
21578
21579
21580cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021581#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021582_ACEOF
21583
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021584 works=yes
21585
Guido van Rossumf78abae1997-01-21 22:02:36 +000021586else
Martin v. Löwis11437992002-04-12 09:54:03 +000021587 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021588sed 's/^/| /' conftest.$ac_ext >&5
21589
Thomas Wouters477c8d52006-05-27 19:21:47 +000021590
Guido van Rossum627b2d71993-12-24 10:39:16 +000021591fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021592
Thomas Wouters0e3f5912006-08-11 14:57:12 +000021593rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000021594{ echo "$as_me:$LINENO: result: $works" >&5
21595echo "${ECHO_T}$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021596
Martin v. Löwisd6320502004-08-12 13:45:08 +000021597# check for socketpair
Thomas Wouters477c8d52006-05-27 19:21:47 +000021598{ echo "$as_me:$LINENO: checking for socketpair" >&5
21599echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000021600cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000021601/* confdefs.h. */
21602_ACEOF
21603cat confdefs.h >>conftest.$ac_ext
21604cat >>conftest.$ac_ext <<_ACEOF
21605/* end confdefs.h. */
21606
21607#include <sys/types.h>
21608#include <sys/socket.h>
21609
21610int
21611main ()
21612{
21613void *x=socketpair
21614 ;
21615 return 0;
21616}
21617_ACEOF
21618rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021619if { (ac_try="$ac_compile"
21620case "(($ac_try" in
21621 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21622 *) ac_try_echo=$ac_try;;
21623esac
21624eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21625 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000021626 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021627 grep -v '^ *+' conftest.er1 >conftest.err
21628 rm -f conftest.er1
21629 cat conftest.err >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000021630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21631 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021632 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
21633 { (case "(($ac_try" in
21634 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21635 *) ac_try_echo=$ac_try;;
21636esac
21637eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21638 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000021639 ac_status=$?
21640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21641 (exit $ac_status); }; } &&
21642 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021643 { (case "(($ac_try" in
21644 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21645 *) ac_try_echo=$ac_try;;
21646esac
21647eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21648 (eval "$ac_try") 2>&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000021649 ac_status=$?
21650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21651 (exit $ac_status); }; }; then
21652
21653cat >>confdefs.h <<\_ACEOF
21654#define HAVE_SOCKETPAIR 1
21655_ACEOF
21656
Thomas Wouters477c8d52006-05-27 19:21:47 +000021657 { echo "$as_me:$LINENO: result: yes" >&5
21658echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000021659else
21660 echo "$as_me: failed program was:" >&5
21661sed 's/^/| /' conftest.$ac_ext >&5
21662
Thomas Wouters477c8d52006-05-27 19:21:47 +000021663 { echo "$as_me:$LINENO: result: no" >&5
21664echo "${ECHO_T}no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000021665
21666fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021667
Thomas Wouters0e3f5912006-08-11 14:57:12 +000021668rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000021669
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021670# check if sockaddr has sa_len member
Thomas Wouters477c8d52006-05-27 19:21:47 +000021671{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
21672echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021673cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021674/* confdefs.h. */
21675_ACEOF
21676cat confdefs.h >>conftest.$ac_ext
21677cat >>conftest.$ac_ext <<_ACEOF
21678/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021679#include <sys/types.h>
21680#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021681int
21682main ()
21683{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021684struct sockaddr x;
21685x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021686 ;
21687 return 0;
21688}
21689_ACEOF
21690rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021691if { (ac_try="$ac_compile"
21692case "(($ac_try" in
21693 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21694 *) ac_try_echo=$ac_try;;
21695esac
21696eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21697 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021698 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021699 grep -v '^ *+' conftest.er1 >conftest.err
21700 rm -f conftest.er1
21701 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21703 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021704 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
21705 { (case "(($ac_try" in
21706 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21707 *) ac_try_echo=$ac_try;;
21708esac
21709eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21710 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000021711 ac_status=$?
21712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21713 (exit $ac_status); }; } &&
21714 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021715 { (case "(($ac_try" in
21716 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21717 *) ac_try_echo=$ac_try;;
21718esac
21719eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21720 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021721 ac_status=$?
21722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21723 (exit $ac_status); }; }; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000021724 { echo "$as_me:$LINENO: result: yes" >&5
21725echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021726
21727cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021728#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021729_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021730
21731else
Martin v. Löwis11437992002-04-12 09:54:03 +000021732 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021733sed 's/^/| /' conftest.$ac_ext >&5
21734
Thomas Wouters477c8d52006-05-27 19:21:47 +000021735 { echo "$as_me:$LINENO: result: no" >&5
21736echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021737fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021738
Thomas Wouters0e3f5912006-08-11 14:57:12 +000021739rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021740
Guido van Rossumda88dad1995-01-26 00:46:29 +000021741va_list_is_array=no
Thomas Wouters477c8d52006-05-27 19:21:47 +000021742{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
21743echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021744cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021745/* confdefs.h. */
21746_ACEOF
21747cat confdefs.h >>conftest.$ac_ext
21748cat >>conftest.$ac_ext <<_ACEOF
21749/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021750
21751#ifdef HAVE_STDARG_PROTOTYPES
21752#include <stdarg.h>
21753#else
21754#include <varargs.h>
21755#endif
21756
Martin v. Löwis11437992002-04-12 09:54:03 +000021757int
21758main ()
21759{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021760va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000021761 ;
21762 return 0;
21763}
21764_ACEOF
21765rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021766if { (ac_try="$ac_compile"
21767case "(($ac_try" in
21768 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21769 *) ac_try_echo=$ac_try;;
21770esac
21771eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21772 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021773 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021774 grep -v '^ *+' conftest.er1 >conftest.err
21775 rm -f conftest.er1
21776 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21778 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021779 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
21780 { (case "(($ac_try" in
21781 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21782 *) ac_try_echo=$ac_try;;
21783esac
21784eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21785 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000021786 ac_status=$?
21787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21788 (exit $ac_status); }; } &&
21789 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021790 { (case "(($ac_try" in
21791 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21792 *) ac_try_echo=$ac_try;;
21793esac
21794eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21795 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021796 ac_status=$?
21797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21798 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021799 :
21800else
Martin v. Löwis11437992002-04-12 09:54:03 +000021801 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021802sed 's/^/| /' conftest.$ac_ext >&5
21803
Martin v. Löwis11437992002-04-12 09:54:03 +000021804
21805
21806cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021807#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021808_ACEOF
21809
Guido van Rossumda88dad1995-01-26 00:46:29 +000021810 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021811
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021812fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021813
Thomas Wouters0e3f5912006-08-11 14:57:12 +000021814rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000021815{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
21816echo "${ECHO_T}$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021817
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021818# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000021819
21820
21821
Thomas Wouters477c8d52006-05-27 19:21:47 +000021822{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
21823echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021824if test "${ac_cv_func_gethostbyname_r+set}" = set; then
21825 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021826else
Martin v. Löwis11437992002-04-12 09:54:03 +000021827 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021828/* confdefs.h. */
21829_ACEOF
21830cat confdefs.h >>conftest.$ac_ext
21831cat >>conftest.$ac_ext <<_ACEOF
21832/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021833/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
21834 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21835#define gethostbyname_r innocuous_gethostbyname_r
21836
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021837/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021838 which can conflict with char gethostbyname_r (); below.
21839 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021840 <limits.h> exists even on freestanding compilers. */
21841
21842#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021843# include <limits.h>
21844#else
21845# include <assert.h>
21846#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021847
21848#undef gethostbyname_r
21849
Thomas Wouters477c8d52006-05-27 19:21:47 +000021850/* Override any GCC internal prototype to avoid an error.
21851 Use char because int might match the return type of a GCC
21852 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021853#ifdef __cplusplus
21854extern "C"
21855#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021856char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021857/* The GNU C library defines this for functions which it implements
21858 to always fail with ENOSYS. Some functions are actually named
21859 something starting with __ and the normal name is an alias. */
Thomas Wouters477c8d52006-05-27 19:21:47 +000021860#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021861choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021862#endif
21863
Skip Montanaro6dead952003-09-25 14:50:04 +000021864int
21865main ()
21866{
Thomas Wouters477c8d52006-05-27 19:21:47 +000021867return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021868 ;
21869 return 0;
21870}
21871_ACEOF
21872rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021873if { (ac_try="$ac_link"
21874case "(($ac_try" in
21875 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21876 *) ac_try_echo=$ac_try;;
21877esac
21878eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21879 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021880 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021881 grep -v '^ *+' conftest.er1 >conftest.err
21882 rm -f conftest.er1
21883 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21885 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021886 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
21887 { (case "(($ac_try" in
21888 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21889 *) ac_try_echo=$ac_try;;
21890esac
21891eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21892 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000021893 ac_status=$?
21894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21895 (exit $ac_status); }; } &&
21896 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021897 { (case "(($ac_try" in
21898 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21899 *) ac_try_echo=$ac_try;;
21900esac
21901eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21902 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021903 ac_status=$?
21904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21905 (exit $ac_status); }; }; then
21906 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021907else
Martin v. Löwis11437992002-04-12 09:54:03 +000021908 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021909sed 's/^/| /' conftest.$ac_ext >&5
21910
Thomas Wouters477c8d52006-05-27 19:21:47 +000021911 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021912fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021913
Thomas Wouters0e3f5912006-08-11 14:57:12 +000021914rm -f core conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021915 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021916fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021917{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
21918echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021919if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021920
Martin v. Löwis11437992002-04-12 09:54:03 +000021921 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021922#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021923_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021924
Thomas Wouters477c8d52006-05-27 19:21:47 +000021925 { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
21926echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021927 OLD_CFLAGS=$CFLAGS
21928 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000021929 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021930/* confdefs.h. */
21931_ACEOF
21932cat confdefs.h >>conftest.$ac_ext
21933cat >>conftest.$ac_ext <<_ACEOF
21934/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021935
21936# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021937
Martin v. Löwis11437992002-04-12 09:54:03 +000021938int
21939main ()
21940{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021941
21942 char *name;
21943 struct hostent *he, *res;
21944 char buffer[2048];
21945 int buflen = 2048;
21946 int h_errnop;
21947
21948 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000021949
21950 ;
21951 return 0;
21952}
21953_ACEOF
21954rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021955if { (ac_try="$ac_compile"
21956case "(($ac_try" in
21957 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21958 *) ac_try_echo=$ac_try;;
21959esac
21960eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21961 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021962 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021963 grep -v '^ *+' conftest.er1 >conftest.err
21964 rm -f conftest.er1
21965 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021966 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21967 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021968 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
21969 { (case "(($ac_try" in
21970 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21971 *) ac_try_echo=$ac_try;;
21972esac
21973eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21974 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000021975 ac_status=$?
21976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21977 (exit $ac_status); }; } &&
21978 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021979 { (case "(($ac_try" in
21980 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21981 *) ac_try_echo=$ac_try;;
21982esac
21983eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21984 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021985 ac_status=$?
21986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21987 (exit $ac_status); }; }; then
21988
21989 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021990#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021991_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021992
Martin v. Löwis11437992002-04-12 09:54:03 +000021993
21994cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021995#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021996_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021997
Thomas Wouters477c8d52006-05-27 19:21:47 +000021998 { echo "$as_me:$LINENO: result: yes" >&5
21999echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022000
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022001else
Martin v. Löwis11437992002-04-12 09:54:03 +000022002 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022003sed 's/^/| /' conftest.$ac_ext >&5
22004
Martin v. Löwis11437992002-04-12 09:54:03 +000022005
Thomas Wouters477c8d52006-05-27 19:21:47 +000022006 { echo "$as_me:$LINENO: result: no" >&5
22007echo "${ECHO_T}no" >&6; }
22008 { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
22009echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022010 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022011/* confdefs.h. */
22012_ACEOF
22013cat confdefs.h >>conftest.$ac_ext
22014cat >>conftest.$ac_ext <<_ACEOF
22015/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022016
22017# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022018
Martin v. Löwis11437992002-04-12 09:54:03 +000022019int
22020main ()
22021{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022022
22023 char *name;
22024 struct hostent *he;
22025 char buffer[2048];
22026 int buflen = 2048;
22027 int h_errnop;
22028
22029 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000022030
22031 ;
22032 return 0;
22033}
22034_ACEOF
22035rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000022036if { (ac_try="$ac_compile"
22037case "(($ac_try" in
22038 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22039 *) ac_try_echo=$ac_try;;
22040esac
22041eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22042 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022043 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022044 grep -v '^ *+' conftest.er1 >conftest.err
22045 rm -f conftest.er1
22046 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22048 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000022049 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
22050 { (case "(($ac_try" in
22051 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22052 *) ac_try_echo=$ac_try;;
22053esac
22054eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22055 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000022056 ac_status=$?
22057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22058 (exit $ac_status); }; } &&
22059 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000022060 { (case "(($ac_try" in
22061 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22062 *) ac_try_echo=$ac_try;;
22063esac
22064eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22065 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022066 ac_status=$?
22067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22068 (exit $ac_status); }; }; then
22069
22070 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022071#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022072_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022073
Martin v. Löwis11437992002-04-12 09:54:03 +000022074
22075cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022076#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022077_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022078
Thomas Wouters477c8d52006-05-27 19:21:47 +000022079 { echo "$as_me:$LINENO: result: yes" >&5
22080echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022081
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022082else
Martin v. Löwis11437992002-04-12 09:54:03 +000022083 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022084sed 's/^/| /' conftest.$ac_ext >&5
22085
Martin v. Löwis11437992002-04-12 09:54:03 +000022086
Thomas Wouters477c8d52006-05-27 19:21:47 +000022087 { echo "$as_me:$LINENO: result: no" >&5
22088echo "${ECHO_T}no" >&6; }
22089 { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
22090echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022091 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022092/* confdefs.h. */
22093_ACEOF
22094cat confdefs.h >>conftest.$ac_ext
22095cat >>conftest.$ac_ext <<_ACEOF
22096/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022097
22098# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022099
Martin v. Löwis11437992002-04-12 09:54:03 +000022100int
22101main ()
22102{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022103
22104 char *name;
22105 struct hostent *he;
22106 struct hostent_data data;
22107
22108 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000022109
22110 ;
22111 return 0;
22112}
22113_ACEOF
22114rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000022115if { (ac_try="$ac_compile"
22116case "(($ac_try" in
22117 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22118 *) ac_try_echo=$ac_try;;
22119esac
22120eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22121 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022122 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022123 grep -v '^ *+' conftest.er1 >conftest.err
22124 rm -f conftest.er1
22125 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22127 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000022128 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
22129 { (case "(($ac_try" in
22130 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22131 *) ac_try_echo=$ac_try;;
22132esac
22133eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22134 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000022135 ac_status=$?
22136 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22137 (exit $ac_status); }; } &&
22138 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000022139 { (case "(($ac_try" in
22140 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22141 *) ac_try_echo=$ac_try;;
22142esac
22143eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22144 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022145 ac_status=$?
22146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22147 (exit $ac_status); }; }; then
22148
22149 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022150#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022151_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022152
Martin v. Löwis11437992002-04-12 09:54:03 +000022153
22154cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022155#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022156_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022157
Thomas Wouters477c8d52006-05-27 19:21:47 +000022158 { echo "$as_me:$LINENO: result: yes" >&5
22159echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022160
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022161else
Martin v. Löwis11437992002-04-12 09:54:03 +000022162 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022163sed 's/^/| /' conftest.$ac_ext >&5
22164
Martin v. Löwis11437992002-04-12 09:54:03 +000022165
Thomas Wouters477c8d52006-05-27 19:21:47 +000022166 { echo "$as_me:$LINENO: result: no" >&5
22167echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022168
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022169fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000022170
Thomas Wouters0e3f5912006-08-11 14:57:12 +000022171rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022172
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022173fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000022174
Thomas Wouters0e3f5912006-08-11 14:57:12 +000022175rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022176
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022177fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000022178
Thomas Wouters0e3f5912006-08-11 14:57:12 +000022179rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022180 CFLAGS=$OLD_CFLAGS
22181
22182else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022183
Martin v. Löwis11437992002-04-12 09:54:03 +000022184
22185for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000022186do
Martin v. Löwis11437992002-04-12 09:54:03 +000022187as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Thomas Wouters477c8d52006-05-27 19:21:47 +000022188{ echo "$as_me:$LINENO: checking for $ac_func" >&5
22189echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
22190if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022191 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022192else
Martin v. Löwis11437992002-04-12 09:54:03 +000022193 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022194/* confdefs.h. */
22195_ACEOF
22196cat confdefs.h >>conftest.$ac_ext
22197cat >>conftest.$ac_ext <<_ACEOF
22198/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022199/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22200 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22201#define $ac_func innocuous_$ac_func
22202
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022203/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022204 which can conflict with char $ac_func (); below.
22205 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022206 <limits.h> exists even on freestanding compilers. */
22207
22208#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022209# include <limits.h>
22210#else
22211# include <assert.h>
22212#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022213
22214#undef $ac_func
22215
Thomas Wouters477c8d52006-05-27 19:21:47 +000022216/* Override any GCC internal prototype to avoid an error.
22217 Use char because int might match the return type of a GCC
22218 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022219#ifdef __cplusplus
22220extern "C"
22221#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022222char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022223/* The GNU C library defines this for functions which it implements
22224 to always fail with ENOSYS. Some functions are actually named
22225 something starting with __ and the normal name is an alias. */
Thomas Wouters477c8d52006-05-27 19:21:47 +000022226#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022227choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022228#endif
22229
Skip Montanaro6dead952003-09-25 14:50:04 +000022230int
22231main ()
22232{
Thomas Wouters477c8d52006-05-27 19:21:47 +000022233return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022234 ;
22235 return 0;
22236}
22237_ACEOF
22238rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000022239if { (ac_try="$ac_link"
22240case "(($ac_try" in
22241 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22242 *) ac_try_echo=$ac_try;;
22243esac
22244eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22245 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022246 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022247 grep -v '^ *+' conftest.er1 >conftest.err
22248 rm -f conftest.er1
22249 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22251 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000022252 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
22253 { (case "(($ac_try" in
22254 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22255 *) ac_try_echo=$ac_try;;
22256esac
22257eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22258 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000022259 ac_status=$?
22260 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22261 (exit $ac_status); }; } &&
22262 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000022263 { (case "(($ac_try" in
22264 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22265 *) ac_try_echo=$ac_try;;
22266esac
22267eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22268 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022269 ac_status=$?
22270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22271 (exit $ac_status); }; }; then
22272 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000022273else
Martin v. Löwis11437992002-04-12 09:54:03 +000022274 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022275sed 's/^/| /' conftest.$ac_ext >&5
22276
Thomas Wouters477c8d52006-05-27 19:21:47 +000022277 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000022278fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000022279
Thomas Wouters0e3f5912006-08-11 14:57:12 +000022280rm -f core conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022281 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000022282fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000022283ac_res=`eval echo '${'$as_ac_var'}'`
22284 { echo "$as_me:$LINENO: result: $ac_res" >&5
22285echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022286if test `eval echo '${'$as_ac_var'}'` = yes; then
22287 cat >>confdefs.h <<_ACEOF
22288#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
22289_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022290
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022291fi
Thomas Wouters3a584202000-08-05 23:28:51 +000022292done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022293
Michael W. Hudson54241132001-12-07 15:38:26 +000022294
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022295fi
22296
Michael W. Hudson54241132001-12-07 15:38:26 +000022297
22298
22299
22300
22301
22302
Guido van Rossum627b2d71993-12-24 10:39:16 +000022303# checks for system services
22304# (none yet)
22305
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022306# Linux requires this for correct f.p. operations
Thomas Wouters477c8d52006-05-27 19:21:47 +000022307{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
22308echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022309if test "${ac_cv_func___fpu_control+set}" = set; then
22310 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022311else
Martin v. Löwis11437992002-04-12 09:54:03 +000022312 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022313/* confdefs.h. */
22314_ACEOF
22315cat confdefs.h >>conftest.$ac_ext
22316cat >>conftest.$ac_ext <<_ACEOF
22317/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022318/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
22319 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22320#define __fpu_control innocuous___fpu_control
22321
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022322/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022323 which can conflict with char __fpu_control (); below.
22324 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022325 <limits.h> exists even on freestanding compilers. */
22326
22327#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022328# include <limits.h>
22329#else
22330# include <assert.h>
22331#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022332
22333#undef __fpu_control
22334
Thomas Wouters477c8d52006-05-27 19:21:47 +000022335/* Override any GCC internal prototype to avoid an error.
22336 Use char because int might match the return type of a GCC
22337 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022338#ifdef __cplusplus
22339extern "C"
22340#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022341char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022342/* The GNU C library defines this for functions which it implements
22343 to always fail with ENOSYS. Some functions are actually named
22344 something starting with __ and the normal name is an alias. */
Thomas Wouters477c8d52006-05-27 19:21:47 +000022345#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022346choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022347#endif
22348
Skip Montanaro6dead952003-09-25 14:50:04 +000022349int
22350main ()
22351{
Thomas Wouters477c8d52006-05-27 19:21:47 +000022352return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022353 ;
22354 return 0;
22355}
22356_ACEOF
22357rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000022358if { (ac_try="$ac_link"
22359case "(($ac_try" in
22360 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22361 *) ac_try_echo=$ac_try;;
22362esac
22363eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22364 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022365 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022366 grep -v '^ *+' conftest.er1 >conftest.err
22367 rm -f conftest.er1
22368 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022369 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22370 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000022371 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
22372 { (case "(($ac_try" in
22373 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22374 *) ac_try_echo=$ac_try;;
22375esac
22376eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22377 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000022378 ac_status=$?
22379 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22380 (exit $ac_status); }; } &&
22381 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000022382 { (case "(($ac_try" in
22383 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22384 *) ac_try_echo=$ac_try;;
22385esac
22386eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22387 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022388 ac_status=$?
22389 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22390 (exit $ac_status); }; }; then
22391 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022392else
Martin v. Löwis11437992002-04-12 09:54:03 +000022393 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022394sed 's/^/| /' conftest.$ac_ext >&5
22395
Thomas Wouters477c8d52006-05-27 19:21:47 +000022396 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022397fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000022398
Thomas Wouters0e3f5912006-08-11 14:57:12 +000022399rm -f core conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022400 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022401fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000022402{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
22403echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022404if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022405 :
22406else
Martin v. Löwis11437992002-04-12 09:54:03 +000022407
Thomas Wouters477c8d52006-05-27 19:21:47 +000022408{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
22409echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022410if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
22411 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022412else
Martin v. Löwis11437992002-04-12 09:54:03 +000022413 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000022414LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000022415cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022416/* confdefs.h. */
22417_ACEOF
22418cat confdefs.h >>conftest.$ac_ext
22419cat >>conftest.$ac_ext <<_ACEOF
22420/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022421
Thomas Wouters477c8d52006-05-27 19:21:47 +000022422/* Override any GCC internal prototype to avoid an error.
22423 Use char because int might match the return type of a GCC
22424 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022425#ifdef __cplusplus
22426extern "C"
22427#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022428char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022429int
22430main ()
22431{
Thomas Wouters477c8d52006-05-27 19:21:47 +000022432return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022433 ;
22434 return 0;
22435}
22436_ACEOF
22437rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000022438if { (ac_try="$ac_link"
22439case "(($ac_try" in
22440 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22441 *) ac_try_echo=$ac_try;;
22442esac
22443eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22444 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022445 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022446 grep -v '^ *+' conftest.er1 >conftest.err
22447 rm -f conftest.er1
22448 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22450 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000022451 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
22452 { (case "(($ac_try" in
22453 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22454 *) ac_try_echo=$ac_try;;
22455esac
22456eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22457 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000022458 ac_status=$?
22459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22460 (exit $ac_status); }; } &&
22461 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000022462 { (case "(($ac_try" in
22463 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22464 *) ac_try_echo=$ac_try;;
22465esac
22466eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22467 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022468 ac_status=$?
22469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22470 (exit $ac_status); }; }; then
22471 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000022472else
Martin v. Löwis11437992002-04-12 09:54:03 +000022473 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022474sed 's/^/| /' conftest.$ac_ext >&5
22475
Thomas Wouters477c8d52006-05-27 19:21:47 +000022476 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000022477fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000022478
Thomas Wouters0e3f5912006-08-11 14:57:12 +000022479rm -f core conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022480 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022481LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022482fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000022483{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
22484echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022485if test $ac_cv_lib_ieee___fpu_control = yes; then
22486 cat >>confdefs.h <<_ACEOF
22487#define HAVE_LIBIEEE 1
22488_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022489
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000022490 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022491
Guido van Rossum627b2d71993-12-24 10:39:16 +000022492fi
22493
Michael W. Hudson54241132001-12-07 15:38:26 +000022494
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022495fi
22496
Michael W. Hudson54241132001-12-07 15:38:26 +000022497
Guido van Rossum7f253911997-05-09 02:42:48 +000022498# Check for --with-fpectl
Thomas Wouters477c8d52006-05-27 19:21:47 +000022499{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
22500echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022501
Thomas Wouters477c8d52006-05-27 19:21:47 +000022502# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000022503if test "${with_fpectl+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000022504 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000022505if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000022506then
22507
22508cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000022509#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022510_ACEOF
22511
Thomas Wouters477c8d52006-05-27 19:21:47 +000022512 { echo "$as_me:$LINENO: result: yes" >&5
22513echo "${ECHO_T}yes" >&6; }
22514else { echo "$as_me:$LINENO: result: no" >&5
22515echo "${ECHO_T}no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000022516fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000022517else
Thomas Wouters477c8d52006-05-27 19:21:47 +000022518 { echo "$as_me:$LINENO: result: no" >&5
22519echo "${ECHO_T}no" >&6; }
22520fi
22521
Guido van Rossum7f253911997-05-09 02:42:48 +000022522
Guido van Rossum7f43da71994-08-01 12:15:30 +000022523# check for --with-libm=...
22524
Guido van Rossum563e7081996-09-10 18:20:48 +000022525case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000022526Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000022527BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000022528*) LIBM=-lm
22529esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000022530{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
22531echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022532
Thomas Wouters477c8d52006-05-27 19:21:47 +000022533# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000022534if test "${with_libm+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000022535 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000022536if test "$withval" = no
22537then LIBM=
Thomas Wouters477c8d52006-05-27 19:21:47 +000022538 { echo "$as_me:$LINENO: result: force LIBM empty" >&5
22539echo "${ECHO_T}force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000022540elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000022541then LIBM=$withval
Thomas Wouters477c8d52006-05-27 19:21:47 +000022542 { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
22543echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022544else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
22545echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
22546 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022547fi
Guido van Rossum7f253911997-05-09 02:42:48 +000022548else
Thomas Wouters477c8d52006-05-27 19:21:47 +000022549 { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
22550echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
22551fi
22552
Guido van Rossum7f43da71994-08-01 12:15:30 +000022553
22554# check for --with-libc=...
22555
Thomas Wouters477c8d52006-05-27 19:21:47 +000022556{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
22557echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022558
Thomas Wouters477c8d52006-05-27 19:21:47 +000022559# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000022560if test "${with_libc+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000022561 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000022562if test "$withval" = no
22563then LIBC=
Thomas Wouters477c8d52006-05-27 19:21:47 +000022564 { echo "$as_me:$LINENO: result: force LIBC empty" >&5
22565echo "${ECHO_T}force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000022566elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000022567then LIBC=$withval
Thomas Wouters477c8d52006-05-27 19:21:47 +000022568 { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
22569echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022570else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
22571echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
22572 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022573fi
Guido van Rossum7f253911997-05-09 02:42:48 +000022574else
Thomas Wouters477c8d52006-05-27 19:21:47 +000022575 { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
22576echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
22577fi
22578
Guido van Rossum7f43da71994-08-01 12:15:30 +000022579
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000022580# check for hypot() in math library
22581LIBS_SAVE=$LIBS
22582LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000022583
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000022584for ac_func in hypot
22585do
Martin v. Löwis11437992002-04-12 09:54:03 +000022586as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Thomas Wouters477c8d52006-05-27 19:21:47 +000022587{ echo "$as_me:$LINENO: checking for $ac_func" >&5
22588echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
22589if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022590 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000022591else
Martin v. Löwis11437992002-04-12 09:54:03 +000022592 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022593/* confdefs.h. */
22594_ACEOF
22595cat confdefs.h >>conftest.$ac_ext
22596cat >>conftest.$ac_ext <<_ACEOF
22597/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022598/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22599 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22600#define $ac_func innocuous_$ac_func
22601
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000022602/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022603 which can conflict with char $ac_func (); below.
22604 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022605 <limits.h> exists even on freestanding compilers. */
22606
22607#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022608# include <limits.h>
22609#else
22610# include <assert.h>
22611#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022612
22613#undef $ac_func
22614
Thomas Wouters477c8d52006-05-27 19:21:47 +000022615/* Override any GCC internal prototype to avoid an error.
22616 Use char because int might match the return type of a GCC
22617 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022618#ifdef __cplusplus
22619extern "C"
22620#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022621char $ac_func ();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000022622/* The GNU C library defines this for functions which it implements
22623 to always fail with ENOSYS. Some functions are actually named
22624 something starting with __ and the normal name is an alias. */
Thomas Wouters477c8d52006-05-27 19:21:47 +000022625#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000022626choke me
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000022627#endif
22628
Skip Montanaro6dead952003-09-25 14:50:04 +000022629int
22630main ()
22631{
Thomas Wouters477c8d52006-05-27 19:21:47 +000022632return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022633 ;
22634 return 0;
22635}
22636_ACEOF
22637rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000022638if { (ac_try="$ac_link"
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_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022645 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022646 grep -v '^ *+' conftest.er1 >conftest.err
22647 rm -f conftest.er1
22648 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22650 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000022651 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
22652 { (case "(($ac_try" in
22653 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22654 *) ac_try_echo=$ac_try;;
22655esac
22656eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22657 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000022658 ac_status=$?
22659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22660 (exit $ac_status); }; } &&
22661 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000022662 { (case "(($ac_try" in
22663 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22664 *) ac_try_echo=$ac_try;;
22665esac
22666eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22667 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022668 ac_status=$?
22669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22670 (exit $ac_status); }; }; then
22671 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000022672else
Martin v. Löwis11437992002-04-12 09:54:03 +000022673 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022674sed 's/^/| /' conftest.$ac_ext >&5
22675
Thomas Wouters477c8d52006-05-27 19:21:47 +000022676 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000022677fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000022678
Thomas Wouters0e3f5912006-08-11 14:57:12 +000022679rm -f core conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022680 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000022681fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000022682ac_res=`eval echo '${'$as_ac_var'}'`
22683 { echo "$as_me:$LINENO: result: $ac_res" >&5
22684echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022685if test `eval echo '${'$as_ac_var'}'` = yes; then
22686 cat >>confdefs.h <<_ACEOF
22687#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
22688_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000022689
Michael W. Hudson54241132001-12-07 15:38:26 +000022690else
Thomas Wouters477c8d52006-05-27 19:21:47 +000022691 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000022692 *" $ac_func.$ac_objext "* ) ;;
Thomas Wouters477c8d52006-05-27 19:21:47 +000022693 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
22694 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000022695esac
22696
Guido van Rossum2b3ac691996-08-30 15:18:41 +000022697fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000022698done
22699
Michael W. Hudson54241132001-12-07 15:38:26 +000022700
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000022701LIBS=$LIBS_SAVE
22702
Guido van Rossumef2255b2000-03-10 22:30:29 +000022703# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000022704if test "${ac_cv_header_wchar_h+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000022705 { echo "$as_me:$LINENO: checking for wchar.h" >&5
22706echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022707if test "${ac_cv_header_wchar_h+set}" = set; then
22708 echo $ECHO_N "(cached) $ECHO_C" >&6
22709fi
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; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000022712else
Martin v. Löwis11437992002-04-12 09:54:03 +000022713 # Is the header compilable?
Thomas Wouters477c8d52006-05-27 19:21:47 +000022714{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
22715echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022716cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022717/* confdefs.h. */
22718_ACEOF
22719cat confdefs.h >>conftest.$ac_ext
22720cat >>conftest.$ac_ext <<_ACEOF
22721/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022722$ac_includes_default
22723#include <wchar.h>
22724_ACEOF
22725rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000022726if { (ac_try="$ac_compile"
22727case "(($ac_try" in
22728 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22729 *) ac_try_echo=$ac_try;;
22730esac
22731eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22732 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022733 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022734 grep -v '^ *+' conftest.er1 >conftest.err
22735 rm -f conftest.er1
22736 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22738 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000022739 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
22740 { (case "(($ac_try" in
22741 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22742 *) ac_try_echo=$ac_try;;
22743esac
22744eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22745 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000022746 ac_status=$?
22747 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22748 (exit $ac_status); }; } &&
22749 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000022750 { (case "(($ac_try" in
22751 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22752 *) ac_try_echo=$ac_try;;
22753esac
22754eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22755 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022756 ac_status=$?
22757 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22758 (exit $ac_status); }; }; then
22759 ac_header_compiler=yes
22760else
22761 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022762sed 's/^/| /' conftest.$ac_ext >&5
22763
Thomas Wouters477c8d52006-05-27 19:21:47 +000022764 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000022765fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000022766
Thomas Wouters0e3f5912006-08-11 14:57:12 +000022767rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000022768{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22769echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022770
22771# Is the header present?
Thomas Wouters477c8d52006-05-27 19:21:47 +000022772{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
22773echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022774cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022775/* confdefs.h. */
22776_ACEOF
22777cat confdefs.h >>conftest.$ac_ext
22778cat >>conftest.$ac_ext <<_ACEOF
22779/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000022780#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022781_ACEOF
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000022782if { (ac_try="$ac_cpp conftest.$ac_ext"
22783case "(($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_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022789 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000022790 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000022791 rm -f conftest.er1
22792 cat conftest.err >&5
22793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22794 (exit $ac_status); } >/dev/null; then
22795 if test -s conftest.err; then
22796 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000022797 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +000022798 else
22799 ac_cpp_err=
22800 fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000022801else
Martin v. Löwis11437992002-04-12 09:54:03 +000022802 ac_cpp_err=yes
22803fi
22804if test -z "$ac_cpp_err"; then
22805 ac_header_preproc=yes
22806else
22807 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022808sed 's/^/| /' conftest.$ac_ext >&5
22809
Martin v. Löwis11437992002-04-12 09:54:03 +000022810 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000022811fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000022812
Martin v. Löwis11437992002-04-12 09:54:03 +000022813rm -f conftest.err conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000022814{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22815echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022816
22817# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022818case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22819 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000022820 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
22821echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000022822 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
22823echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
22824 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022825 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000022826 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022827 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
22828echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000022829 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
22830echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
22831 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
22832echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
22833 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
22834echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022835 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
22836echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000022837 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
22838echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +000022839 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000022840## ------------------------------------------------ ##
22841## Report this to http://www.python.org/python-bugs ##
22842## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000022843_ASBOX
Thomas Wouters477c8d52006-05-27 19:21:47 +000022844 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000022845 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000022846esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000022847{ echo "$as_me:$LINENO: checking for wchar.h" >&5
22848echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022849if test "${ac_cv_header_wchar_h+set}" = set; then
22850 echo $ECHO_N "(cached) $ECHO_C" >&6
22851else
22852 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000022853fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000022854{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
22855echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022856
22857fi
22858if test $ac_cv_header_wchar_h = yes; then
22859
22860
22861cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000022862#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022863_ACEOF
22864
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022865 wchar_h="yes"
22866
Guido van Rossumef2255b2000-03-10 22:30:29 +000022867else
Martin v. Löwis11437992002-04-12 09:54:03 +000022868 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000022869
22870fi
22871
Michael W. Hudson54241132001-12-07 15:38:26 +000022872
Martin v. Löwis11437992002-04-12 09:54:03 +000022873
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022874# determine wchar_t size
22875if test "$wchar_h" = yes
22876then
Thomas Wouters477c8d52006-05-27 19:21:47 +000022877 { echo "$as_me:$LINENO: checking for wchar_t" >&5
22878echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022879if test "${ac_cv_type_wchar_t+set}" = set; then
22880 echo $ECHO_N "(cached) $ECHO_C" >&6
22881else
22882 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022883/* confdefs.h. */
22884_ACEOF
22885cat confdefs.h >>conftest.$ac_ext
22886cat >>conftest.$ac_ext <<_ACEOF
22887/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022888#include <wchar.h>
22889
Thomas Wouters477c8d52006-05-27 19:21:47 +000022890typedef wchar_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022891int
22892main ()
22893{
Thomas Wouters477c8d52006-05-27 19:21:47 +000022894if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000022895 return 0;
Thomas Wouters477c8d52006-05-27 19:21:47 +000022896if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000022897 return 0;
22898 ;
22899 return 0;
22900}
22901_ACEOF
22902rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000022903if { (ac_try="$ac_compile"
22904case "(($ac_try" in
22905 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22906 *) ac_try_echo=$ac_try;;
22907esac
22908eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22909 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022910 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022911 grep -v '^ *+' conftest.er1 >conftest.err
22912 rm -f conftest.er1
22913 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22915 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000022916 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
22917 { (case "(($ac_try" in
22918 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22919 *) ac_try_echo=$ac_try;;
22920esac
22921eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22922 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000022923 ac_status=$?
22924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22925 (exit $ac_status); }; } &&
22926 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000022927 { (case "(($ac_try" in
22928 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22929 *) ac_try_echo=$ac_try;;
22930esac
22931eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22932 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022933 ac_status=$?
22934 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22935 (exit $ac_status); }; }; then
22936 ac_cv_type_wchar_t=yes
22937else
22938 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022939sed 's/^/| /' conftest.$ac_ext >&5
22940
Thomas Wouters477c8d52006-05-27 19:21:47 +000022941 ac_cv_type_wchar_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000022942fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000022943
Thomas Wouters0e3f5912006-08-11 14:57:12 +000022944rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022945fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000022946{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
22947echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022948
Thomas Wouters477c8d52006-05-27 19:21:47 +000022949{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
22950echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022951if test "${ac_cv_sizeof_wchar_t+set}" = set; then
22952 echo $ECHO_N "(cached) $ECHO_C" >&6
22953else
22954 if test "$ac_cv_type_wchar_t" = yes; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000022955 # The cast to long int works around a bug in the HP C Compiler
Martin v. Löwis11437992002-04-12 09:54:03 +000022956 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
22957 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
22958 # This bug is HP SR number 8606223364.
22959 if test "$cross_compiling" = yes; then
22960 # Depending upon the size, compute the lo and hi bounds.
22961cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022962/* confdefs.h. */
22963_ACEOF
22964cat confdefs.h >>conftest.$ac_ext
22965cat >>conftest.$ac_ext <<_ACEOF
22966/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022967#include <wchar.h>
22968
Thomas Wouters477c8d52006-05-27 19:21:47 +000022969 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022970int
22971main ()
22972{
Thomas Wouters477c8d52006-05-27 19:21:47 +000022973static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000022974test_array [0] = 0
22975
22976 ;
22977 return 0;
22978}
22979_ACEOF
22980rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000022981if { (ac_try="$ac_compile"
22982case "(($ac_try" in
22983 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22984 *) ac_try_echo=$ac_try;;
22985esac
22986eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22987 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022988 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022989 grep -v '^ *+' conftest.er1 >conftest.err
22990 rm -f conftest.er1
22991 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22993 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000022994 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
22995 { (case "(($ac_try" in
22996 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22997 *) ac_try_echo=$ac_try;;
22998esac
22999eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23000 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000023001 ac_status=$?
23002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23003 (exit $ac_status); }; } &&
23004 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023005 { (case "(($ac_try" in
23006 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23007 *) ac_try_echo=$ac_try;;
23008esac
23009eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23010 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023011 ac_status=$?
23012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23013 (exit $ac_status); }; }; then
23014 ac_lo=0 ac_mid=0
23015 while :; do
23016 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023017/* confdefs.h. */
23018_ACEOF
23019cat confdefs.h >>conftest.$ac_ext
23020cat >>conftest.$ac_ext <<_ACEOF
23021/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023022#include <wchar.h>
23023
Thomas Wouters477c8d52006-05-27 19:21:47 +000023024 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000023025int
23026main ()
23027{
Thomas Wouters477c8d52006-05-27 19:21:47 +000023028static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000023029test_array [0] = 0
23030
23031 ;
23032 return 0;
23033}
23034_ACEOF
23035rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023036if { (ac_try="$ac_compile"
23037case "(($ac_try" in
23038 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23039 *) ac_try_echo=$ac_try;;
23040esac
23041eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23042 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023043 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023044 grep -v '^ *+' conftest.er1 >conftest.err
23045 rm -f conftest.er1
23046 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23048 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023049 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
23050 { (case "(($ac_try" in
23051 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23052 *) ac_try_echo=$ac_try;;
23053esac
23054eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23055 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000023056 ac_status=$?
23057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23058 (exit $ac_status); }; } &&
23059 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023060 { (case "(($ac_try" in
23061 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23062 *) ac_try_echo=$ac_try;;
23063esac
23064eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23065 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023066 ac_status=$?
23067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23068 (exit $ac_status); }; }; then
23069 ac_hi=$ac_mid; break
23070else
23071 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023072sed 's/^/| /' conftest.$ac_ext >&5
23073
Thomas Wouters477c8d52006-05-27 19:21:47 +000023074 ac_lo=`expr $ac_mid + 1`
23075 if test $ac_lo -le $ac_mid; then
23076 ac_lo= ac_hi=
23077 break
23078 fi
23079 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000023080fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000023081
Thomas Wouters0e3f5912006-08-11 14:57:12 +000023082rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023083 done
23084else
23085 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023086sed 's/^/| /' conftest.$ac_ext >&5
23087
Thomas Wouters477c8d52006-05-27 19:21:47 +000023088 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023089/* confdefs.h. */
23090_ACEOF
23091cat confdefs.h >>conftest.$ac_ext
23092cat >>conftest.$ac_ext <<_ACEOF
23093/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023094#include <wchar.h>
23095
Thomas Wouters477c8d52006-05-27 19:21:47 +000023096 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000023097int
23098main ()
23099{
Thomas Wouters477c8d52006-05-27 19:21:47 +000023100static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000023101test_array [0] = 0
23102
23103 ;
23104 return 0;
23105}
23106_ACEOF
23107rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023108if { (ac_try="$ac_compile"
23109case "(($ac_try" in
23110 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23111 *) ac_try_echo=$ac_try;;
23112esac
23113eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23114 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023115 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023116 grep -v '^ *+' conftest.er1 >conftest.err
23117 rm -f conftest.er1
23118 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23120 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023121 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
23122 { (case "(($ac_try" in
23123 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23124 *) ac_try_echo=$ac_try;;
23125esac
23126eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23127 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000023128 ac_status=$?
23129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23130 (exit $ac_status); }; } &&
23131 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023132 { (case "(($ac_try" in
23133 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23134 *) ac_try_echo=$ac_try;;
23135esac
23136eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23137 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023138 ac_status=$?
23139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23140 (exit $ac_status); }; }; then
23141 ac_hi=-1 ac_mid=-1
23142 while :; do
23143 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023144/* confdefs.h. */
23145_ACEOF
23146cat confdefs.h >>conftest.$ac_ext
23147cat >>conftest.$ac_ext <<_ACEOF
23148/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023149#include <wchar.h>
23150
Thomas Wouters477c8d52006-05-27 19:21:47 +000023151 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000023152int
23153main ()
23154{
Thomas Wouters477c8d52006-05-27 19:21:47 +000023155static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000023156test_array [0] = 0
23157
23158 ;
23159 return 0;
23160}
23161_ACEOF
23162rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023163if { (ac_try="$ac_compile"
23164case "(($ac_try" in
23165 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23166 *) ac_try_echo=$ac_try;;
23167esac
23168eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23169 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023170 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023171 grep -v '^ *+' conftest.er1 >conftest.err
23172 rm -f conftest.er1
23173 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23175 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023176 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
23177 { (case "(($ac_try" in
23178 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23179 *) ac_try_echo=$ac_try;;
23180esac
23181eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23182 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000023183 ac_status=$?
23184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23185 (exit $ac_status); }; } &&
23186 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023187 { (case "(($ac_try" in
23188 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23189 *) ac_try_echo=$ac_try;;
23190esac
23191eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23192 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023193 ac_status=$?
23194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23195 (exit $ac_status); }; }; then
23196 ac_lo=$ac_mid; break
23197else
23198 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023199sed 's/^/| /' conftest.$ac_ext >&5
23200
Thomas Wouters477c8d52006-05-27 19:21:47 +000023201 ac_hi=`expr '(' $ac_mid ')' - 1`
23202 if test $ac_mid -le $ac_hi; then
23203 ac_lo= ac_hi=
23204 break
23205 fi
23206 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000023207fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000023208
Thomas Wouters0e3f5912006-08-11 14:57:12 +000023209rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023210 done
23211else
23212 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023213sed 's/^/| /' conftest.$ac_ext >&5
23214
Thomas Wouters477c8d52006-05-27 19:21:47 +000023215 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000023216fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000023217
Thomas Wouters0e3f5912006-08-11 14:57:12 +000023218rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023219fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000023220
Thomas Wouters0e3f5912006-08-11 14:57:12 +000023221rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023222# Binary search between lo and hi bounds.
23223while test "x$ac_lo" != "x$ac_hi"; do
23224 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
23225 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023226/* confdefs.h. */
23227_ACEOF
23228cat confdefs.h >>conftest.$ac_ext
23229cat >>conftest.$ac_ext <<_ACEOF
23230/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023231#include <wchar.h>
23232
Thomas Wouters477c8d52006-05-27 19:21:47 +000023233 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000023234int
23235main ()
23236{
Thomas Wouters477c8d52006-05-27 19:21:47 +000023237static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000023238test_array [0] = 0
23239
23240 ;
23241 return 0;
23242}
23243_ACEOF
23244rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023245if { (ac_try="$ac_compile"
23246case "(($ac_try" in
23247 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23248 *) ac_try_echo=$ac_try;;
23249esac
23250eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23251 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023252 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023253 grep -v '^ *+' conftest.er1 >conftest.err
23254 rm -f conftest.er1
23255 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23257 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023258 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
23259 { (case "(($ac_try" in
23260 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23261 *) ac_try_echo=$ac_try;;
23262esac
23263eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23264 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000023265 ac_status=$?
23266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23267 (exit $ac_status); }; } &&
23268 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023269 { (case "(($ac_try" in
23270 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23271 *) ac_try_echo=$ac_try;;
23272esac
23273eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23274 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023275 ac_status=$?
23276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23277 (exit $ac_status); }; }; then
23278 ac_hi=$ac_mid
23279else
23280 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023281sed 's/^/| /' conftest.$ac_ext >&5
23282
Thomas Wouters477c8d52006-05-27 19:21:47 +000023283 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000023284fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000023285
Thomas Wouters0e3f5912006-08-11 14:57:12 +000023286rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023287done
23288case $ac_lo in
23289?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Thomas Wouters477c8d52006-05-27 19:21:47 +000023290'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000023291See \`config.log' for more details." >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000023292echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000023293See \`config.log' for more details." >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +000023294 { (exit 77); exit 77; }; } ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000023295esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023296else
Martin v. Löwis11437992002-04-12 09:54:03 +000023297 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023298/* confdefs.h. */
23299_ACEOF
23300cat confdefs.h >>conftest.$ac_ext
23301cat >>conftest.$ac_ext <<_ACEOF
23302/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023303#include <wchar.h>
23304
Thomas Wouters477c8d52006-05-27 19:21:47 +000023305 typedef wchar_t ac__type_sizeof_;
23306static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
23307static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000023308#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023309#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023310int
23311main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023312{
Martin v. Löwis11437992002-04-12 09:54:03 +000023313
23314 FILE *f = fopen ("conftest.val", "w");
23315 if (! f)
Thomas Wouters477c8d52006-05-27 19:21:47 +000023316 return 1;
23317 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000023318 {
Thomas Wouters477c8d52006-05-27 19:21:47 +000023319 long int i = longval ();
23320 if (i != ((long int) (sizeof (ac__type_sizeof_))))
23321 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000023322 fprintf (f, "%ld\n", i);
23323 }
23324 else
23325 {
Thomas Wouters477c8d52006-05-27 19:21:47 +000023326 unsigned long int i = ulongval ();
23327 if (i != ((long int) (sizeof (ac__type_sizeof_))))
23328 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000023329 fprintf (f, "%lu\n", i);
23330 }
Thomas Wouters477c8d52006-05-27 19:21:47 +000023331 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000023332
23333 ;
23334 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000023335}
Martin v. Löwis11437992002-04-12 09:54:03 +000023336_ACEOF
23337rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023338if { (ac_try="$ac_link"
23339case "(($ac_try" in
23340 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23341 *) ac_try_echo=$ac_try;;
23342esac
23343eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23344 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023345 ac_status=$?
23346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23347 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023348 { (case "(($ac_try" in
23349 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23350 *) ac_try_echo=$ac_try;;
23351esac
23352eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23353 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023354 ac_status=$?
23355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23356 (exit $ac_status); }; }; then
23357 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000023358else
Martin v. Löwis11437992002-04-12 09:54:03 +000023359 echo "$as_me: program exited with status $ac_status" >&5
23360echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023361sed 's/^/| /' conftest.$ac_ext >&5
23362
Martin v. Löwis11437992002-04-12 09:54:03 +000023363( exit $ac_status )
Thomas Wouters477c8d52006-05-27 19:21:47 +000023364{ { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000023365See \`config.log' for more details." >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000023366echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000023367See \`config.log' for more details." >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +000023368 { (exit 77); exit 77; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023369fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000023370rm -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 +000023371fi
23372rm -f conftest.val
23373else
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023374 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +000023375fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000023376fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000023377{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
23378echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023379cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023380#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000023381_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023382
Michael W. Hudson54241132001-12-07 15:38:26 +000023383
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023384fi
23385
Thomas Wouters477c8d52006-05-27 19:21:47 +000023386{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
23387echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023388have_ucs4_tcl=no
23389cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023390/* confdefs.h. */
23391_ACEOF
23392cat confdefs.h >>conftest.$ac_ext
23393cat >>conftest.$ac_ext <<_ACEOF
23394/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023395
23396#include <tcl.h>
23397#if TCL_UTF_MAX != 6
23398# error "NOT UCS4_TCL"
23399#endif
23400int
23401main ()
23402{
23403
23404 ;
23405 return 0;
23406}
23407_ACEOF
23408rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023409if { (ac_try="$ac_compile"
23410case "(($ac_try" in
23411 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23412 *) ac_try_echo=$ac_try;;
23413esac
23414eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23415 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023416 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023417 grep -v '^ *+' conftest.er1 >conftest.err
23418 rm -f conftest.er1
23419 cat conftest.err >&5
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23421 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023422 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
23423 { (case "(($ac_try" in
23424 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23425 *) ac_try_echo=$ac_try;;
23426esac
23427eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23428 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000023429 ac_status=$?
23430 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23431 (exit $ac_status); }; } &&
23432 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023433 { (case "(($ac_try" in
23434 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23435 *) ac_try_echo=$ac_try;;
23436esac
23437eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23438 (eval "$ac_try") 2>&5
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023439 ac_status=$?
23440 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23441 (exit $ac_status); }; }; then
23442
23443
23444cat >>confdefs.h <<\_ACEOF
23445#define HAVE_UCS4_TCL 1
23446_ACEOF
23447
23448 have_ucs4_tcl=yes
23449
23450else
23451 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023452sed 's/^/| /' conftest.$ac_ext >&5
23453
Thomas Wouters477c8d52006-05-27 19:21:47 +000023454
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023455fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000023456
Thomas Wouters0e3f5912006-08-11 14:57:12 +000023457rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000023458{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
23459echo "${ECHO_T}$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023460
Skip Montanaro6dead952003-09-25 14:50:04 +000023461# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023462if test "$wchar_h" = yes
23463then
23464 # check whether wchar_t is signed or not
Thomas Wouters477c8d52006-05-27 19:21:47 +000023465 { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
23466echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023467 if test "${ac_cv_wchar_t_signed+set}" = set; then
23468 echo $ECHO_N "(cached) $ECHO_C" >&6
23469else
23470
23471 if test "$cross_compiling" = yes; then
23472 ac_cv_wchar_t_signed=yes
23473else
23474 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023475/* confdefs.h. */
23476_ACEOF
23477cat confdefs.h >>conftest.$ac_ext
23478cat >>conftest.$ac_ext <<_ACEOF
23479/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023480
23481 #include <wchar.h>
23482 int main()
23483 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000023484 /* Success: exit code 0 */
23485 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023486 }
23487
23488_ACEOF
23489rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023490if { (ac_try="$ac_link"
23491case "(($ac_try" in
23492 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23493 *) ac_try_echo=$ac_try;;
23494esac
23495eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23496 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023497 ac_status=$?
23498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23499 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023500 { (case "(($ac_try" in
23501 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23502 *) ac_try_echo=$ac_try;;
23503esac
23504eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23505 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023506 ac_status=$?
23507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23508 (exit $ac_status); }; }; then
23509 ac_cv_wchar_t_signed=yes
23510else
23511 echo "$as_me: program exited with status $ac_status" >&5
23512echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023513sed 's/^/| /' conftest.$ac_ext >&5
23514
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023515( exit $ac_status )
23516ac_cv_wchar_t_signed=no
23517fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000023518rm -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 +000023519fi
23520
Thomas Wouters477c8d52006-05-27 19:21:47 +000023521
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023522fi
23523
Thomas Wouters477c8d52006-05-27 19:21:47 +000023524 { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
23525echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
23526fi
23527
23528{ echo "$as_me:$LINENO: checking what type to use for unicode" >&5
23529echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6; }
23530# Check whether --enable-unicode was given.
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023531if test "${enable_unicode+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000023532 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023533else
23534 enable_unicode=yes
Thomas Wouters477c8d52006-05-27 19:21:47 +000023535fi
23536
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023537
23538if test $enable_unicode = yes
23539then
Martin v. Löwisfd917792001-06-27 20:22:04 +000023540 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023541 case "$have_ucs4_tcl" in
23542 yes) enable_unicode="ucs4"
23543 ;;
23544 *) enable_unicode="ucs2"
23545 ;;
23546 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023547fi
23548
Martin v. Löwis0036cba2002-04-12 09:58:45 +000023549
23550
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023551case "$enable_unicode" in
23552ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000023553 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023554#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000023555_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023556
23557 ;;
23558ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000023559 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023560#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000023561_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023562
23563 ;;
23564esac
23565
Michael W. Hudson54241132001-12-07 15:38:26 +000023566
Martin v. Löwis11437992002-04-12 09:54:03 +000023567
23568
Martin v. Löwis0036cba2002-04-12 09:58:45 +000023569
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023570if test "$enable_unicode" = "no"
23571then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000023572 UNICODE_OBJS=""
Thomas Wouters477c8d52006-05-27 19:21:47 +000023573 { echo "$as_me:$LINENO: result: not used" >&5
23574echo "${ECHO_T}not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023575else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000023576 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000023577
23578cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023579#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023580_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023581
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023582
23583 # wchar_t is only usable if it maps to an unsigned type
23584 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000023585 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023586 then
23587 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023588
Martin v. Löwis11437992002-04-12 09:54:03 +000023589cat >>confdefs.h <<\_ACEOF
23590#define HAVE_USABLE_WCHAR_T 1
23591_ACEOF
23592
23593 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023594#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000023595_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023596
23597 elif test "$ac_cv_sizeof_short" = "$unicode_size"
23598 then
23599 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000023600 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023601#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000023602_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023603
23604 elif test "$ac_cv_sizeof_long" = "$unicode_size"
23605 then
23606 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000023607 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023608#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000023609_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023610
23611 else
23612 PY_UNICODE_TYPE="no type found"
23613 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000023614 { echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
23615echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023616fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000023617
23618# check for endianness
Thomas Wouters477c8d52006-05-27 19:21:47 +000023619{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
23620echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023621if test "${ac_cv_c_bigendian+set}" = set; then
23622 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000023623else
Martin v. Löwis11437992002-04-12 09:54:03 +000023624 # See if sys/param.h defines the BYTE_ORDER macro.
23625cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023626/* confdefs.h. */
23627_ACEOF
23628cat confdefs.h >>conftest.$ac_ext
23629cat >>conftest.$ac_ext <<_ACEOF
23630/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000023631#include <sys/types.h>
23632#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000023633
Martin v. Löwis11437992002-04-12 09:54:03 +000023634int
23635main ()
23636{
Guido van Rossumef2255b2000-03-10 22:30:29 +000023637#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
23638 bogus endian macros
23639#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023640
23641 ;
23642 return 0;
23643}
23644_ACEOF
23645rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023646if { (ac_try="$ac_compile"
23647case "(($ac_try" in
23648 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23649 *) ac_try_echo=$ac_try;;
23650esac
23651eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23652 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023653 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023654 grep -v '^ *+' conftest.er1 >conftest.err
23655 rm -f conftest.er1
23656 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23658 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023659 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
23660 { (case "(($ac_try" in
23661 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23662 *) ac_try_echo=$ac_try;;
23663esac
23664eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23665 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000023666 ac_status=$?
23667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23668 (exit $ac_status); }; } &&
23669 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023670 { (case "(($ac_try" in
23671 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23672 *) ac_try_echo=$ac_try;;
23673esac
23674eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23675 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023676 ac_status=$?
23677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23678 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000023679 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000023680cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023681/* confdefs.h. */
23682_ACEOF
23683cat confdefs.h >>conftest.$ac_ext
23684cat >>conftest.$ac_ext <<_ACEOF
23685/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000023686#include <sys/types.h>
23687#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000023688
Martin v. Löwis11437992002-04-12 09:54:03 +000023689int
23690main ()
23691{
Guido van Rossumef2255b2000-03-10 22:30:29 +000023692#if BYTE_ORDER != BIG_ENDIAN
23693 not big endian
23694#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023695
23696 ;
23697 return 0;
23698}
23699_ACEOF
23700rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023701if { (ac_try="$ac_compile"
23702case "(($ac_try" in
23703 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23704 *) ac_try_echo=$ac_try;;
23705esac
23706eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23707 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023708 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023709 grep -v '^ *+' conftest.er1 >conftest.err
23710 rm -f conftest.er1
23711 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23713 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023714 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
23715 { (case "(($ac_try" in
23716 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23717 *) ac_try_echo=$ac_try;;
23718esac
23719eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23720 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000023721 ac_status=$?
23722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23723 (exit $ac_status); }; } &&
23724 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023725 { (case "(($ac_try" in
23726 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23727 *) ac_try_echo=$ac_try;;
23728esac
23729eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23730 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023731 ac_status=$?
23732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23733 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000023734 ac_cv_c_bigendian=yes
23735else
Martin v. Löwis11437992002-04-12 09:54:03 +000023736 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023737sed 's/^/| /' conftest.$ac_ext >&5
23738
Thomas Wouters477c8d52006-05-27 19:21:47 +000023739 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000023740fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000023741
Thomas Wouters0e3f5912006-08-11 14:57:12 +000023742rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000023743else
Martin v. Löwis11437992002-04-12 09:54:03 +000023744 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023745sed 's/^/| /' conftest.$ac_ext >&5
23746
Thomas Wouters477c8d52006-05-27 19:21:47 +000023747 # It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000023748if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +000023749 # try to guess the endianness by grepping values into an object file
Martin v. Löwis11437992002-04-12 09:54:03 +000023750 ac_cv_c_bigendian=unknown
23751 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023752/* confdefs.h. */
23753_ACEOF
23754cat confdefs.h >>conftest.$ac_ext
23755cat >>conftest.$ac_ext <<_ACEOF
23756/* end confdefs.h. */
Thomas Wouters477c8d52006-05-27 19:21:47 +000023757short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
23758short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000023759void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000023760short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
23761short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000023762void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023763int
23764main ()
23765{
23766 _ascii (); _ebcdic ();
23767 ;
23768 return 0;
23769}
23770_ACEOF
23771rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023772if { (ac_try="$ac_compile"
23773case "(($ac_try" in
23774 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23775 *) ac_try_echo=$ac_try;;
23776esac
23777eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23778 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023779 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023780 grep -v '^ *+' conftest.er1 >conftest.err
23781 rm -f conftest.er1
23782 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23784 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023785 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
23786 { (case "(($ac_try" in
23787 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23788 *) ac_try_echo=$ac_try;;
23789esac
23790eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23791 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000023792 ac_status=$?
23793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23794 (exit $ac_status); }; } &&
23795 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023796 { (case "(($ac_try" in
23797 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23798 *) ac_try_echo=$ac_try;;
23799esac
23800eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23801 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023802 ac_status=$?
23803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23804 (exit $ac_status); }; }; then
Skip Montanaro6dead952003-09-25 14:50:04 +000023805 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023806 ac_cv_c_bigendian=yes
23807fi
Skip Montanaro6dead952003-09-25 14:50:04 +000023808if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023809 if test "$ac_cv_c_bigendian" = unknown; then
23810 ac_cv_c_bigendian=no
23811 else
23812 # finding both strings is unlikely to happen, but who knows?
23813 ac_cv_c_bigendian=unknown
23814 fi
23815fi
23816else
23817 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023818sed 's/^/| /' conftest.$ac_ext >&5
23819
Thomas Wouters477c8d52006-05-27 19:21:47 +000023820
Martin v. Löwis11437992002-04-12 09:54:03 +000023821fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000023822
Thomas Wouters0e3f5912006-08-11 14:57:12 +000023823rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023824else
23825 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023826/* confdefs.h. */
23827_ACEOF
23828cat confdefs.h >>conftest.$ac_ext
23829cat >>conftest.$ac_ext <<_ACEOF
23830/* end confdefs.h. */
Thomas Wouters477c8d52006-05-27 19:21:47 +000023831$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000023832int
23833main ()
23834{
Thomas Wouters477c8d52006-05-27 19:21:47 +000023835
Guido van Rossumef2255b2000-03-10 22:30:29 +000023836 /* Are we little or big endian? From Harbison&Steele. */
23837 union
23838 {
Thomas Wouters477c8d52006-05-27 19:21:47 +000023839 long int l;
23840 char c[sizeof (long int)];
Guido van Rossumef2255b2000-03-10 22:30:29 +000023841 } u;
23842 u.l = 1;
Thomas Wouters477c8d52006-05-27 19:21:47 +000023843 return u.c[sizeof (long int) - 1] == 1;
23844
23845 ;
23846 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000023847}
Martin v. Löwis11437992002-04-12 09:54:03 +000023848_ACEOF
23849rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023850if { (ac_try="$ac_link"
23851case "(($ac_try" in
23852 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23853 *) ac_try_echo=$ac_try;;
23854esac
23855eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23856 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023857 ac_status=$?
23858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23859 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023860 { (case "(($ac_try" in
23861 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23862 *) ac_try_echo=$ac_try;;
23863esac
23864eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23865 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023866 ac_status=$?
23867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23868 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000023869 ac_cv_c_bigendian=no
23870else
Martin v. Löwis11437992002-04-12 09:54:03 +000023871 echo "$as_me: program exited with status $ac_status" >&5
23872echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023873sed 's/^/| /' conftest.$ac_ext >&5
23874
Martin v. Löwis11437992002-04-12 09:54:03 +000023875( exit $ac_status )
23876ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000023877fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000023878rm -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 +000023879fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000023880
23881
Martin v. Löwis11437992002-04-12 09:54:03 +000023882fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000023883
Thomas Wouters0e3f5912006-08-11 14:57:12 +000023884rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023885fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000023886{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
23887echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023888case $ac_cv_c_bigendian in
23889 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000023890
Martin v. Löwis11437992002-04-12 09:54:03 +000023891cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000023892#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023893_ACEOF
23894 ;;
23895 no)
23896 ;;
23897 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000023898 { { echo "$as_me:$LINENO: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000023899presetting ac_cv_c_bigendian=no (or yes) will help" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023900echo "$as_me: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000023901presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
23902 { (exit 1); exit 1; }; } ;;
23903esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000023904
Michael W. Hudson54241132001-12-07 15:38:26 +000023905
Thomas Wouters477c8d52006-05-27 19:21:47 +000023906
23907
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023908# Check whether right shifting a negative integer extends the sign bit
23909# or fills with zeros (like the Cray J90, according to Tim Peters).
Thomas Wouters477c8d52006-05-27 19:21:47 +000023910{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
23911echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023912if test "${ac_cv_rshift_extends_sign+set}" = set; then
23913 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000023914else
Martin v. Löwis11437992002-04-12 09:54:03 +000023915
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023916if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000023917 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023918else
Martin v. Löwis11437992002-04-12 09:54:03 +000023919 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023920/* confdefs.h. */
23921_ACEOF
23922cat confdefs.h >>conftest.$ac_ext
23923cat >>conftest.$ac_ext <<_ACEOF
23924/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023925
23926int main()
23927{
Vladimir Marangozova6180282000-07-12 05:05:06 +000023928 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023929}
23930
Martin v. Löwis11437992002-04-12 09:54:03 +000023931_ACEOF
23932rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023933if { (ac_try="$ac_link"
23934case "(($ac_try" in
23935 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23936 *) ac_try_echo=$ac_try;;
23937esac
23938eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23939 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023940 ac_status=$?
23941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23942 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023943 { (case "(($ac_try" in
23944 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23945 *) ac_try_echo=$ac_try;;
23946esac
23947eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23948 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023949 ac_status=$?
23950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23951 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000023952 ac_cv_rshift_extends_sign=yes
23953else
Martin v. Löwis11437992002-04-12 09:54:03 +000023954 echo "$as_me: program exited with status $ac_status" >&5
23955echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023956sed 's/^/| /' conftest.$ac_ext >&5
23957
Martin v. Löwis11437992002-04-12 09:54:03 +000023958( exit $ac_status )
23959ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000023960fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000023961rm -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 +000023962fi
23963
Thomas Wouters477c8d52006-05-27 19:21:47 +000023964
23965fi
23966
23967{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
23968echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000023969if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023970then
Martin v. Löwis11437992002-04-12 09:54:03 +000023971
23972cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023973#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023974_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023975
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023976fi
23977
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023978# check for getc_unlocked and related locking functions
Thomas Wouters477c8d52006-05-27 19:21:47 +000023979{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
23980echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023981if test "${ac_cv_have_getc_unlocked+set}" = set; then
23982 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023983else
Martin v. Löwis11437992002-04-12 09:54:03 +000023984
23985cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023986/* confdefs.h. */
23987_ACEOF
23988cat confdefs.h >>conftest.$ac_ext
23989cat >>conftest.$ac_ext <<_ACEOF
23990/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023991#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023992int
23993main ()
23994{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023995
23996 FILE *f = fopen("/dev/null", "r");
23997 flockfile(f);
23998 getc_unlocked(f);
23999 funlockfile(f);
24000
Martin v. Löwis11437992002-04-12 09:54:03 +000024001 ;
24002 return 0;
24003}
24004_ACEOF
24005rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024006if { (ac_try="$ac_link"
24007case "(($ac_try" in
24008 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24009 *) ac_try_echo=$ac_try;;
24010esac
24011eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24012 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024013 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024014 grep -v '^ *+' conftest.er1 >conftest.err
24015 rm -f conftest.er1
24016 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24018 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024019 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
24020 { (case "(($ac_try" in
24021 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24022 *) ac_try_echo=$ac_try;;
24023esac
24024eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24025 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000024026 ac_status=$?
24027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24028 (exit $ac_status); }; } &&
24029 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024030 { (case "(($ac_try" in
24031 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24032 *) ac_try_echo=$ac_try;;
24033esac
24034eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24035 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024036 ac_status=$?
24037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24038 (exit $ac_status); }; }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024039 ac_cv_have_getc_unlocked=yes
24040else
Martin v. Löwis11437992002-04-12 09:54:03 +000024041 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024042sed 's/^/| /' conftest.$ac_ext >&5
24043
Thomas Wouters477c8d52006-05-27 19:21:47 +000024044 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024045fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000024046
Thomas Wouters0e3f5912006-08-11 14:57:12 +000024047rm -f core conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024048 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024049fi
24050
Thomas Wouters477c8d52006-05-27 19:21:47 +000024051{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
24052echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024053if test "$ac_cv_have_getc_unlocked" = yes
24054then
Martin v. Löwis11437992002-04-12 09:54:03 +000024055
24056cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024057#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024058_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024059
24060fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024061
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024062# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000024063# save the value of LIBS so we don't actually link Python with readline
24064LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024065
Thomas Wouters477c8d52006-05-27 19:21:47 +000024066{ echo "$as_me:$LINENO: checking for readline in -lreadline" >&5
24067echo $ECHO_N "checking for readline in -lreadline... $ECHO_C" >&6; }
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024068if test "${ac_cv_lib_readline_readline+set}" = set; then
24069 echo $ECHO_N "(cached) $ECHO_C" >&6
24070else
24071 ac_check_lib_save_LIBS=$LIBS
24072LIBS="-lreadline $LIBS"
24073cat >conftest.$ac_ext <<_ACEOF
24074/* confdefs.h. */
24075_ACEOF
24076cat confdefs.h >>conftest.$ac_ext
24077cat >>conftest.$ac_ext <<_ACEOF
24078/* end confdefs.h. */
24079
Thomas Wouters477c8d52006-05-27 19:21:47 +000024080/* Override any GCC internal prototype to avoid an error.
24081 Use char because int might match the return type of a GCC
24082 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024083#ifdef __cplusplus
24084extern "C"
24085#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024086char readline ();
24087int
24088main ()
24089{
Thomas Wouters477c8d52006-05-27 19:21:47 +000024090return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024091 ;
24092 return 0;
24093}
24094_ACEOF
24095rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024096if { (ac_try="$ac_link"
24097case "(($ac_try" in
24098 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24099 *) ac_try_echo=$ac_try;;
24100esac
24101eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24102 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024103 ac_status=$?
24104 grep -v '^ *+' conftest.er1 >conftest.err
24105 rm -f conftest.er1
24106 cat conftest.err >&5
24107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24108 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024109 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
24110 { (case "(($ac_try" in
24111 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24112 *) ac_try_echo=$ac_try;;
24113esac
24114eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24115 (eval "$ac_try") 2>&5
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024116 ac_status=$?
24117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24118 (exit $ac_status); }; } &&
24119 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024120 { (case "(($ac_try" in
24121 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24122 *) ac_try_echo=$ac_try;;
24123esac
24124eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24125 (eval "$ac_try") 2>&5
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024126 ac_status=$?
24127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24128 (exit $ac_status); }; }; then
24129 ac_cv_lib_readline_readline=yes
24130else
24131 echo "$as_me: failed program was:" >&5
24132sed 's/^/| /' conftest.$ac_ext >&5
24133
Thomas Wouters477c8d52006-05-27 19:21:47 +000024134 ac_cv_lib_readline_readline=no
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024135fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000024136
Thomas Wouters0e3f5912006-08-11 14:57:12 +000024137rm -f core conftest.err conftest.$ac_objext \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024138 conftest$ac_exeext conftest.$ac_ext
24139LIBS=$ac_check_lib_save_LIBS
24140fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000024141{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_readline" >&5
24142echo "${ECHO_T}$ac_cv_lib_readline_readline" >&6; }
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024143if test $ac_cv_lib_readline_readline = yes; then
24144 cat >>confdefs.h <<_ACEOF
24145#define HAVE_LIBREADLINE 1
24146_ACEOF
24147
24148 LIBS="-lreadline $LIBS"
24149
24150fi
24151
24152if test "$ac_cv_have_readline_readline" = no
24153then
24154
Thomas Wouters477c8d52006-05-27 19:21:47 +000024155{ echo "$as_me:$LINENO: checking for readline in -ltermcap" >&5
24156echo $ECHO_N "checking for readline in -ltermcap... $ECHO_C" >&6; }
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024157if test "${ac_cv_lib_termcap_readline+set}" = set; then
24158 echo $ECHO_N "(cached) $ECHO_C" >&6
24159else
24160 ac_check_lib_save_LIBS=$LIBS
24161LIBS="-ltermcap $LIBS"
24162cat >conftest.$ac_ext <<_ACEOF
24163/* confdefs.h. */
24164_ACEOF
24165cat confdefs.h >>conftest.$ac_ext
24166cat >>conftest.$ac_ext <<_ACEOF
24167/* end confdefs.h. */
24168
Thomas Wouters477c8d52006-05-27 19:21:47 +000024169/* Override any GCC internal prototype to avoid an error.
24170 Use char because int might match the return type of a GCC
24171 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024172#ifdef __cplusplus
24173extern "C"
24174#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024175char readline ();
24176int
24177main ()
24178{
Thomas Wouters477c8d52006-05-27 19:21:47 +000024179return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024180 ;
24181 return 0;
24182}
24183_ACEOF
24184rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024185if { (ac_try="$ac_link"
24186case "(($ac_try" in
24187 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24188 *) ac_try_echo=$ac_try;;
24189esac
24190eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24191 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024192 ac_status=$?
24193 grep -v '^ *+' conftest.er1 >conftest.err
24194 rm -f conftest.er1
24195 cat conftest.err >&5
24196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24197 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024198 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
24199 { (case "(($ac_try" in
24200 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24201 *) ac_try_echo=$ac_try;;
24202esac
24203eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24204 (eval "$ac_try") 2>&5
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024205 ac_status=$?
24206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24207 (exit $ac_status); }; } &&
24208 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024209 { (case "(($ac_try" in
24210 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24211 *) ac_try_echo=$ac_try;;
24212esac
24213eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24214 (eval "$ac_try") 2>&5
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024215 ac_status=$?
24216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24217 (exit $ac_status); }; }; then
24218 ac_cv_lib_termcap_readline=yes
24219else
24220 echo "$as_me: failed program was:" >&5
24221sed 's/^/| /' conftest.$ac_ext >&5
24222
Thomas Wouters477c8d52006-05-27 19:21:47 +000024223 ac_cv_lib_termcap_readline=no
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024224fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000024225
Thomas Wouters0e3f5912006-08-11 14:57:12 +000024226rm -f core conftest.err conftest.$ac_objext \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024227 conftest$ac_exeext conftest.$ac_ext
24228LIBS=$ac_check_lib_save_LIBS
24229fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000024230{ echo "$as_me:$LINENO: result: $ac_cv_lib_termcap_readline" >&5
24231echo "${ECHO_T}$ac_cv_lib_termcap_readline" >&6; }
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024232if test $ac_cv_lib_termcap_readline = yes; then
24233 cat >>confdefs.h <<_ACEOF
24234#define HAVE_LIBTERMCAP 1
24235_ACEOF
24236
24237 LIBS="-ltermcap $LIBS"
24238
24239fi
24240
24241fi
24242
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024243# check for readline 2.1
Thomas Wouters477c8d52006-05-27 19:21:47 +000024244{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
24245echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024246if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
24247 echo $ECHO_N "(cached) $ECHO_C" >&6
24248else
24249 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024250LIBS="-lreadline $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024251cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024252/* confdefs.h. */
24253_ACEOF
24254cat confdefs.h >>conftest.$ac_ext
24255cat >>conftest.$ac_ext <<_ACEOF
24256/* end confdefs.h. */
24257
Thomas Wouters477c8d52006-05-27 19:21:47 +000024258/* Override any GCC internal prototype to avoid an error.
24259 Use char because int might match the return type of a GCC
24260 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024261#ifdef __cplusplus
24262extern "C"
24263#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024264char rl_callback_handler_install ();
24265int
24266main ()
24267{
Thomas Wouters477c8d52006-05-27 19:21:47 +000024268return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024269 ;
24270 return 0;
24271}
24272_ACEOF
24273rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024274if { (ac_try="$ac_link"
24275case "(($ac_try" in
24276 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24277 *) ac_try_echo=$ac_try;;
24278esac
24279eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24280 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024281 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024282 grep -v '^ *+' conftest.er1 >conftest.err
24283 rm -f conftest.er1
24284 cat conftest.err >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24286 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024287 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
24288 { (case "(($ac_try" in
24289 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24290 *) ac_try_echo=$ac_try;;
24291esac
24292eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24293 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000024294 ac_status=$?
24295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24296 (exit $ac_status); }; } &&
24297 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024298 { (case "(($ac_try" in
24299 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24300 *) ac_try_echo=$ac_try;;
24301esac
24302eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24303 (eval "$ac_try") 2>&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024304 ac_status=$?
24305 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24306 (exit $ac_status); }; }; then
24307 ac_cv_lib_readline_rl_callback_handler_install=yes
24308else
24309 echo "$as_me: failed program was:" >&5
24310sed 's/^/| /' conftest.$ac_ext >&5
24311
Thomas Wouters477c8d52006-05-27 19:21:47 +000024312 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024313fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000024314
Thomas Wouters0e3f5912006-08-11 14:57:12 +000024315rm -f core conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024316 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024317LIBS=$ac_check_lib_save_LIBS
24318fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000024319{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
24320echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024321if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
24322
24323cat >>confdefs.h <<\_ACEOF
24324#define HAVE_RL_CALLBACK 1
24325_ACEOF
24326
24327fi
24328
24329
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024330# check for readline 2.2
24331cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024332/* confdefs.h. */
24333_ACEOF
24334cat confdefs.h >>conftest.$ac_ext
24335cat >>conftest.$ac_ext <<_ACEOF
24336/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024337#include <readline/readline.h>
24338_ACEOF
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024339if { (ac_try="$ac_cpp conftest.$ac_ext"
24340case "(($ac_try" in
24341 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24342 *) ac_try_echo=$ac_try;;
24343esac
24344eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24345 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024346 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000024347 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024348 rm -f conftest.er1
24349 cat conftest.err >&5
24350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24351 (exit $ac_status); } >/dev/null; then
24352 if test -s conftest.err; then
24353 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000024354 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024355 else
24356 ac_cpp_err=
24357 fi
24358else
24359 ac_cpp_err=yes
24360fi
24361if test -z "$ac_cpp_err"; then
24362 have_readline=yes
24363else
24364 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024365sed 's/^/| /' conftest.$ac_ext >&5
24366
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024367 have_readline=no
24368fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000024369
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024370rm -f conftest.err conftest.$ac_ext
24371if test $have_readline = yes
24372then
24373 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024374/* confdefs.h. */
24375_ACEOF
24376cat confdefs.h >>conftest.$ac_ext
24377cat >>conftest.$ac_ext <<_ACEOF
24378/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024379#include <readline/readline.h>
24380
24381_ACEOF
24382if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000024383 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024384
24385cat >>confdefs.h <<\_ACEOF
24386#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
24387_ACEOF
24388
24389fi
24390rm -f conftest*
24391
24392fi
24393
Martin v. Löwis0daad592001-09-30 21:09:59 +000024394# check for readline 4.0
Thomas Wouters477c8d52006-05-27 19:21:47 +000024395{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
24396echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024397if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
24398 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000024399else
Martin v. Löwis11437992002-04-12 09:54:03 +000024400 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024401LIBS="-lreadline $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000024402cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024403/* confdefs.h. */
24404_ACEOF
24405cat confdefs.h >>conftest.$ac_ext
24406cat >>conftest.$ac_ext <<_ACEOF
24407/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024408
Thomas Wouters477c8d52006-05-27 19:21:47 +000024409/* Override any GCC internal prototype to avoid an error.
24410 Use char because int might match the return type of a GCC
24411 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024412#ifdef __cplusplus
24413extern "C"
24414#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000024415char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000024416int
24417main ()
24418{
Thomas Wouters477c8d52006-05-27 19:21:47 +000024419return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000024420 ;
24421 return 0;
24422}
24423_ACEOF
24424rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024425if { (ac_try="$ac_link"
24426case "(($ac_try" in
24427 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24428 *) ac_try_echo=$ac_try;;
24429esac
24430eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24431 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024432 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024433 grep -v '^ *+' conftest.er1 >conftest.err
24434 rm -f conftest.er1
24435 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24437 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024438 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
24439 { (case "(($ac_try" in
24440 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24441 *) ac_try_echo=$ac_try;;
24442esac
24443eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24444 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000024445 ac_status=$?
24446 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24447 (exit $ac_status); }; } &&
24448 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024449 { (case "(($ac_try" in
24450 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24451 *) ac_try_echo=$ac_try;;
24452esac
24453eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24454 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024455 ac_status=$?
24456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24457 (exit $ac_status); }; }; then
24458 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000024459else
Martin v. Löwis11437992002-04-12 09:54:03 +000024460 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024461sed 's/^/| /' conftest.$ac_ext >&5
24462
Thomas Wouters477c8d52006-05-27 19:21:47 +000024463 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000024464fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000024465
Thomas Wouters0e3f5912006-08-11 14:57:12 +000024466rm -f core conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024467 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024468LIBS=$ac_check_lib_save_LIBS
24469fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000024470{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
24471echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024472if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000024473
Martin v. Löwis11437992002-04-12 09:54:03 +000024474cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000024475#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024476_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000024477
Martin v. Löwis0daad592001-09-30 21:09:59 +000024478fi
24479
Michael W. Hudson54241132001-12-07 15:38:26 +000024480
Martin v. Löwis0daad592001-09-30 21:09:59 +000024481# check for readline 4.2
Thomas Wouters477c8d52006-05-27 19:21:47 +000024482{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
24483echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024484if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
24485 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000024486else
Martin v. Löwis11437992002-04-12 09:54:03 +000024487 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024488LIBS="-lreadline $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000024489cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024490/* confdefs.h. */
24491_ACEOF
24492cat confdefs.h >>conftest.$ac_ext
24493cat >>conftest.$ac_ext <<_ACEOF
24494/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024495
Thomas Wouters477c8d52006-05-27 19:21:47 +000024496/* Override any GCC internal prototype to avoid an error.
24497 Use char because int might match the return type of a GCC
24498 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024499#ifdef __cplusplus
24500extern "C"
24501#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000024502char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000024503int
24504main ()
24505{
Thomas Wouters477c8d52006-05-27 19:21:47 +000024506return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000024507 ;
24508 return 0;
24509}
24510_ACEOF
24511rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024512if { (ac_try="$ac_link"
24513case "(($ac_try" in
24514 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24515 *) ac_try_echo=$ac_try;;
24516esac
24517eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24518 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024519 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024520 grep -v '^ *+' conftest.er1 >conftest.err
24521 rm -f conftest.er1
24522 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24524 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024525 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
24526 { (case "(($ac_try" in
24527 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24528 *) ac_try_echo=$ac_try;;
24529esac
24530eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24531 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000024532 ac_status=$?
24533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24534 (exit $ac_status); }; } &&
24535 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024536 { (case "(($ac_try" in
24537 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24538 *) ac_try_echo=$ac_try;;
24539esac
24540eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24541 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024542 ac_status=$?
24543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24544 (exit $ac_status); }; }; then
24545 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000024546else
Martin v. Löwis11437992002-04-12 09:54:03 +000024547 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024548sed 's/^/| /' conftest.$ac_ext >&5
24549
Thomas Wouters477c8d52006-05-27 19:21:47 +000024550 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000024551fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000024552
Thomas Wouters0e3f5912006-08-11 14:57:12 +000024553rm -f core conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024554 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024555LIBS=$ac_check_lib_save_LIBS
24556fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000024557{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
24558echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024559if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000024560
Martin v. Löwis11437992002-04-12 09:54:03 +000024561cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000024562#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024563_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000024564
Guido van Rossum353ae582001-07-10 16:45:32 +000024565fi
24566
Jack Jansendd19cf82001-12-06 22:36:17 +000024567
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024568# also in readline 4.2
24569cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024570/* confdefs.h. */
24571_ACEOF
24572cat confdefs.h >>conftest.$ac_ext
24573cat >>conftest.$ac_ext <<_ACEOF
24574/* end confdefs.h. */
24575#include <readline/readline.h>
24576_ACEOF
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024577if { (ac_try="$ac_cpp conftest.$ac_ext"
24578case "(($ac_try" in
24579 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24580 *) ac_try_echo=$ac_try;;
24581esac
24582eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24583 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024584 ac_status=$?
24585 grep -v '^ *+' conftest.er1 >conftest.err
24586 rm -f conftest.er1
24587 cat conftest.err >&5
24588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24589 (exit $ac_status); } >/dev/null; then
24590 if test -s conftest.err; then
24591 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000024592 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024593 else
24594 ac_cpp_err=
24595 fi
24596else
24597 ac_cpp_err=yes
24598fi
24599if test -z "$ac_cpp_err"; then
24600 have_readline=yes
24601else
24602 echo "$as_me: failed program was:" >&5
24603sed 's/^/| /' conftest.$ac_ext >&5
24604
24605 have_readline=no
24606fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000024607
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024608rm -f conftest.err conftest.$ac_ext
24609if test $have_readline = yes
24610then
24611 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024612/* confdefs.h. */
24613_ACEOF
24614cat confdefs.h >>conftest.$ac_ext
24615cat >>conftest.$ac_ext <<_ACEOF
24616/* end confdefs.h. */
24617#include <readline/readline.h>
24618
24619_ACEOF
24620if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
24621 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
24622
24623cat >>confdefs.h <<\_ACEOF
24624#define HAVE_RL_CATCH_SIGNAL 1
24625_ACEOF
24626
24627fi
24628rm -f conftest*
24629
24630fi
24631
Martin v. Löwis82bca632006-02-10 20:49:30 +000024632# End of readline checks: restore LIBS
24633LIBS=$LIBS_no_readline
24634
Thomas Wouters477c8d52006-05-27 19:21:47 +000024635{ echo "$as_me:$LINENO: checking for broken nice()" >&5
24636echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024637if test "${ac_cv_broken_nice+set}" = set; then
24638 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000024639else
Martin v. Löwis11437992002-04-12 09:54:03 +000024640
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024641if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000024642 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024643else
Martin v. Löwis11437992002-04-12 09:54:03 +000024644 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024645/* confdefs.h. */
24646_ACEOF
24647cat confdefs.h >>conftest.$ac_ext
24648cat >>conftest.$ac_ext <<_ACEOF
24649/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024650
24651int main()
24652{
24653 int val1 = nice(1);
24654 if (val1 != -1 && val1 == nice(2))
24655 exit(0);
24656 exit(1);
24657}
24658
Martin v. Löwis11437992002-04-12 09:54:03 +000024659_ACEOF
24660rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024661if { (ac_try="$ac_link"
24662case "(($ac_try" in
24663 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24664 *) ac_try_echo=$ac_try;;
24665esac
24666eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24667 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024668 ac_status=$?
24669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24670 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024671 { (case "(($ac_try" in
24672 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24673 *) ac_try_echo=$ac_try;;
24674esac
24675eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24676 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024677 ac_status=$?
24678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24679 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024680 ac_cv_broken_nice=yes
24681else
Martin v. Löwis11437992002-04-12 09:54:03 +000024682 echo "$as_me: program exited with status $ac_status" >&5
24683echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024684sed 's/^/| /' conftest.$ac_ext >&5
24685
Martin v. Löwis11437992002-04-12 09:54:03 +000024686( exit $ac_status )
24687ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024688fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000024689rm -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 +000024690fi
24691
Thomas Wouters477c8d52006-05-27 19:21:47 +000024692
24693fi
24694
24695{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
24696echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024697if test "$ac_cv_broken_nice" = yes
24698then
Martin v. Löwis11437992002-04-12 09:54:03 +000024699
24700cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024701#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024702_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024703
24704fi
24705
Thomas Wouters477c8d52006-05-27 19:21:47 +000024706{ echo "$as_me:$LINENO: checking for broken poll()" >&5
24707echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024708if test "$cross_compiling" = yes; then
24709 ac_cv_broken_poll=no
24710else
24711 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024712/* confdefs.h. */
24713_ACEOF
24714cat confdefs.h >>conftest.$ac_ext
24715cat >>conftest.$ac_ext <<_ACEOF
24716/* end confdefs.h. */
24717
24718#include <poll.h>
24719
24720int main (void)
24721 {
24722 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
24723
24724 close (42);
24725
24726 int poll_test = poll (&poll_struct, 1, 0);
24727
24728 if (poll_test < 0)
24729 {
24730 exit(0);
24731 }
24732 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
24733 {
24734 exit(0);
24735 }
24736 else
24737 {
24738 exit(1);
24739 }
24740 }
24741
24742_ACEOF
24743rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024744if { (ac_try="$ac_link"
24745case "(($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_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024751 ac_status=$?
24752 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24753 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024754 { (case "(($ac_try" in
24755 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24756 *) ac_try_echo=$ac_try;;
24757esac
24758eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24759 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024760 ac_status=$?
24761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24762 (exit $ac_status); }; }; then
24763 ac_cv_broken_poll=yes
24764else
24765 echo "$as_me: program exited with status $ac_status" >&5
24766echo "$as_me: failed program was:" >&5
24767sed 's/^/| /' conftest.$ac_ext >&5
24768
24769( exit $ac_status )
24770ac_cv_broken_poll=no
24771fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000024772rm -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 +000024773fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000024774
24775
24776{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
24777echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024778if test "$ac_cv_broken_poll" = yes
24779then
24780
24781cat >>confdefs.h <<\_ACEOF
24782#define HAVE_BROKEN_POLL 1
24783_ACEOF
24784
24785fi
24786
Brett Cannon43802422005-02-10 20:48:03 +000024787# 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 +000024788# (which is not required by ISO C or UNIX spec) and/or if we support
24789# tzname[]
Thomas Wouters477c8d52006-05-27 19:21:47 +000024790{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
24791echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000024792if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
24793 echo $ECHO_N "(cached) $ECHO_C" >&6
24794else
24795 cat >conftest.$ac_ext <<_ACEOF
24796/* confdefs.h. */
24797_ACEOF
24798cat confdefs.h >>conftest.$ac_ext
24799cat >>conftest.$ac_ext <<_ACEOF
24800/* end confdefs.h. */
24801#include <sys/types.h>
24802#include <$ac_cv_struct_tm>
24803
24804
24805int
24806main ()
24807{
24808static struct tm ac_aggr;
24809if (ac_aggr.tm_zone)
24810return 0;
24811 ;
24812 return 0;
24813}
24814_ACEOF
24815rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024816if { (ac_try="$ac_compile"
24817case "(($ac_try" in
24818 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24819 *) ac_try_echo=$ac_try;;
24820esac
24821eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24822 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000024823 ac_status=$?
24824 grep -v '^ *+' conftest.er1 >conftest.err
24825 rm -f conftest.er1
24826 cat conftest.err >&5
24827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24828 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024829 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
24830 { (case "(($ac_try" in
24831 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24832 *) ac_try_echo=$ac_try;;
24833esac
24834eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24835 (eval "$ac_try") 2>&5
Brett Cannon43802422005-02-10 20:48:03 +000024836 ac_status=$?
24837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24838 (exit $ac_status); }; } &&
24839 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024840 { (case "(($ac_try" in
24841 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24842 *) ac_try_echo=$ac_try;;
24843esac
24844eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24845 (eval "$ac_try") 2>&5
Brett Cannon43802422005-02-10 20:48:03 +000024846 ac_status=$?
24847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24848 (exit $ac_status); }; }; then
24849 ac_cv_member_struct_tm_tm_zone=yes
24850else
24851 echo "$as_me: failed program was:" >&5
24852sed 's/^/| /' conftest.$ac_ext >&5
24853
Thomas Wouters477c8d52006-05-27 19:21:47 +000024854 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000024855/* confdefs.h. */
24856_ACEOF
24857cat confdefs.h >>conftest.$ac_ext
24858cat >>conftest.$ac_ext <<_ACEOF
24859/* end confdefs.h. */
24860#include <sys/types.h>
24861#include <$ac_cv_struct_tm>
24862
24863
24864int
24865main ()
24866{
24867static struct tm ac_aggr;
24868if (sizeof ac_aggr.tm_zone)
24869return 0;
24870 ;
24871 return 0;
24872}
24873_ACEOF
24874rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024875if { (ac_try="$ac_compile"
24876case "(($ac_try" in
24877 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24878 *) ac_try_echo=$ac_try;;
24879esac
24880eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24881 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000024882 ac_status=$?
24883 grep -v '^ *+' conftest.er1 >conftest.err
24884 rm -f conftest.er1
24885 cat conftest.err >&5
24886 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24887 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024888 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
24889 { (case "(($ac_try" in
24890 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24891 *) ac_try_echo=$ac_try;;
24892esac
24893eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24894 (eval "$ac_try") 2>&5
Brett Cannon43802422005-02-10 20:48:03 +000024895 ac_status=$?
24896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24897 (exit $ac_status); }; } &&
24898 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024899 { (case "(($ac_try" in
24900 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24901 *) ac_try_echo=$ac_try;;
24902esac
24903eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24904 (eval "$ac_try") 2>&5
Brett Cannon43802422005-02-10 20:48:03 +000024905 ac_status=$?
24906 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24907 (exit $ac_status); }; }; then
24908 ac_cv_member_struct_tm_tm_zone=yes
24909else
24910 echo "$as_me: failed program was:" >&5
24911sed 's/^/| /' conftest.$ac_ext >&5
24912
Thomas Wouters477c8d52006-05-27 19:21:47 +000024913 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000024914fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000024915
Thomas Wouters0e3f5912006-08-11 14:57:12 +000024916rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000024917fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000024918
Thomas Wouters0e3f5912006-08-11 14:57:12 +000024919rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000024920fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000024921{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
24922echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000024923if test $ac_cv_member_struct_tm_tm_zone = yes; then
24924
24925cat >>confdefs.h <<_ACEOF
24926#define HAVE_STRUCT_TM_TM_ZONE 1
24927_ACEOF
24928
24929
24930fi
24931
24932if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
24933
24934cat >>confdefs.h <<\_ACEOF
24935#define HAVE_TM_ZONE 1
24936_ACEOF
24937
24938else
Thomas Wouters477c8d52006-05-27 19:21:47 +000024939 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
24940echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
24941if test "${ac_cv_have_decl_tzname+set}" = set; then
24942 echo $ECHO_N "(cached) $ECHO_C" >&6
24943else
24944 cat >conftest.$ac_ext <<_ACEOF
24945/* confdefs.h. */
24946_ACEOF
24947cat confdefs.h >>conftest.$ac_ext
24948cat >>conftest.$ac_ext <<_ACEOF
24949/* end confdefs.h. */
24950#include <time.h>
24951
24952int
24953main ()
24954{
24955#ifndef tzname
24956 char *p = (char *) tzname;
24957 return !p;
24958#endif
24959
24960 ;
24961 return 0;
24962}
24963_ACEOF
24964rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024965if { (ac_try="$ac_compile"
24966case "(($ac_try" in
24967 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24968 *) ac_try_echo=$ac_try;;
24969esac
24970eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24971 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters477c8d52006-05-27 19:21:47 +000024972 ac_status=$?
24973 grep -v '^ *+' conftest.er1 >conftest.err
24974 rm -f conftest.er1
24975 cat conftest.err >&5
24976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24977 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024978 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
24979 { (case "(($ac_try" in
24980 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24981 *) ac_try_echo=$ac_try;;
24982esac
24983eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24984 (eval "$ac_try") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000024985 ac_status=$?
24986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24987 (exit $ac_status); }; } &&
24988 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024989 { (case "(($ac_try" in
24990 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24991 *) ac_try_echo=$ac_try;;
24992esac
24993eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24994 (eval "$ac_try") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000024995 ac_status=$?
24996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24997 (exit $ac_status); }; }; then
24998 ac_cv_have_decl_tzname=yes
24999else
25000 echo "$as_me: failed program was:" >&5
25001sed 's/^/| /' conftest.$ac_ext >&5
25002
25003 ac_cv_have_decl_tzname=no
25004fi
25005
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025006rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000025007fi
25008{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
25009echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
25010if test $ac_cv_have_decl_tzname = yes; then
25011
25012cat >>confdefs.h <<_ACEOF
25013#define HAVE_DECL_TZNAME 1
25014_ACEOF
25015
25016
25017else
25018 cat >>confdefs.h <<_ACEOF
25019#define HAVE_DECL_TZNAME 0
25020_ACEOF
25021
25022
25023fi
25024
25025
25026 { echo "$as_me:$LINENO: checking for tzname" >&5
25027echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000025028if test "${ac_cv_var_tzname+set}" = set; then
25029 echo $ECHO_N "(cached) $ECHO_C" >&6
25030else
25031 cat >conftest.$ac_ext <<_ACEOF
25032/* confdefs.h. */
25033_ACEOF
25034cat confdefs.h >>conftest.$ac_ext
25035cat >>conftest.$ac_ext <<_ACEOF
25036/* end confdefs.h. */
25037#include <time.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +000025038#if !HAVE_DECL_TZNAME
25039extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000025040#endif
25041
25042int
25043main ()
25044{
Thomas Wouters477c8d52006-05-27 19:21:47 +000025045return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000025046 ;
25047 return 0;
25048}
25049_ACEOF
25050rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000025051if { (ac_try="$ac_link"
25052case "(($ac_try" in
25053 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25054 *) ac_try_echo=$ac_try;;
25055esac
25056eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25057 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000025058 ac_status=$?
25059 grep -v '^ *+' conftest.er1 >conftest.err
25060 rm -f conftest.er1
25061 cat conftest.err >&5
25062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25063 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000025064 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
25065 { (case "(($ac_try" in
25066 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25067 *) ac_try_echo=$ac_try;;
25068esac
25069eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25070 (eval "$ac_try") 2>&5
Brett Cannon43802422005-02-10 20:48:03 +000025071 ac_status=$?
25072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25073 (exit $ac_status); }; } &&
25074 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000025075 { (case "(($ac_try" in
25076 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25077 *) ac_try_echo=$ac_try;;
25078esac
25079eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25080 (eval "$ac_try") 2>&5
Brett Cannon43802422005-02-10 20:48:03 +000025081 ac_status=$?
25082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25083 (exit $ac_status); }; }; then
25084 ac_cv_var_tzname=yes
25085else
25086 echo "$as_me: failed program was:" >&5
25087sed 's/^/| /' conftest.$ac_ext >&5
25088
Thomas Wouters477c8d52006-05-27 19:21:47 +000025089 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000025090fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000025091
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025092rm -f core conftest.err conftest.$ac_objext \
Brett Cannon43802422005-02-10 20:48:03 +000025093 conftest$ac_exeext conftest.$ac_ext
25094fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000025095{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
25096echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000025097 if test $ac_cv_var_tzname = yes; then
25098
25099cat >>confdefs.h <<\_ACEOF
25100#define HAVE_TZNAME 1
25101_ACEOF
25102
25103 fi
25104fi
25105
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025106
Martin v. Löwis1d459062005-03-14 21:23:33 +000025107# check tzset(3) exists and works like we expect it to
Thomas Wouters477c8d52006-05-27 19:21:47 +000025108{ echo "$as_me:$LINENO: checking for working tzset()" >&5
25109echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025110if test "${ac_cv_working_tzset+set}" = set; then
25111 echo $ECHO_N "(cached) $ECHO_C" >&6
25112else
25113
25114if test "$cross_compiling" = yes; then
25115 ac_cv_working_tzset=no
25116else
25117 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025118/* confdefs.h. */
25119_ACEOF
25120cat confdefs.h >>conftest.$ac_ext
25121cat >>conftest.$ac_ext <<_ACEOF
25122/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025123
25124#include <stdlib.h>
25125#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000025126#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000025127
25128#if HAVE_TZNAME
25129extern char *tzname[];
25130#endif
25131
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025132int main()
25133{
Brett Cannon18367812003-09-19 00:59:16 +000025134 /* Note that we need to ensure that not only does tzset(3)
25135 do 'something' with localtime, but it works as documented
25136 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000025137 This includes making sure that tzname is set properly if
25138 tm->tm_zone does not exist since it is the alternative way
25139 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000025140
25141 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000025142 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000025143 */
25144
Martin v. Löwis1d459062005-03-14 21:23:33 +000025145 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000025146 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
25147
Neal Norwitz7f2588c2003-04-11 15:35:53 +000025148 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025149 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000025150 if (localtime(&groundhogday)->tm_hour != 0)
25151 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025152#if HAVE_TZNAME
25153 /* For UTC, tzname[1] is sometimes "", sometimes " " */
25154 if (strcmp(tzname[0], "UTC") ||
25155 (tzname[1][0] != 0 && tzname[1][0] != ' '))
25156 exit(1);
25157#endif
Brett Cannon18367812003-09-19 00:59:16 +000025158
Neal Norwitz7f2588c2003-04-11 15:35:53 +000025159 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025160 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000025161 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025162 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025163#if HAVE_TZNAME
25164 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
25165 exit(1);
25166#endif
Brett Cannon18367812003-09-19 00:59:16 +000025167
25168 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
25169 tzset();
25170 if (localtime(&groundhogday)->tm_hour != 11)
25171 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025172#if HAVE_TZNAME
25173 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
25174 exit(1);
25175#endif
25176
25177#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000025178 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
25179 exit(1);
25180 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
25181 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025182#endif
Brett Cannon18367812003-09-19 00:59:16 +000025183
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025184 exit(0);
25185}
25186
25187_ACEOF
25188rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000025189if { (ac_try="$ac_link"
25190case "(($ac_try" in
25191 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25192 *) ac_try_echo=$ac_try;;
25193esac
25194eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25195 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025196 ac_status=$?
25197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25198 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000025199 { (case "(($ac_try" in
25200 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25201 *) ac_try_echo=$ac_try;;
25202esac
25203eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25204 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025205 ac_status=$?
25206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25207 (exit $ac_status); }; }; then
25208 ac_cv_working_tzset=yes
25209else
25210 echo "$as_me: program exited with status $ac_status" >&5
25211echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025212sed 's/^/| /' conftest.$ac_ext >&5
25213
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025214( exit $ac_status )
25215ac_cv_working_tzset=no
25216fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000025217rm -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 +000025218fi
25219
Thomas Wouters477c8d52006-05-27 19:21:47 +000025220
25221fi
25222
25223{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
25224echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025225if test "$ac_cv_working_tzset" = yes
25226then
25227
25228cat >>confdefs.h <<\_ACEOF
25229#define HAVE_WORKING_TZSET 1
25230_ACEOF
25231
25232fi
25233
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025234# Look for subsecond timestamps in struct stat
Thomas Wouters477c8d52006-05-27 19:21:47 +000025235{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
25236echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025237if test "${ac_cv_stat_tv_nsec+set}" = set; then
25238 echo $ECHO_N "(cached) $ECHO_C" >&6
25239else
25240 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025241/* confdefs.h. */
25242_ACEOF
25243cat confdefs.h >>conftest.$ac_ext
25244cat >>conftest.$ac_ext <<_ACEOF
25245/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025246#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025247int
25248main ()
25249{
25250
25251struct stat st;
25252st.st_mtim.tv_nsec = 1;
25253
25254 ;
25255 return 0;
25256}
25257_ACEOF
25258rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000025259if { (ac_try="$ac_compile"
25260case "(($ac_try" in
25261 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25262 *) ac_try_echo=$ac_try;;
25263esac
25264eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25265 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025266 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025267 grep -v '^ *+' conftest.er1 >conftest.err
25268 rm -f conftest.er1
25269 cat conftest.err >&5
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25271 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000025272 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
25273 { (case "(($ac_try" in
25274 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25275 *) ac_try_echo=$ac_try;;
25276esac
25277eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25278 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000025279 ac_status=$?
25280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25281 (exit $ac_status); }; } &&
25282 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000025283 { (case "(($ac_try" in
25284 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25285 *) ac_try_echo=$ac_try;;
25286esac
25287eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25288 (eval "$ac_try") 2>&5
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025289 ac_status=$?
25290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25291 (exit $ac_status); }; }; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000025292 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025293else
25294 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025295sed 's/^/| /' conftest.$ac_ext >&5
25296
Thomas Wouters477c8d52006-05-27 19:21:47 +000025297 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025298fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000025299
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025300rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025301fi
25302
Thomas Wouters477c8d52006-05-27 19:21:47 +000025303{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
25304echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025305if test "$ac_cv_stat_tv_nsec" = yes
25306then
25307
25308cat >>confdefs.h <<\_ACEOF
25309#define HAVE_STAT_TV_NSEC 1
25310_ACEOF
25311
25312fi
25313
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025314# Look for BSD style subsecond timestamps in struct stat
Thomas Wouters477c8d52006-05-27 19:21:47 +000025315{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
25316echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025317if test "${ac_cv_stat_tv_nsec2+set}" = set; then
25318 echo $ECHO_N "(cached) $ECHO_C" >&6
25319else
25320 cat >conftest.$ac_ext <<_ACEOF
25321/* confdefs.h. */
25322_ACEOF
25323cat confdefs.h >>conftest.$ac_ext
25324cat >>conftest.$ac_ext <<_ACEOF
25325/* end confdefs.h. */
25326#include <sys/stat.h>
25327int
25328main ()
25329{
25330
25331struct stat st;
25332st.st_mtimespec.tv_nsec = 1;
25333
25334 ;
25335 return 0;
25336}
25337_ACEOF
25338rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000025339if { (ac_try="$ac_compile"
25340case "(($ac_try" in
25341 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25342 *) ac_try_echo=$ac_try;;
25343esac
25344eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25345 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025346 ac_status=$?
25347 grep -v '^ *+' conftest.er1 >conftest.err
25348 rm -f conftest.er1
25349 cat conftest.err >&5
25350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25351 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000025352 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
25353 { (case "(($ac_try" in
25354 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25355 *) ac_try_echo=$ac_try;;
25356esac
25357eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25358 (eval "$ac_try") 2>&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025359 ac_status=$?
25360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25361 (exit $ac_status); }; } &&
25362 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000025363 { (case "(($ac_try" in
25364 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25365 *) ac_try_echo=$ac_try;;
25366esac
25367eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25368 (eval "$ac_try") 2>&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025369 ac_status=$?
25370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25371 (exit $ac_status); }; }; then
25372 ac_cv_stat_tv_nsec2=yes
25373else
25374 echo "$as_me: failed program was:" >&5
25375sed 's/^/| /' conftest.$ac_ext >&5
25376
Thomas Wouters477c8d52006-05-27 19:21:47 +000025377 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025378fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000025379
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025380rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025381fi
25382
Thomas Wouters477c8d52006-05-27 19:21:47 +000025383{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
25384echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025385if test "$ac_cv_stat_tv_nsec2" = yes
25386then
25387
25388cat >>confdefs.h <<\_ACEOF
25389#define HAVE_STAT_TV_NSEC2 1
25390_ACEOF
25391
25392fi
25393
Jack Jansen666b1e72001-10-31 12:11:48 +000025394# On HP/UX 11.0, mvwdelch is a block with a return statement
Thomas Wouters477c8d52006-05-27 19:21:47 +000025395{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
25396echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025397if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
25398 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000025399else
Martin v. Löwis11437992002-04-12 09:54:03 +000025400 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025401/* confdefs.h. */
25402_ACEOF
25403cat confdefs.h >>conftest.$ac_ext
25404cat >>conftest.$ac_ext <<_ACEOF
25405/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000025406#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025407int
25408main ()
25409{
Jack Jansen666b1e72001-10-31 12:11:48 +000025410
25411 int rtn;
25412 rtn = mvwdelch(0,0,0);
25413
Martin v. Löwis11437992002-04-12 09:54:03 +000025414 ;
25415 return 0;
25416}
25417_ACEOF
25418rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000025419if { (ac_try="$ac_compile"
25420case "(($ac_try" in
25421 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25422 *) ac_try_echo=$ac_try;;
25423esac
25424eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25425 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025426 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025427 grep -v '^ *+' conftest.er1 >conftest.err
25428 rm -f conftest.er1
25429 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025430 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25431 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000025432 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
25433 { (case "(($ac_try" in
25434 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25435 *) ac_try_echo=$ac_try;;
25436esac
25437eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25438 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000025439 ac_status=$?
25440 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25441 (exit $ac_status); }; } &&
25442 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000025443 { (case "(($ac_try" in
25444 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25445 *) ac_try_echo=$ac_try;;
25446esac
25447eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25448 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025449 ac_status=$?
25450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25451 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000025452 ac_cv_mvwdelch_is_expression=yes
25453else
Martin v. Löwis11437992002-04-12 09:54:03 +000025454 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025455sed 's/^/| /' conftest.$ac_ext >&5
25456
Thomas Wouters477c8d52006-05-27 19:21:47 +000025457 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000025458fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000025459
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025460rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000025461fi
25462
Thomas Wouters477c8d52006-05-27 19:21:47 +000025463{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
25464echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000025465
25466if test "$ac_cv_mvwdelch_is_expression" = yes
25467then
Martin v. Löwis11437992002-04-12 09:54:03 +000025468
25469cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000025470#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025471_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000025472
25473fi
25474
Thomas Wouters477c8d52006-05-27 19:21:47 +000025475{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
25476echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025477if test "${ac_cv_window_has_flags+set}" = set; then
25478 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000025479else
Martin v. Löwis11437992002-04-12 09:54:03 +000025480 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025481/* confdefs.h. */
25482_ACEOF
25483cat confdefs.h >>conftest.$ac_ext
25484cat >>conftest.$ac_ext <<_ACEOF
25485/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000025486#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025487int
25488main ()
25489{
Jack Jansen666b1e72001-10-31 12:11:48 +000025490
25491 WINDOW *w;
25492 w->_flags = 0;
25493
Martin v. Löwis11437992002-04-12 09:54:03 +000025494 ;
25495 return 0;
25496}
25497_ACEOF
25498rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000025499if { (ac_try="$ac_compile"
25500case "(($ac_try" in
25501 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25502 *) ac_try_echo=$ac_try;;
25503esac
25504eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25505 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025506 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025507 grep -v '^ *+' conftest.er1 >conftest.err
25508 rm -f conftest.er1
25509 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25511 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000025512 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
25513 { (case "(($ac_try" in
25514 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25515 *) ac_try_echo=$ac_try;;
25516esac
25517eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25518 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000025519 ac_status=$?
25520 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25521 (exit $ac_status); }; } &&
25522 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000025523 { (case "(($ac_try" in
25524 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25525 *) ac_try_echo=$ac_try;;
25526esac
25527eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25528 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025529 ac_status=$?
25530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25531 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000025532 ac_cv_window_has_flags=yes
25533else
Martin v. Löwis11437992002-04-12 09:54:03 +000025534 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025535sed 's/^/| /' conftest.$ac_ext >&5
25536
Thomas Wouters477c8d52006-05-27 19:21:47 +000025537 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000025538fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000025539
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025540rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000025541fi
25542
Thomas Wouters477c8d52006-05-27 19:21:47 +000025543{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
25544echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000025545
Jack Jansen666b1e72001-10-31 12:11:48 +000025546
25547if test "$ac_cv_window_has_flags" = yes
25548then
Martin v. Löwis11437992002-04-12 09:54:03 +000025549
25550cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000025551#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025552_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000025553
25554fi
25555
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025556{ echo "$as_me:$LINENO: checking for is_term_resized" >&5
25557echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; }
25558cat >conftest.$ac_ext <<_ACEOF
25559/* confdefs.h. */
25560_ACEOF
25561cat confdefs.h >>conftest.$ac_ext
25562cat >>conftest.$ac_ext <<_ACEOF
25563/* end confdefs.h. */
25564#include <curses.h>
25565int
25566main ()
25567{
25568void *x=is_term_resized
25569 ;
25570 return 0;
25571}
25572_ACEOF
25573rm -f conftest.$ac_objext
25574if { (ac_try="$ac_compile"
25575case "(($ac_try" in
25576 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25577 *) ac_try_echo=$ac_try;;
25578esac
25579eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25580 (eval "$ac_compile") 2>conftest.er1
25581 ac_status=$?
25582 grep -v '^ *+' conftest.er1 >conftest.err
25583 rm -f conftest.er1
25584 cat conftest.err >&5
25585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25586 (exit $ac_status); } &&
25587 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
25588 { (case "(($ac_try" in
25589 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25590 *) ac_try_echo=$ac_try;;
25591esac
25592eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25593 (eval "$ac_try") 2>&5
25594 ac_status=$?
25595 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25596 (exit $ac_status); }; } &&
25597 { ac_try='test -s conftest.$ac_objext'
25598 { (case "(($ac_try" in
25599 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25600 *) ac_try_echo=$ac_try;;
25601esac
25602eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25603 (eval "$ac_try") 2>&5
25604 ac_status=$?
25605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25606 (exit $ac_status); }; }; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000025607
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025608cat >>confdefs.h <<\_ACEOF
25609#define HAVE_CURSES_IS_TERM_RESIZED 1
25610_ACEOF
25611
Thomas Wouters477c8d52006-05-27 19:21:47 +000025612 { echo "$as_me:$LINENO: result: yes" >&5
25613echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025614else
25615 echo "$as_me: failed program was:" >&5
25616sed 's/^/| /' conftest.$ac_ext >&5
25617
25618 { echo "$as_me:$LINENO: result: no" >&5
25619echo "${ECHO_T}no" >&6; }
25620
25621fi
25622
25623rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25624
25625{ echo "$as_me:$LINENO: checking for resize_term" >&5
25626echo $ECHO_N "checking for resize_term... $ECHO_C" >&6; }
25627cat >conftest.$ac_ext <<_ACEOF
25628/* confdefs.h. */
25629_ACEOF
25630cat confdefs.h >>conftest.$ac_ext
25631cat >>conftest.$ac_ext <<_ACEOF
25632/* end confdefs.h. */
25633#include <curses.h>
25634int
25635main ()
25636{
25637void *x=resize_term
25638 ;
25639 return 0;
25640}
25641_ACEOF
25642rm -f conftest.$ac_objext
25643if { (ac_try="$ac_compile"
25644case "(($ac_try" in
25645 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25646 *) ac_try_echo=$ac_try;;
25647esac
25648eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25649 (eval "$ac_compile") 2>conftest.er1
25650 ac_status=$?
25651 grep -v '^ *+' conftest.er1 >conftest.err
25652 rm -f conftest.er1
25653 cat conftest.err >&5
25654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25655 (exit $ac_status); } &&
25656 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
25657 { (case "(($ac_try" in
25658 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25659 *) ac_try_echo=$ac_try;;
25660esac
25661eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25662 (eval "$ac_try") 2>&5
25663 ac_status=$?
25664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25665 (exit $ac_status); }; } &&
25666 { ac_try='test -s conftest.$ac_objext'
25667 { (case "(($ac_try" in
25668 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25669 *) ac_try_echo=$ac_try;;
25670esac
25671eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25672 (eval "$ac_try") 2>&5
25673 ac_status=$?
25674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25675 (exit $ac_status); }; }; then
25676
25677cat >>confdefs.h <<\_ACEOF
25678#define HAVE_CURSES_RESIZE_TERM 1
25679_ACEOF
25680
25681 { echo "$as_me:$LINENO: result: yes" >&5
25682echo "${ECHO_T}yes" >&6; }
25683else
25684 echo "$as_me: failed program was:" >&5
25685sed 's/^/| /' conftest.$ac_ext >&5
25686
25687 { echo "$as_me:$LINENO: result: no" >&5
25688echo "${ECHO_T}no" >&6; }
25689
25690fi
25691
25692rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25693
25694{ echo "$as_me:$LINENO: checking for resizeterm" >&5
25695echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6; }
25696cat >conftest.$ac_ext <<_ACEOF
25697/* confdefs.h. */
25698_ACEOF
25699cat confdefs.h >>conftest.$ac_ext
25700cat >>conftest.$ac_ext <<_ACEOF
25701/* end confdefs.h. */
25702#include <curses.h>
25703int
25704main ()
25705{
25706void *x=resizeterm
25707 ;
25708 return 0;
25709}
25710_ACEOF
25711rm -f conftest.$ac_objext
25712if { (ac_try="$ac_compile"
25713case "(($ac_try" in
25714 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25715 *) ac_try_echo=$ac_try;;
25716esac
25717eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25718 (eval "$ac_compile") 2>conftest.er1
25719 ac_status=$?
25720 grep -v '^ *+' conftest.er1 >conftest.err
25721 rm -f conftest.er1
25722 cat conftest.err >&5
25723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25724 (exit $ac_status); } &&
25725 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
25726 { (case "(($ac_try" in
25727 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25728 *) ac_try_echo=$ac_try;;
25729esac
25730eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25731 (eval "$ac_try") 2>&5
25732 ac_status=$?
25733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25734 (exit $ac_status); }; } &&
25735 { ac_try='test -s conftest.$ac_objext'
25736 { (case "(($ac_try" in
25737 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25738 *) ac_try_echo=$ac_try;;
25739esac
25740eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25741 (eval "$ac_try") 2>&5
25742 ac_status=$?
25743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25744 (exit $ac_status); }; }; then
25745
25746cat >>confdefs.h <<\_ACEOF
25747#define HAVE_CURSES_RESIZETERM 1
25748_ACEOF
25749
25750 { echo "$as_me:$LINENO: result: yes" >&5
25751echo "${ECHO_T}yes" >&6; }
25752else
25753 echo "$as_me: failed program was:" >&5
25754sed 's/^/| /' conftest.$ac_ext >&5
25755
25756 { echo "$as_me:$LINENO: result: no" >&5
25757echo "${ECHO_T}no" >&6; }
25758
25759fi
25760
25761rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25762
25763{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
25764echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
25765if test "${ac_cv_file__dev_ptmx+set}" = set; then
25766 echo $ECHO_N "(cached) $ECHO_C" >&6
25767else
25768 test "$cross_compiling" = yes &&
25769 { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
25770echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
25771 { (exit 1); exit 1; }; }
25772if test -r "/dev/ptmx"; then
25773 ac_cv_file__dev_ptmx=yes
25774else
25775 ac_cv_file__dev_ptmx=no
25776fi
25777fi
25778{ echo "$as_me:$LINENO: result: $ac_cv_file__dev_ptmx" >&5
25779echo "${ECHO_T}$ac_cv_file__dev_ptmx" >&6; }
25780if test $ac_cv_file__dev_ptmx = yes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000025781
25782cat >>confdefs.h <<\_ACEOF
25783#define HAVE_DEV_PTMX 1
25784_ACEOF
25785
Martin v. Löwis24a880b2002-12-31 12:55:15 +000025786fi
25787
Thomas Wouters477c8d52006-05-27 19:21:47 +000025788{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
25789echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025790if test "${ac_cv_file__dev_ptc+set}" = set; then
25791 echo $ECHO_N "(cached) $ECHO_C" >&6
25792else
25793 test "$cross_compiling" = yes &&
25794 { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
25795echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
25796 { (exit 1); exit 1; }; }
25797if test -r "/dev/ptc"; then
25798 ac_cv_file__dev_ptc=yes
25799else
25800 ac_cv_file__dev_ptc=no
25801fi
25802fi
25803{ echo "$as_me:$LINENO: result: $ac_cv_file__dev_ptc" >&5
25804echo "${ECHO_T}$ac_cv_file__dev_ptc" >&6; }
25805if test $ac_cv_file__dev_ptc = yes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000025806
25807cat >>confdefs.h <<\_ACEOF
25808#define HAVE_DEV_PTC 1
25809_ACEOF
25810
Neal Norwitz865400f2003-03-21 01:42:58 +000025811fi
25812
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025813
Thomas Wouters477c8d52006-05-27 19:21:47 +000025814{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
25815echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
25816if test "$cross_compiling" = yes; then
25817 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
25818See \`config.log' for more details." >&5
25819echo "$as_me: error: cannot run test program while cross compiling
25820See \`config.log' for more details." >&2;}
25821 { (exit 1); exit 1; }; }
25822else
25823 cat >conftest.$ac_ext <<_ACEOF
25824/* confdefs.h. */
25825_ACEOF
25826cat confdefs.h >>conftest.$ac_ext
25827cat >>conftest.$ac_ext <<_ACEOF
25828/* end confdefs.h. */
25829#include <stdio.h>
25830#include <stddef.h>
25831#include <string.h>
25832
25833int main()
25834{
25835 char buffer[4];
25836
25837 if(sprintf(buffer, "%zd", (size_t)123) < 0)
25838 return 1;
25839
25840 if (strncmp(buffer, "123", 3))
25841 return 1;
25842
25843 return 0;
25844}
25845_ACEOF
25846rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000025847if { (ac_try="$ac_link"
25848case "(($ac_try" in
25849 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25850 *) ac_try_echo=$ac_try;;
25851esac
25852eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25853 (eval "$ac_link") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000025854 ac_status=$?
25855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25856 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000025857 { (case "(($ac_try" in
25858 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25859 *) ac_try_echo=$ac_try;;
25860esac
25861eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25862 (eval "$ac_try") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000025863 ac_status=$?
25864 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25865 (exit $ac_status); }; }; then
25866 { echo "$as_me:$LINENO: result: yes" >&5
25867echo "${ECHO_T}yes" >&6; }
25868
25869cat >>confdefs.h <<\_ACEOF
25870#define PY_FORMAT_SIZE_T "z"
25871_ACEOF
25872
25873else
25874 echo "$as_me: program exited with status $ac_status" >&5
25875echo "$as_me: failed program was:" >&5
25876sed 's/^/| /' conftest.$ac_ext >&5
25877
25878( exit $ac_status )
25879{ echo "$as_me:$LINENO: result: no" >&5
25880echo "${ECHO_T}no" >&6; }
25881fi
25882rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
25883fi
25884
25885
25886
25887{ echo "$as_me:$LINENO: checking for socklen_t" >&5
25888echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025889if test "${ac_cv_type_socklen_t+set}" = set; then
25890 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000025891else
Martin v. Löwis11437992002-04-12 09:54:03 +000025892 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025893/* confdefs.h. */
25894_ACEOF
25895cat confdefs.h >>conftest.$ac_ext
25896cat >>conftest.$ac_ext <<_ACEOF
25897/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000025898
25899#ifdef HAVE_SYS_TYPES_H
25900#include <sys/types.h>
25901#endif
25902#ifdef HAVE_SYS_SOCKET_H
25903#include <sys/socket.h>
25904#endif
25905
25906
Thomas Wouters477c8d52006-05-27 19:21:47 +000025907typedef socklen_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000025908int
25909main ()
25910{
Thomas Wouters477c8d52006-05-27 19:21:47 +000025911if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000025912 return 0;
Thomas Wouters477c8d52006-05-27 19:21:47 +000025913if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000025914 return 0;
25915 ;
25916 return 0;
25917}
25918_ACEOF
25919rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000025920if { (ac_try="$ac_compile"
25921case "(($ac_try" in
25922 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25923 *) ac_try_echo=$ac_try;;
25924esac
25925eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25926 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025927 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025928 grep -v '^ *+' conftest.er1 >conftest.err
25929 rm -f conftest.er1
25930 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25932 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000025933 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
25934 { (case "(($ac_try" in
25935 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25936 *) ac_try_echo=$ac_try;;
25937esac
25938eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25939 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000025940 ac_status=$?
25941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25942 (exit $ac_status); }; } &&
25943 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000025944 { (case "(($ac_try" in
25945 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25946 *) ac_try_echo=$ac_try;;
25947esac
25948eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25949 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025950 ac_status=$?
25951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25952 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000025953 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000025954else
Martin v. Löwis11437992002-04-12 09:54:03 +000025955 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025956sed 's/^/| /' conftest.$ac_ext >&5
25957
Thomas Wouters477c8d52006-05-27 19:21:47 +000025958 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000025959fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000025960
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025961rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025962fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000025963{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
25964echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025965if test $ac_cv_type_socklen_t = yes; then
25966 :
25967else
Guido van Rossum95713eb2000-05-18 20:53:31 +000025968
Martin v. Löwis01c04012002-11-11 14:58:44 +000025969cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000025970#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000025971_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000025972
25973fi
25974
Michael W. Hudson54241132001-12-07 15:38:26 +000025975
Michael W. Hudson54241132001-12-07 15:38:26 +000025976
25977
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000025978for h in `(cd $srcdir;echo Python/thread_*.h)`
25979do
25980 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
25981done
25982
Michael W. Hudson54241132001-12-07 15:38:26 +000025983
Neal Norwitzd24499d2005-12-18 21:36:39 +000025984SRCDIRS="Parser Grammar Objects Python Modules Mac"
Thomas Wouters477c8d52006-05-27 19:21:47 +000025985{ echo "$as_me:$LINENO: checking for build directories" >&5
25986echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000025987for dir in $SRCDIRS; do
25988 if test ! -d $dir; then
25989 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000025990 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000025991done
Thomas Wouters477c8d52006-05-27 19:21:47 +000025992{ echo "$as_me:$LINENO: result: done" >&5
25993echo "${ECHO_T}done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000025994
Guido van Rossum627b2d71993-12-24 10:39:16 +000025995# generate output files
Thomas Wouters477c8d52006-05-27 19:21:47 +000025996ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000025997
Martin v. Löwis11437992002-04-12 09:54:03 +000025998cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025999# This file is a shell script that caches the results of configure
26000# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000026001# scripts and configure runs, see configure's option --config-cache.
26002# It is not useful on other systems. If it contains results you don't
26003# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026004#
Martin v. Löwis11437992002-04-12 09:54:03 +000026005# config.status only pays attention to the cache file if you give it
26006# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026007#
Skip Montanaro6dead952003-09-25 14:50:04 +000026008# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000026009# loading this file, other *unset* `ac_cv_foo' will be assigned the
26010# following values.
26011
26012_ACEOF
26013
Guido van Rossumf78abae1997-01-21 22:02:36 +000026014# The following way of writing the cache mishandles newlines in values,
26015# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters477c8d52006-05-27 19:21:47 +000026016# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000026017# Ultrix sh set writes to stderr and can't be redirected directly,
26018# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters477c8d52006-05-27 19:21:47 +000026019(
26020 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
26021 eval ac_val=\$$ac_var
26022 case $ac_val in #(
26023 *${as_nl}*)
26024 case $ac_var in #(
26025 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
26026echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
26027 esac
26028 case $ac_var in #(
26029 _ | IFS | as_nl) ;; #(
26030 *) $as_unset $ac_var ;;
26031 esac ;;
26032 esac
26033 done
26034
Martin v. Löwis11437992002-04-12 09:54:03 +000026035 (set) 2>&1 |
Thomas Wouters477c8d52006-05-27 19:21:47 +000026036 case $as_nl`(ac_space=' '; set) 2>&1` in #(
26037 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000026038 # `set' does not quote correctly, so add quotes (double-quote
26039 # substitution turns \\\\ into \\, and sed turns \\ into \).
26040 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026041 "s/'/'\\\\''/g;
26042 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters477c8d52006-05-27 19:21:47 +000026043 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000026044 *)
26045 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters477c8d52006-05-27 19:21:47 +000026046 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000026047 ;;
Thomas Wouters477c8d52006-05-27 19:21:47 +000026048 esac |
26049 sort
26050) |
Martin v. Löwis11437992002-04-12 09:54:03 +000026051 sed '
Thomas Wouters477c8d52006-05-27 19:21:47 +000026052 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000026053 t clear
Thomas Wouters477c8d52006-05-27 19:21:47 +000026054 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000026055 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
26056 t end
Thomas Wouters477c8d52006-05-27 19:21:47 +000026057 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
26058 :end' >>confcache
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000026059if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
26060 if test -w "$cache_file"; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000026061 test "x$cache_file" != "x/dev/null" &&
26062 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
26063echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000026064 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000026065 else
Thomas Wouters477c8d52006-05-27 19:21:47 +000026066 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
26067echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000026068 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026069fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000026070rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000026071
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026072test "x$prefix" = xNONE && prefix=$ac_default_prefix
26073# Let make expand exec_prefix.
26074test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000026075
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026076DEFS=-DHAVE_CONFIG_H
26077
Skip Montanaro6dead952003-09-25 14:50:04 +000026078ac_libobjs=
26079ac_ltlibobjs=
26080for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
26081 # 1. Remove the extension, and $U if already installed.
Thomas Wouters477c8d52006-05-27 19:21:47 +000026082 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
26083 ac_i=`echo "$ac_i" | sed "$ac_script"`
26084 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
26085 # will be set to the directory where LIBOBJS objects are built.
26086 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
26087 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000026088done
26089LIBOBJS=$ac_libobjs
26090
26091LTLIBOBJS=$ac_ltlibobjs
26092
26093
Martin v. Löwis11437992002-04-12 09:54:03 +000026094
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026095: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000026096ac_clean_files_save=$ac_clean_files
26097ac_clean_files="$ac_clean_files $CONFIG_STATUS"
26098{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
26099echo "$as_me: creating $CONFIG_STATUS" >&6;}
26100cat >$CONFIG_STATUS <<_ACEOF
26101#! $SHELL
26102# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000026103# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026104# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000026105# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000026106
Martin v. Löwis11437992002-04-12 09:54:03 +000026107debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000026108ac_cs_recheck=false
26109ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000026110SHELL=\${CONFIG_SHELL-$SHELL}
26111_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000026112
Martin v. Löwis11437992002-04-12 09:54:03 +000026113cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026114## --------------------- ##
26115## M4sh Initialization. ##
26116## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000026117
Martin v. Löwis11437992002-04-12 09:54:03 +000026118# Be Bourne compatible
26119if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26120 emulate sh
26121 NULLCMD=:
Skip Montanaro6dead952003-09-25 14:50:04 +000026122 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
26123 # is contrary to our usage. Disable this feature.
26124 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters477c8d52006-05-27 19:21:47 +000026125 setopt NO_GLOB_SUBST
26126else
26127 case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
Michael W. Hudson54241132001-12-07 15:38:26 +000026128fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026129BIN_SH=xpg4; export BIN_SH # for Tru64
Skip Montanarof0d5f792004-08-15 14:08:23 +000026130DUALCASE=1; export DUALCASE # for MKS sh
Michael W. Hudson54241132001-12-07 15:38:26 +000026131
Michael W. Hudson54241132001-12-07 15:38:26 +000026132
Thomas Wouters477c8d52006-05-27 19:21:47 +000026133# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000026134# Avoid depending upon Character Ranges.
26135as_cr_letters='abcdefghijklmnopqrstuvwxyz'
26136as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
26137as_cr_Letters=$as_cr_letters$as_cr_LETTERS
26138as_cr_digits='0123456789'
26139as_cr_alnum=$as_cr_Letters$as_cr_digits
26140
26141# The user is always right.
26142if test "${PATH_SEPARATOR+set}" != set; then
Skip Montanaro6dead952003-09-25 14:50:04 +000026143 echo "#! /bin/sh" >conf$$.sh
26144 echo "exit 0" >>conf$$.sh
26145 chmod +x conf$$.sh
26146 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026147 PATH_SEPARATOR=';'
26148 else
26149 PATH_SEPARATOR=:
26150 fi
Skip Montanaro6dead952003-09-25 14:50:04 +000026151 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000026152fi
26153
Thomas Wouters477c8d52006-05-27 19:21:47 +000026154# Support unset when possible.
26155if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
26156 as_unset=unset
26157else
26158 as_unset=false
26159fi
Martin v. Löwis11437992002-04-12 09:54:03 +000026160
Thomas Wouters477c8d52006-05-27 19:21:47 +000026161
26162# IFS
26163# We need space, tab and new line, in precisely that order. Quoting is
26164# there to prevent editors from complaining about space-tab.
26165# (If _AS_PATH_WALK were called with IFS unset, it would disable word
26166# splitting by setting IFS to empty value.)
26167as_nl='
26168'
26169IFS=" "" $as_nl"
26170
26171# Find who we are. Look in the path if we contain no directory separator.
26172case $0 in
26173 *[\\/]* ) as_myself=$0 ;;
26174 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000026175for as_dir in $PATH
26176do
26177 IFS=$as_save_IFS
26178 test -z "$as_dir" && as_dir=.
26179 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
26180done
Thomas Wouters477c8d52006-05-27 19:21:47 +000026181IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000026182
Thomas Wouters477c8d52006-05-27 19:21:47 +000026183 ;;
26184esac
26185# We did not find ourselves, most probably we were run as `sh COMMAND'
26186# in which case we are not to be found in the path.
26187if test "x$as_myself" = x; then
26188 as_myself=$0
26189fi
26190if test ! -f "$as_myself"; then
26191 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
26192 { (exit 1); exit 1; }
26193fi
26194
26195# Work around bugs in pre-3.0 UWIN ksh.
26196for as_var in ENV MAIL MAILPATH
26197do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
26198done
26199PS1='$ '
26200PS2='> '
26201PS4='+ '
26202
26203# NLS nuisances.
26204for as_var in \
26205 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
26206 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
26207 LC_TELEPHONE LC_TIME
Martin v. Löwis11437992002-04-12 09:54:03 +000026208do
Thomas Wouters477c8d52006-05-27 19:21:47 +000026209 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
26210 eval $as_var=C; export $as_var
26211 else
26212 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
26213 fi
26214done
26215
26216# Required to use basename.
26217if expr a : '\(a\)' >/dev/null 2>&1 &&
26218 test "X`expr 00001 : '.*\(...\)'`" = X001; then
26219 as_expr=expr
26220else
26221 as_expr=false
26222fi
26223
26224if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
26225 as_basename=basename
26226else
26227 as_basename=false
26228fi
26229
26230
26231# Name of the executable.
26232as_me=`$as_basename -- "$0" ||
26233$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
26234 X"$0" : 'X\(//\)$' \| \
26235 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
26236echo X/"$0" |
26237 sed '/^.*\/\([^/][^/]*\)\/*$/{
26238 s//\1/
26239 q
26240 }
26241 /^X\/\(\/\/\)$/{
26242 s//\1/
26243 q
26244 }
26245 /^X\/\(\/\).*/{
26246 s//\1/
26247 q
26248 }
26249 s/.*/./; q'`
26250
26251# CDPATH.
26252$as_unset CDPATH
26253
26254
26255
Martin v. Löwis11437992002-04-12 09:54:03 +000026256 as_lineno_1=$LINENO
26257 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000026258 test "x$as_lineno_1" != "x$as_lineno_2" &&
Thomas Wouters477c8d52006-05-27 19:21:47 +000026259 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000026260
Martin v. Löwis11437992002-04-12 09:54:03 +000026261 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
26262 # uniformly replaced by the line number. The first 'sed' inserts a
Thomas Wouters477c8d52006-05-27 19:21:47 +000026263 # line-number line after each line using $LINENO; the second 'sed'
26264 # does the real work. The second script uses 'N' to pair each
26265 # line-number line with the line containing $LINENO, and appends
26266 # trailing '-' during substitution so that $LINENO is not a special
26267 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000026268 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Thomas Wouters477c8d52006-05-27 19:21:47 +000026269 # scripts with optimization help from Paolo Bonzini. Blame Lee
26270 # E. McMahon (1931-1989) for sed's syntax. :-)
26271 sed -n '
26272 p
26273 /[$]LINENO/=
26274 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000026275 sed '
Thomas Wouters477c8d52006-05-27 19:21:47 +000026276 s/[$]LINENO.*/&-/
26277 t lineno
26278 b
26279 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000026280 N
Thomas Wouters477c8d52006-05-27 19:21:47 +000026281 :loop
26282 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000026283 t loop
Thomas Wouters477c8d52006-05-27 19:21:47 +000026284 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000026285 ' >$as_me.lineno &&
Thomas Wouters477c8d52006-05-27 19:21:47 +000026286 chmod +x "$as_me.lineno" ||
26287 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000026288 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000026289
Martin v. Löwis11437992002-04-12 09:54:03 +000026290 # Don't try to exec as it changes $[0], causing all sort of problems
26291 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters477c8d52006-05-27 19:21:47 +000026292 # original and so on. Autoconf is especially sensitive to this).
26293 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000026294 # Exit status is that of the last command.
26295 exit
26296}
26297
26298
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000026299if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000026300 as_dirname=dirname
26301else
26302 as_dirname=false
26303fi
26304
26305ECHO_C= ECHO_N= ECHO_T=
26306case `echo -n x` in
26307-n*)
26308 case `echo 'x\c'` in
26309 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
26310 *) ECHO_C='\c';;
26311 esac;;
26312*)
26313 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000026314esac
26315
Thomas Wouters477c8d52006-05-27 19:21:47 +000026316if expr a : '\(a\)' >/dev/null 2>&1 &&
26317 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026318 as_expr=expr
26319else
26320 as_expr=false
26321fi
26322
26323rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters477c8d52006-05-27 19:21:47 +000026324if test -d conf$$.dir; then
26325 rm -f conf$$.dir/conf$$.file
26326else
26327 rm -f conf$$.dir
26328 mkdir conf$$.dir
26329fi
Martin v. Löwis11437992002-04-12 09:54:03 +000026330echo >conf$$.file
26331if ln -s conf$$.file conf$$ 2>/dev/null; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000026332 as_ln_s='ln -s'
26333 # ... but there are two gotchas:
26334 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
26335 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
26336 # In both cases, we have to default to `cp -p'.
26337 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +000026338 as_ln_s='cp -p'
Martin v. Löwis11437992002-04-12 09:54:03 +000026339elif ln conf$$.file conf$$ 2>/dev/null; then
26340 as_ln_s=ln
26341else
26342 as_ln_s='cp -p'
26343fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026344rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
26345rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000026346
Skip Montanaro6dead952003-09-25 14:50:04 +000026347if mkdir -p . 2>/dev/null; then
26348 as_mkdir_p=:
26349else
Skip Montanarof0d5f792004-08-15 14:08:23 +000026350 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000026351 as_mkdir_p=false
26352fi
26353
Thomas Wouters477c8d52006-05-27 19:21:47 +000026354# Find out whether ``test -x'' works. Don't use a zero-byte file, as
26355# systems may use methods other than mode bits to determine executability.
26356cat >conf$$.file <<_ASEOF
26357#! /bin/sh
26358exit 0
26359_ASEOF
26360chmod +x conf$$.file
26361if test -x conf$$.file >/dev/null 2>&1; then
26362 as_executable_p="test -x"
26363else
26364 as_executable_p=:
26365fi
26366rm -f conf$$.file
Martin v. Löwis11437992002-04-12 09:54:03 +000026367
26368# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000026369as_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 +000026370
26371# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000026372as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000026373
26374
Martin v. Löwis11437992002-04-12 09:54:03 +000026375exec 6>&1
26376
Thomas Wouters477c8d52006-05-27 19:21:47 +000026377# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000026378# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters477c8d52006-05-27 19:21:47 +000026379# values after options handling.
26380ac_log="
Guido van Rossum0c4eb622006-03-30 16:19:24 +000026381This file was extended by python $as_me 3.0, which was
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026382generated by GNU Autoconf 2.60. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000026383
26384 CONFIG_FILES = $CONFIG_FILES
26385 CONFIG_HEADERS = $CONFIG_HEADERS
26386 CONFIG_LINKS = $CONFIG_LINKS
26387 CONFIG_COMMANDS = $CONFIG_COMMANDS
26388 $ $0 $@
26389
Thomas Wouters477c8d52006-05-27 19:21:47 +000026390on `(hostname || uname -n) 2>/dev/null | sed 1q`
26391"
26392
Martin v. Löwis11437992002-04-12 09:54:03 +000026393_ACEOF
26394
Thomas Wouters477c8d52006-05-27 19:21:47 +000026395cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026396# Files that config.status was made for.
Thomas Wouters477c8d52006-05-27 19:21:47 +000026397config_files="$ac_config_files"
26398config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000026399
Thomas Wouters477c8d52006-05-27 19:21:47 +000026400_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026401
26402cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026403ac_cs_usage="\
26404\`$as_me' instantiates files from templates according to the
26405current configuration.
26406
26407Usage: $0 [OPTIONS] [FILE]...
26408
26409 -h, --help print this help, then exit
26410 -V, --version print version number, then exit
Skip Montanaro6dead952003-09-25 14:50:04 +000026411 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000026412 -d, --debug don't remove temporary files
26413 --recheck update $as_me by reconfiguring in the same conditions
26414 --file=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000026415 instantiate the configuration file FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000026416 --header=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000026417 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000026418
26419Configuration files:
26420$config_files
26421
26422Configuration headers:
26423$config_headers
26424
26425Report bugs to <bug-autoconf@gnu.org>."
Martin v. Löwis11437992002-04-12 09:54:03 +000026426
Thomas Wouters477c8d52006-05-27 19:21:47 +000026427_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026428cat >>$CONFIG_STATUS <<_ACEOF
26429ac_cs_version="\\
Guido van Rossum0c4eb622006-03-30 16:19:24 +000026430python config.status 3.0
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026431configured by $0, generated by GNU Autoconf 2.60,
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000026432 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000026433
Thomas Wouters477c8d52006-05-27 19:21:47 +000026434Copyright (C) 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000026435This config.status script is free software; the Free Software Foundation
26436gives unlimited permission to copy, distribute and modify it."
Thomas Wouters477c8d52006-05-27 19:21:47 +000026437
26438ac_pwd='$ac_pwd'
26439srcdir='$srcdir'
26440INSTALL='$INSTALL'
Martin v. Löwis11437992002-04-12 09:54:03 +000026441_ACEOF
26442
26443cat >>$CONFIG_STATUS <<\_ACEOF
26444# If no file are specified by the user, then we need to provide default
26445# value. By we need to know if files were specified by the user.
26446ac_need_defaults=:
26447while test $# != 0
26448do
26449 case $1 in
26450 --*=*)
Thomas Wouters477c8d52006-05-27 19:21:47 +000026451 ac_option=`expr "X$1" : 'X\([^=]*\)='`
26452 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000026453 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000026454 ;;
Thomas Wouters477c8d52006-05-27 19:21:47 +000026455 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000026456 ac_option=$1
26457 ac_optarg=$2
26458 ac_shift=shift
26459 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026460 esac
26461
Skip Montanaro6dead952003-09-25 14:50:04 +000026462 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000026463 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000026464 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
26465 ac_cs_recheck=: ;;
Thomas Wouters477c8d52006-05-27 19:21:47 +000026466 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
26467 echo "$ac_cs_version"; exit ;;
26468 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000026469 debug=: ;;
26470 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000026471 $ac_shift
26472 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000026473 ac_need_defaults=false;;
26474 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000026475 $ac_shift
26476 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000026477 ac_need_defaults=false;;
Thomas Wouters477c8d52006-05-27 19:21:47 +000026478 --he | --h)
26479 # Conflict between --help and --header
26480 { echo "$as_me: error: ambiguous option: $1
26481Try \`$0 --help' for more information." >&2
26482 { (exit 1); exit 1; }; };;
26483 --help | --hel | -h )
26484 echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000026485 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
26486 | -silent | --silent | --silen | --sile | --sil | --si | --s)
26487 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026488
26489 # This is an error.
Thomas Wouters477c8d52006-05-27 19:21:47 +000026490 -*) { echo "$as_me: error: unrecognized option: $1
26491Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000026492 { (exit 1); exit 1; }; } ;;
26493
Thomas Wouters477c8d52006-05-27 19:21:47 +000026494 *) ac_config_targets="$ac_config_targets $1"
26495 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026496
26497 esac
26498 shift
26499done
26500
Skip Montanaro6dead952003-09-25 14:50:04 +000026501ac_configure_extra_args=
26502
26503if $ac_cs_silent; then
26504 exec 6>/dev/null
26505 ac_configure_extra_args="$ac_configure_extra_args --silent"
26506fi
26507
26508_ACEOF
26509cat >>$CONFIG_STATUS <<_ACEOF
26510if \$ac_cs_recheck; then
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000026511 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 +000026512 CONFIG_SHELL=$SHELL
26513 export CONFIG_SHELL
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000026514 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000026515fi
26516
Martin v. Löwis11437992002-04-12 09:54:03 +000026517_ACEOF
Thomas Wouters477c8d52006-05-27 19:21:47 +000026518cat >>$CONFIG_STATUS <<\_ACEOF
26519exec 5>>config.log
26520{
26521 echo
26522 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
26523## Running $as_me. ##
26524_ASBOX
26525 echo "$ac_log"
26526} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026527
Thomas Wouters477c8d52006-05-27 19:21:47 +000026528_ACEOF
26529cat >>$CONFIG_STATUS <<_ACEOF
26530_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026531
26532cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters477c8d52006-05-27 19:21:47 +000026533
26534# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000026535for ac_config_target in $ac_config_targets
26536do
Thomas Wouters477c8d52006-05-27 19:21:47 +000026537 case $ac_config_target in
26538 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
Thomas Wouters73e5a5b2006-06-08 15:35:45 +000026539 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
26540 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
26541 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Thomas Wouters477c8d52006-05-27 19:21:47 +000026542 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
26543 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
26544
Martin v. Löwis11437992002-04-12 09:54:03 +000026545 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
26546echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
26547 { (exit 1); exit 1; }; };;
26548 esac
26549done
26550
Thomas Wouters477c8d52006-05-27 19:21:47 +000026551
Martin v. Löwis11437992002-04-12 09:54:03 +000026552# If the user did not use the arguments to specify the items to instantiate,
26553# then the envvar interface is used. Set only those that are not.
26554# We use the long form for the default assignment because of an extremely
26555# bizarre bug on SunOS 4.1.3.
26556if $ac_need_defaults; then
26557 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
26558 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
26559fi
26560
Skip Montanaro6dead952003-09-25 14:50:04 +000026561# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters477c8d52006-05-27 19:21:47 +000026562# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000026563# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters477c8d52006-05-27 19:21:47 +000026564# Hook for its removal unless debugging.
26565# Note that there is a small window in which the directory will not be cleaned:
26566# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000026567$debug ||
26568{
Thomas Wouters477c8d52006-05-27 19:21:47 +000026569 tmp=
26570 trap 'exit_status=$?
26571 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
26572' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000026573 trap '{ (exit 1); exit 1; }' 1 2 13 15
26574}
Martin v. Löwis11437992002-04-12 09:54:03 +000026575# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000026576
Martin v. Löwis11437992002-04-12 09:54:03 +000026577{
Thomas Wouters477c8d52006-05-27 19:21:47 +000026578 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000026579 test -n "$tmp" && test -d "$tmp"
26580} ||
26581{
Thomas Wouters477c8d52006-05-27 19:21:47 +000026582 tmp=./conf$$-$RANDOM
26583 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000026584} ||
26585{
Skip Montanaro6dead952003-09-25 14:50:04 +000026586 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000026587 { (exit 1); exit 1; }
26588}
26589
Martin v. Löwis11437992002-04-12 09:54:03 +000026590#
Thomas Wouters477c8d52006-05-27 19:21:47 +000026591# Set up the sed scripts for CONFIG_FILES section.
Martin v. Löwis11437992002-04-12 09:54:03 +000026592#
26593
26594# No need to generate the scripts if there are no CONFIG_FILES.
26595# This happens for instance when ./config.status config.h
Thomas Wouters477c8d52006-05-27 19:21:47 +000026596if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026597
26598_ACEOF
26599
Thomas Wouters477c8d52006-05-27 19:21:47 +000026600
26601
26602ac_delim='%!_!# '
26603for ac_last_try in false false false false false :; do
26604 cat >conf$$subs.sed <<_ACEOF
26605SHELL!$SHELL$ac_delim
26606PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
26607PACKAGE_NAME!$PACKAGE_NAME$ac_delim
26608PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
26609PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
26610PACKAGE_STRING!$PACKAGE_STRING$ac_delim
26611PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
26612exec_prefix!$exec_prefix$ac_delim
26613prefix!$prefix$ac_delim
26614program_transform_name!$program_transform_name$ac_delim
26615bindir!$bindir$ac_delim
26616sbindir!$sbindir$ac_delim
26617libexecdir!$libexecdir$ac_delim
26618datarootdir!$datarootdir$ac_delim
26619datadir!$datadir$ac_delim
26620sysconfdir!$sysconfdir$ac_delim
26621sharedstatedir!$sharedstatedir$ac_delim
26622localstatedir!$localstatedir$ac_delim
26623includedir!$includedir$ac_delim
26624oldincludedir!$oldincludedir$ac_delim
26625docdir!$docdir$ac_delim
26626infodir!$infodir$ac_delim
26627htmldir!$htmldir$ac_delim
26628dvidir!$dvidir$ac_delim
26629pdfdir!$pdfdir$ac_delim
26630psdir!$psdir$ac_delim
26631libdir!$libdir$ac_delim
26632localedir!$localedir$ac_delim
26633mandir!$mandir$ac_delim
26634DEFS!$DEFS$ac_delim
26635ECHO_C!$ECHO_C$ac_delim
26636ECHO_N!$ECHO_N$ac_delim
26637ECHO_T!$ECHO_T$ac_delim
26638LIBS!$LIBS$ac_delim
26639build_alias!$build_alias$ac_delim
26640host_alias!$host_alias$ac_delim
26641target_alias!$target_alias$ac_delim
26642VERSION!$VERSION$ac_delim
26643SOVERSION!$SOVERSION$ac_delim
26644CONFIG_ARGS!$CONFIG_ARGS$ac_delim
26645UNIVERSALSDK!$UNIVERSALSDK$ac_delim
26646PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
26647PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
26648PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
26649PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
26650FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
26651FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
Thomas Wouters73e5a5b2006-06-08 15:35:45 +000026652FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
26653FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
26654FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
Thomas Wouters477c8d52006-05-27 19:21:47 +000026655MACHDEP!$MACHDEP$ac_delim
26656SGI_ABI!$SGI_ABI$ac_delim
26657EXTRAPLATDIR!$EXTRAPLATDIR$ac_delim
26658EXTRAMACHDEPPATH!$EXTRAMACHDEPPATH$ac_delim
26659CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
26660EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim
26661CC!$CC$ac_delim
26662CFLAGS!$CFLAGS$ac_delim
26663LDFLAGS!$LDFLAGS$ac_delim
26664CPPFLAGS!$CPPFLAGS$ac_delim
26665ac_ct_CC!$ac_ct_CC$ac_delim
26666EXEEXT!$EXEEXT$ac_delim
26667OBJEXT!$OBJEXT$ac_delim
26668CXX!$CXX$ac_delim
26669MAINCC!$MAINCC$ac_delim
26670CPP!$CPP$ac_delim
26671GREP!$GREP$ac_delim
26672EGREP!$EGREP$ac_delim
26673BUILDEXEEXT!$BUILDEXEEXT$ac_delim
26674LIBRARY!$LIBRARY$ac_delim
26675LDLIBRARY!$LDLIBRARY$ac_delim
26676DLLLIBRARY!$DLLLIBRARY$ac_delim
26677BLDLIBRARY!$BLDLIBRARY$ac_delim
26678LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
26679INSTSONAME!$INSTSONAME$ac_delim
26680RUNSHARED!$RUNSHARED$ac_delim
26681LINKCC!$LINKCC$ac_delim
26682RANLIB!$RANLIB$ac_delim
26683AR!$AR$ac_delim
26684SVNVERSION!$SVNVERSION$ac_delim
26685INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
26686INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
26687INSTALL_DATA!$INSTALL_DATA$ac_delim
26688LN!$LN$ac_delim
26689OPT!$OPT$ac_delim
26690BASECFLAGS!$BASECFLAGS$ac_delim
26691OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
26692LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
26693SO!$SO$ac_delim
26694LDSHARED!$LDSHARED$ac_delim
26695BLDSHARED!$BLDSHARED$ac_delim
26696CCSHARED!$CCSHARED$ac_delim
26697LINKFORSHARED!$LINKFORSHARED$ac_delim
26698CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
26699SHLIBS!$SHLIBS$ac_delim
26700USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
26701SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
Thomas Wouters477c8d52006-05-27 19:21:47 +000026702_ACEOF
26703
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000026704 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000026705 break
26706 elif $ac_last_try; then
26707 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
26708echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
26709 { (exit 1); exit 1; }; }
26710 else
26711 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000026712 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026713done
26714
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000026715ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
26716if test -n "$ac_eof"; then
26717 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
26718 ac_eof=`expr $ac_eof + 1`
Thomas Wouters477c8d52006-05-27 19:21:47 +000026719fi
26720
26721cat >>$CONFIG_STATUS <<_ACEOF
26722cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
26723/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
26724_ACEOF
26725sed '
26726s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
26727s/^/s,@/; s/!/@,|#_!!_#|/
26728:n
26729t n
26730s/'"$ac_delim"'$/,g/; t
26731s/$/\\/; p
26732N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
26733' >>$CONFIG_STATUS <conf$$subs.sed
26734rm -f conf$$subs.sed
26735cat >>$CONFIG_STATUS <<_ACEOF
26736CEOF$ac_eof
26737_ACEOF
26738
26739
26740ac_delim='%!_!# '
26741for ac_last_try in false false false false false :; do
26742 cat >conf$$subs.sed <<_ACEOF
Thomas Wouters73e5a5b2006-06-08 15:35:45 +000026743USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
26744LDLAST!$LDLAST$ac_delim
26745THREADOBJ!$THREADOBJ$ac_delim
Thomas Wouters477c8d52006-05-27 19:21:47 +000026746DLINCLDIR!$DLINCLDIR$ac_delim
26747DYNLOADFILE!$DYNLOADFILE$ac_delim
26748MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
26749TRUE!$TRUE$ac_delim
26750LIBOBJS!$LIBOBJS$ac_delim
26751HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
26752HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
26753HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
26754HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
26755HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
26756LIBM!$LIBM$ac_delim
26757LIBC!$LIBC$ac_delim
26758UNICODE_OBJS!$UNICODE_OBJS$ac_delim
26759THREADHEADERS!$THREADHEADERS$ac_delim
26760SRCDIRS!$SRCDIRS$ac_delim
26761LTLIBOBJS!$LTLIBOBJS$ac_delim
26762_ACEOF
26763
Thomas Wouters73e5a5b2006-06-08 15:35:45 +000026764 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 19; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000026765 break
26766 elif $ac_last_try; then
26767 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
26768echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
26769 { (exit 1); exit 1; }; }
26770 else
26771 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
26772 fi
26773done
26774
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000026775ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
26776if test -n "$ac_eof"; then
26777 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
26778 ac_eof=`expr $ac_eof + 1`
Thomas Wouters477c8d52006-05-27 19:21:47 +000026779fi
26780
26781cat >>$CONFIG_STATUS <<_ACEOF
26782cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
26783/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
26784_ACEOF
26785sed '
26786s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
26787s/^/s,@/; s/!/@,|#_!!_#|/
26788:n
26789t n
26790s/'"$ac_delim"'$/,g/; t
26791s/$/\\/; p
26792N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
26793' >>$CONFIG_STATUS <conf$$subs.sed
26794rm -f conf$$subs.sed
26795cat >>$CONFIG_STATUS <<_ACEOF
26796:end
26797s/|#_!!_#|//g
26798CEOF$ac_eof
26799_ACEOF
26800
26801
26802# VPATH may cause trouble with some makes, so we remove $(srcdir),
26803# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
26804# trailing colons and then remove the whole line if VPATH becomes empty
26805# (actually we leave an empty line to preserve line numbers).
26806if test "x$srcdir" = x.; then
26807 ac_vpsub='/^[ ]*VPATH[ ]*=/{
26808s/:*\$(srcdir):*/:/
26809s/:*\${srcdir}:*/:/
26810s/:*@srcdir@:*/:/
26811s/^\([^=]*=[ ]*\):*/\1/
26812s/:*$//
26813s/^[^=]*=[ ]*$//
26814}'
26815fi
26816
26817cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026818fi # test -n "$CONFIG_FILES"
26819
Thomas Wouters477c8d52006-05-27 19:21:47 +000026820
26821for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
26822do
26823 case $ac_tag in
26824 :[FHLC]) ac_mode=$ac_tag; continue;;
26825 esac
26826 case $ac_mode$ac_tag in
26827 :[FHL]*:*);;
26828 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
26829echo "$as_me: error: Invalid tag $ac_tag." >&2;}
26830 { (exit 1); exit 1; }; };;
26831 :[FH]-) ac_tag=-:-;;
26832 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
26833 esac
26834 ac_save_IFS=$IFS
26835 IFS=:
26836 set x $ac_tag
26837 IFS=$ac_save_IFS
26838 shift
26839 ac_file=$1
26840 shift
26841
26842 case $ac_mode in
26843 :L) ac_source=$1;;
26844 :[FH])
26845 ac_file_inputs=
26846 for ac_f
26847 do
26848 case $ac_f in
26849 -) ac_f="$tmp/stdin";;
26850 *) # Look for the file first in the build tree, then in the source tree
26851 # (if the path is not absolute). The absolute path cannot be DOS-style,
26852 # because $ac_f cannot contain `:'.
26853 test -f "$ac_f" ||
26854 case $ac_f in
26855 [\\/$]*) false;;
26856 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
26857 esac ||
26858 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
26859echo "$as_me: error: cannot find input file: $ac_f" >&2;}
26860 { (exit 1); exit 1; }; };;
26861 esac
26862 ac_file_inputs="$ac_file_inputs $ac_f"
26863 done
26864
26865 # Let's still pretend it is `configure' which instantiates (i.e., don't
26866 # use $as_me), people would be surprised to read:
26867 # /* config.h. Generated by config.status. */
26868 configure_input="Generated from "`IFS=:
26869 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
26870 if test x"$ac_file" != x-; then
26871 configure_input="$ac_file. $configure_input"
26872 { echo "$as_me:$LINENO: creating $ac_file" >&5
26873echo "$as_me: creating $ac_file" >&6;}
26874 fi
26875
26876 case $ac_tag in
26877 *:-:* | *:-) cat >"$tmp/stdin";;
26878 esac
26879 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026880 esac
26881
Thomas Wouters477c8d52006-05-27 19:21:47 +000026882 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000026883$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026884 X"$ac_file" : 'X\(//\)[^/]' \| \
26885 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters477c8d52006-05-27 19:21:47 +000026886 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +000026887echo X"$ac_file" |
Thomas Wouters477c8d52006-05-27 19:21:47 +000026888 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26889 s//\1/
26890 q
26891 }
26892 /^X\(\/\/\)[^/].*/{
26893 s//\1/
26894 q
26895 }
26896 /^X\(\/\/\)$/{
26897 s//\1/
26898 q
26899 }
26900 /^X\(\/\).*/{
26901 s//\1/
26902 q
26903 }
26904 s/.*/./; q'`
26905 { as_dir="$ac_dir"
26906 case $as_dir in #(
26907 -*) as_dir=./$as_dir;;
26908 esac
26909 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000026910 as_dirs=
Thomas Wouters477c8d52006-05-27 19:21:47 +000026911 while :; do
26912 case $as_dir in #(
26913 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
26914 *) as_qdir=$as_dir;;
26915 esac
26916 as_dirs="'$as_qdir' $as_dirs"
26917 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000026918$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026919 X"$as_dir" : 'X\(//\)[^/]' \| \
26920 X"$as_dir" : 'X\(//\)$' \| \
Thomas Wouters477c8d52006-05-27 19:21:47 +000026921 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Skip Montanaro6dead952003-09-25 14:50:04 +000026922echo X"$as_dir" |
Thomas Wouters477c8d52006-05-27 19:21:47 +000026923 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26924 s//\1/
26925 q
26926 }
26927 /^X\(\/\/\)[^/].*/{
26928 s//\1/
26929 q
26930 }
26931 /^X\(\/\/\)$/{
26932 s//\1/
26933 q
26934 }
26935 /^X\(\/\).*/{
26936 s//\1/
26937 q
26938 }
26939 s/.*/./; q'`
26940 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000026941 done
Thomas Wouters477c8d52006-05-27 19:21:47 +000026942 test -z "$as_dirs" || eval "mkdir $as_dirs"
26943 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
26944echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000026945 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026946 ac_builddir=.
26947
Thomas Wouters477c8d52006-05-27 19:21:47 +000026948case "$ac_dir" in
26949.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
26950*)
Martin v. Löwis11437992002-04-12 09:54:03 +000026951 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Thomas Wouters477c8d52006-05-27 19:21:47 +000026952 # A ".." for each directory in $ac_dir_suffix.
26953 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
26954 case $ac_top_builddir_sub in
26955 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
26956 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
26957 esac ;;
26958esac
26959ac_abs_top_builddir=$ac_pwd
26960ac_abs_builddir=$ac_pwd$ac_dir_suffix
26961# for backward compatibility:
26962ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000026963
26964case $srcdir in
Thomas Wouters477c8d52006-05-27 19:21:47 +000026965 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000026966 ac_srcdir=.
Thomas Wouters477c8d52006-05-27 19:21:47 +000026967 ac_top_srcdir=$ac_top_builddir_sub
26968 ac_abs_top_srcdir=$ac_pwd ;;
26969 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000026970 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters477c8d52006-05-27 19:21:47 +000026971 ac_top_srcdir=$srcdir
26972 ac_abs_top_srcdir=$srcdir ;;
26973 *) # Relative name.
26974 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
26975 ac_top_srcdir=$ac_top_build_prefix$srcdir
26976 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026977esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000026978ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000026979
Martin v. Löwis11437992002-04-12 09:54:03 +000026980
Thomas Wouters477c8d52006-05-27 19:21:47 +000026981 case $ac_mode in
26982 :F)
26983 #
26984 # CONFIG_FILE
26985 #
Martin v. Löwis11437992002-04-12 09:54:03 +000026986
26987 case $INSTALL in
26988 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters477c8d52006-05-27 19:21:47 +000026989 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026990 esac
Martin v. Löwis11437992002-04-12 09:54:03 +000026991_ACEOF
Thomas Wouters477c8d52006-05-27 19:21:47 +000026992
26993cat >>$CONFIG_STATUS <<\_ACEOF
26994# If the template does not know about datarootdir, expand it.
26995# FIXME: This hack should be removed a few years after 2.60.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000026996ac_datarootdir_hack=; ac_datarootdir_seen=
Thomas Wouters477c8d52006-05-27 19:21:47 +000026997
26998case `sed -n '/datarootdir/ {
26999 p
27000 q
27001}
27002/@datadir@/p
27003/@docdir@/p
27004/@infodir@/p
27005/@localedir@/p
27006/@mandir@/p
27007' $ac_file_inputs` in
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000027008*datarootdir*) ac_datarootdir_seen=yes;;
Thomas Wouters477c8d52006-05-27 19:21:47 +000027009*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
27010 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
27011echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
27012_ACEOF
27013cat >>$CONFIG_STATUS <<_ACEOF
27014 ac_datarootdir_hack='
27015 s&@datadir@&$datadir&g
27016 s&@docdir@&$docdir&g
27017 s&@infodir@&$infodir&g
27018 s&@localedir@&$localedir&g
27019 s&@mandir@&$mandir&g
27020 s&\\\${datarootdir}&$datarootdir&g' ;;
27021esac
27022_ACEOF
27023
27024# Neutralize VPATH when `$srcdir' = `.'.
27025# Shell code in configure.ac might set extrasub.
27026# FIXME: do we really want to maintain this feature?
Martin v. Löwis11437992002-04-12 09:54:03 +000027027cat >>$CONFIG_STATUS <<_ACEOF
27028 sed "$ac_vpsub
27029$extrasub
27030_ACEOF
27031cat >>$CONFIG_STATUS <<\_ACEOF
27032:t
27033/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Thomas Wouters477c8d52006-05-27 19:21:47 +000027034s&@configure_input@&$configure_input&;t t
27035s&@top_builddir@&$ac_top_builddir_sub&;t t
27036s&@srcdir@&$ac_srcdir&;t t
27037s&@abs_srcdir@&$ac_abs_srcdir&;t t
27038s&@top_srcdir@&$ac_top_srcdir&;t t
27039s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
27040s&@builddir@&$ac_builddir&;t t
27041s&@abs_builddir@&$ac_abs_builddir&;t t
27042s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
27043s&@INSTALL@&$ac_INSTALL&;t t
27044$ac_datarootdir_hack
27045" $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 +000027046
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000027047test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
27048 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
Thomas Wouters0e3f5912006-08-11 14:57:12 +000027049 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000027050 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
27051which seems to be undefined. Please make sure it is defined." >&5
27052echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
27053which seems to be undefined. Please make sure it is defined." >&2;}
27054
Thomas Wouters477c8d52006-05-27 19:21:47 +000027055 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000027056 case $ac_file in
Thomas Wouters477c8d52006-05-27 19:21:47 +000027057 -) cat "$tmp/out"; rm -f "$tmp/out";;
27058 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027059 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000027060 ;;
27061 :H)
27062 #
27063 # CONFIG_HEADER
27064 #
Martin v. Löwis11437992002-04-12 09:54:03 +000027065_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027066
Thomas Wouters477c8d52006-05-27 19:21:47 +000027067# Transform confdefs.h into a sed script `conftest.defines', that
27068# substitutes the proper values into config.h.in to produce config.h.
27069rm -f conftest.defines conftest.tail
27070# First, append a space to every undef/define line, to ease matching.
27071echo 's/$/ /' >conftest.defines
27072# Then, protect against being on the right side of a sed subst, or in
27073# an unquoted here document, in config.status. If some macros were
27074# called several times there might be several #defines for the same
27075# symbol, which is useless. But do not sort them, since the last
27076# AC_DEFINE must be honored.
27077ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000027078# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
27079# NAME is the cpp macro being defined, VALUE is the value it is being given.
27080# PARAMS is the parameter list in the macro definition--in most cases, it's
27081# just an empty string.
27082ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
27083ac_dB='\\)[ (].*,\\1define\\2'
27084ac_dC=' '
27085ac_dD=' ,'
27086
Thomas Wouters477c8d52006-05-27 19:21:47 +000027087uniq confdefs.h |
27088 sed -n '
27089 t rset
27090 :rset
27091 s/^[ ]*#[ ]*define[ ][ ]*//
27092 t ok
27093 d
27094 :ok
27095 s/[\\&,]/\\&/g
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000027096 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
27097 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
Thomas Wouters477c8d52006-05-27 19:21:47 +000027098 ' >>conftest.defines
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027099
Thomas Wouters477c8d52006-05-27 19:21:47 +000027100# Remove the space that was appended to ease matching.
27101# Then replace #undef with comments. This is necessary, for
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027102# example, in the case of _POSIX_SOURCE, which is predefined and required
27103# on some systems where configure will not decide to define it.
Thomas Wouters477c8d52006-05-27 19:21:47 +000027104# (The regexp can be short, since the line contains either #define or #undef.)
27105echo 's/ $//
27106s,^[ #]*u.*,/* & */,' >>conftest.defines
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027107
Thomas Wouters477c8d52006-05-27 19:21:47 +000027108# Break up conftest.defines:
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000027109ac_max_sed_lines=50
Thomas Wouters477c8d52006-05-27 19:21:47 +000027110
27111# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
27112# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
27113# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
27114# et cetera.
27115ac_in='$ac_file_inputs'
27116ac_out='"$tmp/out1"'
27117ac_nxt='"$tmp/out2"'
27118
27119while :
Jack Jansendd19cf82001-12-06 22:36:17 +000027120do
Thomas Wouters477c8d52006-05-27 19:21:47 +000027121 # Write a here document:
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000027122 cat >>$CONFIG_STATUS <<_ACEOF
27123 # First, check the format of the line:
27124 cat >"\$tmp/defines.sed" <<\\CEOF
27125/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
27126/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
Thomas Wouters477c8d52006-05-27 19:21:47 +000027127b
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000027128:def
27129_ACEOF
Thomas Wouters477c8d52006-05-27 19:21:47 +000027130 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000027131 echo 'CEOF
Thomas Wouters477c8d52006-05-27 19:21:47 +000027132 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
27133 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
27134 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
27135 grep . conftest.tail >/dev/null || break
Martin v. Löwis11437992002-04-12 09:54:03 +000027136 rm -f conftest.defines
27137 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000027138done
Thomas Wouters477c8d52006-05-27 19:21:47 +000027139rm -f conftest.defines conftest.tail
Jack Jansendd19cf82001-12-06 22:36:17 +000027140
Thomas Wouters477c8d52006-05-27 19:21:47 +000027141echo "ac_result=$ac_in" >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000027142cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027143 if test x"$ac_file" != x-; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000027144 echo "/* $configure_input */" >"$tmp/config.h"
27145 cat "$ac_result" >>"$tmp/config.h"
27146 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027147 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
27148echo "$as_me: $ac_file is unchanged" >&6;}
27149 else
Martin v. Löwis11437992002-04-12 09:54:03 +000027150 rm -f $ac_file
Thomas Wouters477c8d52006-05-27 19:21:47 +000027151 mv "$tmp/config.h" $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000027152 fi
27153 else
Thomas Wouters477c8d52006-05-27 19:21:47 +000027154 echo "/* $configure_input */"
27155 cat "$ac_result"
Martin v. Löwis11437992002-04-12 09:54:03 +000027156 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000027157 rm -f "$tmp/out12"
27158 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000027159
Thomas Wouters477c8d52006-05-27 19:21:47 +000027160
27161 esac
27162
27163done # for ac_tag
27164
Guido van Rossum627b2d71993-12-24 10:39:16 +000027165
Martin v. Löwis11437992002-04-12 09:54:03 +000027166{ (exit 0); exit 0; }
27167_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027168chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000027169ac_clean_files=$ac_clean_files_save
27170
27171
27172# configure is writing to config.log, and then calls config.status.
27173# config.status does its own redirection, appending to config.log.
27174# Unfortunately, on DOS this fails, as config.log is still kept open
27175# by configure, so config.status won't be able to write to it; its
27176# output is simply discarded. So we exec the FD to /dev/null,
27177# effectively closing config.log, so it can be properly (re)opened and
27178# appended to by config.status. When coming back to configure, we
27179# need to make the FD available again.
27180if test "$no_create" != yes; then
27181 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000027182 ac_config_status_args=
27183 test "$silent" = yes &&
27184 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000027185 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000027186 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000027187 exec 5>>config.log
27188 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
27189 # would make configure fail if this is the last instruction.
27190 $ac_cs_success || { (exit 1); exit 1; }
27191fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000027192
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000027193
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000027194echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000027195if test ! -f Modules/Setup
27196then
27197 cp $srcdir/Modules/Setup.dist Modules/Setup
27198fi
27199
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000027200echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000027201if test ! -f Modules/Setup.local
27202then
27203 echo "# Edit this file for local setup changes" >Modules/Setup.local
27204fi
27205
27206echo "creating Makefile"
27207$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
27208 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000027209 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000027210mv config.c Modules