blob: a07d5192cf88b7de3e68eed39bf128b855725f76 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Mark Dickinson875ada42009-11-28 12:52:39 +00002# From configure.in Revision: 76406 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004# Generated by GNU Autoconf 2.61 for python 3.1.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Georg Brandle2e15612009-05-20 18:25:10 +00006# Report bugs to <http://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00007#
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009# 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
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016# Be more Bourne compatible
17DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000018if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
19 emulate sh
20 NULLCMD=:
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000022 # is contrary to our usage. Disable this feature.
23 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000025else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026 case `(set -o) 2>/dev/null` in
27 *posix*) set -o posix ;;
28esac
29
Martin v. Löwis11437992002-04-12 09:54:03 +000030fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000031
32
Martin v. Löwis11437992002-04-12 09:54:03 +000033
Martin v. Löwis11437992002-04-12 09:54:03 +000034
Thomas Wouters47b49bf2007-08-30 22:15:33 +000035# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000036# Avoid depending upon Character Ranges.
37as_cr_letters='abcdefghijklmnopqrstuvwxyz'
38as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
39as_cr_Letters=$as_cr_letters$as_cr_LETTERS
40as_cr_digits='0123456789'
41as_cr_alnum=$as_cr_Letters$as_cr_digits
42
43# The user is always right.
44if test "${PATH_SEPARATOR+set}" != set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000045 echo "#! /bin/sh" >conf$$.sh
46 echo "exit 0" >>conf$$.sh
47 chmod +x conf$$.sh
48 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
49 PATH_SEPARATOR=';'
50 else
51 PATH_SEPARATOR=:
52 fi
53 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000054fi
55
Thomas Wouters47b49bf2007-08-30 22:15:33 +000056# Support unset when possible.
57if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
58 as_unset=unset
59else
60 as_unset=false
61fi
Martin v. Löwis11437992002-04-12 09:54:03 +000062
Thomas Wouters47b49bf2007-08-30 22:15:33 +000063
64# IFS
65# We need space, tab and new line, in precisely that order. Quoting is
66# there to prevent editors from complaining about space-tab.
67# (If _AS_PATH_WALK were called with IFS unset, it would disable word
68# splitting by setting IFS to empty value.)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000069as_nl='
70'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000071IFS=" "" $as_nl"
72
73# Find who we are. Look in the path if we contain no directory separator.
74case $0 in
75 *[\\/]* ) as_myself=$0 ;;
76 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000077for as_dir in $PATH
78do
79 IFS=$as_save_IFS
80 test -z "$as_dir" && as_dir=.
81 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
82done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000083IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000084
Thomas Wouters47b49bf2007-08-30 22:15:33 +000085 ;;
86esac
87# We did not find ourselves, most probably we were run as `sh COMMAND'
88# in which case we are not to be found in the path.
89if test "x$as_myself" = x; then
90 as_myself=$0
91fi
92if test ! -f "$as_myself"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000093 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +000094 { (exit 1); exit 1; }
95fi
96
97# Work around bugs in pre-3.0 UWIN ksh.
98for as_var in ENV MAIL MAILPATH
99do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
100done
101PS1='$ '
102PS2='> '
103PS4='+ '
104
105# NLS nuisances.
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000106for as_var in \
107 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
108 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
109 LC_TELEPHONE LC_TIME
110do
111 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
112 eval $as_var=C; export $as_var
113 else
114 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
115 fi
116done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000117
118# Required to use basename.
119if expr a : '\(a\)' >/dev/null 2>&1 &&
120 test "X`expr 00001 : '.*\(...\)'`" = X001; then
121 as_expr=expr
122else
123 as_expr=false
124fi
125
126if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
127 as_basename=basename
128else
129 as_basename=false
130fi
131
132
133# Name of the executable.
134as_me=`$as_basename -- "$0" ||
135$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
136 X"$0" : 'X\(//\)$' \| \
137 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000138echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000139 sed '/^.*\/\([^/][^/]*\)\/*$/{
140 s//\1/
141 q
142 }
143 /^X\/\(\/\/\)$/{
144 s//\1/
145 q
146 }
147 /^X\/\(\/\).*/{
148 s//\1/
149 q
150 }
151 s/.*/./; q'`
152
153# CDPATH.
154$as_unset CDPATH
155
156
157if test "x$CONFIG_SHELL" = x; then
158 if (eval ":") 2>/dev/null; then
159 as_have_required=yes
160else
161 as_have_required=no
162fi
163
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000164 if test $as_have_required = yes && (eval ":
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000165(as_func_return () {
166 (exit \$1)
167}
168as_func_success () {
169 as_func_return 0
170}
171as_func_failure () {
172 as_func_return 1
173}
174as_func_ret_success () {
175 return 0
176}
177as_func_ret_failure () {
178 return 1
179}
180
181exitcode=0
182if as_func_success; then
183 :
184else
185 exitcode=1
186 echo as_func_success failed.
187fi
188
189if as_func_failure; then
190 exitcode=1
191 echo as_func_failure succeeded.
192fi
193
194if as_func_ret_success; then
195 :
196else
197 exitcode=1
198 echo as_func_ret_success failed.
199fi
200
201if as_func_ret_failure; then
202 exitcode=1
203 echo as_func_ret_failure succeeded.
204fi
205
206if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
207 :
208else
209 exitcode=1
210 echo positional parameters were not saved.
211fi
212
213test \$exitcode = 0) || { (exit 1); exit 1; }
214
215(
216 as_lineno_1=\$LINENO
217 as_lineno_2=\$LINENO
218 test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
219 test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
220") 2> /dev/null; then
221 :
222else
223 as_candidate_shells=
Martin v. Löwis11437992002-04-12 09:54:03 +0000224 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters89f507f2006-12-13 04:49:30 +0000225for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
Martin v. Löwis11437992002-04-12 09:54:03 +0000226do
227 IFS=$as_save_IFS
228 test -z "$as_dir" && as_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000229 case $as_dir in
Martin v. Löwis11437992002-04-12 09:54:03 +0000230 /*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000231 for as_base in sh bash ksh sh5; do
232 as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
233 done;;
234 esac
235done
236IFS=$as_save_IFS
237
238
239 for as_shell in $as_candidate_shells $SHELL; do
240 # Try only shells that exist, to save several forks.
241 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
242 { ("$as_shell") 2> /dev/null <<\_ASEOF
243if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
244 emulate sh
245 NULLCMD=:
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000246 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000247 # is contrary to our usage. Disable this feature.
248 alias -g '${1+"$@"}'='"$@"'
249 setopt NO_GLOB_SUBST
250else
251 case `(set -o) 2>/dev/null` in
252 *posix*) set -o posix ;;
253esac
254
255fi
256
257
258:
259_ASEOF
260}; then
261 CONFIG_SHELL=$as_shell
262 as_have_required=yes
263 if { "$as_shell" 2> /dev/null <<\_ASEOF
264if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
265 emulate sh
266 NULLCMD=:
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000267 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000268 # is contrary to our usage. Disable this feature.
269 alias -g '${1+"$@"}'='"$@"'
270 setopt NO_GLOB_SUBST
271else
272 case `(set -o) 2>/dev/null` in
273 *posix*) set -o posix ;;
274esac
275
276fi
277
278
279:
280(as_func_return () {
281 (exit $1)
282}
283as_func_success () {
284 as_func_return 0
285}
286as_func_failure () {
287 as_func_return 1
288}
289as_func_ret_success () {
290 return 0
291}
292as_func_ret_failure () {
293 return 1
294}
295
296exitcode=0
297if as_func_success; then
298 :
299else
300 exitcode=1
301 echo as_func_success failed.
302fi
303
304if as_func_failure; then
305 exitcode=1
306 echo as_func_failure succeeded.
307fi
308
309if as_func_ret_success; then
310 :
311else
312 exitcode=1
313 echo as_func_ret_success failed.
314fi
315
316if as_func_ret_failure; then
317 exitcode=1
318 echo as_func_ret_failure succeeded.
319fi
320
321if ( set x; as_func_ret_success y && test x = "$1" ); then
322 :
323else
324 exitcode=1
325 echo positional parameters were not saved.
326fi
327
328test $exitcode = 0) || { (exit 1); exit 1; }
329
330(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000331 as_lineno_1=$LINENO
332 as_lineno_2=$LINENO
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000333 test "x$as_lineno_1" != "x$as_lineno_2" &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000334 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
335
336_ASEOF
337}; then
338 break
339fi
340
341fi
342
343 done
344
345 if test "x$CONFIG_SHELL" != x; then
346 for as_var in BASH_ENV ENV
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000347 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
348 done
349 export CONFIG_SHELL
350 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000351fi
352
353
354 if test $as_have_required = no; then
355 echo This script requires a shell more modern than all the
356 echo shells that I found on your system. Please install a
357 echo modern shell, or manually run the script under such a
358 echo shell if you do have one.
359 { (exit 1); exit 1; }
360fi
361
362
363fi
364
365fi
366
367
368
369(eval "as_func_return () {
370 (exit \$1)
371}
372as_func_success () {
373 as_func_return 0
374}
375as_func_failure () {
376 as_func_return 1
377}
378as_func_ret_success () {
379 return 0
380}
381as_func_ret_failure () {
382 return 1
383}
384
385exitcode=0
386if as_func_success; then
387 :
388else
389 exitcode=1
390 echo as_func_success failed.
391fi
392
393if as_func_failure; then
394 exitcode=1
395 echo as_func_failure succeeded.
396fi
397
398if as_func_ret_success; then
399 :
400else
401 exitcode=1
402 echo as_func_ret_success failed.
403fi
404
405if as_func_ret_failure; then
406 exitcode=1
407 echo as_func_ret_failure succeeded.
408fi
409
410if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
411 :
412else
413 exitcode=1
414 echo positional parameters were not saved.
415fi
416
417test \$exitcode = 0") || {
418 echo No shell found that supports shell functions.
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000419 echo Please tell autoconf@gnu.org about your system,
420 echo including any error possibly output before this
421 echo message
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000422}
423
424
425
426 as_lineno_1=$LINENO
427 as_lineno_2=$LINENO
428 test "x$as_lineno_1" != "x$as_lineno_2" &&
429 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Martin v. Löwis11437992002-04-12 09:54:03 +0000430
431 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
432 # uniformly replaced by the line number. The first 'sed' inserts a
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000433 # line-number line after each line using $LINENO; the second 'sed'
434 # does the real work. The second script uses 'N' to pair each
435 # line-number line with the line containing $LINENO, and appends
436 # trailing '-' during substitution so that $LINENO is not a special
437 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +0000438 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000439 # scripts with optimization help from Paolo Bonzini. Blame Lee
440 # E. McMahon (1931-1989) for sed's syntax. :-)
441 sed -n '
442 p
443 /[$]LINENO/=
444 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000445 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000446 s/[$]LINENO.*/&-/
447 t lineno
448 b
449 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000450 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000451 :loop
452 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000453 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000454 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000455 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000456 chmod +x "$as_me.lineno" ||
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000457 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000458 { (exit 1); exit 1; }; }
459
460 # Don't try to exec as it changes $[0], causing all sort of problems
461 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000462 # original and so on. Autoconf is especially sensitive to this).
463 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000464 # Exit status is that of the last command.
465 exit
466}
467
468
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000469if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
470 as_dirname=dirname
471else
472 as_dirname=false
473fi
474
475ECHO_C= ECHO_N= ECHO_T=
476case `echo -n x` in
477-n*)
478 case `echo 'x\c'` in
479 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
480 *) ECHO_C='\c';;
481 esac;;
482*)
483 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000484esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000485
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000486if expr a : '\(a\)' >/dev/null 2>&1 &&
487 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000488 as_expr=expr
489else
490 as_expr=false
491fi
492
493rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000494if test -d conf$$.dir; then
495 rm -f conf$$.dir/conf$$.file
496else
497 rm -f conf$$.dir
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000498 mkdir conf$$.dir
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000499fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000500echo >conf$$.file
501if ln -s conf$$.file conf$$ 2>/dev/null; then
502 as_ln_s='ln -s'
503 # ... but there are two gotchas:
504 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
505 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
506 # In both cases, we have to default to `cp -p'.
507 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +0000508 as_ln_s='cp -p'
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000509elif ln conf$$.file conf$$ 2>/dev/null; then
510 as_ln_s=ln
Martin v. Löwis11437992002-04-12 09:54:03 +0000511else
512 as_ln_s='cp -p'
513fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000514rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
515rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000516
Skip Montanaro6dead952003-09-25 14:50:04 +0000517if mkdir -p . 2>/dev/null; then
518 as_mkdir_p=:
519else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000520 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000521 as_mkdir_p=false
522fi
523
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000524if test -x / >/dev/null 2>&1; then
525 as_test_x='test -x'
526else
527 if ls -dL / >/dev/null 2>&1; then
528 as_ls_L_option=L
529 else
530 as_ls_L_option=
531 fi
532 as_test_x='
533 eval sh -c '\''
534 if test -d "$1"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000535 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000536 else
537 case $1 in
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000538 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000539 esac;
540 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
541 ???[sx]*):;;*)false;;esac;fi
542 '\'' sh
543 '
544fi
545as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +0000546
547# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000548as_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 +0000549
550# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000551as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000552
553
Martin v. Löwis11437992002-04-12 09:54:03 +0000554
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000555exec 7<&0 </dev/null 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000556
557# Name of the host.
558# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
559# so uname gets run too.
560ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
561
Martin v. Löwis11437992002-04-12 09:54:03 +0000562#
563# Initializations.
564#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000565ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000566ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000567ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000568LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000569cross_compiling=no
570subdirs=
571MFLAGS=
572MAKEFLAGS=
573SHELL=${CONFIG_SHELL-/bin/sh}
574
Martin v. Löwis11437992002-04-12 09:54:03 +0000575# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000576PACKAGE_NAME='python'
577PACKAGE_TARNAME='python'
Christian Heimes70e5cab2008-12-03 18:18:23 +0000578PACKAGE_VERSION='3.1'
579PACKAGE_STRING='python 3.1'
Georg Brandle2e15612009-05-20 18:25:10 +0000580PACKAGE_BUGREPORT='http://bugs.python.org/'
Martin v. Löwis11437992002-04-12 09:54:03 +0000581
582ac_unique_file="Include/object.h"
583# Factoring default headers for most tests.
584ac_includes_default="\
585#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000586#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000587# include <sys/types.h>
588#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000589#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000590# include <sys/stat.h>
591#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000592#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <stdlib.h>
594# include <stddef.h>
595#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000596# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000597# include <stdlib.h>
598# endif
599#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000600#ifdef HAVE_STRING_H
601# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000602# include <memory.h>
603# endif
604# include <string.h>
605#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000606#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000607# include <strings.h>
608#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000609#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000610# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000611#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000612#ifdef HAVE_STDINT_H
613# include <stdint.h>
614#endif
615#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000616# include <unistd.h>
617#endif"
618
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000619ac_subst_vars='SHELL
Benjamin Petersona8332062009-09-11 22:36:27 +0000620PATH_SEPARATOR
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000621PACKAGE_NAME
622PACKAGE_TARNAME
623PACKAGE_VERSION
624PACKAGE_STRING
625PACKAGE_BUGREPORT
626exec_prefix
627prefix
628program_transform_name
629bindir
630sbindir
631libexecdir
632datarootdir
633datadir
634sysconfdir
635sharedstatedir
636localstatedir
637includedir
638oldincludedir
639docdir
640infodir
641htmldir
642dvidir
643pdfdir
644psdir
645libdir
646localedir
647mandir
648DEFS
649ECHO_C
650ECHO_N
651ECHO_T
652LIBS
653build_alias
654host_alias
655target_alias
656VERSION
657SOVERSION
658CONFIG_ARGS
659UNIVERSALSDK
660ARCH_RUN_32BIT
661PYTHONFRAMEWORK
662PYTHONFRAMEWORKIDENTIFIER
663PYTHONFRAMEWORKDIR
664PYTHONFRAMEWORKPREFIX
665PYTHONFRAMEWORKINSTALLDIR
666FRAMEWORKINSTALLFIRST
667FRAMEWORKINSTALLLAST
668FRAMEWORKALTINSTALLFIRST
669FRAMEWORKALTINSTALLLAST
670FRAMEWORKUNIXTOOLSPREFIX
671MACHDEP
672SGI_ABI
673CONFIGURE_MACOSX_DEPLOYMENT_TARGET
674EXPORT_MACOSX_DEPLOYMENT_TARGET
675CC
676CFLAGS
677LDFLAGS
678CPPFLAGS
679ac_ct_CC
680EXEEXT
681OBJEXT
682CXX
683MAINCC
684CPP
685GREP
686EGREP
687BUILDEXEEXT
688LIBRARY
689LDLIBRARY
690DLLLIBRARY
691BLDLIBRARY
692LDLIBRARYDIR
693INSTSONAME
694RUNSHARED
695LINKCC
696GNULD
697RANLIB
698AR
699ARFLAGS
700SVNVERSION
701INSTALL_PROGRAM
702INSTALL_SCRIPT
703INSTALL_DATA
704LN
705OPT
706BASECFLAGS
707UNIVERSAL_ARCH_FLAGS
708OTHER_LIBTOOL_OPT
709LIBTOOL_CRUFT
710SO
711LDSHARED
712BLDSHARED
713CCSHARED
714LINKFORSHARED
715CFLAGSFORSHARED
716SHLIBS
717USE_SIGNAL_MODULE
718SIGNAL_OBJS
719USE_THREAD_MODULE
720LDLAST
721THREADOBJ
722DLINCLDIR
723DYNLOADFILE
724MACHDEP_OBJS
725TRUE
726LIBOBJS
727HAVE_GETHOSTBYNAME_R_6_ARG
728HAVE_GETHOSTBYNAME_R_5_ARG
729HAVE_GETHOSTBYNAME_R_3_ARG
730HAVE_GETHOSTBYNAME_R
731HAVE_GETHOSTBYNAME
732LIBM
733LIBC
734THREADHEADERS
735SRCDIRS
736LTLIBOBJS'
Skip Montanaro6dead952003-09-25 14:50:04 +0000737ac_subst_files=''
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000738 ac_precious_vars='build_alias
739host_alias
740target_alias
741CC
742CFLAGS
743LDFLAGS
744LIBS
745CPPFLAGS
746CPP'
747
Guido van Rossum627b2d71993-12-24 10:39:16 +0000748
Guido van Rossum7f43da71994-08-01 12:15:30 +0000749# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000750ac_init_help=
751ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000752# The variables have the same names as the options, with
753# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000754cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000755exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000756no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000757no_recursion=
758prefix=NONE
759program_prefix=NONE
760program_suffix=NONE
761program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000762silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000763site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000764srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000765verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000766x_includes=NONE
767x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000768
769# Installation directory options.
770# These are left unexpanded so users can "make install exec_prefix=/foo"
771# and all the variables that are supposed to be based on exec_prefix
772# by default will actually change.
773# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000774# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000775bindir='${exec_prefix}/bin'
776sbindir='${exec_prefix}/sbin'
777libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000778datarootdir='${prefix}/share'
779datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000780sysconfdir='${prefix}/etc'
781sharedstatedir='${prefix}/com'
782localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000783includedir='${prefix}/include'
784oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000785docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
786infodir='${datarootdir}/info'
787htmldir='${docdir}'
788dvidir='${docdir}'
789pdfdir='${docdir}'
790psdir='${docdir}'
791libdir='${exec_prefix}/lib'
792localedir='${datarootdir}/locale'
793mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000794
Guido van Rossum7f43da71994-08-01 12:15:30 +0000795ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000796ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000797for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000798do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000799 # If the previous option needs an argument, assign it.
800 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000801 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000802 ac_prev=
803 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000804 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000805
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000806 case $ac_option in
807 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
808 *) ac_optarg=yes ;;
809 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000810
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000811 # Accept the important Cygnus configure options, so we can diagnose typos.
812
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000813 case $ac_dashdash$ac_option in
814 --)
815 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000816
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000817 -bindir | --bindir | --bindi | --bind | --bin | --bi)
818 ac_prev=bindir ;;
819 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000820 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000821
822 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000823 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000824 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000825 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000826
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000827 -cache-file | --cache-file | --cache-fil | --cache-fi \
828 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
829 ac_prev=cache_file ;;
830 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
831 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000832 cache_file=$ac_optarg ;;
833
834 --config-cache | -C)
835 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000836
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000837 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000838 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000839 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000840 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000841
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000842 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
843 | --dataroo | --dataro | --datar)
844 ac_prev=datarootdir ;;
845 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
846 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
847 datarootdir=$ac_optarg ;;
848
Guido van Rossum7f43da71994-08-01 12:15:30 +0000849 -disable-* | --disable-*)
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000850 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000851 # Reject names that are not valid shell variable names.
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000852 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
853 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000854 { (exit 1); exit 1; }; }
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000855 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
856 eval enable_$ac_feature=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000857
858 -docdir | --docdir | --docdi | --doc | --do)
859 ac_prev=docdir ;;
860 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
861 docdir=$ac_optarg ;;
862
863 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
864 ac_prev=dvidir ;;
865 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
866 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000867
868 -enable-* | --enable-*)
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000869 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000870 # Reject names that are not valid shell variable names.
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000871 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
872 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000873 { (exit 1); exit 1; }; }
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000874 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
875 eval enable_$ac_feature=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000876
Guido van Rossum7f43da71994-08-01 12:15:30 +0000877 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
878 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
879 | --exec | --exe | --ex)
880 ac_prev=exec_prefix ;;
881 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
882 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
883 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000884 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000885
886 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000887 # Obsolete; use --with-gas.
888 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000889
Martin v. Löwis11437992002-04-12 09:54:03 +0000890 -help | --help | --hel | --he | -h)
891 ac_init_help=long ;;
892 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
893 ac_init_help=recursive ;;
894 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
895 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000896
897 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000898 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000899 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000900 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000901
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000902 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
903 ac_prev=htmldir ;;
904 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
905 | --ht=*)
906 htmldir=$ac_optarg ;;
907
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000908 -includedir | --includedir | --includedi | --included | --include \
909 | --includ | --inclu | --incl | --inc)
910 ac_prev=includedir ;;
911 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
912 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000913 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000914
915 -infodir | --infodir | --infodi | --infod | --info | --inf)
916 ac_prev=infodir ;;
917 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000918 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000919
920 -libdir | --libdir | --libdi | --libd)
921 ac_prev=libdir ;;
922 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000923 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000924
925 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
926 | --libexe | --libex | --libe)
927 ac_prev=libexecdir ;;
928 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
929 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000930 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000931
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000932 -localedir | --localedir | --localedi | --localed | --locale)
933 ac_prev=localedir ;;
934 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
935 localedir=$ac_optarg ;;
936
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000937 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000938 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000939 ac_prev=localstatedir ;;
940 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000941 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000942 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000943
944 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
945 ac_prev=mandir ;;
946 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000947 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000948
Guido van Rossum7f43da71994-08-01 12:15:30 +0000949 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000950 # Obsolete; use --without-fp.
951 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000952
953 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000954 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000955 no_create=yes ;;
956
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000957 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
958 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
959 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000960
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000961 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
962 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
963 | --oldin | --oldi | --old | --ol | --o)
964 ac_prev=oldincludedir ;;
965 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
966 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
967 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000968 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000969
Guido van Rossum7f43da71994-08-01 12:15:30 +0000970 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
971 ac_prev=prefix ;;
972 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000973 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000974
975 -program-prefix | --program-prefix | --program-prefi | --program-pref \
976 | --program-pre | --program-pr | --program-p)
977 ac_prev=program_prefix ;;
978 -program-prefix=* | --program-prefix=* | --program-prefi=* \
979 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000980 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000981
982 -program-suffix | --program-suffix | --program-suffi | --program-suff \
983 | --program-suf | --program-su | --program-s)
984 ac_prev=program_suffix ;;
985 -program-suffix=* | --program-suffix=* | --program-suffi=* \
986 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000987 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000988
989 -program-transform-name | --program-transform-name \
990 | --program-transform-nam | --program-transform-na \
991 | --program-transform-n | --program-transform- \
992 | --program-transform | --program-transfor \
993 | --program-transfo | --program-transf \
994 | --program-trans | --program-tran \
995 | --progr-tra | --program-tr | --program-t)
996 ac_prev=program_transform_name ;;
997 -program-transform-name=* | --program-transform-name=* \
998 | --program-transform-nam=* | --program-transform-na=* \
999 | --program-transform-n=* | --program-transform-=* \
1000 | --program-transform=* | --program-transfor=* \
1001 | --program-transfo=* | --program-transf=* \
1002 | --program-trans=* | --program-tran=* \
1003 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001004 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001005
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001006 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1007 ac_prev=pdfdir ;;
1008 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1009 pdfdir=$ac_optarg ;;
1010
1011 -psdir | --psdir | --psdi | --psd | --ps)
1012 ac_prev=psdir ;;
1013 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1014 psdir=$ac_optarg ;;
1015
Guido van Rossum7f43da71994-08-01 12:15:30 +00001016 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1017 | -silent | --silent | --silen | --sile | --sil)
1018 silent=yes ;;
1019
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001020 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1021 ac_prev=sbindir ;;
1022 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1023 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001024 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001025
1026 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1027 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1028 | --sharedst | --shareds | --shared | --share | --shar \
1029 | --sha | --sh)
1030 ac_prev=sharedstatedir ;;
1031 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1032 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1033 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1034 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001035 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001036
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001037 -site | --site | --sit)
1038 ac_prev=site ;;
1039 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001040 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001041
Guido van Rossum7f43da71994-08-01 12:15:30 +00001042 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1043 ac_prev=srcdir ;;
1044 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001045 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001046
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001047 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1048 | --syscon | --sysco | --sysc | --sys | --sy)
1049 ac_prev=sysconfdir ;;
1050 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1051 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001052 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001053
Guido van Rossum7f43da71994-08-01 12:15:30 +00001054 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001055 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001056 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001057 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001058
1059 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1060 verbose=yes ;;
1061
Martin v. Löwis11437992002-04-12 09:54:03 +00001062 -version | --version | --versio | --versi | --vers | -V)
1063 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001064
1065 -with-* | --with-*)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001066 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001067 # Reject names that are not valid shell variable names.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001068 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1069 { echo "$as_me: error: invalid package name: $ac_package" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001070 { (exit 1); exit 1; }; }
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001071 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1072 eval with_$ac_package=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001073
1074 -without-* | --without-*)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001075 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001076 # Reject names that are not valid shell variable names.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001077 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1078 { echo "$as_me: error: invalid package name: $ac_package" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001079 { (exit 1); exit 1; }; }
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001080 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1081 eval with_$ac_package=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001082
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001083 --x)
1084 # Obsolete; use --with-x.
1085 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001086
1087 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1088 | --x-incl | --x-inc | --x-in | --x-i)
1089 ac_prev=x_includes ;;
1090 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1091 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001092 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001093
1094 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1095 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1096 ac_prev=x_libraries ;;
1097 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1098 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001099 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001100
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001101 -*) { echo "$as_me: error: unrecognized option: $ac_option
Martin v. Löwis11437992002-04-12 09:54:03 +00001102Try \`$0 --help' for more information." >&2
1103 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001104 ;;
1105
Martin v. Löwis11437992002-04-12 09:54:03 +00001106 *=*)
1107 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1108 # Reject names that are not valid shell variable names.
1109 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001110 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001111 { (exit 1); exit 1; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001112 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001113 export $ac_envvar ;;
1114
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001115 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001116 # FIXME: should be removed in autoconf 3.0.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001117 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001118 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001119 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001120 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001121 ;;
1122
1123 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001124done
1125
Guido van Rossum7f43da71994-08-01 12:15:30 +00001126if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001127 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001128 { echo "$as_me: error: missing argument to $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001129 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001130fi
1131
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001132# Be sure to have absolute directory names.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001133for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1134 datadir sysconfdir sharedstatedir localstatedir includedir \
1135 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1136 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001137do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001138 eval ac_val=\$$ac_var
Martin v. Löwis11437992002-04-12 09:54:03 +00001139 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001140 [\\/$]* | ?:[\\/]* ) continue;;
1141 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001142 esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001143 { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001144 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001145done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001146
Martin v. Löwis11437992002-04-12 09:54:03 +00001147# There might be people who depend on the old broken behavior: `$host'
1148# used to hold the argument of --host etc.
1149# FIXME: To remove some day.
1150build=$build_alias
1151host=$host_alias
1152target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001153
Martin v. Löwis11437992002-04-12 09:54:03 +00001154# FIXME: To remove some day.
1155if test "x$host_alias" != x; then
1156 if test "x$build_alias" = x; then
1157 cross_compiling=maybe
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001158 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
Martin v. Löwis11437992002-04-12 09:54:03 +00001159 If a cross compiler is detected then cross compile mode will be used." >&2
1160 elif test "x$build_alias" != "x$host_alias"; then
1161 cross_compiling=yes
1162 fi
1163fi
1164
1165ac_tool_prefix=
1166test -n "$host_alias" && ac_tool_prefix=$host_alias-
1167
1168test "$silent" = yes && exec 6>/dev/null
1169
Guido van Rossum627b2d71993-12-24 10:39:16 +00001170
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001171ac_pwd=`pwd` && test -n "$ac_pwd" &&
1172ac_ls_di=`ls -di .` &&
1173ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001174 { echo "$as_me: error: Working directory cannot be determined" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001175 { (exit 1); exit 1; }; }
1176test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001177 { echo "$as_me: error: pwd does not report name of working directory" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001178 { (exit 1); exit 1; }; }
1179
1180
Guido van Rossum627b2d71993-12-24 10:39:16 +00001181# Find the source files, if location was not specified.
1182if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001183 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001184 # Try the directory containing this script, then the parent directory.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001185 ac_confdir=`$as_dirname -- "$0" ||
1186$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1187 X"$0" : 'X\(//\)[^/]' \| \
1188 X"$0" : 'X\(//\)$' \| \
1189 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
1190echo X"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001191 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1192 s//\1/
1193 q
1194 }
1195 /^X\(\/\/\)[^/].*/{
1196 s//\1/
1197 q
1198 }
1199 /^X\(\/\/\)$/{
1200 s//\1/
1201 q
1202 }
1203 /^X\(\/\).*/{
1204 s//\1/
1205 q
1206 }
1207 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001208 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001209 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001210 srcdir=..
1211 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001212else
1213 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001214fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001215if test ! -r "$srcdir/$ac_unique_file"; then
1216 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001217 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001218 { (exit 1); exit 1; }; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00001219fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001220ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1221ac_abs_confdir=`(
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001222 cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001223 { (exit 1); exit 1; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001224 pwd)`
1225# When building in place, set srcdir=.
1226if test "$ac_abs_confdir" = "$ac_pwd"; then
1227 srcdir=.
1228fi
1229# Remove unnecessary trailing slashes from srcdir.
1230# Double slashes in file names in object file debugging info
1231# mess up M-x gdb in Emacs.
1232case $srcdir in
1233*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1234esac
1235for ac_var in $ac_precious_vars; do
1236 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1237 eval ac_env_${ac_var}_value=\$${ac_var}
1238 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1239 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1240done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001241
Martin v. Löwis11437992002-04-12 09:54:03 +00001242#
1243# Report the --help message.
1244#
1245if test "$ac_init_help" = "long"; then
1246 # Omit some internal or obsolete options to make the list less imposing.
1247 # This message is too long to be a string in the A/UX 3.1 sh.
1248 cat <<_ACEOF
Christian Heimes70e5cab2008-12-03 18:18:23 +00001249\`configure' configures python 3.1 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001250
1251Usage: $0 [OPTION]... [VAR=VALUE]...
1252
1253To assign environment variables (e.g., CC, CFLAGS...), specify them as
1254VAR=VALUE. See below for descriptions of some of the useful variables.
1255
1256Defaults for the options are specified in brackets.
1257
1258Configuration:
1259 -h, --help display this help and exit
1260 --help=short display options specific to this package
1261 --help=recursive display the short help of all the included packages
1262 -V, --version display version information and exit
1263 -q, --quiet, --silent do not print \`checking...' messages
1264 --cache-file=FILE cache test results in FILE [disabled]
1265 -C, --config-cache alias for \`--cache-file=config.cache'
1266 -n, --no-create do not create output files
1267 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1268
Martin v. Löwis11437992002-04-12 09:54:03 +00001269Installation directories:
1270 --prefix=PREFIX install architecture-independent files in PREFIX
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001271 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001272 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001273 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001274
1275By default, \`make install' will install all the files in
1276\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1277an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1278for instance \`--prefix=\$HOME'.
1279
1280For better control, use the options below.
1281
1282Fine tuning of the installation directories:
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001283 --bindir=DIR user executables [EPREFIX/bin]
1284 --sbindir=DIR system admin executables [EPREFIX/sbin]
1285 --libexecdir=DIR program executables [EPREFIX/libexec]
1286 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1287 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1288 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1289 --libdir=DIR object code libraries [EPREFIX/lib]
1290 --includedir=DIR C header files [PREFIX/include]
1291 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1292 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1293 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1294 --infodir=DIR info documentation [DATAROOTDIR/info]
1295 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1296 --mandir=DIR man documentation [DATAROOTDIR/man]
1297 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1298 --htmldir=DIR html documentation [DOCDIR]
1299 --dvidir=DIR dvi documentation [DOCDIR]
1300 --pdfdir=DIR pdf documentation [DOCDIR]
1301 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001302_ACEOF
1303
1304 cat <<\_ACEOF
1305_ACEOF
1306fi
1307
1308if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001309 case $ac_init_help in
Christian Heimes70e5cab2008-12-03 18:18:23 +00001310 short | recursive ) echo "Configuration of python 3.1:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001311 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001312 cat <<\_ACEOF
1313
1314Optional Features:
1315 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1316 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001317 --enable-universalsdk[=SDKDIR]
Christian Heimes292d3512008-02-03 16:51:08 +00001318 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001319 --enable-framework[=INSTALLDIR]
1320 Build (MacOSX|Darwin) framework
1321 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001322 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001323 --enable-ipv6 Enable ipv6 (with ipv4) support
1324 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001325 --enable-big-digits[=BITS]
1326 use big digits for Python longs [BITS=30]
Martin v. Löwis11437992002-04-12 09:54:03 +00001327
1328Optional Packages:
1329 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1330 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001331 --with-universal-archs=ARCH
1332 select architectures for universal build ("32-bit",
Ronald Oussoren856624d2009-09-08 07:13:53 +00001333 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001334 --with-framework-name=FRAMEWORK
1335 specify an alternate name of the framework built
1336 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001337 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001338 --with-cxx-main=<compiler>
1339 compile main() and link python executable with C++
1340 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001341 --with-suffix=.exe set executable suffix
1342 --with-pydebug build with Py_DEBUG defined
1343 --with-libs='lib1 ...' link against additional libs
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001344 --with-system-ffi build _ctypes module using an installed ffi library
Matthias Klose55708cc2009-04-30 08:06:49 +00001345 --with-dbmliborder=db1:db2:...
1346 order to check db backends for dbm. Valid value is a
1347 colon separated string with the backend names
1348 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001349 --with-signal-module disable/enable signal module
1350 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1351 --with(out)-threads[=DIRECTORY]
1352 disable/enable thread support
1353 --with(out)-thread[=DIRECTORY]
1354 deprecated; use --with(out)-threads
1355 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001356 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001357 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001358 --with(out)-pymalloc disable/enable specialized mallocs
1359 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001360 --with-fpectl enable SIGFPE catching
1361 --with-libm=STRING math library
1362 --with-libc=STRING C library
Georg Brandl52d168a2008-01-07 18:10:24 +00001363 --with-wide-unicode Use 4-byte Unicode characters (default is 2 bytes)
Antoine Pitroub52ec782009-01-25 16:34:23 +00001364 --with-computed-gotos Use computed gotos / threaded dispatch in evaluation
1365 loop (not available on all compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001366
1367Some influential environment variables:
1368 CC C compiler command
1369 CFLAGS C compiler flags
1370 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1371 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001372 LIBS libraries to pass to the linker, e.g. -l<library>
1373 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1374 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001375 CPP C preprocessor
1376
1377Use these variables to override the choices made by `configure' or to help
1378it to find libraries and programs with nonstandard names/locations.
1379
Georg Brandle2e15612009-05-20 18:25:10 +00001380Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001381_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001382ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001383fi
1384
1385if test "$ac_init_help" = "recursive"; then
1386 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001387 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001388 test -d "$ac_dir" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001389 ac_builddir=.
1390
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001391case "$ac_dir" in
1392.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1393*)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001394 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001395 # A ".." for each directory in $ac_dir_suffix.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001396 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001397 case $ac_top_builddir_sub in
1398 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1399 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1400 esac ;;
1401esac
1402ac_abs_top_builddir=$ac_pwd
1403ac_abs_builddir=$ac_pwd$ac_dir_suffix
1404# for backward compatibility:
1405ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001406
1407case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001408 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001409 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001410 ac_top_srcdir=$ac_top_builddir_sub
1411 ac_abs_top_srcdir=$ac_pwd ;;
1412 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001413 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001414 ac_top_srcdir=$srcdir
1415 ac_abs_top_srcdir=$srcdir ;;
1416 *) # Relative name.
1417 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1418 ac_top_srcdir=$ac_top_build_prefix$srcdir
1419 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001420esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001421ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001422
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001423 cd "$ac_dir" || { ac_status=$?; continue; }
1424 # Check for guested configure.
1425 if test -f "$ac_srcdir/configure.gnu"; then
1426 echo &&
1427 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1428 elif test -f "$ac_srcdir/configure"; then
1429 echo &&
1430 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001431 else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001432 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001433 fi || ac_status=$?
1434 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001435 done
1436fi
1437
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001438test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001439if $ac_init_version; then
1440 cat <<\_ACEOF
Christian Heimes70e5cab2008-12-03 18:18:23 +00001441python configure 3.1
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001442generated by GNU Autoconf 2.61
Martin v. Löwis11437992002-04-12 09:54:03 +00001443
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001444Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014452002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001446This configure script is free software; the Free Software Foundation
1447gives unlimited permission to copy, distribute and modify it.
1448_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001449 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001450fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001451cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00001452This file contains any messages produced by compilers while
1453running configure, to aid debugging if configure makes a mistake.
1454
Christian Heimes70e5cab2008-12-03 18:18:23 +00001455It was created by python $as_me 3.1, which was
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001456generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00001457
1458 $ $0 $@
1459
1460_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001461exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00001462{
1463cat <<_ASUNAME
1464## --------- ##
1465## Platform. ##
1466## --------- ##
1467
1468hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1469uname -m = `(uname -m) 2>/dev/null || echo unknown`
1470uname -r = `(uname -r) 2>/dev/null || echo unknown`
1471uname -s = `(uname -s) 2>/dev/null || echo unknown`
1472uname -v = `(uname -v) 2>/dev/null || echo unknown`
1473
1474/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1475/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1476
1477/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1478/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1479/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001480/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00001481/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1482/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1483/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1484
1485_ASUNAME
1486
1487as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1488for as_dir in $PATH
1489do
1490 IFS=$as_save_IFS
1491 test -z "$as_dir" && as_dir=.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001492 echo "PATH: $as_dir"
Martin v. Löwis11437992002-04-12 09:54:03 +00001493done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001494IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00001495
1496} >&5
1497
1498cat >&5 <<_ACEOF
1499
1500
1501## ----------- ##
1502## Core tests. ##
1503## ----------- ##
1504
1505_ACEOF
1506
1507
1508# Keep a trace of the command line.
1509# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001510# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001511# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001512# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001513ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001514ac_configure_args0=
1515ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00001516ac_must_keep_next=false
1517for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001518do
Skip Montanaro6dead952003-09-25 14:50:04 +00001519 for ac_arg
1520 do
1521 case $ac_arg in
1522 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1523 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1524 | -silent | --silent | --silen | --sile | --sil)
1525 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001526 *\'*)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001527 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00001528 esac
1529 case $ac_pass in
1530 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1531 2)
1532 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1533 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001534 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00001535 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00001536 case $ac_arg in
1537 *=* | --config-cache | -C | -disable-* | --disable-* \
1538 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1539 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1540 | -with-* | --with-* | -without-* | --without-* | --x)
1541 case "$ac_configure_args0 " in
1542 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1543 esac
1544 ;;
1545 -* ) ac_must_keep_next=true ;;
1546 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00001547 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001548 ac_configure_args="$ac_configure_args '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00001549 ;;
1550 esac
1551 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001552done
Skip Montanaro6dead952003-09-25 14:50:04 +00001553$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1554$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 +00001555
1556# When interrupted or exit'd, cleanup temporary files, and complete
1557# config.log. We remove comments because anyway the quotes in there
1558# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001559# WARNING: Use '\'' to represent an apostrophe within the trap.
1560# 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 +00001561trap 'exit_status=$?
1562 # Save into config.log some information that might help in debugging.
1563 {
1564 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001565
Martin v. Löwis11437992002-04-12 09:54:03 +00001566 cat <<\_ASBOX
1567## ---------------- ##
1568## Cache variables. ##
1569## ---------------- ##
1570_ASBOX
1571 echo
1572 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001573(
1574 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1575 eval ac_val=\$$ac_var
1576 case $ac_val in #(
1577 *${as_nl}*)
1578 case $ac_var in #(
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001579 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1580echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001581 esac
1582 case $ac_var in #(
1583 _ | IFS | as_nl) ;; #(
1584 *) $as_unset $ac_var ;;
1585 esac ;;
1586 esac
1587 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001588 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001589 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1590 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001591 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001592 "s/'\''/'\''\\\\'\'''\''/g;
1593 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1594 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001595 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001596 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001597 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001598 esac |
1599 sort
1600)
Martin v. Löwis11437992002-04-12 09:54:03 +00001601 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001602
1603 cat <<\_ASBOX
1604## ----------------- ##
1605## Output variables. ##
1606## ----------------- ##
1607_ASBOX
1608 echo
1609 for ac_var in $ac_subst_vars
1610 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001611 eval ac_val=\$$ac_var
1612 case $ac_val in
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001613 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001614 esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001615 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001616 done | sort
1617 echo
1618
1619 if test -n "$ac_subst_files"; then
1620 cat <<\_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001621## ------------------- ##
1622## File substitutions. ##
1623## ------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00001624_ASBOX
1625 echo
1626 for ac_var in $ac_subst_files
1627 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001628 eval ac_val=\$$ac_var
1629 case $ac_val in
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001630 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001631 esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001632 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001633 done | sort
1634 echo
1635 fi
1636
Martin v. Löwis11437992002-04-12 09:54:03 +00001637 if test -s confdefs.h; then
1638 cat <<\_ASBOX
1639## ----------- ##
1640## confdefs.h. ##
1641## ----------- ##
1642_ASBOX
1643 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001644 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001645 echo
1646 fi
1647 test "$ac_signal" != 0 &&
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001648 echo "$as_me: caught signal $ac_signal"
1649 echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00001650 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001651 rm -f core *.core core.conftest.* &&
1652 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001653 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001654' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00001655for ac_signal in 1 2 13 15; do
1656 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1657done
1658ac_signal=0
1659
1660# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001661rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001662
1663# Predefined preprocessor variables.
1664
1665cat >>confdefs.h <<_ACEOF
1666#define PACKAGE_NAME "$PACKAGE_NAME"
1667_ACEOF
1668
1669
1670cat >>confdefs.h <<_ACEOF
1671#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1672_ACEOF
1673
1674
1675cat >>confdefs.h <<_ACEOF
1676#define PACKAGE_VERSION "$PACKAGE_VERSION"
1677_ACEOF
1678
1679
1680cat >>confdefs.h <<_ACEOF
1681#define PACKAGE_STRING "$PACKAGE_STRING"
1682_ACEOF
1683
1684
1685cat >>confdefs.h <<_ACEOF
1686#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1687_ACEOF
1688
1689
1690# Let the site file select an alternate cache file if it wants to.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001691# Prefer explicitly selected file to automatically selected ones.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001692if test -n "$CONFIG_SITE"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001693 set x "$CONFIG_SITE"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001694elif test "x$prefix" != xNONE; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001695 set x "$prefix/share/config.site" "$prefix/etc/config.site"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001696else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001697 set x "$ac_default_prefix/share/config.site" \
1698 "$ac_default_prefix/etc/config.site"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001699fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001700shift
1701for ac_site_file
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001702do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001703 if test -r "$ac_site_file"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001704 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1705echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001706 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001707 . "$ac_site_file"
1708 fi
1709done
1710
1711if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001712 # Some versions of bash will fail to source /dev/null (special
1713 # files actually), so we avoid doing that.
1714 if test -f "$cache_file"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001715 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1716echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001717 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001718 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1719 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00001720 esac
1721 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001722else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001723 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1724echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001725 >$cache_file
1726fi
1727
1728# Check that the precious variables saved in the cache have kept the same
1729# value.
1730ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001731for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001732 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1733 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001734 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1735 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00001736 case $ac_old_set,$ac_new_set in
1737 set,)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001738 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1739echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001740 ac_cache_corrupted=: ;;
1741 ,set)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001742 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1743echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001744 ac_cache_corrupted=: ;;
1745 ,);;
1746 *)
1747 if test "x$ac_old_val" != "x$ac_new_val"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001748 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1749echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1750 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1751echo "$as_me: former value: $ac_old_val" >&2;}
1752 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1753echo "$as_me: current value: $ac_new_val" >&2;}
1754 ac_cache_corrupted=:
Martin v. Löwis11437992002-04-12 09:54:03 +00001755 fi;;
1756 esac
1757 # Pass precious variables to config.status.
1758 if test "$ac_new_set" = set; then
1759 case $ac_new_val in
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001760 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001761 *) ac_arg=$ac_var=$ac_new_val ;;
1762 esac
1763 case " $ac_configure_args " in
1764 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1765 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1766 esac
1767 fi
1768done
1769if $ac_cache_corrupted; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001770 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1771echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1772 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1773echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001774 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001775fi
1776
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
Guido van Rossum7f43da71994-08-01 12:15:30 +00001801ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001802ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001803ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1804ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1805ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001806
Guido van Rossum627b2d71993-12-24 10:39:16 +00001807
Michael W. Hudson54241132001-12-07 15:38:26 +00001808
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001809ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001810
1811
Martin v. Löwis11437992002-04-12 09:54:03 +00001812
Benjamin Petersond23f8222009-04-05 19:13:16 +00001813if test "$prefix" != "/"; then
1814 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
1815fi
1816
1817
Martin v. Löwis11437992002-04-12 09:54:03 +00001818
1819
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001820
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001821
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001822# We don't use PACKAGE_ variables, and they cause conflicts
1823# with other autoconf-based packages that include Python.h
1824grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1825rm confdefs.h
1826mv confdefs.h.new confdefs.h
1827
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001828
Christian Heimes70e5cab2008-12-03 18:18:23 +00001829VERSION=3.1
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001830
Martin v. Löwis1142de32002-03-29 16:28:31 +00001831
1832SOVERSION=1.0
1833
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001834# The later defininition of _XOPEN_SOURCE disables certain features
1835# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1836
1837cat >>confdefs.h <<\_ACEOF
1838#define _GNU_SOURCE 1
1839_ACEOF
1840
1841
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001842# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1843# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1844# them.
1845
1846cat >>confdefs.h <<\_ACEOF
1847#define _NETBSD_SOURCE 1
1848_ACEOF
1849
1850
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001851# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1852# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1853# them.
1854
1855cat >>confdefs.h <<\_ACEOF
1856#define __BSD_VISIBLE 1
1857_ACEOF
1858
1859
Martin v. Löwisd6320502004-08-12 13:45:08 +00001860# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1861# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
1862
1863cat >>confdefs.h <<\_ACEOF
1864#define _BSD_TYPES 1
1865_ACEOF
1866
1867
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001868# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1869# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
1870# them.
1871
1872cat >>confdefs.h <<\_ACEOF
1873#define _DARWIN_C_SOURCE 1
1874_ACEOF
1875
1876
1877
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001878define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001879
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001880# Arguments passed to configure.
1881
1882CONFIG_ARGS="$ac_configure_args"
1883
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001884# Check whether --enable-universalsdk was given.
Thomas Wouters477c8d52006-05-27 19:21:47 +00001885if test "${enable_universalsdk+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001886 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00001887 case $enableval in
1888 yes)
1889 enableval=/Developer/SDKs/MacOSX10.4u.sdk
1890 ;;
1891 esac
1892 case $enableval in
1893 no)
1894 UNIVERSALSDK=
1895 enable_universalsdk=
1896 ;;
1897 *)
1898 UNIVERSALSDK=$enableval
1899 ;;
1900 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001901
Thomas Wouters477c8d52006-05-27 19:21:47 +00001902else
1903
1904 UNIVERSALSDK=
1905 enable_universalsdk=
1906
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001907fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00001908
1909
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001910
Benjamin Peterson6794aa32008-07-16 20:33:37 +00001911
1912
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001913UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001914{ echo "$as_me:$LINENO: checking for --with-universal-archs" >&5
1915echo $ECHO_N "checking for --with-universal-archs... $ECHO_C" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001916
1917# Check whether --with-universal-archs was given.
1918if test "${with_universal_archs+set}" = set; then
1919 withval=$with_universal_archs;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001920 { echo "$as_me:$LINENO: result: $withval" >&5
1921echo "${ECHO_T}$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001922 UNIVERSAL_ARCHS="$withval"
1923
1924else
1925
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001926 { echo "$as_me:$LINENO: result: 32-bit" >&5
1927echo "${ECHO_T}32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001928
1929fi
1930
1931
1932
1933
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001934
1935# Check whether --with-framework-name was given.
1936if test "${with_framework_name+set}" = set; then
1937 withval=$with_framework_name;
1938 PYTHONFRAMEWORK=${withval}
1939 PYTHONFRAMEWORKDIR=${withval}.framework
1940 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
1941
1942else
1943
1944 PYTHONFRAMEWORK=Python
1945 PYTHONFRAMEWORKDIR=Python.framework
1946 PYTHONFRAMEWORKIDENTIFIER=org.python.python
1947
1948fi
1949
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001950# Check whether --enable-framework was given.
Thomas Wouters477c8d52006-05-27 19:21:47 +00001951if test "${enable_framework+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001952 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00001953 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001954 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001955 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001956 esac
1957 case $enableval in
1958 no)
1959 PYTHONFRAMEWORK=
1960 PYTHONFRAMEWORKDIR=no-framework
1961 PYTHONFRAMEWORKPREFIX=
1962 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00001963 FRAMEWORKINSTALLFIRST=
1964 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00001965 FRAMEWORKALTINSTALLFIRST=
1966 FRAMEWORKALTINSTALLLAST=
1967 if test "x${prefix}" = "xNONE"; then
1968 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1969 else
1970 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1971 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001972 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001973 ;;
1974 *)
1975 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001976 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00001977 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00001978 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001979 if test "$UNIVERSAL_ARCHS" = "all"
1980 then
1981 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkinstallunixtools4way"
Ronald Oussorene3918352009-03-30 18:00:28 +00001982 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkaltinstallunixtools4way"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001983 else
Ronald Oussorene3918352009-03-30 18:00:28 +00001984 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001985 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
1986 fi
1987
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00001988 if test "x${prefix}" = "xNONE" ; then
1989 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1990 else
1991 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1992 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001993 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00001994
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001995 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00001996 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001997 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001998
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001999 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002000
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002001 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2002
2003 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2004
Jack Jansene578a632001-08-15 01:27:14 +00002005 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002006
Guido van Rossum563e7081996-09-10 18:20:48 +00002007else
Martin v. Löwis11437992002-04-12 09:54:03 +00002008
Jack Jansene578a632001-08-15 01:27:14 +00002009 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002010 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002011 PYTHONFRAMEWORKPREFIX=
2012 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002013 FRAMEWORKINSTALLFIRST=
2014 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002015 FRAMEWORKALTINSTALLFIRST=
2016 FRAMEWORKALTINSTALLLAST=
2017 if test "x${prefix}" = "xNONE" ; then
2018 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2019 else
2020 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2021 fi
Jack Jansene578a632001-08-15 01:27:14 +00002022 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002023
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002024 if test "$UNIVERSAL_ARCHS" = "all"
2025 then
2026 FRAMEWORKINSTALLLAST=update4wayuniversal
2027 FRAMEWORKALTINSTALLLAST=update4wayuniversal
2028 fi
2029
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002030fi
2031
Thomas Wouters477c8d52006-05-27 19:21:47 +00002032
2033
Michael W. Hudson54241132001-12-07 15:38:26 +00002034
2035
2036
2037
Jack Jansene578a632001-08-15 01:27:14 +00002038
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002039
2040
2041
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002042
Jack Jansene578a632001-08-15 01:27:14 +00002043##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00002044## AC_HELP_STRING(--with-dyld,
2045## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00002046##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002047# Set name for machine-dependent library files
2048
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002049{ echo "$as_me:$LINENO: checking MACHDEP" >&5
2050echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002051if test -z "$MACHDEP"
2052then
Guido van Rossum563e7081996-09-10 18:20:48 +00002053 ac_sys_system=`uname -s`
Benjamin Petersona8332062009-09-11 22:36:27 +00002054 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002055 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002056 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002057 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002058 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002059 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002060 ac_md_system=`echo $ac_sys_system |
2061 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2062 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002063 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002064 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002065
Guido van Rossum07397971997-04-29 21:49:50 +00002066 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002067 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002068 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00002069 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002070 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002071 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002072 esac
2073fi
Guido van Rossum91922671997-10-09 20:24:13 +00002074
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002075# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2076# disable features if it is defined, without any means to access these
2077# features as extensions. For these systems, we skip the definition of
2078# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2079# some feature, make sure there is no alternative way to access this
2080# feature. Also, when using wildcards, make sure you have verified the
2081# need for not defining _XOPEN_SOURCE on all systems matching the
2082# wildcard, and that the wildcard does not include future systems
2083# (which may remove their limitations).
2084case $ac_sys_system/$ac_sys_release in
2085 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2086 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002087 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Benjamin Petersonde9c8692008-07-01 18:23:09 +00002088 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00002089 define_xopen_source=no
2090 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2091 # also defined. This can be overridden by defining _BSD_SOURCE
2092 # As this has a different meaning on Linux, only define it on OpenBSD
2093
2094cat >>confdefs.h <<\_ACEOF
2095#define _BSD_SOURCE 1
2096_ACEOF
2097
2098 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00002099 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
2100 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
2101 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00002102 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6[A-S])
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002103 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00002104 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
2105 # of union __?sigval. Reported by Stuart Bishop.
2106 SunOS/5.6)
2107 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002108 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
2109 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00002110 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00002111 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002112 define_xopen_source=no;;
2113 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002114 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002115 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002116 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00002117 # On FreeBSD 4, the math functions C89 does not cover are never defined
2118 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
2119 FreeBSD/4.*)
2120 define_xopen_source=no;;
2121 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
2122 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
2123 # identifies itself as Darwin/7.*
2124 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2125 # disables platform specific features beyond repair.
2126 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2127 # has no effect, don't bother defining them
2128 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00002129 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002130 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
2131 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
2132 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00002133 AIX/4)
2134 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002135 AIX/5)
2136 if test `uname -r` -eq 1; then
2137 define_xopen_source=no
2138 fi
2139 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00002140 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
2141 # defining NI_NUMERICHOST.
2142 QNX/6.3.2)
2143 define_xopen_source=no
2144 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002145
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002146esac
2147
2148if test $define_xopen_source = yes
2149then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002150 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
2151 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00002152 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
2153 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00002154 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00002155 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00002156
2157cat >>confdefs.h <<\_ACEOF
2158#define _XOPEN_SOURCE 500
2159_ACEOF
2160
2161 ;;
2162 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002163
2164cat >>confdefs.h <<\_ACEOF
2165#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002166_ACEOF
2167
Skip Montanarof0d5f792004-08-15 14:08:23 +00002168 ;;
2169 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002170
2171 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
2172 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
2173 # several APIs are not declared. Since this is also needed in some
2174 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00002175 # except for Solaris 10, where it must not be defined,
2176 # as it implies XPG4.2
2177 case $ac_sys_system/$ac_sys_release in
2178 SunOS/5.10)
2179 ;;
2180 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002181
2182cat >>confdefs.h <<\_ACEOF
2183#define _XOPEN_SOURCE_EXTENDED 1
2184_ACEOF
2185
Martin v. Löwis7dece662005-11-26 11:38:24 +00002186 ;;
2187 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002188
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002189
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002190cat >>confdefs.h <<\_ACEOF
2191#define _POSIX_C_SOURCE 200112L
2192_ACEOF
2193
2194
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002195fi
2196
Guido van Rossum91922671997-10-09 20:24:13 +00002197#
2198# SGI compilers allow the specification of the both the ABI and the
2199# ISA on the command line. Depending on the values of these switches,
2200# different and often incompatable code will be generated.
2201#
2202# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
2203# thus supply support for various ABI/ISA combinations. The MACHDEP
2204# variable is also adjusted.
2205#
2206
2207if test ! -z "$SGI_ABI"
2208then
2209 CC="cc $SGI_ABI"
2210 LDFLAGS="$SGI_ABI $LDFLAGS"
2211 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
2212fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002213{ echo "$as_me:$LINENO: result: $MACHDEP" >&5
2214echo "${ECHO_T}$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002215
Jack Jansen6b08a402004-06-03 12:41:45 +00002216# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
2217# it may influence the way we can build extensions, so distutils
2218# needs to check it
2219
Thomas Wouters477c8d52006-05-27 19:21:47 +00002220
Jack Jansen6b08a402004-06-03 12:41:45 +00002221CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002222EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00002223
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002224{ echo "$as_me:$LINENO: checking machine type as reported by uname -m" >&5
2225echo $ECHO_N "checking machine type as reported by uname -m... $ECHO_C" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00002226ac_sys_machine=`uname -m`
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002227{ echo "$as_me:$LINENO: result: $ac_sys_machine" >&5
2228echo "${ECHO_T}$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00002229
Guido van Rossum627b2d71993-12-24 10:39:16 +00002230# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00002231
2232# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
2233# for debug/optimization stuff. BASECFLAGS is for flags that are required
2234# just to get things to compile and link. Users are free to override OPT
2235# when running configure or make. The build should not break if they do.
2236# BASECFLAGS should generally not be messed with, however.
2237
2238# XXX shouldn't some/most/all of this code be merged with the stuff later
2239# on that fiddles with OPT and BASECFLAGS?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002240{ echo "$as_me:$LINENO: checking for --without-gcc" >&5
2241echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002242
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002243# Check whether --with-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002244if test "${with_gcc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002245 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002246 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00002247 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00002248 without_gcc=yes;;
2249 yes) CC=gcc
2250 without_gcc=no;;
2251 *) CC=$withval
2252 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002253 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00002254else
Martin v. Löwis11437992002-04-12 09:54:03 +00002255
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002256 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002257 AIX*) CC=cc_r
2258 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00002259 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00002260 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002261fi
2262
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002263{ echo "$as_me:$LINENO: result: $without_gcc" >&5
2264echo "${ECHO_T}$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002265
Guido van Rossum8b131c51995-03-09 14:10:13 +00002266# If the user switches compilers, we can't believe the cache
2267if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
2268then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002269 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002270(it is also a good idea to do 'make clean' before compiling)" >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002271echo "$as_me: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002272(it is also a good idea to do 'make clean' before compiling)" >&2;}
2273 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00002274fi
2275
Martin v. Löwis11437992002-04-12 09:54:03 +00002276ac_ext=c
2277ac_cpp='$CPP $CPPFLAGS'
2278ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2279ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2280ac_compiler_gnu=$ac_cv_c_compiler_gnu
2281if test -n "$ac_tool_prefix"; then
2282 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2283set dummy ${ac_tool_prefix}gcc; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002284{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2285echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002286if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002287 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002288else
2289 if test -n "$CC"; then
2290 ac_cv_prog_CC="$CC" # Let the user override the test.
2291else
Martin v. Löwis11437992002-04-12 09:54:03 +00002292as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2293for as_dir in $PATH
2294do
2295 IFS=$as_save_IFS
2296 test -z "$as_dir" && as_dir=.
2297 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002298 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002299 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002300 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002301 break 2
2302 fi
2303done
2304done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002305IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002306
Jack Jansendd19cf82001-12-06 22:36:17 +00002307fi
2308fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002309CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00002310if test -n "$CC"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002311 { echo "$as_me:$LINENO: result: $CC" >&5
2312echo "${ECHO_T}$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002313else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002314 { echo "$as_me:$LINENO: result: no" >&5
2315echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002316fi
2317
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002318
Martin v. Löwis11437992002-04-12 09:54:03 +00002319fi
2320if test -z "$ac_cv_prog_CC"; then
2321 ac_ct_CC=$CC
2322 # Extract the first word of "gcc", so it can be a program name with args.
2323set dummy gcc; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002324{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2325echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002326if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002327 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002328else
2329 if test -n "$ac_ct_CC"; then
2330 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2331else
2332as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2333for as_dir in $PATH
2334do
2335 IFS=$as_save_IFS
2336 test -z "$as_dir" && as_dir=.
2337 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002338 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002339 ac_cv_prog_ac_ct_CC="gcc"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002340 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002341 break 2
2342 fi
2343done
2344done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002345IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002346
2347fi
2348fi
2349ac_ct_CC=$ac_cv_prog_ac_ct_CC
2350if test -n "$ac_ct_CC"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002351 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2352echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002353else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002354 { echo "$as_me:$LINENO: result: no" >&5
2355echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002356fi
2357
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002358 if test "x$ac_ct_CC" = x; then
2359 CC=""
2360 else
2361 case $cross_compiling:$ac_tool_warned in
2362yes:)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002363{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2364whose name does not start with the host triplet. If you think this
2365configuration is useful to you, please write to autoconf@gnu.org." >&5
2366echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2367whose name does not start with the host triplet. If you think this
2368configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002369ac_tool_warned=yes ;;
2370esac
2371 CC=$ac_ct_CC
2372 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002373else
2374 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002375fi
2376
Jack Jansendd19cf82001-12-06 22:36:17 +00002377if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002378 if test -n "$ac_tool_prefix"; then
2379 # 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 +00002380set dummy ${ac_tool_prefix}cc; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002381{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2382echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002383if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002384 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002385else
2386 if test -n "$CC"; then
2387 ac_cv_prog_CC="$CC" # Let the user override the test.
2388else
Martin v. Löwis11437992002-04-12 09:54:03 +00002389as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2390for as_dir in $PATH
2391do
2392 IFS=$as_save_IFS
2393 test -z "$as_dir" && as_dir=.
2394 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002395 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002396 ac_cv_prog_CC="${ac_tool_prefix}cc"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002397 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002398 break 2
2399 fi
2400done
2401done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002402IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002403
2404fi
2405fi
2406CC=$ac_cv_prog_CC
2407if test -n "$CC"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002408 { echo "$as_me:$LINENO: result: $CC" >&5
2409echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002410else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002411 { echo "$as_me:$LINENO: result: no" >&5
2412echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002413fi
2414
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002415
Martin v. Löwis11437992002-04-12 09:54:03 +00002416 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002417fi
2418if test -z "$CC"; then
2419 # Extract the first word of "cc", so it can be a program name with args.
2420set dummy cc; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002421{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2422echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002423if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002424 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002425else
2426 if test -n "$CC"; then
2427 ac_cv_prog_CC="$CC" # Let the user override the test.
2428else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002429 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002430as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2431for as_dir in $PATH
2432do
2433 IFS=$as_save_IFS
2434 test -z "$as_dir" && as_dir=.
2435 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002436 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002437 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2438 ac_prog_rejected=yes
2439 continue
2440 fi
2441 ac_cv_prog_CC="cc"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002442 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002443 break 2
2444 fi
2445done
2446done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002447IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002448
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002449if test $ac_prog_rejected = yes; then
2450 # We found a bogon in the path, so make sure we never use it.
2451 set dummy $ac_cv_prog_CC
2452 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002453 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002454 # We chose a different compiler from the bogus one.
2455 # However, it has the same basename, so the bogon will be chosen
2456 # first if we set CC to just the basename; use the full file name.
2457 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002458 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002459 fi
2460fi
2461fi
2462fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002463CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002464if test -n "$CC"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002465 { echo "$as_me:$LINENO: result: $CC" >&5
2466echo "${ECHO_T}$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002467else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002468 { echo "$as_me:$LINENO: result: no" >&5
2469echo "${ECHO_T}no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002470fi
2471
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002472
Martin v. Löwis11437992002-04-12 09:54:03 +00002473fi
2474if test -z "$CC"; then
2475 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002476 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002477 do
2478 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2479set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002480{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2481echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002482if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002483 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002484else
2485 if test -n "$CC"; then
2486 ac_cv_prog_CC="$CC" # Let the user override the test.
2487else
Martin v. Löwis11437992002-04-12 09:54:03 +00002488as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2489for as_dir in $PATH
2490do
2491 IFS=$as_save_IFS
2492 test -z "$as_dir" && as_dir=.
2493 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002494 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002495 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002496 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002497 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002498 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002499done
2500done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002501IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002502
2503fi
2504fi
2505CC=$ac_cv_prog_CC
2506if test -n "$CC"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002507 { echo "$as_me:$LINENO: result: $CC" >&5
2508echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002509else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002510 { echo "$as_me:$LINENO: result: no" >&5
2511echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002512fi
2513
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002514
Martin v. Löwis11437992002-04-12 09:54:03 +00002515 test -n "$CC" && break
2516 done
2517fi
2518if test -z "$CC"; then
2519 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002520 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002521do
2522 # Extract the first word of "$ac_prog", so it can be a program name with args.
2523set dummy $ac_prog; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002524{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2525echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002526if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002527 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002528else
2529 if test -n "$ac_ct_CC"; then
2530 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2531else
2532as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2533for as_dir in $PATH
2534do
2535 IFS=$as_save_IFS
2536 test -z "$as_dir" && as_dir=.
2537 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002538 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002539 ac_cv_prog_ac_ct_CC="$ac_prog"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002540 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002541 break 2
2542 fi
2543done
2544done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002545IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00002546
Martin v. Löwis11437992002-04-12 09:54:03 +00002547fi
2548fi
2549ac_ct_CC=$ac_cv_prog_ac_ct_CC
2550if test -n "$ac_ct_CC"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002551 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2552echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002553else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002554 { echo "$as_me:$LINENO: result: no" >&5
2555echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002556fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002557
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002558
Martin v. Löwis11437992002-04-12 09:54:03 +00002559 test -n "$ac_ct_CC" && break
2560done
Michael W. Hudson54241132001-12-07 15:38:26 +00002561
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002562 if test "x$ac_ct_CC" = x; then
2563 CC=""
2564 else
2565 case $cross_compiling:$ac_tool_warned in
2566yes:)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002567{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2568whose name does not start with the host triplet. If you think this
2569configuration is useful to you, please write to autoconf@gnu.org." >&5
2570echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2571whose name does not start with the host triplet. If you think this
2572configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002573ac_tool_warned=yes ;;
2574esac
2575 CC=$ac_ct_CC
2576 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002577fi
2578
2579fi
2580
2581
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002582test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002583See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002584echo "$as_me: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002585See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002586 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002587
2588# Provide some information about the compiler.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002589echo "$as_me:$LINENO: checking for C compiler version" >&5
2590ac_compiler=`set X $ac_compile; echo $2`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002591{ (ac_try="$ac_compiler --version >&5"
2592case "(($ac_try" in
2593 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2594 *) ac_try_echo=$ac_try;;
2595esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002596eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002597 (eval "$ac_compiler --version >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002598 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002599 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002600 (exit $ac_status); }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002601{ (ac_try="$ac_compiler -v >&5"
2602case "(($ac_try" in
2603 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2604 *) ac_try_echo=$ac_try;;
2605esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002606eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002607 (eval "$ac_compiler -v >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002608 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002610 (exit $ac_status); }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002611{ (ac_try="$ac_compiler -V >&5"
2612case "(($ac_try" in
2613 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2614 *) ac_try_echo=$ac_try;;
2615esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002616eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002617 (eval "$ac_compiler -V >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002618 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002620 (exit $ac_status); }
2621
2622cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002623/* confdefs.h. */
2624_ACEOF
2625cat confdefs.h >>conftest.$ac_ext
2626cat >>conftest.$ac_ext <<_ACEOF
2627/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002628
Martin v. Löwis11437992002-04-12 09:54:03 +00002629int
2630main ()
2631{
2632
2633 ;
2634 return 0;
2635}
2636_ACEOF
2637ac_clean_files_save=$ac_clean_files
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002638ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002639# Try to create an executable without -o first, disregard a.out.
2640# It will help us diagnose broken compilers, and finding out an intuition
2641# of exeext.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002642{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2643echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
2644ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2645#
2646# List of possible output files, starting from the most likely.
2647# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2648# only as a last resort. b.out is created by i960 compilers.
2649ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2650#
2651# The IRIX 6 linker writes into existing files which may not be
2652# executable, retaining their permissions. Remove them first so a
2653# subsequent execution test works.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002654ac_rmfiles=
2655for ac_file in $ac_files
2656do
2657 case $ac_file in
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002658 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002659 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2660 esac
2661done
2662rm -f $ac_rmfiles
2663
2664if { (ac_try="$ac_link_default"
2665case "(($ac_try" in
2666 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2667 *) ac_try_echo=$ac_try;;
2668esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002669eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002670 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002671 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002673 (exit $ac_status); }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002674 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2675# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2676# in a Makefile. We should not override ac_cv_exeext if it was cached,
2677# so that the user can short-circuit this test for compilers unknown to
2678# Autoconf.
2679for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00002680do
2681 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002682 case $ac_file in
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002683 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002684 ;;
2685 [ab].out )
2686 # We found the default executable, but exeext='' is most
2687 # certainly right.
2688 break;;
2689 *.* )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002690 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2691 then :; else
2692 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2693 fi
2694 # We set ac_cv_exeext here because the later test for it is not
2695 # safe: cross compilers may not add the suffix if given an `-o'
2696 # argument, so we may need to know it at that point already.
2697 # Even if this section looks crufty: it has the advantage of
2698 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002699 break;;
2700 * )
2701 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002702 esac
2703done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002704test "$ac_cv_exeext" = no && ac_cv_exeext=
2705
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002706else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002707 ac_file=''
2708fi
2709
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002710{ echo "$as_me:$LINENO: result: $ac_file" >&5
2711echo "${ECHO_T}$ac_file" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002712if test -z "$ac_file"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002713 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002714sed 's/^/| /' conftest.$ac_ext >&5
2715
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002716{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002717See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002718echo "$as_me: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002719See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002720 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002721fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002722
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002723ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002724
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002725# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002726# the compiler is broken, or we cross compile.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002727{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2728echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002729# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2730# If not cross compiling, check that we can run a simple program.
2731if test "$cross_compiling" != yes; then
2732 if { ac_try='./$ac_file'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002733 { (case "(($ac_try" in
2734 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2735 *) ac_try_echo=$ac_try;;
2736esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002737eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002738 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002739 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002741 (exit $ac_status); }; }; then
2742 cross_compiling=no
2743 else
2744 if test "$cross_compiling" = maybe; then
2745 cross_compiling=yes
2746 else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002747 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002748If you meant to cross compile, use \`--host'.
2749See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002750echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002751If you meant to cross compile, use \`--host'.
2752See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002753 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002754 fi
2755 fi
2756fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002757{ echo "$as_me:$LINENO: result: yes" >&5
2758echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002759
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002760rm -f a.out a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002761ac_clean_files=$ac_clean_files_save
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002762# Check that the compiler produces executables we can run. If not, either
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002763# the compiler is broken, or we cross compile.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002764{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2765echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2766{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2767echo "${ECHO_T}$cross_compiling" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00002768
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002769{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2770echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002771if { (ac_try="$ac_link"
2772case "(($ac_try" in
2773 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2774 *) ac_try_echo=$ac_try;;
2775esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002776eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002777 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002778 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002779 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002780 (exit $ac_status); }; then
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002781 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2782# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2783# work properly (i.e., refer to `conftest.exe'), while it won't with
2784# `rm'.
2785for ac_file in conftest.exe conftest conftest.*; do
2786 test -f "$ac_file" || continue
2787 case $ac_file in
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002788 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002789 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2790 break;;
2791 * ) break;;
2792 esac
2793done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002794else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002795 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002796See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002797echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002798See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002799 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002800fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002801
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002802rm -f conftest$ac_cv_exeext
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002803{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2804echo "${ECHO_T}$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002805
2806rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002807EXEEXT=$ac_cv_exeext
2808ac_exeext=$EXEEXT
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002809{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
2810echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002811if test "${ac_cv_objext+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002812 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002813else
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002814 cat >conftest.$ac_ext <<_ACEOF
2815/* confdefs.h. */
2816_ACEOF
2817cat confdefs.h >>conftest.$ac_ext
2818cat >>conftest.$ac_ext <<_ACEOF
2819/* end confdefs.h. */
2820
2821int
2822main ()
2823{
2824
2825 ;
2826 return 0;
2827}
2828_ACEOF
2829rm -f conftest.o conftest.obj
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002830if { (ac_try="$ac_compile"
2831case "(($ac_try" in
2832 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2833 *) ac_try_echo=$ac_try;;
2834esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002835eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002836 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002837 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002839 (exit $ac_status); }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002840 for ac_file in conftest.o conftest.obj conftest.*; do
2841 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00002842 case $ac_file in
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002843 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002844 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2845 break;;
2846 esac
2847done
2848else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002849 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002850sed 's/^/| /' conftest.$ac_ext >&5
2851
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002852{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002853See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002854echo "$as_me: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002855See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002856 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002857fi
2858
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002859rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002860fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002861{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2862echo "${ECHO_T}$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002863OBJEXT=$ac_cv_objext
2864ac_objext=$OBJEXT
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002865{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2866echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002867if test "${ac_cv_c_compiler_gnu+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002868 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002869else
2870 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002871/* confdefs.h. */
2872_ACEOF
2873cat confdefs.h >>conftest.$ac_ext
2874cat >>conftest.$ac_ext <<_ACEOF
2875/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002876
Martin v. Löwis11437992002-04-12 09:54:03 +00002877int
2878main ()
2879{
2880#ifndef __GNUC__
2881 choke me
2882#endif
2883
2884 ;
2885 return 0;
2886}
2887_ACEOF
2888rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002889if { (ac_try="$ac_compile"
2890case "(($ac_try" in
2891 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2892 *) ac_try_echo=$ac_try;;
2893esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002894eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002895 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002896 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002897 grep -v '^ *+' conftest.er1 >conftest.err
2898 rm -f conftest.er1
2899 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002901 (exit $ac_status); } && {
2902 test -z "$ac_c_werror_flag" ||
2903 test ! -s conftest.err
2904 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002905 ac_compiler_gnu=yes
2906else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002907 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002908sed 's/^/| /' conftest.$ac_ext >&5
2909
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002910 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002911fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002912
2913rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002914ac_cv_c_compiler_gnu=$ac_compiler_gnu
2915
2916fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002917{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2918echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
2919GCC=`test $ac_compiler_gnu = yes && echo yes`
Martin v. Löwis11437992002-04-12 09:54:03 +00002920ac_test_CFLAGS=${CFLAGS+set}
2921ac_save_CFLAGS=$CFLAGS
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002922{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2923echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002924if test "${ac_cv_prog_cc_g+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002925 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002926else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002927 ac_save_c_werror_flag=$ac_c_werror_flag
2928 ac_c_werror_flag=yes
2929 ac_cv_prog_cc_g=no
2930 CFLAGS="-g"
2931 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002932/* confdefs.h. */
2933_ACEOF
2934cat confdefs.h >>conftest.$ac_ext
2935cat >>conftest.$ac_ext <<_ACEOF
2936/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002937
Martin v. Löwis11437992002-04-12 09:54:03 +00002938int
2939main ()
2940{
2941
2942 ;
2943 return 0;
2944}
2945_ACEOF
2946rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002947if { (ac_try="$ac_compile"
2948case "(($ac_try" in
2949 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2950 *) ac_try_echo=$ac_try;;
2951esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002952eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002953 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002954 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002955 grep -v '^ *+' conftest.er1 >conftest.err
2956 rm -f conftest.er1
2957 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002959 (exit $ac_status); } && {
2960 test -z "$ac_c_werror_flag" ||
2961 test ! -s conftest.err
2962 } && test -s conftest.$ac_objext; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002963 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002964else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002965 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002966sed 's/^/| /' conftest.$ac_ext >&5
2967
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002968 CFLAGS=""
2969 cat >conftest.$ac_ext <<_ACEOF
2970/* confdefs.h. */
2971_ACEOF
2972cat confdefs.h >>conftest.$ac_ext
2973cat >>conftest.$ac_ext <<_ACEOF
2974/* end confdefs.h. */
2975
2976int
2977main ()
2978{
2979
2980 ;
2981 return 0;
2982}
2983_ACEOF
2984rm -f conftest.$ac_objext
2985if { (ac_try="$ac_compile"
2986case "(($ac_try" in
2987 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2988 *) ac_try_echo=$ac_try;;
2989esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002990eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002991 (eval "$ac_compile") 2>conftest.er1
2992 ac_status=$?
2993 grep -v '^ *+' conftest.er1 >conftest.err
2994 rm -f conftest.er1
2995 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002997 (exit $ac_status); } && {
2998 test -z "$ac_c_werror_flag" ||
2999 test ! -s conftest.err
3000 } && test -s conftest.$ac_objext; then
3001 :
3002else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003003 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003004sed 's/^/| /' conftest.$ac_ext >&5
3005
3006 ac_c_werror_flag=$ac_save_c_werror_flag
3007 CFLAGS="-g"
3008 cat >conftest.$ac_ext <<_ACEOF
3009/* confdefs.h. */
3010_ACEOF
3011cat confdefs.h >>conftest.$ac_ext
3012cat >>conftest.$ac_ext <<_ACEOF
3013/* end confdefs.h. */
3014
3015int
3016main ()
3017{
3018
3019 ;
3020 return 0;
3021}
3022_ACEOF
3023rm -f conftest.$ac_objext
3024if { (ac_try="$ac_compile"
3025case "(($ac_try" in
3026 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3027 *) ac_try_echo=$ac_try;;
3028esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003029eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003030 (eval "$ac_compile") 2>conftest.er1
3031 ac_status=$?
3032 grep -v '^ *+' conftest.er1 >conftest.err
3033 rm -f conftest.er1
3034 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003036 (exit $ac_status); } && {
3037 test -z "$ac_c_werror_flag" ||
3038 test ! -s conftest.err
3039 } && test -s conftest.$ac_objext; then
3040 ac_cv_prog_cc_g=yes
3041else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003042 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003043sed 's/^/| /' conftest.$ac_ext >&5
3044
3045
Guido van Rossum627b2d71993-12-24 10:39:16 +00003046fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003047
3048rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003049fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003050
3051rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3052fi
3053
3054rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3055 ac_c_werror_flag=$ac_save_c_werror_flag
3056fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003057{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3058echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003059if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003060 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003061elif test $ac_cv_prog_cc_g = yes; then
3062 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003063 CFLAGS="-g -O2"
3064 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003065 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003066 fi
3067else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003068 if test "$GCC" = yes; then
3069 CFLAGS="-O2"
3070 else
3071 CFLAGS=
3072 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003073fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003074{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3075echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003076if test "${ac_cv_prog_cc_c89+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003077 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003078else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003079 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003080ac_save_CC=$CC
3081cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003082/* confdefs.h. */
3083_ACEOF
3084cat confdefs.h >>conftest.$ac_ext
3085cat >>conftest.$ac_ext <<_ACEOF
3086/* end confdefs.h. */
3087#include <stdarg.h>
3088#include <stdio.h>
3089#include <sys/types.h>
3090#include <sys/stat.h>
3091/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3092struct buf { int x; };
3093FILE * (*rcsopen) (struct buf *, struct stat *, int);
3094static char *e (p, i)
3095 char **p;
3096 int i;
3097{
3098 return p[i];
3099}
3100static char *f (char * (*g) (char **, int), char **p, ...)
3101{
3102 char *s;
3103 va_list v;
3104 va_start (v,p);
3105 s = g (p, va_arg (v,int));
3106 va_end (v);
3107 return s;
3108}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003109
3110/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3111 function prototypes and stuff, but not '\xHH' hex character constants.
3112 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003113 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003114 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3115 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003116 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003117int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3118
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003119/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3120 inside strings and character constants. */
3121#define FOO(x) 'x'
3122int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3123
Skip Montanaro6dead952003-09-25 14:50:04 +00003124int test (int i, double x);
3125struct s1 {int (*f) (int a);};
3126struct s2 {int (*f) (double a);};
3127int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3128int argc;
3129char **argv;
3130int
3131main ()
3132{
3133return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3134 ;
3135 return 0;
3136}
3137_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003138for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3139 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003140do
3141 CC="$ac_save_CC $ac_arg"
3142 rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003143if { (ac_try="$ac_compile"
3144case "(($ac_try" in
3145 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3146 *) ac_try_echo=$ac_try;;
3147esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003148eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003149 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00003150 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003151 grep -v '^ *+' conftest.er1 >conftest.err
3152 rm -f conftest.er1
3153 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003155 (exit $ac_status); } && {
3156 test -z "$ac_c_werror_flag" ||
3157 test ! -s conftest.err
3158 } && test -s conftest.$ac_objext; then
3159 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003160else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003161 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003162sed 's/^/| /' conftest.$ac_ext >&5
3163
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003164
Skip Montanaro6dead952003-09-25 14:50:04 +00003165fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003166
3167rm -f core conftest.err conftest.$ac_objext
3168 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003169done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003170rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003171CC=$ac_save_CC
3172
3173fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003174# AC_CACHE_VAL
3175case "x$ac_cv_prog_cc_c89" in
3176 x)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003177 { echo "$as_me:$LINENO: result: none needed" >&5
3178echo "${ECHO_T}none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003179 xno)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003180 { echo "$as_me:$LINENO: result: unsupported" >&5
3181echo "${ECHO_T}unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003182 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003183 CC="$CC $ac_cv_prog_cc_c89"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003184 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3185echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003186esac
3187
Skip Montanaro6dead952003-09-25 14:50:04 +00003188
Martin v. Löwis11437992002-04-12 09:54:03 +00003189ac_ext=c
3190ac_cpp='$CPP $CPPFLAGS'
3191ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3192ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3193ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003194
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003195
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003196
3197
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003198{ echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
3199echo $ECHO_N "checking for --with-cxx-main=<compiler>... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003200
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003201# Check whether --with-cxx_main was given.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003202if test "${with_cxx_main+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003203 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003204
3205 case $withval in
3206 no) with_cxx_main=no
3207 MAINCC='$(CC)';;
3208 yes) with_cxx_main=yes
3209 MAINCC='$(CXX)';;
3210 *) with_cxx_main=yes
3211 MAINCC=$withval
3212 if test -z "$CXX"
3213 then
3214 CXX=$withval
3215 fi;;
3216 esac
3217else
3218
3219 with_cxx_main=no
3220 MAINCC='$(CC)'
3221
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003222fi
3223
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003224{ echo "$as_me:$LINENO: result: $with_cxx_main" >&5
3225echo "${ECHO_T}$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003226
3227preset_cxx="$CXX"
3228if test -z "$CXX"
3229then
3230 case "$CC" in
3231 gcc) # Extract the first word of "g++", so it can be a program name with args.
3232set dummy g++; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003233{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3234echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003235if test "${ac_cv_path_CXX+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003236 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003237else
3238 case $CXX in
3239 [\\/]* | ?:[\\/]*)
3240 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3241 ;;
3242 *)
3243 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3244for as_dir in notfound
3245do
3246 IFS=$as_save_IFS
3247 test -z "$as_dir" && as_dir=.
3248 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003249 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003250 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003251 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003252 break 2
3253 fi
3254done
3255done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003256IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003257
3258 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
3259 ;;
3260esac
3261fi
3262CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003263if test -n "$CXX"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003264 { echo "$as_me:$LINENO: result: $CXX" >&5
3265echo "${ECHO_T}$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003266else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003267 { echo "$as_me:$LINENO: result: no" >&5
3268echo "${ECHO_T}no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003269fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003270
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003271 ;;
3272 cc) # Extract the first word of "c++", so it can be a program name with args.
3273set dummy c++; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003274{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3275echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003276if test "${ac_cv_path_CXX+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003277 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003278else
3279 case $CXX in
3280 [\\/]* | ?:[\\/]*)
3281 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3282 ;;
3283 *)
3284 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3285for as_dir in notfound
3286do
3287 IFS=$as_save_IFS
3288 test -z "$as_dir" && as_dir=.
3289 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003290 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003291 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003292 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003293 break 2
3294 fi
3295done
3296done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003297IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003298
3299 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
3300 ;;
3301esac
3302fi
3303CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003304if test -n "$CXX"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003305 { echo "$as_me:$LINENO: result: $CXX" >&5
3306echo "${ECHO_T}$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003307else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003308 { echo "$as_me:$LINENO: result: no" >&5
3309echo "${ECHO_T}no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003310fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003311
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003312 ;;
3313 esac
3314 if test "$CXX" = "notfound"
3315 then
3316 CXX=""
3317 fi
3318fi
3319if test -z "$CXX"
3320then
3321 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
3322do
3323 # Extract the first word of "$ac_prog", so it can be a program name with args.
3324set dummy $ac_prog; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003325{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3326echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003327if test "${ac_cv_prog_CXX+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003328 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003329else
3330 if test -n "$CXX"; then
3331 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3332else
3333as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3334for as_dir in $PATH
3335do
3336 IFS=$as_save_IFS
3337 test -z "$as_dir" && as_dir=.
3338 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003339 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003340 ac_cv_prog_CXX="$ac_prog"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003341 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003342 break 2
3343 fi
3344done
3345done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003346IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003347
3348fi
3349fi
3350CXX=$ac_cv_prog_CXX
3351if test -n "$CXX"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003352 { echo "$as_me:$LINENO: result: $CXX" >&5
3353echo "${ECHO_T}$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003354else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003355 { echo "$as_me:$LINENO: result: no" >&5
3356echo "${ECHO_T}no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003357fi
3358
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003359
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003360 test -n "$CXX" && break
3361done
3362test -n "$CXX" || CXX="notfound"
3363
3364 if test "$CXX" = "notfound"
3365 then
3366 CXX=""
3367 fi
3368fi
3369if test "$preset_cxx" != "$CXX"
3370then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003371 { echo "$as_me:$LINENO: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003372
3373 By default, distutils will build C++ extension modules with \"$CXX\".
3374 If this is not intended, then set CXX on the configure command line.
3375 " >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003376echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003377
3378 By default, distutils will build C++ extension modules with \"$CXX\".
3379 If this is not intended, then set CXX on the configure command line.
3380 " >&2;}
3381fi
3382
3383
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003384# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00003385
3386ac_ext=c
3387ac_cpp='$CPP $CPPFLAGS'
3388ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3389ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3390ac_compiler_gnu=$ac_cv_c_compiler_gnu
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003391{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3392echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003393# On Suns, sometimes $CPP names a directory.
3394if test -n "$CPP" && test -d "$CPP"; then
3395 CPP=
3396fi
3397if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003398 if test "${ac_cv_prog_CPP+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003399 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003400else
Martin v. Löwis11437992002-04-12 09:54:03 +00003401 # Double quotes because CPP needs to be expanded
3402 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3403 do
3404 ac_preproc_ok=false
3405for ac_c_preproc_warn_flag in '' yes
3406do
3407 # Use a header file that comes with gcc, so configuring glibc
3408 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003409 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3410 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003411 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00003412 # not just through cpp. "Syntax error" is here to catch this case.
3413 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003414/* confdefs.h. */
3415_ACEOF
3416cat confdefs.h >>conftest.$ac_ext
3417cat >>conftest.$ac_ext <<_ACEOF
3418/* end confdefs.h. */
3419#ifdef __STDC__
3420# include <limits.h>
3421#else
3422# include <assert.h>
3423#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003424 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003425_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003426if { (ac_try="$ac_cpp conftest.$ac_ext"
3427case "(($ac_try" in
3428 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3429 *) ac_try_echo=$ac_try;;
3430esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003431eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003432 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003433 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003434 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003435 rm -f conftest.er1
3436 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003437 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003438 (exit $ac_status); } >/dev/null && {
3439 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3440 test ! -s conftest.err
3441 }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003442 :
3443else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003444 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003445sed 's/^/| /' conftest.$ac_ext >&5
3446
Martin v. Löwis11437992002-04-12 09:54:03 +00003447 # Broken: fails on valid input.
3448continue
Jack Jansendd19cf82001-12-06 22:36:17 +00003449fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003450
Martin v. Löwis11437992002-04-12 09:54:03 +00003451rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00003452
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003453 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003454 # can be detected and how.
3455 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003456/* confdefs.h. */
3457_ACEOF
3458cat confdefs.h >>conftest.$ac_ext
3459cat >>conftest.$ac_ext <<_ACEOF
3460/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003461#include <ac_nonexistent.h>
3462_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003463if { (ac_try="$ac_cpp conftest.$ac_ext"
3464case "(($ac_try" in
3465 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3466 *) ac_try_echo=$ac_try;;
3467esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003468eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003469 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003470 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003471 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003472 rm -f conftest.er1
3473 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003475 (exit $ac_status); } >/dev/null && {
3476 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3477 test ! -s conftest.err
3478 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003479 # Broken: success on invalid input.
3480continue
3481else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003482 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003483sed 's/^/| /' conftest.$ac_ext >&5
3484
Martin v. Löwis11437992002-04-12 09:54:03 +00003485 # Passes both tests.
3486ac_preproc_ok=:
3487break
3488fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003489
Martin v. Löwis11437992002-04-12 09:54:03 +00003490rm -f conftest.err conftest.$ac_ext
3491
3492done
3493# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3494rm -f conftest.err conftest.$ac_ext
3495if $ac_preproc_ok; then
3496 break
3497fi
3498
3499 done
3500 ac_cv_prog_CPP=$CPP
3501
3502fi
3503 CPP=$ac_cv_prog_CPP
3504else
3505 ac_cv_prog_CPP=$CPP
3506fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003507{ echo "$as_me:$LINENO: result: $CPP" >&5
3508echo "${ECHO_T}$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003509ac_preproc_ok=false
3510for ac_c_preproc_warn_flag in '' yes
3511do
3512 # Use a header file that comes with gcc, so configuring glibc
3513 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003514 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3515 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003516 # On the NeXT, cc -E runs the code through the compiler's parser,
3517 # not just through cpp. "Syntax error" is here to catch this case.
3518 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003519/* confdefs.h. */
3520_ACEOF
3521cat confdefs.h >>conftest.$ac_ext
3522cat >>conftest.$ac_ext <<_ACEOF
3523/* end confdefs.h. */
3524#ifdef __STDC__
3525# include <limits.h>
3526#else
3527# include <assert.h>
3528#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003529 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003530_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003531if { (ac_try="$ac_cpp conftest.$ac_ext"
3532case "(($ac_try" in
3533 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3534 *) ac_try_echo=$ac_try;;
3535esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003536eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003537 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003538 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003539 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003540 rm -f conftest.er1
3541 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003543 (exit $ac_status); } >/dev/null && {
3544 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3545 test ! -s conftest.err
3546 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003547 :
3548else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003549 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003550sed 's/^/| /' conftest.$ac_ext >&5
3551
Martin v. Löwis11437992002-04-12 09:54:03 +00003552 # Broken: fails on valid input.
3553continue
3554fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003555
Martin v. Löwis11437992002-04-12 09:54:03 +00003556rm -f conftest.err conftest.$ac_ext
3557
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003558 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003559 # can be detected and how.
3560 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003561/* confdefs.h. */
3562_ACEOF
3563cat confdefs.h >>conftest.$ac_ext
3564cat >>conftest.$ac_ext <<_ACEOF
3565/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003566#include <ac_nonexistent.h>
3567_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003568if { (ac_try="$ac_cpp conftest.$ac_ext"
3569case "(($ac_try" in
3570 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3571 *) ac_try_echo=$ac_try;;
3572esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003573eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003574 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003575 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003576 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003577 rm -f conftest.er1
3578 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003580 (exit $ac_status); } >/dev/null && {
3581 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3582 test ! -s conftest.err
3583 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003584 # Broken: success on invalid input.
3585continue
3586else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003587 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003588sed 's/^/| /' conftest.$ac_ext >&5
3589
Martin v. Löwis11437992002-04-12 09:54:03 +00003590 # Passes both tests.
3591ac_preproc_ok=:
3592break
3593fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003594
Martin v. Löwis11437992002-04-12 09:54:03 +00003595rm -f conftest.err conftest.$ac_ext
3596
3597done
3598# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3599rm -f conftest.err conftest.$ac_ext
3600if $ac_preproc_ok; then
3601 :
3602else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003603 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003604See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003605echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003606See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003607 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003608fi
3609
3610ac_ext=c
3611ac_cpp='$CPP $CPPFLAGS'
3612ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3613ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3614ac_compiler_gnu=$ac_cv_c_compiler_gnu
3615
3616
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003617{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3618echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003619if test "${ac_cv_path_GREP+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003620 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003621else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003622 # Extract the first word of "grep ggrep" to use in msg output
3623if test -z "$GREP"; then
3624set dummy grep ggrep; ac_prog_name=$2
3625if test "${ac_cv_path_GREP+set}" = set; then
3626 echo $ECHO_N "(cached) $ECHO_C" >&6
3627else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003628 ac_path_GREP_found=false
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003629# Loop through the user's path and test for each of PROGNAME-LIST
3630as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003631for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3632do
3633 IFS=$as_save_IFS
3634 test -z "$as_dir" && as_dir=.
3635 for ac_prog in grep ggrep; do
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003636 for ac_exec_ext in '' $ac_executable_extensions; do
3637 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3638 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3639 # Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003640 # Check for GNU $ac_path_GREP
3641case `"$ac_path_GREP" --version 2>&1` in
3642*GNU*)
3643 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3644*)
3645 ac_count=0
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003646 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003647 while :
3648 do
3649 cat "conftest.in" "conftest.in" >"conftest.tmp"
3650 mv "conftest.tmp" "conftest.in"
3651 cp "conftest.in" "conftest.nl"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003652 echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003653 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3654 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3655 ac_count=`expr $ac_count + 1`
3656 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3657 # Best one so far, save it but keep looking for a better one
3658 ac_cv_path_GREP="$ac_path_GREP"
3659 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00003660 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003661 # 10*(2^10) chars as input seems more than enough
3662 test $ac_count -gt 10 && break
3663 done
3664 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3665esac
3666
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003667
3668 $ac_path_GREP_found && break 3
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003669 done
3670done
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003671
3672done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003673IFS=$as_save_IFS
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003674
3675
3676fi
3677
3678GREP="$ac_cv_path_GREP"
3679if test -z "$GREP"; then
3680 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3681echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003682 { (exit 1); exit 1; }; }
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003683fi
3684
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003685else
3686 ac_cv_path_GREP=$GREP
3687fi
3688
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003689
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003690fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003691{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3692echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003693 GREP="$ac_cv_path_GREP"
3694
3695
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003696{ echo "$as_me:$LINENO: checking for egrep" >&5
3697echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003698if test "${ac_cv_path_EGREP+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003699 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003700else
3701 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3702 then ac_cv_path_EGREP="$GREP -E"
3703 else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003704 # Extract the first word of "egrep" to use in msg output
3705if test -z "$EGREP"; then
3706set dummy egrep; ac_prog_name=$2
3707if test "${ac_cv_path_EGREP+set}" = set; then
3708 echo $ECHO_N "(cached) $ECHO_C" >&6
3709else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003710 ac_path_EGREP_found=false
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003711# Loop through the user's path and test for each of PROGNAME-LIST
3712as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003713for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3714do
3715 IFS=$as_save_IFS
3716 test -z "$as_dir" && as_dir=.
3717 for ac_prog in egrep; do
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003718 for ac_exec_ext in '' $ac_executable_extensions; do
3719 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3720 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3721 # Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003722 # Check for GNU $ac_path_EGREP
3723case `"$ac_path_EGREP" --version 2>&1` in
3724*GNU*)
3725 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3726*)
3727 ac_count=0
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003728 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003729 while :
3730 do
3731 cat "conftest.in" "conftest.in" >"conftest.tmp"
3732 mv "conftest.tmp" "conftest.in"
3733 cp "conftest.in" "conftest.nl"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003734 echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003735 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3736 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3737 ac_count=`expr $ac_count + 1`
3738 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3739 # Best one so far, save it but keep looking for a better one
3740 ac_cv_path_EGREP="$ac_path_EGREP"
3741 ac_path_EGREP_max=$ac_count
3742 fi
3743 # 10*(2^10) chars as input seems more than enough
3744 test $ac_count -gt 10 && break
3745 done
3746 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3747esac
3748
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003749
3750 $ac_path_EGREP_found && break 3
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003751 done
3752done
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003753
3754done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003755IFS=$as_save_IFS
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003756
3757
3758fi
3759
3760EGREP="$ac_cv_path_EGREP"
3761if test -z "$EGREP"; then
3762 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3763echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003764 { (exit 1); exit 1; }; }
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003765fi
3766
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003767else
3768 ac_cv_path_EGREP=$EGREP
3769fi
3770
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003771
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003772 fi
3773fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003774{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3775echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003776 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00003777
3778
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003779
3780{ echo "$as_me:$LINENO: checking for AIX" >&5
3781echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
3782cat >conftest.$ac_ext <<_ACEOF
Benjamin Petersona8332062009-09-11 22:36:27 +00003783/* confdefs.h. */
3784_ACEOF
3785cat confdefs.h >>conftest.$ac_ext
3786cat >>conftest.$ac_ext <<_ACEOF
3787/* end confdefs.h. */
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003788#ifdef _AIX
3789 yes
Benjamin Petersona8332062009-09-11 22:36:27 +00003790#endif
3791
Benjamin Petersona8332062009-09-11 22:36:27 +00003792_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003793if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3794 $EGREP "yes" >/dev/null 2>&1; then
3795 { echo "$as_me:$LINENO: result: yes" >&5
3796echo "${ECHO_T}yes" >&6; }
Benjamin Petersona8332062009-09-11 22:36:27 +00003797cat >>confdefs.h <<\_ACEOF
Antoine Pitrou20327222009-05-24 20:39:11 +00003798#define _ALL_SOURCE 1
3799_ACEOF
3800
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003801else
3802 { echo "$as_me:$LINENO: result: no" >&5
3803echo "${ECHO_T}no" >&6; }
3804fi
Mark Dickinson875ada42009-11-28 12:52:39 +00003805rm -f conftest*
Antoine Pitrou20327222009-05-24 20:39:11 +00003806
3807
3808
3809# Check for unsupported systems
3810case $ac_sys_system/$ac_sys_release in
3811atheos*|Linux*/1*)
3812 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3813 echo See README for details.
3814 exit 1;;
3815esac
3816
3817
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003818{ echo "$as_me:$LINENO: checking for --with-suffix" >&5
3819echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003820
3821# Check whether --with-suffix was given.
3822if test "${with_suffix+set}" = set; then
3823 withval=$with_suffix;
3824 case $withval in
3825 no) EXEEXT=;;
3826 yes) EXEEXT=.exe;;
3827 *) EXEEXT=$withval;;
3828 esac
3829fi
3830
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003831{ echo "$as_me:$LINENO: result: $EXEEXT" >&5
3832echo "${ECHO_T}$EXEEXT" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003833
3834# Test whether we're running on a non-case-sensitive system, in which
3835# case we give a warning if no ext is given
3836
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003837{ echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3838echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003839if test ! -d CaseSensitiveTestDir; then
3840mkdir CaseSensitiveTestDir
3841fi
3842
3843if test -d casesensitivetestdir
3844then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003845 { echo "$as_me:$LINENO: result: yes" >&5
3846echo "${ECHO_T}yes" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003847 BUILDEXEEXT=.exe
3848else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003849 { echo "$as_me:$LINENO: result: no" >&5
3850echo "${ECHO_T}no" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003851 BUILDEXEEXT=$EXEEXT
3852fi
3853rmdir CaseSensitiveTestDir
3854
3855case $MACHDEP in
3856bsdos*)
3857 case $CC in
3858 gcc) CC="$CC -D_HAVE_BSDI";;
3859 esac;;
3860esac
3861
3862case $ac_sys_system in
3863hp*|HP*)
3864 case $CC in
3865 cc|*/cc) CC="$CC -Ae";;
3866 esac;;
Antoine Pitrou20327222009-05-24 20:39:11 +00003867SunOS*)
3868 # Some functions have a prototype only with that define, e.g. confstr
3869
3870cat >>confdefs.h <<\_ACEOF
3871#define __EXTENSIONS__ 1
3872_ACEOF
3873
3874 ;;
3875esac
3876
3877
3878
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003879{ echo "$as_me:$LINENO: checking LIBRARY" >&5
3880echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003881if test -z "$LIBRARY"
3882then
3883 LIBRARY='libpython$(VERSION).a'
3884fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003885{ echo "$as_me:$LINENO: result: $LIBRARY" >&5
3886echo "${ECHO_T}$LIBRARY" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003887
3888# LDLIBRARY is the name of the library to link against (as opposed to the
3889# name of the library into which to insert object files). BLDLIBRARY is also
3890# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3891# is blank as the main program is not linked directly against LDLIBRARY.
3892# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3893# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3894# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3895# DLLLIBRARY is the shared (i.e., DLL) library.
3896#
3897# RUNSHARED is used to run shared python without installed libraries
3898#
3899# INSTSONAME is the name of the shared library that will be use to install
3900# on the system - some systems like version suffix, others don't
3901
3902
3903
3904
3905
3906
3907LDLIBRARY="$LIBRARY"
3908BLDLIBRARY='$(LDLIBRARY)'
3909INSTSONAME='$(LDLIBRARY)'
3910DLLLIBRARY=''
3911LDLIBRARYDIR=''
3912RUNSHARED=''
3913
3914# LINKCC is the command that links the python executable -- default is $(CC).
3915# If CXX is set, and if it is needed to link a main function that was
3916# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3917# python might then depend on the C++ runtime
3918# This is altered for AIX in order to build the export list before
3919# linking.
3920
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003921{ echo "$as_me:$LINENO: checking LINKCC" >&5
3922echo $ECHO_N "checking LINKCC... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003923if test -z "$LINKCC"
3924then
3925 LINKCC='$(PURIFY) $(MAINCC)'
3926 case $ac_sys_system in
3927 AIX*)
3928 exp_extra="\"\""
3929 if test $ac_sys_release -ge 5 -o \
3930 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3931 exp_extra="."
3932 fi
3933 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Antoine Pitrou20327222009-05-24 20:39:11 +00003934 QNX*)
3935 # qcc must be used because the other compilers do not
3936 # support -N.
3937 LINKCC=qcc;;
3938 esac
3939fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003940{ echo "$as_me:$LINENO: result: $LINKCC" >&5
3941echo "${ECHO_T}$LINKCC" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003942
3943# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
3944# make sure we default having it set to "no": this is used by
3945# distutils.unixccompiler to know if it should add --enable-new-dtags
3946# to linker command lines, and failing to detect GNU ld simply results
3947# in the same bahaviour as before.
3948
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003949{ echo "$as_me:$LINENO: checking for GNU ld" >&5
3950echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003951ac_prog=ld
3952if test "$GCC" = yes; then
3953 ac_prog=`$CC -print-prog-name=ld`
3954fi
3955case `"$ac_prog" -V 2>&1 < /dev/null` in
3956 *GNU*)
3957 GNULD=yes;;
3958 *)
3959 GNULD=no;;
3960esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003961{ echo "$as_me:$LINENO: result: $GNULD" >&5
3962echo "${ECHO_T}$GNULD" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003963
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003964{ echo "$as_me:$LINENO: checking for --enable-shared" >&5
3965echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003966# Check whether --enable-shared was given.
3967if test "${enable_shared+set}" = set; then
3968 enableval=$enable_shared;
3969fi
3970
3971
3972if test -z "$enable_shared"
3973then
3974 case $ac_sys_system in
3975 CYGWIN* | atheos*)
3976 enable_shared="yes";;
3977 *)
3978 enable_shared="no";;
3979 esac
3980fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003981{ echo "$as_me:$LINENO: result: $enable_shared" >&5
3982echo "${ECHO_T}$enable_shared" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003983
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003984{ echo "$as_me:$LINENO: checking for --enable-profiling" >&5
3985echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003986# Check whether --enable-profiling was given.
3987if test "${enable_profiling+set}" = set; then
3988 enableval=$enable_profiling; ac_save_cc="$CC"
3989 CC="$CC -pg"
3990 if test "$cross_compiling" = yes; then
3991 ac_enable_profiling="no"
3992else
3993 cat >conftest.$ac_ext <<_ACEOF
3994/* confdefs.h. */
3995_ACEOF
3996cat confdefs.h >>conftest.$ac_ext
3997cat >>conftest.$ac_ext <<_ACEOF
3998/* end confdefs.h. */
3999int main() { return 0; }
4000_ACEOF
4001rm -f conftest$ac_exeext
4002if { (ac_try="$ac_link"
4003case "(($ac_try" in
4004 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4005 *) ac_try_echo=$ac_try;;
4006esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004007eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004008 (eval "$ac_link") 2>&5
4009 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004011 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4012 { (case "(($ac_try" in
4013 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4014 *) ac_try_echo=$ac_try;;
4015esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004016eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004017 (eval "$ac_try") 2>&5
4018 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004020 (exit $ac_status); }; }; then
4021 ac_enable_profiling="yes"
4022else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004023 echo "$as_me: program exited with status $ac_status" >&5
4024echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004025sed 's/^/| /' conftest.$ac_ext >&5
4026
4027( exit $ac_status )
4028ac_enable_profiling="no"
4029fi
Antoine Pitrou20327222009-05-24 20:39:11 +00004030rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4031fi
4032
4033
4034 CC="$ac_save_cc"
4035fi
4036
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004037{ echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
4038echo "${ECHO_T}$ac_enable_profiling" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004039
4040case "$ac_enable_profiling" in
4041 "yes")
4042 BASECFLAGS="-pg $BASECFLAGS"
4043 LDFLAGS="-pg $LDFLAGS"
4044 ;;
4045esac
4046
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004047{ echo "$as_me:$LINENO: checking LDLIBRARY" >&5
4048echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004049
4050# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4051# library that we build, but we do not want to link against it (we
4052# will find it with a -framework option). For this reason there is an
4053# extra variable BLDLIBRARY against which Python and the extension
4054# modules are linked, BLDLIBRARY. This is normally the same as
4055# LDLIBRARY, but empty for MacOSX framework builds.
4056if test "$enable_framework"
4057then
4058 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4059 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4060 BLDLIBRARY=''
4061else
4062 BLDLIBRARY='$(LDLIBRARY)'
4063fi
4064
4065# Other platforms follow
4066if test $enable_shared = "yes"; then
4067
4068cat >>confdefs.h <<\_ACEOF
4069#define Py_ENABLE_SHARED 1
4070_ACEOF
4071
4072 case $ac_sys_system in
4073 CYGWIN*)
4074 LDLIBRARY='libpython$(VERSION).dll.a'
4075 DLLLIBRARY='libpython$(VERSION).dll'
4076 ;;
4077 SunOS*)
4078 LDLIBRARY='libpython$(VERSION).so'
4079 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
4080 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4081 INSTSONAME="$LDLIBRARY".$SOVERSION
4082 ;;
4083 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
4084 LDLIBRARY='libpython$(VERSION).so'
4085 BLDLIBRARY='-L. -lpython$(VERSION)'
4086 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4087 case $ac_sys_system in
4088 FreeBSD*)
4089 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4090 ;;
4091 esac
4092 INSTSONAME="$LDLIBRARY".$SOVERSION
4093 ;;
4094 hp*|HP*)
4095 case `uname -m` in
4096 ia64)
4097 LDLIBRARY='libpython$(VERSION).so'
4098 ;;
4099 *)
4100 LDLIBRARY='libpython$(VERSION).sl'
4101 ;;
4102 esac
4103 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
4104 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4105 ;;
4106 OSF*)
4107 LDLIBRARY='libpython$(VERSION).so'
4108 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
4109 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4110 ;;
4111 atheos*)
4112 LDLIBRARY='libpython$(VERSION).so'
4113 BLDLIBRARY='-L. -lpython$(VERSION)'
4114 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
4115 ;;
4116 Darwin*)
4117 LDLIBRARY='libpython$(VERSION).dylib'
4118 BLDLIBRARY='-L. -lpython$(VERSION)'
4119 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4120 ;;
4121
4122 esac
4123else # shared is disabled
4124 case $ac_sys_system in
4125 CYGWIN*)
4126 BLDLIBRARY='$(LIBRARY)'
4127 LDLIBRARY='libpython$(VERSION).dll.a'
4128 ;;
4129 esac
4130fi
4131
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004132{ echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
4133echo "${ECHO_T}$LDLIBRARY" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004134
4135if test -n "$ac_tool_prefix"; then
4136 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4137set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004138{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4139echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004140if test "${ac_cv_prog_RANLIB+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004141 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00004142else
4143 if test -n "$RANLIB"; then
4144 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4145else
4146as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4147for as_dir in $PATH
4148do
4149 IFS=$as_save_IFS
4150 test -z "$as_dir" && as_dir=.
4151 for ac_exec_ext in '' $ac_executable_extensions; do
4152 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4153 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004154 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004155 break 2
4156 fi
4157done
4158done
4159IFS=$as_save_IFS
4160
4161fi
4162fi
4163RANLIB=$ac_cv_prog_RANLIB
4164if test -n "$RANLIB"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004165 { echo "$as_me:$LINENO: result: $RANLIB" >&5
4166echo "${ECHO_T}$RANLIB" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004167else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004168 { echo "$as_me:$LINENO: result: no" >&5
4169echo "${ECHO_T}no" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004170fi
4171
4172
4173fi
4174if test -z "$ac_cv_prog_RANLIB"; then
4175 ac_ct_RANLIB=$RANLIB
4176 # Extract the first word of "ranlib", so it can be a program name with args.
4177set dummy ranlib; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004178{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4179echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004180if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004181 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00004182else
4183 if test -n "$ac_ct_RANLIB"; then
4184 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4185else
4186as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4187for as_dir in $PATH
4188do
4189 IFS=$as_save_IFS
4190 test -z "$as_dir" && as_dir=.
4191 for ac_exec_ext in '' $ac_executable_extensions; do
4192 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4193 ac_cv_prog_ac_ct_RANLIB="ranlib"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004194 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004195 break 2
4196 fi
4197done
4198done
4199IFS=$as_save_IFS
4200
4201fi
4202fi
4203ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4204if test -n "$ac_ct_RANLIB"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004205 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4206echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004207else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004208 { echo "$as_me:$LINENO: result: no" >&5
4209echo "${ECHO_T}no" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004210fi
4211
4212 if test "x$ac_ct_RANLIB" = x; then
4213 RANLIB=":"
4214 else
4215 case $cross_compiling:$ac_tool_warned in
4216yes:)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004217{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
4218whose name does not start with the host triplet. If you think this
4219configuration is useful to you, please write to autoconf@gnu.org." >&5
4220echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
4221whose name does not start with the host triplet. If you think this
4222configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Antoine Pitrou20327222009-05-24 20:39:11 +00004223ac_tool_warned=yes ;;
4224esac
4225 RANLIB=$ac_ct_RANLIB
4226 fi
4227else
4228 RANLIB="$ac_cv_prog_RANLIB"
4229fi
4230
4231
4232for ac_prog in ar aal
4233do
4234 # Extract the first word of "$ac_prog", so it can be a program name with args.
4235set dummy $ac_prog; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004236{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4237echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004238if test "${ac_cv_prog_AR+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004239 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00004240else
4241 if test -n "$AR"; then
4242 ac_cv_prog_AR="$AR" # Let the user override the test.
4243else
4244as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4245for as_dir in $PATH
4246do
4247 IFS=$as_save_IFS
4248 test -z "$as_dir" && as_dir=.
4249 for ac_exec_ext in '' $ac_executable_extensions; do
4250 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4251 ac_cv_prog_AR="$ac_prog"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004252 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004253 break 2
4254 fi
4255done
4256done
4257IFS=$as_save_IFS
4258
4259fi
4260fi
4261AR=$ac_cv_prog_AR
4262if test -n "$AR"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004263 { echo "$as_me:$LINENO: result: $AR" >&5
4264echo "${ECHO_T}$AR" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004265else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004266 { echo "$as_me:$LINENO: result: no" >&5
4267echo "${ECHO_T}no" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004268fi
4269
4270
4271 test -n "$AR" && break
4272done
4273test -n "$AR" || AR="ar"
4274
4275
4276# tweak ARFLAGS only if the user didn't set it on the command line
4277
4278if test -z "$ARFLAGS"
4279then
4280 ARFLAGS="rc"
4281fi
4282
4283
4284# Extract the first word of "svnversion", so it can be a program name with args.
4285set dummy svnversion; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004286{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4287echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004288if test "${ac_cv_prog_SVNVERSION+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004289 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00004290else
4291 if test -n "$SVNVERSION"; then
4292 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
4293else
4294as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4295for as_dir in $PATH
4296do
4297 IFS=$as_save_IFS
4298 test -z "$as_dir" && as_dir=.
4299 for ac_exec_ext in '' $ac_executable_extensions; do
4300 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4301 ac_cv_prog_SVNVERSION="found"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004302 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004303 break 2
4304 fi
4305done
4306done
4307IFS=$as_save_IFS
4308
4309 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
4310fi
4311fi
4312SVNVERSION=$ac_cv_prog_SVNVERSION
4313if test -n "$SVNVERSION"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004314 { echo "$as_me:$LINENO: result: $SVNVERSION" >&5
4315echo "${ECHO_T}$SVNVERSION" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004316else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004317 { echo "$as_me:$LINENO: result: no" >&5
4318echo "${ECHO_T}no" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004319fi
4320
4321
4322if test $SVNVERSION = found
4323then
4324 SVNVERSION="svnversion \$(srcdir)"
4325else
4326 SVNVERSION="echo Unversioned directory"
4327fi
4328
4329case $MACHDEP in
4330bsdos*|hp*|HP*)
4331 # install -d does not work on BSDI or HP-UX
4332 if test -z "$INSTALL"
4333 then
4334 INSTALL="${srcdir}/install-sh -c"
4335 fi
4336esac
4337ac_aux_dir=
4338for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4339 if test -f "$ac_dir/install-sh"; then
4340 ac_aux_dir=$ac_dir
4341 ac_install_sh="$ac_aux_dir/install-sh -c"
4342 break
4343 elif test -f "$ac_dir/install.sh"; then
4344 ac_aux_dir=$ac_dir
4345 ac_install_sh="$ac_aux_dir/install.sh -c"
4346 break
4347 elif test -f "$ac_dir/shtool"; then
4348 ac_aux_dir=$ac_dir
4349 ac_install_sh="$ac_aux_dir/shtool install -c"
4350 break
4351 fi
4352done
4353if test -z "$ac_aux_dir"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004354 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
4355echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
Antoine Pitrou20327222009-05-24 20:39:11 +00004356 { (exit 1); exit 1; }; }
4357fi
4358
4359# These three variables are undocumented and unsupported,
4360# and are intended to be withdrawn in a future Autoconf release.
4361# They can cause serious problems if a builder's source tree is in a directory
4362# whose full name contains unusual characters.
4363ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4364ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4365ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4366
4367
4368# Find a good install program. We prefer a C program (faster),
4369# so one script is as good as another. But avoid the broken or
4370# incompatible versions:
4371# SysV /etc/install, /usr/sbin/install
4372# SunOS /usr/etc/install
4373# IRIX /sbin/install
4374# AIX /bin/install
4375# AmigaOS /C/install, which installs bootblocks on floppy discs
4376# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4377# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4378# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4379# OS/2's system install, which has a completely different semantic
4380# ./install, which can be erroneously created by make from ./install.sh.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004381{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4382echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004383if test -z "$INSTALL"; then
4384if test "${ac_cv_path_install+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004385 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00004386else
4387 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4388for as_dir in $PATH
4389do
4390 IFS=$as_save_IFS
4391 test -z "$as_dir" && as_dir=.
4392 # Account for people who put trailing slashes in PATH elements.
4393case $as_dir/ in
4394 ./ | .// | /cC/* | \
4395 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4396 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
4397 /usr/ucb/* ) ;;
4398 *)
4399 # OSF1 and SCO ODT 3.0 have their own names for install.
4400 # Don't use installbsd from OSF since it installs stuff as root
4401 # by default.
4402 for ac_prog in ginstall scoinst install; do
4403 for ac_exec_ext in '' $ac_executable_extensions; do
4404 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
4405 if test $ac_prog = install &&
4406 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4407 # AIX install. It has an incompatible calling convention.
4408 :
4409 elif test $ac_prog = install &&
4410 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4411 # program-specific install script used by HP pwplus--don't use.
4412 :
4413 else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004414 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4415 break 3
Antoine Pitrou20327222009-05-24 20:39:11 +00004416 fi
4417 fi
4418 done
4419 done
4420 ;;
4421esac
Antoine Pitrou20327222009-05-24 20:39:11 +00004422done
4423IFS=$as_save_IFS
4424
Antoine Pitrou20327222009-05-24 20:39:11 +00004425
4426fi
4427 if test "${ac_cv_path_install+set}" = set; then
4428 INSTALL=$ac_cv_path_install
4429 else
4430 # As a last resort, use the slow shell script. Don't cache a
4431 # value for INSTALL within a source directory, because that will
4432 # break other packages using the cache if that directory is
4433 # removed, or if the value is a relative name.
4434 INSTALL=$ac_install_sh
4435 fi
4436fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004437{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4438echo "${ECHO_T}$INSTALL" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004439
4440# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4441# It thinks the first close brace ends the variable substitution.
4442test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4443
4444test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4445
4446test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4447
4448
4449# Not every filesystem supports hard links
4450
4451if test -z "$LN" ; then
4452 case $ac_sys_system in
4453 CYGWIN*) LN="ln -s";;
4454 atheos*) LN="ln -s";;
4455 *) LN=ln;;
4456 esac
4457fi
4458
4459# Check for --with-pydebug
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004460{ echo "$as_me:$LINENO: checking for --with-pydebug" >&5
4461echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004462
4463# Check whether --with-pydebug was given.
4464if test "${with_pydebug+set}" = set; then
4465 withval=$with_pydebug;
4466if test "$withval" != no
4467then
4468
4469cat >>confdefs.h <<\_ACEOF
4470#define Py_DEBUG 1
4471_ACEOF
4472
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004473 { echo "$as_me:$LINENO: result: yes" >&5
4474echo "${ECHO_T}yes" >&6; };
Antoine Pitrou20327222009-05-24 20:39:11 +00004475 Py_DEBUG='true'
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004476else { echo "$as_me:$LINENO: result: no" >&5
4477echo "${ECHO_T}no" >&6; }; Py_DEBUG='false'
Antoine Pitrou20327222009-05-24 20:39:11 +00004478fi
4479else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004480 { echo "$as_me:$LINENO: result: no" >&5
4481echo "${ECHO_T}no" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004482fi
4483
4484
4485# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
4486# merged with this chunk of code?
4487
4488# Optimizer/debugger flags
4489# ------------------------
4490# (The following bit of code is complicated enough - please keep things
4491# indented properly. Just pretend you're editing Python code. ;-)
4492
4493# There are two parallel sets of case statements below, one that checks to
4494# see if OPT was set and one that does BASECFLAGS setting based upon
4495# compiler and platform. BASECFLAGS tweaks need to be made even if the
4496# user set OPT.
4497
4498# tweak OPT based on compiler and platform, only if the user didn't set
4499# it on the command line
4500
4501if test -z "$OPT"
4502then
4503 case $GCC in
4504 yes)
4505 if test "$CC" != 'g++' ; then
4506 STRICT_PROTO="-Wstrict-prototypes"
4507 fi
4508 # For gcc 4.x we need to use -fwrapv so lets check if its supported
4509 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
4510 WRAP="-fwrapv"
4511 fi
4512 case $ac_cv_prog_cc_g in
4513 yes)
4514 if test "$Py_DEBUG" = 'true' ; then
4515 # Optimization messes up debuggers, so turn it off for
4516 # debug builds.
4517 OPT="-g -Wall $STRICT_PROTO"
4518 else
4519 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
4520 fi
4521 ;;
4522 *)
4523 OPT="-O3 -Wall $STRICT_PROTO"
4524 ;;
4525 esac
4526 case $ac_sys_system in
4527 SCO_SV*) OPT="$OPT -m486 -DSCO5"
4528 ;;
4529 esac
4530 ;;
4531
4532 *)
4533 OPT="-O"
4534 ;;
4535 esac
Antoine Pitrou20327222009-05-24 20:39:11 +00004536fi
4537
4538
4539
4540# The -arch flags for universal builds on OSX
4541UNIVERSAL_ARCH_FLAGS=
4542
4543
4544# tweak BASECFLAGS based on compiler and platform
4545case $GCC in
4546yes)
4547 # Python violates C99 rules, by casting between incompatible
4548 # pointer types. GCC may generate bad code as a result of that,
4549 # so use -fno-strict-aliasing if supported.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004550 { echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
4551echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004552 ac_save_cc="$CC"
4553 CC="$CC -fno-strict-aliasing"
4554 if test "$cross_compiling" = yes; then
4555 ac_cv_no_strict_aliasing_ok=no
4556else
4557 cat >conftest.$ac_ext <<_ACEOF
4558/* confdefs.h. */
4559_ACEOF
4560cat confdefs.h >>conftest.$ac_ext
4561cat >>conftest.$ac_ext <<_ACEOF
4562/* end confdefs.h. */
4563int main() { return 0; }
4564_ACEOF
4565rm -f conftest$ac_exeext
4566if { (ac_try="$ac_link"
4567case "(($ac_try" in
4568 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4569 *) ac_try_echo=$ac_try;;
4570esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004571eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004572 (eval "$ac_link") 2>&5
4573 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004575 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4576 { (case "(($ac_try" in
4577 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4578 *) ac_try_echo=$ac_try;;
4579esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004580eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004581 (eval "$ac_try") 2>&5
4582 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004584 (exit $ac_status); }; }; then
4585 ac_cv_no_strict_aliasing_ok=yes
4586else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004587 echo "$as_me: program exited with status $ac_status" >&5
4588echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004589sed 's/^/| /' conftest.$ac_ext >&5
4590
4591( exit $ac_status )
4592ac_cv_no_strict_aliasing_ok=no
4593fi
Antoine Pitrou20327222009-05-24 20:39:11 +00004594rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4595fi
4596
4597
4598 CC="$ac_save_cc"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004599 { echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
4600echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004601 if test $ac_cv_no_strict_aliasing_ok = yes
4602 then
4603 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
4604 fi
4605
4606 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
4607 # support. Without this, treatment of subnormals doesn't follow
4608 # the standard.
4609 case $ac_sys_machine in
4610 alpha*)
4611 BASECFLAGS="$BASECFLAGS -mieee"
4612 ;;
4613 esac
4614
4615 case $ac_sys_system in
4616 SCO_SV*)
4617 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
4618 ;;
4619 # is there any other compiler on Darwin besides gcc?
4620 Darwin*)
4621 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
4622 # used to be here, but non-Apple gcc doesn't accept them.
4623
4624
4625 if test "${enable_universalsdk}"; then
4626 UNIVERSAL_ARCH_FLAGS=""
4627 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
4628 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
4629 ARCH_RUN_32BIT=""
4630
4631 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
4632 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussorend45ff2c2009-09-06 11:11:04 +00004633 ARCH_RUN_32BIT="true"
Antoine Pitrou20327222009-05-24 20:39:11 +00004634
4635 elif test "$UNIVERSAL_ARCHS" = "all" ; then
4636 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
4637 ARCH_RUN_32BIT="arch -i386 -ppc"
4638
Ronald Oussoren856624d2009-09-08 07:13:53 +00004639 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
4640 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
4641 ARCH_RUN_32BIT="arch -i386"
4642
4643 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
4644 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
4645 ARCH_RUN_32BIT="arch -i386 -ppc"
4646
Antoine Pitrou20327222009-05-24 20:39:11 +00004647 else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004648 { { echo "$as_me:$LINENO: error: proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" >&5
4649echo "$as_me: error: proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" >&2;}
Antoine Pitrou20327222009-05-24 20:39:11 +00004650 { (exit 1); exit 1; }; }
4651
4652 fi
4653
4654
4655 BASECFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
4656 tgt=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4657 if test "${UNIVERSALSDK}" != "/" -a "${tgt}" '>' '10.4' ; then
4658 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
4659 fi
4660 fi
4661
4662 # Calculate the right deployment target for this build.
4663 #
4664 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4665 if test ${cur_target} '>' 10.2; then
4666 cur_target=10.3
Ronald Oussorend45ff2c2009-09-06 11:11:04 +00004667 if test ${enable_universalsdk}; then
4668 if test "${UNIVERSAL_ARCHS}" = "all"; then
4669 # Ensure that the default platform for a
4670 # 4-way universal build is OSX 10.5,
4671 # that's the first OS release where
4672 # 4-way builds make sense.
4673 cur_target='10.5'
Ronald Oussoren856624d2009-09-08 07:13:53 +00004674
4675 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
4676 cur_target='10.5'
4677
4678 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
4679 cur_target='10.5'
4680
4681 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
4682 cur_target='10.5'
Ronald Oussorend45ff2c2009-09-06 11:11:04 +00004683 fi
4684 else
4685 if test `arch` = "i386"; then
4686 # On Intel macs default to a deployment
4687 # target of 10.4, that's the first OSX
4688 # release with Intel support.
4689 cur_target="10.4"
4690 fi
4691 fi
Antoine Pitrou20327222009-05-24 20:39:11 +00004692 fi
4693 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
4694
4695 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
4696 # environment with a value that is the same as what we'll use
4697 # in the Makefile to ensure that we'll get the same compiler
4698 # environment during configure and build time.
4699 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
4700 export MACOSX_DEPLOYMENT_TARGET
4701 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
4702
4703 ;;
4704 OSF*)
4705 BASECFLAGS="$BASECFLAGS -mieee"
4706 ;;
4707 esac
4708 ;;
4709
4710*)
4711 case $ac_sys_system in
4712 OpenUNIX*|UnixWare*)
4713 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
4714 ;;
4715 OSF*)
4716 BASECFLAGS="$BASECFLAGS -ieee -std"
4717 ;;
4718 SCO_SV*)
4719 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
4720 ;;
4721 esac
4722 ;;
4723esac
4724
4725if test "$Py_DEBUG" = 'true'; then
4726 :
4727else
4728 OPT="-DNDEBUG $OPT"
4729fi
4730
4731if test "$ac_arch_flags"
4732then
4733 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
4734fi
4735
4736# disable check for icc since it seems to pass, but generates a warning
4737if test "$CC" = icc
4738then
4739 ac_cv_opt_olimit_ok=no
4740fi
4741
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004742{ echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
4743echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004744if test "${ac_cv_opt_olimit_ok+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004745 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00004746else
4747 ac_save_cc="$CC"
4748CC="$CC -OPT:Olimit=0"
4749if test "$cross_compiling" = yes; then
4750 ac_cv_opt_olimit_ok=no
4751else
4752 cat >conftest.$ac_ext <<_ACEOF
4753/* confdefs.h. */
4754_ACEOF
4755cat confdefs.h >>conftest.$ac_ext
4756cat >>conftest.$ac_ext <<_ACEOF
4757/* end confdefs.h. */
4758int main() { return 0; }
4759_ACEOF
4760rm -f conftest$ac_exeext
4761if { (ac_try="$ac_link"
4762case "(($ac_try" in
4763 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4764 *) ac_try_echo=$ac_try;;
4765esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004766eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004767 (eval "$ac_link") 2>&5
4768 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004770 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4771 { (case "(($ac_try" in
4772 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4773 *) ac_try_echo=$ac_try;;
4774esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004775eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004776 (eval "$ac_try") 2>&5
4777 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004779 (exit $ac_status); }; }; then
4780 ac_cv_opt_olimit_ok=yes
4781else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004782 echo "$as_me: program exited with status $ac_status" >&5
4783echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004784sed 's/^/| /' conftest.$ac_ext >&5
4785
4786( exit $ac_status )
4787ac_cv_opt_olimit_ok=no
4788fi
Antoine Pitrou20327222009-05-24 20:39:11 +00004789rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4790fi
4791
4792
4793CC="$ac_save_cc"
4794fi
4795
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004796{ echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
4797echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004798if test $ac_cv_opt_olimit_ok = yes; then
4799 case $ac_sys_system in
4800 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
4801 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
4802 # environment?
4803 Darwin*)
4804 ;;
4805 *)
4806 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
4807 ;;
4808 esac
4809else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004810 { echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
4811echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004812 if test "${ac_cv_olimit_ok+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004813 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00004814else
4815 ac_save_cc="$CC"
4816 CC="$CC -Olimit 1500"
4817 if test "$cross_compiling" = yes; then
4818 ac_cv_olimit_ok=no
4819else
4820 cat >conftest.$ac_ext <<_ACEOF
4821/* confdefs.h. */
4822_ACEOF
4823cat confdefs.h >>conftest.$ac_ext
4824cat >>conftest.$ac_ext <<_ACEOF
4825/* end confdefs.h. */
4826int main() { return 0; }
4827_ACEOF
4828rm -f conftest$ac_exeext
4829if { (ac_try="$ac_link"
4830case "(($ac_try" in
4831 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4832 *) ac_try_echo=$ac_try;;
4833esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004834eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004835 (eval "$ac_link") 2>&5
4836 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004838 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4839 { (case "(($ac_try" in
4840 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4841 *) ac_try_echo=$ac_try;;
4842esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004843eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004844 (eval "$ac_try") 2>&5
4845 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004847 (exit $ac_status); }; }; then
4848 ac_cv_olimit_ok=yes
4849else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004850 echo "$as_me: program exited with status $ac_status" >&5
4851echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004852sed 's/^/| /' conftest.$ac_ext >&5
4853
4854( exit $ac_status )
4855ac_cv_olimit_ok=no
4856fi
Antoine Pitrou20327222009-05-24 20:39:11 +00004857rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4858fi
4859
4860
4861 CC="$ac_save_cc"
4862fi
4863
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004864 { echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4865echo "${ECHO_T}$ac_cv_olimit_ok" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004866 if test $ac_cv_olimit_ok = yes; then
4867 BASECFLAGS="$BASECFLAGS -Olimit 1500"
4868 fi
4869fi
4870
4871# Check whether GCC supports PyArg_ParseTuple format
4872if test "$GCC" = "yes"
4873then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004874 { echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
4875echo $ECHO_N "checking whether gcc supports ParseTuple __format__... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004876 save_CFLAGS=$CFLAGS
4877 CFLAGS="$CFLAGS -Werror"
4878 cat >conftest.$ac_ext <<_ACEOF
4879/* confdefs.h. */
4880_ACEOF
4881cat confdefs.h >>conftest.$ac_ext
4882cat >>conftest.$ac_ext <<_ACEOF
4883/* end confdefs.h. */
4884
4885 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
4886
4887int
4888main ()
4889{
4890
4891 ;
4892 return 0;
4893}
4894_ACEOF
4895rm -f conftest.$ac_objext
4896if { (ac_try="$ac_compile"
4897case "(($ac_try" in
4898 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4899 *) ac_try_echo=$ac_try;;
4900esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004901eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004902 (eval "$ac_compile") 2>conftest.er1
4903 ac_status=$?
4904 grep -v '^ *+' conftest.er1 >conftest.err
4905 rm -f conftest.er1
4906 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004908 (exit $ac_status); } && {
4909 test -z "$ac_c_werror_flag" ||
4910 test ! -s conftest.err
4911 } && test -s conftest.$ac_objext; then
4912
4913cat >>confdefs.h <<\_ACEOF
4914#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
4915_ACEOF
4916
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004917 { echo "$as_me:$LINENO: result: yes" >&5
4918echo "${ECHO_T}yes" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004919else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004920 echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004921sed 's/^/| /' conftest.$ac_ext >&5
4922
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004923 { echo "$as_me:$LINENO: result: no" >&5
4924echo "${ECHO_T}no" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004925
4926fi
4927
4928rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4929 CFLAGS=$save_CFLAGS
4930fi
4931
4932# On some compilers, pthreads are available without further options
4933# (e.g. MacOS X). On some of these systems, the compiler will not
4934# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
4935# So we have to see first whether pthreads are available without
4936# options before we can check whether -Kpthread improves anything.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004937{ echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
4938echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004939if test "${ac_cv_pthread_is_default+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004940 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00004941else
4942 if test "$cross_compiling" = yes; then
4943 ac_cv_pthread_is_default=no
4944else
4945 cat >conftest.$ac_ext <<_ACEOF
4946/* confdefs.h. */
4947_ACEOF
4948cat confdefs.h >>conftest.$ac_ext
4949cat >>conftest.$ac_ext <<_ACEOF
4950/* end confdefs.h. */
4951
4952#include <pthread.h>
4953
4954void* routine(void* p){return NULL;}
4955
4956int main(){
4957 pthread_t p;
4958 if(pthread_create(&p,NULL,routine,NULL)!=0)
4959 return 1;
4960 (void)pthread_detach(p);
4961 return 0;
4962}
4963
4964_ACEOF
4965rm -f conftest$ac_exeext
4966if { (ac_try="$ac_link"
4967case "(($ac_try" in
4968 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4969 *) ac_try_echo=$ac_try;;
4970esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004971eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004972 (eval "$ac_link") 2>&5
4973 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004975 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4976 { (case "(($ac_try" in
4977 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4978 *) ac_try_echo=$ac_try;;
4979esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004980eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004981 (eval "$ac_try") 2>&5
4982 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004984 (exit $ac_status); }; }; then
4985
4986 ac_cv_pthread_is_default=yes
4987 ac_cv_kthread=no
4988 ac_cv_pthread=no
4989
4990else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004991 echo "$as_me: program exited with status $ac_status" >&5
4992echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004993sed 's/^/| /' conftest.$ac_ext >&5
4994
4995( exit $ac_status )
4996ac_cv_pthread_is_default=no
4997fi
Antoine Pitrou20327222009-05-24 20:39:11 +00004998rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4999fi
5000
5001
5002
5003fi
5004
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005005{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
5006echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005007
5008
5009if test $ac_cv_pthread_is_default = yes
5010then
5011 ac_cv_kpthread=no
5012else
5013# -Kpthread, if available, provides the right #defines
5014# and linker options to make pthread_create available
5015# Some compilers won't report that they do not support -Kpthread,
5016# so we need to run a program to see whether it really made the
5017# function available.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005018{ echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
5019echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005020if test "${ac_cv_kpthread+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005021 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00005022else
5023 ac_save_cc="$CC"
5024CC="$CC -Kpthread"
5025if test "$cross_compiling" = yes; then
5026 ac_cv_kpthread=no
5027else
5028 cat >conftest.$ac_ext <<_ACEOF
5029/* confdefs.h. */
5030_ACEOF
5031cat confdefs.h >>conftest.$ac_ext
5032cat >>conftest.$ac_ext <<_ACEOF
5033/* end confdefs.h. */
5034
5035#include <pthread.h>
5036
5037void* routine(void* p){return NULL;}
5038
5039int main(){
5040 pthread_t p;
5041 if(pthread_create(&p,NULL,routine,NULL)!=0)
5042 return 1;
5043 (void)pthread_detach(p);
5044 return 0;
5045}
5046
5047_ACEOF
5048rm -f conftest$ac_exeext
5049if { (ac_try="$ac_link"
5050case "(($ac_try" in
5051 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5052 *) ac_try_echo=$ac_try;;
5053esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005054eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005055 (eval "$ac_link") 2>&5
5056 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005058 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5059 { (case "(($ac_try" in
5060 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5061 *) ac_try_echo=$ac_try;;
5062esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005063eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005064 (eval "$ac_try") 2>&5
5065 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005066 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005067 (exit $ac_status); }; }; then
5068 ac_cv_kpthread=yes
5069else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005070 echo "$as_me: program exited with status $ac_status" >&5
5071echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005072sed 's/^/| /' conftest.$ac_ext >&5
5073
5074( exit $ac_status )
5075ac_cv_kpthread=no
5076fi
Antoine Pitrou20327222009-05-24 20:39:11 +00005077rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5078fi
5079
5080
5081CC="$ac_save_cc"
5082fi
5083
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005084{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
5085echo "${ECHO_T}$ac_cv_kpthread" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005086fi
5087
5088if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5089then
5090# -Kthread, if available, provides the right #defines
5091# and linker options to make pthread_create available
5092# Some compilers won't report that they do not support -Kthread,
5093# so we need to run a program to see whether it really made the
5094# function available.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005095{ echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
5096echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005097if test "${ac_cv_kthread+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005098 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00005099else
5100 ac_save_cc="$CC"
5101CC="$CC -Kthread"
5102if test "$cross_compiling" = yes; then
5103 ac_cv_kthread=no
5104else
5105 cat >conftest.$ac_ext <<_ACEOF
5106/* confdefs.h. */
5107_ACEOF
5108cat confdefs.h >>conftest.$ac_ext
5109cat >>conftest.$ac_ext <<_ACEOF
5110/* end confdefs.h. */
5111
5112#include <pthread.h>
5113
5114void* routine(void* p){return NULL;}
5115
5116int main(){
5117 pthread_t p;
5118 if(pthread_create(&p,NULL,routine,NULL)!=0)
5119 return 1;
5120 (void)pthread_detach(p);
5121 return 0;
5122}
5123
5124_ACEOF
5125rm -f conftest$ac_exeext
5126if { (ac_try="$ac_link"
5127case "(($ac_try" in
5128 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5129 *) ac_try_echo=$ac_try;;
5130esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005131eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005132 (eval "$ac_link") 2>&5
5133 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005135 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5136 { (case "(($ac_try" in
5137 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5138 *) ac_try_echo=$ac_try;;
5139esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005140eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005141 (eval "$ac_try") 2>&5
5142 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005144 (exit $ac_status); }; }; then
5145 ac_cv_kthread=yes
5146else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005147 echo "$as_me: program exited with status $ac_status" >&5
5148echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005149sed 's/^/| /' conftest.$ac_ext >&5
5150
5151( exit $ac_status )
5152ac_cv_kthread=no
5153fi
Antoine Pitrou20327222009-05-24 20:39:11 +00005154rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5155fi
5156
5157
5158CC="$ac_save_cc"
5159fi
5160
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005161{ echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
5162echo "${ECHO_T}$ac_cv_kthread" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005163fi
5164
5165if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5166then
5167# -pthread, if available, provides the right #defines
5168# and linker options to make pthread_create available
5169# Some compilers won't report that they do not support -pthread,
5170# so we need to run a program to see whether it really made the
5171# function available.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005172{ echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
5173echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005174if test "${ac_cv_thread+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005175 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00005176else
5177 ac_save_cc="$CC"
5178CC="$CC -pthread"
5179if test "$cross_compiling" = yes; then
5180 ac_cv_pthread=no
5181else
5182 cat >conftest.$ac_ext <<_ACEOF
5183/* confdefs.h. */
5184_ACEOF
5185cat confdefs.h >>conftest.$ac_ext
5186cat >>conftest.$ac_ext <<_ACEOF
5187/* end confdefs.h. */
5188
5189#include <pthread.h>
5190
5191void* routine(void* p){return NULL;}
5192
5193int main(){
5194 pthread_t p;
5195 if(pthread_create(&p,NULL,routine,NULL)!=0)
5196 return 1;
5197 (void)pthread_detach(p);
5198 return 0;
5199}
5200
5201_ACEOF
5202rm -f conftest$ac_exeext
5203if { (ac_try="$ac_link"
5204case "(($ac_try" in
5205 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5206 *) ac_try_echo=$ac_try;;
5207esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005208eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005209 (eval "$ac_link") 2>&5
5210 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005212 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5213 { (case "(($ac_try" in
5214 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5215 *) ac_try_echo=$ac_try;;
5216esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005217eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005218 (eval "$ac_try") 2>&5
5219 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005221 (exit $ac_status); }; }; then
5222 ac_cv_pthread=yes
5223else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005224 echo "$as_me: program exited with status $ac_status" >&5
5225echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005226sed 's/^/| /' conftest.$ac_ext >&5
5227
5228( exit $ac_status )
5229ac_cv_pthread=no
5230fi
Antoine Pitrou20327222009-05-24 20:39:11 +00005231rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5232fi
5233
5234
5235CC="$ac_save_cc"
5236fi
5237
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005238{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5239echo "${ECHO_T}$ac_cv_pthread" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005240fi
5241
5242# If we have set a CC compiler flag for thread support then
5243# check if it works for CXX, too.
5244ac_cv_cxx_thread=no
5245if test ! -z "$CXX"
5246then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005247{ echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5248echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005249ac_save_cxx="$CXX"
5250
5251if test "$ac_cv_kpthread" = "yes"
5252then
5253 CXX="$CXX -Kpthread"
5254 ac_cv_cxx_thread=yes
5255elif test "$ac_cv_kthread" = "yes"
5256then
5257 CXX="$CXX -Kthread"
5258 ac_cv_cxx_thread=yes
5259elif test "$ac_cv_pthread" = "yes"
5260then
5261 CXX="$CXX -pthread"
5262 ac_cv_cxx_thread=yes
5263fi
5264
5265if test $ac_cv_cxx_thread = yes
5266then
5267 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5268 $CXX -c conftest.$ac_ext 2>&5
5269 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5270 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5271 then
5272 ac_cv_cxx_thread=yes
5273 else
5274 ac_cv_cxx_thread=no
5275 fi
5276 rm -fr conftest*
5277fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005278{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5279echo "${ECHO_T}$ac_cv_cxx_thread" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005280fi
5281CXX="$ac_save_cxx"
5282
5283
5284# checks for header files
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005285{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5286echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005287if test "${ac_cv_header_stdc+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005288 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00005289else
5290 cat >conftest.$ac_ext <<_ACEOF
5291/* confdefs.h. */
5292_ACEOF
5293cat confdefs.h >>conftest.$ac_ext
5294cat >>conftest.$ac_ext <<_ACEOF
5295/* end confdefs.h. */
5296#include <stdlib.h>
5297#include <stdarg.h>
5298#include <string.h>
5299#include <float.h>
5300
5301int
5302main ()
5303{
5304
5305 ;
5306 return 0;
5307}
5308_ACEOF
5309rm -f conftest.$ac_objext
5310if { (ac_try="$ac_compile"
5311case "(($ac_try" in
5312 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5313 *) ac_try_echo=$ac_try;;
5314esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005315eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005316 (eval "$ac_compile") 2>conftest.er1
5317 ac_status=$?
5318 grep -v '^ *+' conftest.er1 >conftest.err
5319 rm -f conftest.er1
5320 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005322 (exit $ac_status); } && {
5323 test -z "$ac_c_werror_flag" ||
5324 test ! -s conftest.err
5325 } && test -s conftest.$ac_objext; then
5326 ac_cv_header_stdc=yes
5327else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005328 echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005329sed 's/^/| /' conftest.$ac_ext >&5
5330
5331 ac_cv_header_stdc=no
5332fi
5333
5334rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5335
5336if test $ac_cv_header_stdc = yes; then
5337 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5338 cat >conftest.$ac_ext <<_ACEOF
5339/* confdefs.h. */
5340_ACEOF
5341cat confdefs.h >>conftest.$ac_ext
5342cat >>conftest.$ac_ext <<_ACEOF
5343/* end confdefs.h. */
5344#include <string.h>
5345
5346_ACEOF
5347if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5348 $EGREP "memchr" >/dev/null 2>&1; then
5349 :
5350else
5351 ac_cv_header_stdc=no
5352fi
Mark Dickinson875ada42009-11-28 12:52:39 +00005353rm -f conftest*
Antoine Pitrou20327222009-05-24 20:39:11 +00005354
5355fi
5356
5357if test $ac_cv_header_stdc = yes; then
5358 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5359 cat >conftest.$ac_ext <<_ACEOF
5360/* confdefs.h. */
5361_ACEOF
5362cat confdefs.h >>conftest.$ac_ext
5363cat >>conftest.$ac_ext <<_ACEOF
5364/* end confdefs.h. */
5365#include <stdlib.h>
5366
5367_ACEOF
5368if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5369 $EGREP "free" >/dev/null 2>&1; then
5370 :
5371else
5372 ac_cv_header_stdc=no
5373fi
Mark Dickinson875ada42009-11-28 12:52:39 +00005374rm -f conftest*
Antoine Pitrou20327222009-05-24 20:39:11 +00005375
5376fi
5377
5378if test $ac_cv_header_stdc = yes; then
5379 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5380 if test "$cross_compiling" = yes; then
5381 :
5382else
5383 cat >conftest.$ac_ext <<_ACEOF
5384/* confdefs.h. */
5385_ACEOF
5386cat confdefs.h >>conftest.$ac_ext
5387cat >>conftest.$ac_ext <<_ACEOF
5388/* end confdefs.h. */
5389#include <ctype.h>
5390#include <stdlib.h>
5391#if ((' ' & 0x0FF) == 0x020)
5392# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5393# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5394#else
5395# define ISLOWER(c) \
5396 (('a' <= (c) && (c) <= 'i') \
5397 || ('j' <= (c) && (c) <= 'r') \
5398 || ('s' <= (c) && (c) <= 'z'))
5399# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5400#endif
5401
5402#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5403int
5404main ()
5405{
5406 int i;
5407 for (i = 0; i < 256; i++)
5408 if (XOR (islower (i), ISLOWER (i))
5409 || toupper (i) != TOUPPER (i))
5410 return 2;
5411 return 0;
5412}
5413_ACEOF
5414rm -f conftest$ac_exeext
5415if { (ac_try="$ac_link"
5416case "(($ac_try" in
5417 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5418 *) ac_try_echo=$ac_try;;
5419esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005420eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005421 (eval "$ac_link") 2>&5
5422 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005424 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5425 { (case "(($ac_try" in
5426 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5427 *) ac_try_echo=$ac_try;;
5428esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005429eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005430 (eval "$ac_try") 2>&5
5431 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005433 (exit $ac_status); }; }; then
5434 :
5435else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005436 echo "$as_me: program exited with status $ac_status" >&5
5437echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005438sed 's/^/| /' conftest.$ac_ext >&5
5439
5440( exit $ac_status )
5441ac_cv_header_stdc=no
5442fi
Antoine Pitrou20327222009-05-24 20:39:11 +00005443rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5444fi
5445
5446
5447fi
5448fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005449{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5450echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005451if test $ac_cv_header_stdc = yes; then
5452
5453cat >>confdefs.h <<\_ACEOF
5454#define STDC_HEADERS 1
5455_ACEOF
5456
5457fi
5458
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005459# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5470 inttypes.h stdint.h unistd.h
5471do
5472as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5473{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5474echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5475if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5476 echo $ECHO_N "(cached) $ECHO_C" >&6
5477else
5478 cat >conftest.$ac_ext <<_ACEOF
5479/* confdefs.h. */
5480_ACEOF
5481cat confdefs.h >>conftest.$ac_ext
5482cat >>conftest.$ac_ext <<_ACEOF
5483/* end confdefs.h. */
5484$ac_includes_default
5485
5486#include <$ac_header>
5487_ACEOF
5488rm -f conftest.$ac_objext
5489if { (ac_try="$ac_compile"
5490case "(($ac_try" in
5491 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5492 *) ac_try_echo=$ac_try;;
5493esac
5494eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5495 (eval "$ac_compile") 2>conftest.er1
5496 ac_status=$?
5497 grep -v '^ *+' conftest.er1 >conftest.err
5498 rm -f conftest.er1
5499 cat conftest.err >&5
5500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5501 (exit $ac_status); } && {
5502 test -z "$ac_c_werror_flag" ||
5503 test ! -s conftest.err
5504 } && test -s conftest.$ac_objext; then
5505 eval "$as_ac_Header=yes"
5506else
5507 echo "$as_me: failed program was:" >&5
5508sed 's/^/| /' conftest.$ac_ext >&5
5509
5510 eval "$as_ac_Header=no"
5511fi
5512
5513rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5514fi
5515ac_res=`eval echo '${'$as_ac_Header'}'`
5516 { echo "$as_me:$LINENO: result: $ac_res" >&5
5517echo "${ECHO_T}$ac_res" >&6; }
5518if test `eval echo '${'$as_ac_Header'}'` = yes; then
5519 cat >>confdefs.h <<_ACEOF
5520#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5521_ACEOF
5522
5523fi
5524
5525done
5526
5527
Antoine Pitrou20327222009-05-24 20:39:11 +00005528
Martin v. Löwis11437992002-04-12 09:54:03 +00005529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
Anthony Baxter8a560de2004-10-13 15:30:56 +00005564
Martin v. Löwisc3001752005-01-23 09:27:24 +00005565
Martin v. Löwis11017b12006-01-14 18:12:57 +00005566
Thomas Wouters477c8d52006-05-27 19:21:47 +00005567
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005568
5569
5570
5571
5572
5573
5574
5575
Thomas Wouters89f507f2006-12-13 04:49:30 +00005576
Christian Heimes043d6f62008-01-07 17:19:16 +00005577
Christian Heimes4fbc72b2008-03-22 00:47:35 +00005578
5579
Christian Heimesbbe741d2008-03-28 10:53:29 +00005580
Benjamin Petersonde9c8692008-07-01 18:23:09 +00005581
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005582for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5583fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00005584ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00005585shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005586unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00005587sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
5588sys/lock.h sys/mkdev.h sys/modem.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005589sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Benjamin Petersonde9c8692008-07-01 18:23:09 +00005590sys/termio.h sys/time.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005591sys/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 +00005592sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimes043d6f62008-01-07 17:19:16 +00005593bluetooth/bluetooth.h linux/tipc.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00005594do
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005595as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005596if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005597 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5598echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005599if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005600 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005601fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005602ac_res=`eval echo '${'$as_ac_Header'}'`
5603 { echo "$as_me:$LINENO: result: $ac_res" >&5
5604echo "${ECHO_T}$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005605else
Martin v. Löwis11437992002-04-12 09:54:03 +00005606 # Is the header compilable?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005607{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5608echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005609cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005610/* confdefs.h. */
5611_ACEOF
5612cat confdefs.h >>conftest.$ac_ext
5613cat >>conftest.$ac_ext <<_ACEOF
5614/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005615$ac_includes_default
5616#include <$ac_header>
5617_ACEOF
5618rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005619if { (ac_try="$ac_compile"
5620case "(($ac_try" in
5621 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5622 *) ac_try_echo=$ac_try;;
5623esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005624eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005625 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005626 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005627 grep -v '^ *+' conftest.er1 >conftest.err
5628 rm -f conftest.er1
5629 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005631 (exit $ac_status); } && {
5632 test -z "$ac_c_werror_flag" ||
5633 test ! -s conftest.err
5634 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005635 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00005636else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005637 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005638sed 's/^/| /' conftest.$ac_ext >&5
5639
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005640 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005641fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005642
5643rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005644{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5645echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005646
5647# Is the header present?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005648{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5649echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005650cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005651/* confdefs.h. */
5652_ACEOF
5653cat confdefs.h >>conftest.$ac_ext
5654cat >>conftest.$ac_ext <<_ACEOF
5655/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005656#include <$ac_header>
5657_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005658if { (ac_try="$ac_cpp conftest.$ac_ext"
5659case "(($ac_try" in
5660 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5661 *) ac_try_echo=$ac_try;;
5662esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005663eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005664 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005665 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005666 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00005667 rm -f conftest.er1
5668 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005670 (exit $ac_status); } >/dev/null && {
5671 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5672 test ! -s conftest.err
5673 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005674 ac_header_preproc=yes
5675else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005676 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005677sed 's/^/| /' conftest.$ac_ext >&5
5678
Martin v. Löwis11437992002-04-12 09:54:03 +00005679 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00005680fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005681
Martin v. Löwis11437992002-04-12 09:54:03 +00005682rm -f conftest.err conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005683{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5684echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005685
5686# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005687case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5688 yes:no: )
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005689 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5690echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
5691 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5692echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005693 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005694 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005695 no:yes:* )
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005696 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5697echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
5698 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5699echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5700 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5701echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5702 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5703echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
5704 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5705echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5706 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5707echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005708 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00005709## -------------------------------------- ##
5710## Report this to http://bugs.python.org/ ##
5711## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005712_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005713 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005714 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00005715esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005716{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5717echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005718if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005719 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005720else
Skip Montanarof0d5f792004-08-15 14:08:23 +00005721 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005722fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005723ac_res=`eval echo '${'$as_ac_Header'}'`
5724 { echo "$as_me:$LINENO: result: $ac_res" >&5
5725echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005726
5727fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005728if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005729 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005730#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005731_ACEOF
5732
5733fi
5734
Guido van Rossum627b2d71993-12-24 10:39:16 +00005735done
5736
Martin v. Löwis11437992002-04-12 09:54:03 +00005737
5738
5739
5740
5741
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005742ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005743for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005744 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
5745{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5746echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005747if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005748 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005749else
Martin v. Löwis11437992002-04-12 09:54:03 +00005750 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005751/* confdefs.h. */
5752_ACEOF
5753cat confdefs.h >>conftest.$ac_ext
5754cat >>conftest.$ac_ext <<_ACEOF
5755/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005756#include <sys/types.h>
5757#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00005758
Martin v. Löwis11437992002-04-12 09:54:03 +00005759int
5760main ()
5761{
5762if ((DIR *) 0)
5763return 0;
5764 ;
5765 return 0;
5766}
5767_ACEOF
5768rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005769if { (ac_try="$ac_compile"
5770case "(($ac_try" in
5771 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5772 *) ac_try_echo=$ac_try;;
5773esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005774eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005775 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005776 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005777 grep -v '^ *+' conftest.er1 >conftest.err
5778 rm -f conftest.er1
5779 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005781 (exit $ac_status); } && {
5782 test -z "$ac_c_werror_flag" ||
5783 test ! -s conftest.err
5784 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005785 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00005786else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005787 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005788sed 's/^/| /' conftest.$ac_ext >&5
5789
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005790 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005791fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005792
5793rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005794fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005795ac_res=`eval echo '${'$as_ac_Header'}'`
5796 { echo "$as_me:$LINENO: result: $ac_res" >&5
5797echo "${ECHO_T}$ac_res" >&6; }
5798if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005799 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005800#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005801_ACEOF
5802
5803ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00005804fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005805
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005806done
5807# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5808if test $ac_header_dirent = dirent.h; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005809 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5810echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005811if test "${ac_cv_search_opendir+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005812 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005813else
Martin v. Löwis11437992002-04-12 09:54:03 +00005814 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005815cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005816/* confdefs.h. */
5817_ACEOF
5818cat confdefs.h >>conftest.$ac_ext
5819cat >>conftest.$ac_ext <<_ACEOF
5820/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005821
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005822/* Override any GCC internal prototype to avoid an error.
5823 Use char because int might match the return type of a GCC
5824 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005825#ifdef __cplusplus
5826extern "C"
5827#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005828char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005829int
5830main ()
5831{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005832return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005833 ;
5834 return 0;
5835}
5836_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005837for ac_lib in '' dir; do
5838 if test -z "$ac_lib"; then
5839 ac_res="none required"
5840 else
5841 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005842 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005843 fi
5844 rm -f conftest.$ac_objext conftest$ac_exeext
5845if { (ac_try="$ac_link"
5846case "(($ac_try" in
5847 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5848 *) ac_try_echo=$ac_try;;
5849esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005850eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005851 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005852 ac_status=$?
5853 grep -v '^ *+' conftest.er1 >conftest.err
5854 rm -f conftest.er1
5855 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005857 (exit $ac_status); } && {
5858 test -z "$ac_c_werror_flag" ||
5859 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005860 } && test -s conftest$ac_exeext &&
5861 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005862 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00005863else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005864 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005865sed 's/^/| /' conftest.$ac_ext >&5
5866
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005867
Thomas Wouters477c8d52006-05-27 19:21:47 +00005868fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005869
5870rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5871 conftest$ac_exeext
5872 if test "${ac_cv_search_opendir+set}" = set; then
5873 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005874fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005875done
5876if test "${ac_cv_search_opendir+set}" = set; then
5877 :
5878else
5879 ac_cv_search_opendir=no
5880fi
5881rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005882LIBS=$ac_func_search_save_LIBS
5883fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005884{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5885echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005886ac_res=$ac_cv_search_opendir
5887if test "$ac_res" != no; then
5888 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005889
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005890fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005891
Michael W. Hudson54241132001-12-07 15:38:26 +00005892else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005893 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5894echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005895if test "${ac_cv_search_opendir+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005896 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005897else
5898 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005899cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005900/* confdefs.h. */
5901_ACEOF
5902cat confdefs.h >>conftest.$ac_ext
5903cat >>conftest.$ac_ext <<_ACEOF
5904/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005905
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005906/* Override any GCC internal prototype to avoid an error.
5907 Use char because int might match the return type of a GCC
5908 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005909#ifdef __cplusplus
5910extern "C"
5911#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005912char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005913int
5914main ()
5915{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005916return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005917 ;
5918 return 0;
5919}
5920_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005921for ac_lib in '' x; do
5922 if test -z "$ac_lib"; then
5923 ac_res="none required"
5924 else
5925 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005926 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005927 fi
5928 rm -f conftest.$ac_objext conftest$ac_exeext
5929if { (ac_try="$ac_link"
5930case "(($ac_try" in
5931 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5932 *) ac_try_echo=$ac_try;;
5933esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005934eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005935 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005936 ac_status=$?
5937 grep -v '^ *+' conftest.er1 >conftest.err
5938 rm -f conftest.er1
5939 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005941 (exit $ac_status); } && {
5942 test -z "$ac_c_werror_flag" ||
5943 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005944 } && test -s conftest$ac_exeext &&
5945 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005946 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00005947else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005948 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005949sed 's/^/| /' conftest.$ac_ext >&5
5950
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005951
Thomas Wouters477c8d52006-05-27 19:21:47 +00005952fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005953
5954rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5955 conftest$ac_exeext
5956 if test "${ac_cv_search_opendir+set}" = set; then
5957 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005958fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005959done
5960if test "${ac_cv_search_opendir+set}" = set; then
5961 :
5962else
5963 ac_cv_search_opendir=no
5964fi
5965rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005966LIBS=$ac_func_search_save_LIBS
5967fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005968{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5969echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005970ac_res=$ac_cv_search_opendir
5971if test "$ac_res" != no; then
5972 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00005973
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005974fi
5975
5976fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005977
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005978{ echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
5979echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005980if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005981 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005982else
5983 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005984/* confdefs.h. */
5985_ACEOF
5986cat confdefs.h >>conftest.$ac_ext
5987cat >>conftest.$ac_ext <<_ACEOF
5988/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005989#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005990int
5991main ()
5992{
5993return makedev(0, 0);
5994 ;
5995 return 0;
5996}
5997_ACEOF
5998rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005999if { (ac_try="$ac_link"
6000case "(($ac_try" in
6001 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6002 *) ac_try_echo=$ac_try;;
6003esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006004eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006005 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006006 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006007 grep -v '^ *+' conftest.er1 >conftest.err
6008 rm -f conftest.er1
6009 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006011 (exit $ac_status); } && {
6012 test -z "$ac_c_werror_flag" ||
6013 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006014 } && test -s conftest$ac_exeext &&
6015 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006016 ac_cv_header_sys_types_h_makedev=yes
6017else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006018 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006019sed 's/^/| /' conftest.$ac_ext >&5
6020
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006021 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006022fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006023
6024rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006025 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006026
6027fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006028{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
6029echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006030
6031if test $ac_cv_header_sys_types_h_makedev = no; then
6032if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006033 { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6034echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006035if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006036 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006037fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006038{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6039echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006040else
6041 # Is the header compilable?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006042{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
6043echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006044cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006045/* confdefs.h. */
6046_ACEOF
6047cat confdefs.h >>conftest.$ac_ext
6048cat >>conftest.$ac_ext <<_ACEOF
6049/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006050$ac_includes_default
6051#include <sys/mkdev.h>
6052_ACEOF
6053rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006054if { (ac_try="$ac_compile"
6055case "(($ac_try" in
6056 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6057 *) ac_try_echo=$ac_try;;
6058esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006059eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006060 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006061 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006062 grep -v '^ *+' conftest.er1 >conftest.err
6063 rm -f conftest.er1
6064 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006066 (exit $ac_status); } && {
6067 test -z "$ac_c_werror_flag" ||
6068 test ! -s conftest.err
6069 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006070 ac_header_compiler=yes
6071else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006072 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006073sed 's/^/| /' conftest.$ac_ext >&5
6074
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006075 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006076fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006077
6078rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006079{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6080echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006081
6082# Is the header present?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006083{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
6084echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006085cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006086/* confdefs.h. */
6087_ACEOF
6088cat confdefs.h >>conftest.$ac_ext
6089cat >>conftest.$ac_ext <<_ACEOF
6090/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006091#include <sys/mkdev.h>
6092_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006093if { (ac_try="$ac_cpp conftest.$ac_ext"
6094case "(($ac_try" in
6095 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6096 *) ac_try_echo=$ac_try;;
6097esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006098eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006099 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006100 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006101 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006102 rm -f conftest.er1
6103 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006105 (exit $ac_status); } >/dev/null && {
6106 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6107 test ! -s conftest.err
6108 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006109 ac_header_preproc=yes
6110else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006111 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006112sed 's/^/| /' conftest.$ac_ext >&5
6113
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006114 ac_header_preproc=no
6115fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006116
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006117rm -f conftest.err conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006118{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6119echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006120
6121# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006122case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6123 yes:no: )
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006124 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
6125echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6126 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
6127echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006128 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006129 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006130 no:yes:* )
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006131 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
6132echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
6133 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
6134echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
6135 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
6136echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
6137 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
6138echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
6139 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
6140echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
6141 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
6142echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006143 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00006144## -------------------------------------- ##
6145## Report this to http://bugs.python.org/ ##
6146## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006147_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006148 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006149 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006150esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006151{ echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6152echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006153if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006154 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006155else
6156 ac_cv_header_sys_mkdev_h=$ac_header_preproc
6157fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006158{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6159echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006160
6161fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006162if test $ac_cv_header_sys_mkdev_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006163
6164cat >>confdefs.h <<\_ACEOF
6165#define MAJOR_IN_MKDEV 1
6166_ACEOF
6167
6168fi
6169
6170
6171
6172 if test $ac_cv_header_sys_mkdev_h = no; then
6173 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006174 { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6175echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006176if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006177 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006178fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006179{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6180echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006181else
6182 # Is the header compilable?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006183{ echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6184echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006185cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006186/* confdefs.h. */
6187_ACEOF
6188cat confdefs.h >>conftest.$ac_ext
6189cat >>conftest.$ac_ext <<_ACEOF
6190/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006191$ac_includes_default
6192#include <sys/sysmacros.h>
6193_ACEOF
6194rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006195if { (ac_try="$ac_compile"
6196case "(($ac_try" in
6197 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6198 *) ac_try_echo=$ac_try;;
6199esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006200eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006201 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006202 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006203 grep -v '^ *+' conftest.er1 >conftest.err
6204 rm -f conftest.er1
6205 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006207 (exit $ac_status); } && {
6208 test -z "$ac_c_werror_flag" ||
6209 test ! -s conftest.err
6210 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006211 ac_header_compiler=yes
6212else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006213 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006214sed 's/^/| /' conftest.$ac_ext >&5
6215
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006216 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006217fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006218
6219rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006220{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6221echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006222
6223# Is the header present?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006224{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6225echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006226cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006227/* confdefs.h. */
6228_ACEOF
6229cat confdefs.h >>conftest.$ac_ext
6230cat >>conftest.$ac_ext <<_ACEOF
6231/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006232#include <sys/sysmacros.h>
6233_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006234if { (ac_try="$ac_cpp conftest.$ac_ext"
6235case "(($ac_try" in
6236 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6237 *) ac_try_echo=$ac_try;;
6238esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006239eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006240 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006241 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006242 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006243 rm -f conftest.er1
6244 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006245 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006246 (exit $ac_status); } >/dev/null && {
6247 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6248 test ! -s conftest.err
6249 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006250 ac_header_preproc=yes
6251else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006252 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006253sed 's/^/| /' conftest.$ac_ext >&5
6254
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006255 ac_header_preproc=no
6256fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006257
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006258rm -f conftest.err conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006259{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6260echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006261
6262# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006263case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6264 yes:no: )
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006265 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6266echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6267 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6268echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006269 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006270 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006271 no:yes:* )
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006272 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6273echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
6274 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6275echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6276 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6277echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6278 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6279echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
6280 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6281echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
6282 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6283echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006284 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00006285## -------------------------------------- ##
6286## Report this to http://bugs.python.org/ ##
6287## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006288_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006289 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006290 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006291esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006292{ echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6293echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006294if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006295 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006296else
6297 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6298fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006299{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6300echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006301
6302fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006303if test $ac_cv_header_sys_sysmacros_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006304
6305cat >>confdefs.h <<\_ACEOF
6306#define MAJOR_IN_SYSMACROS 1
6307_ACEOF
6308
6309fi
6310
6311
6312 fi
6313fi
6314
Michael W. Hudson54241132001-12-07 15:38:26 +00006315
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006316# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006317
6318for ac_header in term.h
6319do
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006320as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6321{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6322echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006323if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006324 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006325else
6326 cat >conftest.$ac_ext <<_ACEOF
6327/* confdefs.h. */
6328_ACEOF
6329cat confdefs.h >>conftest.$ac_ext
6330cat >>conftest.$ac_ext <<_ACEOF
6331/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006332
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006333#ifdef HAVE_CURSES_H
6334#include <curses.h>
6335#endif
6336
6337
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006338#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006339_ACEOF
6340rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006341if { (ac_try="$ac_compile"
6342case "(($ac_try" in
6343 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6344 *) ac_try_echo=$ac_try;;
6345esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006346eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006347 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006348 ac_status=$?
6349 grep -v '^ *+' conftest.er1 >conftest.err
6350 rm -f conftest.er1
6351 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006353 (exit $ac_status); } && {
6354 test -z "$ac_c_werror_flag" ||
6355 test ! -s conftest.err
6356 } && test -s conftest.$ac_objext; then
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006357 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006358else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006359 echo "$as_me: failed program was:" >&5
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006360sed 's/^/| /' conftest.$ac_ext >&5
6361
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006362 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006363fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006364
6365rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006366fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006367ac_res=`eval echo '${'$as_ac_Header'}'`
6368 { echo "$as_me:$LINENO: result: $ac_res" >&5
6369echo "${ECHO_T}$ac_res" >&6; }
6370if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006371 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006372#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006373_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006374
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006375fi
6376
6377done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006378
6379
Martin v. Löwis11017b12006-01-14 18:12:57 +00006380# On Linux, netlink.h requires asm/types.h
6381
6382for ac_header in linux/netlink.h
6383do
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006384as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6385{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6386echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006387if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006388 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11017b12006-01-14 18:12:57 +00006389else
6390 cat >conftest.$ac_ext <<_ACEOF
6391/* confdefs.h. */
6392_ACEOF
6393cat confdefs.h >>conftest.$ac_ext
6394cat >>conftest.$ac_ext <<_ACEOF
6395/* end confdefs.h. */
6396
6397#ifdef HAVE_ASM_TYPES_H
6398#include <asm/types.h>
6399#endif
6400#ifdef HAVE_SYS_SOCKET_H
6401#include <sys/socket.h>
6402#endif
6403
6404
6405#include <$ac_header>
6406_ACEOF
6407rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006408if { (ac_try="$ac_compile"
6409case "(($ac_try" in
6410 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6411 *) ac_try_echo=$ac_try;;
6412esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006413eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006414 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006415 ac_status=$?
6416 grep -v '^ *+' conftest.er1 >conftest.err
6417 rm -f conftest.er1
6418 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006420 (exit $ac_status); } && {
6421 test -z "$ac_c_werror_flag" ||
6422 test ! -s conftest.err
6423 } && test -s conftest.$ac_objext; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006424 eval "$as_ac_Header=yes"
6425else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006426 echo "$as_me: failed program was:" >&5
Martin v. Löwis11017b12006-01-14 18:12:57 +00006427sed 's/^/| /' conftest.$ac_ext >&5
6428
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006429 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00006430fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006431
6432rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00006433fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006434ac_res=`eval echo '${'$as_ac_Header'}'`
6435 { echo "$as_me:$LINENO: result: $ac_res" >&5
6436echo "${ECHO_T}$ac_res" >&6; }
6437if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006438 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006439#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006440_ACEOF
6441
6442fi
6443
6444done
6445
6446
Guido van Rossum627b2d71993-12-24 10:39:16 +00006447# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006448was_it_defined=no
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006449{ echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
6450echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006451cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006452/* confdefs.h. */
6453_ACEOF
6454cat confdefs.h >>conftest.$ac_ext
6455cat >>conftest.$ac_ext <<_ACEOF
6456/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006457#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006458
6459_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006460if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006461 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006462 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006463else
Martin v. Löwis11437992002-04-12 09:54:03 +00006464
6465
6466cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006467#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00006468_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006469
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006470
Guido van Rossum627b2d71993-12-24 10:39:16 +00006471fi
Mark Dickinson875ada42009-11-28 12:52:39 +00006472rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006473
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006474{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
6475echo "${ECHO_T}$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006476
Neal Norwitz11690112002-07-30 01:08:28 +00006477# Check whether using makedev requires defining _OSF_SOURCE
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006478{ echo "$as_me:$LINENO: checking for makedev" >&5
6479echo $ECHO_N "checking for makedev... $ECHO_C" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006480cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006481/* confdefs.h. */
6482_ACEOF
6483cat confdefs.h >>conftest.$ac_ext
6484cat >>conftest.$ac_ext <<_ACEOF
6485/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006486#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006487int
6488main ()
6489{
6490 makedev(0, 0)
6491 ;
6492 return 0;
6493}
6494_ACEOF
6495rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006496if { (ac_try="$ac_link"
6497case "(($ac_try" in
6498 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6499 *) ac_try_echo=$ac_try;;
6500esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006501eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006502 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006503 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006504 grep -v '^ *+' conftest.er1 >conftest.err
6505 rm -f conftest.er1
6506 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006508 (exit $ac_status); } && {
6509 test -z "$ac_c_werror_flag" ||
6510 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006511 } && test -s conftest$ac_exeext &&
6512 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006513 ac_cv_has_makedev=yes
6514else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006515 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006516sed 's/^/| /' conftest.$ac_ext >&5
6517
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006518 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006519fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006520
6521rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006522 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006523if test "$ac_cv_has_makedev" = "no"; then
6524 # we didn't link, try if _OSF_SOURCE will allow us to link
6525 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006526/* confdefs.h. */
6527_ACEOF
6528cat confdefs.h >>conftest.$ac_ext
6529cat >>conftest.$ac_ext <<_ACEOF
6530/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006531
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006532#define _OSF_SOURCE 1
6533#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006534
Neal Norwitz11690112002-07-30 01:08:28 +00006535int
6536main ()
6537{
6538 makedev(0, 0)
6539 ;
6540 return 0;
6541}
6542_ACEOF
6543rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006544if { (ac_try="$ac_link"
6545case "(($ac_try" in
6546 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6547 *) ac_try_echo=$ac_try;;
6548esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006549eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006550 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006551 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006552 grep -v '^ *+' conftest.er1 >conftest.err
6553 rm -f conftest.er1
6554 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006556 (exit $ac_status); } && {
6557 test -z "$ac_c_werror_flag" ||
6558 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006559 } && test -s conftest$ac_exeext &&
6560 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006561 ac_cv_has_makedev=yes
6562else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006563 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006564sed 's/^/| /' conftest.$ac_ext >&5
6565
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006566 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006567fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006568
6569rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006570 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006571 if test "$ac_cv_has_makedev" = "yes"; then
6572
6573cat >>confdefs.h <<\_ACEOF
6574#define _OSF_SOURCE 1
6575_ACEOF
6576
6577 fi
6578fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006579{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
6580echo "${ECHO_T}$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006581if test "$ac_cv_has_makedev" = "yes"; then
6582
6583cat >>confdefs.h <<\_ACEOF
6584#define HAVE_MAKEDEV 1
6585_ACEOF
6586
6587fi
6588
Martin v. Löwis399a6892002-10-04 10:22:02 +00006589# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6590# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6591# defined, but the compiler does not support pragma redefine_extname,
6592# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6593# structures (such as rlimit64) without declaring them. As a
6594# work-around, disable LFS on such configurations
6595
6596use_lfs=yes
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006597{ echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
6598echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006599cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006600/* confdefs.h. */
6601_ACEOF
6602cat confdefs.h >>conftest.$ac_ext
6603cat >>conftest.$ac_ext <<_ACEOF
6604/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006605
6606#define _LARGEFILE_SOURCE 1
6607#define _FILE_OFFSET_BITS 64
6608#include <sys/resource.h>
6609
Martin v. Löwis399a6892002-10-04 10:22:02 +00006610int
6611main ()
6612{
6613struct rlimit foo;
6614 ;
6615 return 0;
6616}
6617_ACEOF
6618rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006619if { (ac_try="$ac_compile"
6620case "(($ac_try" in
6621 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6622 *) ac_try_echo=$ac_try;;
6623esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006624eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006625 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00006626 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006627 grep -v '^ *+' conftest.er1 >conftest.err
6628 rm -f conftest.er1
6629 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006631 (exit $ac_status); } && {
6632 test -z "$ac_c_werror_flag" ||
6633 test ! -s conftest.err
6634 } && test -s conftest.$ac_objext; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00006635 sol_lfs_bug=no
6636else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006637 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006638sed 's/^/| /' conftest.$ac_ext >&5
6639
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006640 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006641fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006642
6643rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006644{ echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
6645echo "${ECHO_T}$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006646if test "$sol_lfs_bug" = "yes"; then
6647 use_lfs=no
6648fi
6649
6650if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006651# Two defines needed to enable largefile support on various platforms
6652# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006653
Martin v. Löwis11437992002-04-12 09:54:03 +00006654cat >>confdefs.h <<\_ACEOF
6655#define _LARGEFILE_SOURCE 1
6656_ACEOF
6657
6658
6659cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006660#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00006661_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006662
Martin v. Löwis399a6892002-10-04 10:22:02 +00006663fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006664
Guido van Rossum84e7b241996-08-19 21:59:00 +00006665# Add some code to confdefs.h so that the test for off_t works on SCO
6666cat >> confdefs.h <<\EOF
6667#if defined(SCO_DS)
6668#undef _OFF_T
6669#endif
6670EOF
6671
Guido van Rossumef2255b2000-03-10 22:30:29 +00006672# Type availability checks
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006673{ echo "$as_me:$LINENO: checking for mode_t" >&5
6674echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006675if test "${ac_cv_type_mode_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006676 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006677else
Benjamin Petersona8332062009-09-11 22:36:27 +00006678 cat >conftest.$ac_ext <<_ACEOF
6679/* confdefs.h. */
6680_ACEOF
6681cat confdefs.h >>conftest.$ac_ext
6682cat >>conftest.$ac_ext <<_ACEOF
6683/* end confdefs.h. */
6684$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006685typedef mode_t ac__type_new_;
Benjamin Petersona8332062009-09-11 22:36:27 +00006686int
6687main ()
6688{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006689if ((ac__type_new_ *) 0)
6690 return 0;
6691if (sizeof (ac__type_new_))
6692 return 0;
Benjamin Petersona8332062009-09-11 22:36:27 +00006693 ;
6694 return 0;
6695}
6696_ACEOF
6697rm -f conftest.$ac_objext
6698if { (ac_try="$ac_compile"
6699case "(($ac_try" in
6700 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6701 *) ac_try_echo=$ac_try;;
6702esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006703eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00006704 (eval "$ac_compile") 2>conftest.er1
6705 ac_status=$?
6706 grep -v '^ *+' conftest.er1 >conftest.err
6707 rm -f conftest.er1
6708 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00006710 (exit $ac_status); } && {
6711 test -z "$ac_c_werror_flag" ||
6712 test ! -s conftest.err
6713 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006714 ac_cv_type_mode_t=yes
Jack Jansendd19cf82001-12-06 22:36:17 +00006715else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006716 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006717sed 's/^/| /' conftest.$ac_ext >&5
6718
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006719 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00006720fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006721
6722rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006723fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006724{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
6725echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
6726if test $ac_cv_type_mode_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006727 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006728else
Martin v. Löwis11437992002-04-12 09:54:03 +00006729
6730cat >>confdefs.h <<_ACEOF
6731#define mode_t int
6732_ACEOF
6733
6734fi
6735
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006736{ echo "$as_me:$LINENO: checking for off_t" >&5
6737echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006738if test "${ac_cv_type_off_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006739 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006740else
Benjamin Petersona8332062009-09-11 22:36:27 +00006741 cat >conftest.$ac_ext <<_ACEOF
6742/* confdefs.h. */
6743_ACEOF
6744cat confdefs.h >>conftest.$ac_ext
6745cat >>conftest.$ac_ext <<_ACEOF
6746/* end confdefs.h. */
6747$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006748typedef off_t ac__type_new_;
Benjamin Petersona8332062009-09-11 22:36:27 +00006749int
6750main ()
6751{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006752if ((ac__type_new_ *) 0)
6753 return 0;
6754if (sizeof (ac__type_new_))
6755 return 0;
Benjamin Petersona8332062009-09-11 22:36:27 +00006756 ;
6757 return 0;
6758}
6759_ACEOF
6760rm -f conftest.$ac_objext
6761if { (ac_try="$ac_compile"
6762case "(($ac_try" in
6763 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6764 *) ac_try_echo=$ac_try;;
6765esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006766eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00006767 (eval "$ac_compile") 2>conftest.er1
6768 ac_status=$?
6769 grep -v '^ *+' conftest.er1 >conftest.err
6770 rm -f conftest.er1
6771 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00006773 (exit $ac_status); } && {
6774 test -z "$ac_c_werror_flag" ||
6775 test ! -s conftest.err
6776 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006777 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006778else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006779 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006780sed 's/^/| /' conftest.$ac_ext >&5
6781
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006782 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006783fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006784
6785rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006786fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006787{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6788echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
6789if test $ac_cv_type_off_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006790 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006791else
Martin v. Löwis11437992002-04-12 09:54:03 +00006792
6793cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006794#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006795_ACEOF
6796
6797fi
6798
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006799{ echo "$as_me:$LINENO: checking for pid_t" >&5
6800echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006801if test "${ac_cv_type_pid_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006802 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006803else
Benjamin Petersona8332062009-09-11 22:36:27 +00006804 cat >conftest.$ac_ext <<_ACEOF
6805/* confdefs.h. */
6806_ACEOF
6807cat confdefs.h >>conftest.$ac_ext
6808cat >>conftest.$ac_ext <<_ACEOF
6809/* end confdefs.h. */
6810$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006811typedef pid_t ac__type_new_;
Benjamin Petersona8332062009-09-11 22:36:27 +00006812int
6813main ()
6814{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006815if ((ac__type_new_ *) 0)
6816 return 0;
6817if (sizeof (ac__type_new_))
6818 return 0;
Benjamin Petersona8332062009-09-11 22:36:27 +00006819 ;
6820 return 0;
6821}
6822_ACEOF
6823rm -f conftest.$ac_objext
6824if { (ac_try="$ac_compile"
6825case "(($ac_try" in
6826 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6827 *) ac_try_echo=$ac_try;;
6828esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006829eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00006830 (eval "$ac_compile") 2>conftest.er1
6831 ac_status=$?
6832 grep -v '^ *+' conftest.er1 >conftest.err
6833 rm -f conftest.er1
6834 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00006836 (exit $ac_status); } && {
6837 test -z "$ac_c_werror_flag" ||
6838 test ! -s conftest.err
6839 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006840 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006841else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006842 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006843sed 's/^/| /' conftest.$ac_ext >&5
6844
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006845 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006846fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006847
6848rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006849fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006850{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
6851echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
6852if test $ac_cv_type_pid_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006853 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006854else
Martin v. Löwis11437992002-04-12 09:54:03 +00006855
6856cat >>confdefs.h <<_ACEOF
6857#define pid_t int
6858_ACEOF
6859
6860fi
6861
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006862{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
6863echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006864if test "${ac_cv_type_signal+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006865 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006866else
6867 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006868/* confdefs.h. */
6869_ACEOF
6870cat confdefs.h >>conftest.$ac_ext
6871cat >>conftest.$ac_ext <<_ACEOF
6872/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00006873#include <sys/types.h>
6874#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006875
Martin v. Löwis11437992002-04-12 09:54:03 +00006876int
6877main ()
6878{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006879return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00006880 ;
6881 return 0;
6882}
6883_ACEOF
6884rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006885if { (ac_try="$ac_compile"
6886case "(($ac_try" in
6887 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6888 *) ac_try_echo=$ac_try;;
6889esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006890eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006891 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006892 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006893 grep -v '^ *+' conftest.er1 >conftest.err
6894 rm -f conftest.er1
6895 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006897 (exit $ac_status); } && {
6898 test -z "$ac_c_werror_flag" ||
6899 test ! -s conftest.err
6900 } && test -s conftest.$ac_objext; then
6901 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00006902else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006903 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006904sed 's/^/| /' conftest.$ac_ext >&5
6905
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006906 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00006907fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006908
6909rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006910fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006911{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
6912echo "${ECHO_T}$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006913
Martin v. Löwis11437992002-04-12 09:54:03 +00006914cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006915#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00006916_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006917
Michael W. Hudson54241132001-12-07 15:38:26 +00006918
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006919{ echo "$as_me:$LINENO: checking for size_t" >&5
6920echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006921if test "${ac_cv_type_size_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006922 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006923else
Benjamin Petersona8332062009-09-11 22:36:27 +00006924 cat >conftest.$ac_ext <<_ACEOF
6925/* confdefs.h. */
6926_ACEOF
6927cat confdefs.h >>conftest.$ac_ext
6928cat >>conftest.$ac_ext <<_ACEOF
6929/* end confdefs.h. */
6930$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006931typedef size_t ac__type_new_;
Benjamin Petersona8332062009-09-11 22:36:27 +00006932int
6933main ()
6934{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006935if ((ac__type_new_ *) 0)
6936 return 0;
6937if (sizeof (ac__type_new_))
6938 return 0;
Benjamin Petersona8332062009-09-11 22:36:27 +00006939 ;
6940 return 0;
6941}
6942_ACEOF
6943rm -f conftest.$ac_objext
6944if { (ac_try="$ac_compile"
6945case "(($ac_try" in
6946 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6947 *) ac_try_echo=$ac_try;;
6948esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006949eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00006950 (eval "$ac_compile") 2>conftest.er1
6951 ac_status=$?
6952 grep -v '^ *+' conftest.er1 >conftest.err
6953 rm -f conftest.er1
6954 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00006956 (exit $ac_status); } && {
6957 test -z "$ac_c_werror_flag" ||
6958 test ! -s conftest.err
6959 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006960 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006961else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006962 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006963sed 's/^/| /' conftest.$ac_ext >&5
6964
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006965 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006966fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006967
6968rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006969fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006970{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
6971echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
6972if test $ac_cv_type_size_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006973 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006974else
Martin v. Löwis11437992002-04-12 09:54:03 +00006975
6976cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006977#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006978_ACEOF
6979
6980fi
6981
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006982{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
6983echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006984if test "${ac_cv_type_uid_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006985 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006986else
6987 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006988/* confdefs.h. */
6989_ACEOF
6990cat confdefs.h >>conftest.$ac_ext
6991cat >>conftest.$ac_ext <<_ACEOF
6992/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006993#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006994
6995_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006996if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006997 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006998 ac_cv_type_uid_t=yes
6999else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007000 ac_cv_type_uid_t=no
7001fi
Mark Dickinson875ada42009-11-28 12:52:39 +00007002rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007003
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007004fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007005{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
7006echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007007if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007008
Martin v. Löwis11437992002-04-12 09:54:03 +00007009cat >>confdefs.h <<\_ACEOF
7010#define uid_t int
7011_ACEOF
7012
7013
7014cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007015#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00007016_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007017
7018fi
7019
Mark Dickinsonbd792642009-03-18 20:06:12 +00007020
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007021 { echo "$as_me:$LINENO: checking for uint32_t" >&5
7022echo $ECHO_N "checking for uint32_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007023if test "${ac_cv_c_uint32_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007024 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007025else
7026 ac_cv_c_uint32_t=no
7027 for ac_type in 'uint32_t' 'unsigned int' 'unsigned long int' \
7028 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7029 cat >conftest.$ac_ext <<_ACEOF
7030/* confdefs.h. */
7031_ACEOF
7032cat confdefs.h >>conftest.$ac_ext
7033cat >>conftest.$ac_ext <<_ACEOF
7034/* end confdefs.h. */
7035$ac_includes_default
7036int
7037main ()
7038{
7039static int test_array [1 - 2 * !(($ac_type) -1 >> (32 - 1) == 1)];
7040test_array [0] = 0
7041
7042 ;
7043 return 0;
7044}
7045_ACEOF
7046rm -f conftest.$ac_objext
7047if { (ac_try="$ac_compile"
7048case "(($ac_try" in
7049 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7050 *) ac_try_echo=$ac_try;;
7051esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007052eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007053 (eval "$ac_compile") 2>conftest.er1
7054 ac_status=$?
7055 grep -v '^ *+' conftest.er1 >conftest.err
7056 rm -f conftest.er1
7057 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007058 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007059 (exit $ac_status); } && {
7060 test -z "$ac_c_werror_flag" ||
7061 test ! -s conftest.err
7062 } && test -s conftest.$ac_objext; then
7063 case $ac_type in
7064 uint32_t) ac_cv_c_uint32_t=yes ;;
7065 *) ac_cv_c_uint32_t=$ac_type ;;
7066esac
7067
7068else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007069 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007070sed 's/^/| /' conftest.$ac_ext >&5
7071
7072
7073fi
7074
7075rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7076 test "$ac_cv_c_uint32_t" != no && break
7077 done
7078fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007079{ echo "$as_me:$LINENO: result: $ac_cv_c_uint32_t" >&5
7080echo "${ECHO_T}$ac_cv_c_uint32_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007081 case $ac_cv_c_uint32_t in #(
7082 no|yes) ;; #(
7083 *)
7084
7085cat >>confdefs.h <<\_ACEOF
7086#define _UINT32_T 1
7087_ACEOF
7088
7089
7090cat >>confdefs.h <<_ACEOF
7091#define uint32_t $ac_cv_c_uint32_t
7092_ACEOF
7093;;
7094 esac
7095
7096
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007097 { echo "$as_me:$LINENO: checking for uint64_t" >&5
7098echo $ECHO_N "checking for uint64_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007099if test "${ac_cv_c_uint64_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007100 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007101else
7102 ac_cv_c_uint64_t=no
7103 for ac_type in 'uint64_t' 'unsigned int' 'unsigned long int' \
7104 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7105 cat >conftest.$ac_ext <<_ACEOF
7106/* confdefs.h. */
7107_ACEOF
7108cat confdefs.h >>conftest.$ac_ext
7109cat >>conftest.$ac_ext <<_ACEOF
7110/* end confdefs.h. */
7111$ac_includes_default
7112int
7113main ()
7114{
7115static int test_array [1 - 2 * !(($ac_type) -1 >> (64 - 1) == 1)];
7116test_array [0] = 0
7117
7118 ;
7119 return 0;
7120}
7121_ACEOF
7122rm -f conftest.$ac_objext
7123if { (ac_try="$ac_compile"
7124case "(($ac_try" in
7125 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7126 *) ac_try_echo=$ac_try;;
7127esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007128eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007129 (eval "$ac_compile") 2>conftest.er1
7130 ac_status=$?
7131 grep -v '^ *+' conftest.er1 >conftest.err
7132 rm -f conftest.er1
7133 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007135 (exit $ac_status); } && {
7136 test -z "$ac_c_werror_flag" ||
7137 test ! -s conftest.err
7138 } && test -s conftest.$ac_objext; then
7139 case $ac_type in
7140 uint64_t) ac_cv_c_uint64_t=yes ;;
7141 *) ac_cv_c_uint64_t=$ac_type ;;
7142esac
7143
7144else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007145 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007146sed 's/^/| /' conftest.$ac_ext >&5
7147
7148
7149fi
7150
7151rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7152 test "$ac_cv_c_uint64_t" != no && break
7153 done
7154fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007155{ echo "$as_me:$LINENO: result: $ac_cv_c_uint64_t" >&5
7156echo "${ECHO_T}$ac_cv_c_uint64_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007157 case $ac_cv_c_uint64_t in #(
7158 no|yes) ;; #(
7159 *)
7160
7161cat >>confdefs.h <<\_ACEOF
7162#define _UINT64_T 1
7163_ACEOF
7164
7165
7166cat >>confdefs.h <<_ACEOF
7167#define uint64_t $ac_cv_c_uint64_t
7168_ACEOF
7169;;
7170 esac
7171
7172
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007173 { echo "$as_me:$LINENO: checking for int32_t" >&5
7174echo $ECHO_N "checking for int32_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007175if test "${ac_cv_c_int32_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007176 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007177else
7178 ac_cv_c_int32_t=no
7179 for ac_type in 'int32_t' 'int' 'long int' \
7180 'long long int' 'short int' 'signed char'; do
7181 cat >conftest.$ac_ext <<_ACEOF
7182/* confdefs.h. */
7183_ACEOF
7184cat confdefs.h >>conftest.$ac_ext
7185cat >>conftest.$ac_ext <<_ACEOF
7186/* end confdefs.h. */
7187$ac_includes_default
7188int
7189main ()
7190{
7191static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1))];
7192test_array [0] = 0
7193
7194 ;
7195 return 0;
7196}
7197_ACEOF
7198rm -f conftest.$ac_objext
7199if { (ac_try="$ac_compile"
7200case "(($ac_try" in
7201 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7202 *) ac_try_echo=$ac_try;;
7203esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007204eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007205 (eval "$ac_compile") 2>conftest.er1
7206 ac_status=$?
7207 grep -v '^ *+' conftest.er1 >conftest.err
7208 rm -f conftest.er1
7209 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007211 (exit $ac_status); } && {
7212 test -z "$ac_c_werror_flag" ||
7213 test ! -s conftest.err
7214 } && test -s conftest.$ac_objext; then
7215 cat >conftest.$ac_ext <<_ACEOF
7216/* confdefs.h. */
7217_ACEOF
7218cat confdefs.h >>conftest.$ac_ext
7219cat >>conftest.$ac_ext <<_ACEOF
7220/* end confdefs.h. */
7221$ac_includes_default
7222int
7223main ()
7224{
7225static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007226 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 2))];
Mark Dickinsonbd792642009-03-18 20:06:12 +00007227test_array [0] = 0
7228
7229 ;
7230 return 0;
7231}
7232_ACEOF
7233rm -f conftest.$ac_objext
7234if { (ac_try="$ac_compile"
7235case "(($ac_try" in
7236 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7237 *) ac_try_echo=$ac_try;;
7238esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007239eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007240 (eval "$ac_compile") 2>conftest.er1
7241 ac_status=$?
7242 grep -v '^ *+' conftest.er1 >conftest.err
7243 rm -f conftest.er1
7244 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007245 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007246 (exit $ac_status); } && {
7247 test -z "$ac_c_werror_flag" ||
7248 test ! -s conftest.err
7249 } && test -s conftest.$ac_objext; then
7250 :
7251else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007252 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007253sed 's/^/| /' conftest.$ac_ext >&5
7254
7255 case $ac_type in
7256 int32_t) ac_cv_c_int32_t=yes ;;
7257 *) ac_cv_c_int32_t=$ac_type ;;
7258esac
7259
7260fi
7261
7262rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7263else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007264 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007265sed 's/^/| /' conftest.$ac_ext >&5
7266
7267
7268fi
7269
7270rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7271 test "$ac_cv_c_int32_t" != no && break
7272 done
7273fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007274{ echo "$as_me:$LINENO: result: $ac_cv_c_int32_t" >&5
7275echo "${ECHO_T}$ac_cv_c_int32_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007276 case $ac_cv_c_int32_t in #(
7277 no|yes) ;; #(
7278 *)
7279
7280cat >>confdefs.h <<_ACEOF
7281#define int32_t $ac_cv_c_int32_t
7282_ACEOF
7283;;
7284 esac
7285
7286
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007287 { echo "$as_me:$LINENO: checking for int64_t" >&5
7288echo $ECHO_N "checking for int64_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007289if test "${ac_cv_c_int64_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007290 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007291else
7292 ac_cv_c_int64_t=no
7293 for ac_type in 'int64_t' 'int' 'long int' \
7294 'long long int' 'short int' 'signed char'; do
7295 cat >conftest.$ac_ext <<_ACEOF
7296/* confdefs.h. */
7297_ACEOF
7298cat confdefs.h >>conftest.$ac_ext
7299cat >>conftest.$ac_ext <<_ACEOF
7300/* end confdefs.h. */
7301$ac_includes_default
7302int
7303main ()
7304{
7305static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1))];
7306test_array [0] = 0
7307
7308 ;
7309 return 0;
7310}
7311_ACEOF
7312rm -f conftest.$ac_objext
7313if { (ac_try="$ac_compile"
7314case "(($ac_try" in
7315 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7316 *) ac_try_echo=$ac_try;;
7317esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007318eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007319 (eval "$ac_compile") 2>conftest.er1
7320 ac_status=$?
7321 grep -v '^ *+' conftest.er1 >conftest.err
7322 rm -f conftest.er1
7323 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007325 (exit $ac_status); } && {
7326 test -z "$ac_c_werror_flag" ||
7327 test ! -s conftest.err
7328 } && test -s conftest.$ac_objext; then
7329 cat >conftest.$ac_ext <<_ACEOF
7330/* confdefs.h. */
7331_ACEOF
7332cat confdefs.h >>conftest.$ac_ext
7333cat >>conftest.$ac_ext <<_ACEOF
7334/* end confdefs.h. */
7335$ac_includes_default
7336int
7337main ()
7338{
7339static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007340 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 2))];
Mark Dickinsonbd792642009-03-18 20:06:12 +00007341test_array [0] = 0
7342
7343 ;
7344 return 0;
7345}
7346_ACEOF
7347rm -f conftest.$ac_objext
7348if { (ac_try="$ac_compile"
7349case "(($ac_try" in
7350 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7351 *) ac_try_echo=$ac_try;;
7352esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007353eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007354 (eval "$ac_compile") 2>conftest.er1
7355 ac_status=$?
7356 grep -v '^ *+' conftest.er1 >conftest.err
7357 rm -f conftest.er1
7358 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007360 (exit $ac_status); } && {
7361 test -z "$ac_c_werror_flag" ||
7362 test ! -s conftest.err
7363 } && test -s conftest.$ac_objext; then
7364 :
7365else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007366 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007367sed 's/^/| /' conftest.$ac_ext >&5
7368
7369 case $ac_type in
7370 int64_t) ac_cv_c_int64_t=yes ;;
7371 *) ac_cv_c_int64_t=$ac_type ;;
7372esac
7373
7374fi
7375
7376rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7377else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007378 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007379sed 's/^/| /' conftest.$ac_ext >&5
7380
7381
7382fi
7383
7384rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7385 test "$ac_cv_c_int64_t" != no && break
7386 done
7387fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007388{ echo "$as_me:$LINENO: result: $ac_cv_c_int64_t" >&5
7389echo "${ECHO_T}$ac_cv_c_int64_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007390 case $ac_cv_c_int64_t in #(
7391 no|yes) ;; #(
7392 *)
7393
7394cat >>confdefs.h <<_ACEOF
7395#define int64_t $ac_cv_c_int64_t
7396_ACEOF
7397;;
7398 esac
7399
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007400{ echo "$as_me:$LINENO: checking for ssize_t" >&5
7401echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00007402if test "${ac_cv_type_ssize_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007403 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007404else
Benjamin Petersona8332062009-09-11 22:36:27 +00007405 cat >conftest.$ac_ext <<_ACEOF
7406/* confdefs.h. */
7407_ACEOF
7408cat confdefs.h >>conftest.$ac_ext
7409cat >>conftest.$ac_ext <<_ACEOF
7410/* end confdefs.h. */
7411$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007412typedef ssize_t ac__type_new_;
Benjamin Petersona8332062009-09-11 22:36:27 +00007413int
7414main ()
7415{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007416if ((ac__type_new_ *) 0)
7417 return 0;
7418if (sizeof (ac__type_new_))
7419 return 0;
Benjamin Petersona8332062009-09-11 22:36:27 +00007420 ;
7421 return 0;
7422}
7423_ACEOF
7424rm -f conftest.$ac_objext
7425if { (ac_try="$ac_compile"
7426case "(($ac_try" in
7427 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7428 *) ac_try_echo=$ac_try;;
7429esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007430eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00007431 (eval "$ac_compile") 2>conftest.er1
7432 ac_status=$?
7433 grep -v '^ *+' conftest.er1 >conftest.err
7434 rm -f conftest.er1
7435 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00007437 (exit $ac_status); } && {
7438 test -z "$ac_c_werror_flag" ||
7439 test ! -s conftest.err
7440 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007441 ac_cv_type_ssize_t=yes
Martin v. Löwis18e16552006-02-15 17:27:45 +00007442else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007443 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +00007444sed 's/^/| /' conftest.$ac_ext >&5
7445
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007446 ac_cv_type_ssize_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00007447fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007448
7449rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00007450fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007451{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
7452echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
7453if test $ac_cv_type_ssize_t = yes; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00007454
7455cat >>confdefs.h <<\_ACEOF
7456#define HAVE_SSIZE_T 1
7457_ACEOF
7458
7459fi
7460
Jack Jansendd19cf82001-12-06 22:36:17 +00007461
Michael W. Hudson54241132001-12-07 15:38:26 +00007462# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007463# ANSI C requires sizeof(char) == 1, so no need to check it
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007464{ echo "$as_me:$LINENO: checking for int" >&5
7465echo $ECHO_N "checking for int... $ECHO_C" >&6; }
7466if test "${ac_cv_type_int+set}" = set; then
7467 echo $ECHO_N "(cached) $ECHO_C" >&6
7468else
7469 cat >conftest.$ac_ext <<_ACEOF
7470/* confdefs.h. */
7471_ACEOF
7472cat confdefs.h >>conftest.$ac_ext
7473cat >>conftest.$ac_ext <<_ACEOF
7474/* end confdefs.h. */
7475$ac_includes_default
7476typedef int ac__type_new_;
7477int
7478main ()
7479{
7480if ((ac__type_new_ *) 0)
7481 return 0;
7482if (sizeof (ac__type_new_))
7483 return 0;
7484 ;
7485 return 0;
7486}
7487_ACEOF
7488rm -f conftest.$ac_objext
7489if { (ac_try="$ac_compile"
7490case "(($ac_try" in
7491 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7492 *) ac_try_echo=$ac_try;;
7493esac
7494eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7495 (eval "$ac_compile") 2>conftest.er1
7496 ac_status=$?
7497 grep -v '^ *+' conftest.er1 >conftest.err
7498 rm -f conftest.er1
7499 cat conftest.err >&5
7500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7501 (exit $ac_status); } && {
7502 test -z "$ac_c_werror_flag" ||
7503 test ! -s conftest.err
7504 } && test -s conftest.$ac_objext; then
7505 ac_cv_type_int=yes
7506else
7507 echo "$as_me: failed program was:" >&5
7508sed 's/^/| /' conftest.$ac_ext >&5
7509
7510 ac_cv_type_int=no
7511fi
7512
7513rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7514fi
7515{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
7516echo "${ECHO_T}$ac_cv_type_int" >&6; }
7517
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007518# The cast to long int works around a bug in the HP C Compiler
7519# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7520# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7521# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007522{ echo "$as_me:$LINENO: checking size of int" >&5
7523echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007524if test "${ac_cv_sizeof_int+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007525 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007526else
Martin v. Löwis11437992002-04-12 09:54:03 +00007527 if test "$cross_compiling" = yes; then
7528 # Depending upon the size, compute the lo and hi bounds.
7529cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007530/* confdefs.h. */
7531_ACEOF
7532cat confdefs.h >>conftest.$ac_ext
7533cat >>conftest.$ac_ext <<_ACEOF
7534/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007535$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007536 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007537int
7538main ()
7539{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007540static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007541test_array [0] = 0
7542
7543 ;
7544 return 0;
7545}
7546_ACEOF
7547rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007548if { (ac_try="$ac_compile"
7549case "(($ac_try" in
7550 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7551 *) ac_try_echo=$ac_try;;
7552esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007553eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007554 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007555 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007556 grep -v '^ *+' conftest.er1 >conftest.err
7557 rm -f conftest.er1
7558 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007560 (exit $ac_status); } && {
7561 test -z "$ac_c_werror_flag" ||
7562 test ! -s conftest.err
7563 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007564 ac_lo=0 ac_mid=0
7565 while :; do
7566 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007567/* confdefs.h. */
7568_ACEOF
7569cat confdefs.h >>conftest.$ac_ext
7570cat >>conftest.$ac_ext <<_ACEOF
7571/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007572$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007573 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007574int
7575main ()
7576{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007577static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007578test_array [0] = 0
7579
7580 ;
7581 return 0;
7582}
7583_ACEOF
7584rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007585if { (ac_try="$ac_compile"
7586case "(($ac_try" in
7587 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7588 *) ac_try_echo=$ac_try;;
7589esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007590eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007591 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007592 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007593 grep -v '^ *+' conftest.er1 >conftest.err
7594 rm -f conftest.er1
7595 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007597 (exit $ac_status); } && {
7598 test -z "$ac_c_werror_flag" ||
7599 test ! -s conftest.err
7600 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007601 ac_hi=$ac_mid; break
7602else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007603 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007604sed 's/^/| /' conftest.$ac_ext >&5
7605
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007606 ac_lo=`expr $ac_mid + 1`
7607 if test $ac_lo -le $ac_mid; then
7608 ac_lo= ac_hi=
7609 break
7610 fi
7611 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007612fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007613
7614rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007615 done
7616else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007617 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007618sed 's/^/| /' conftest.$ac_ext >&5
7619
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007620 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007621/* confdefs.h. */
7622_ACEOF
7623cat confdefs.h >>conftest.$ac_ext
7624cat >>conftest.$ac_ext <<_ACEOF
7625/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007626$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007627 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007628int
7629main ()
7630{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007631static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007632test_array [0] = 0
7633
7634 ;
7635 return 0;
7636}
7637_ACEOF
7638rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007639if { (ac_try="$ac_compile"
7640case "(($ac_try" in
7641 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7642 *) ac_try_echo=$ac_try;;
7643esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007644eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007645 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007646 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007647 grep -v '^ *+' conftest.er1 >conftest.err
7648 rm -f conftest.er1
7649 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007651 (exit $ac_status); } && {
7652 test -z "$ac_c_werror_flag" ||
7653 test ! -s conftest.err
7654 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007655 ac_hi=-1 ac_mid=-1
7656 while :; do
7657 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007658/* confdefs.h. */
7659_ACEOF
7660cat confdefs.h >>conftest.$ac_ext
7661cat >>conftest.$ac_ext <<_ACEOF
7662/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007663$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007664 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007665int
7666main ()
7667{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007668static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007669test_array [0] = 0
7670
7671 ;
7672 return 0;
7673}
7674_ACEOF
7675rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007676if { (ac_try="$ac_compile"
7677case "(($ac_try" in
7678 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7679 *) ac_try_echo=$ac_try;;
7680esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007681eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007682 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007683 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007684 grep -v '^ *+' conftest.er1 >conftest.err
7685 rm -f conftest.er1
7686 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007687 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007688 (exit $ac_status); } && {
7689 test -z "$ac_c_werror_flag" ||
7690 test ! -s conftest.err
7691 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007692 ac_lo=$ac_mid; break
7693else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007694 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007695sed 's/^/| /' conftest.$ac_ext >&5
7696
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007697 ac_hi=`expr '(' $ac_mid ')' - 1`
7698 if test $ac_mid -le $ac_hi; then
7699 ac_lo= ac_hi=
7700 break
7701 fi
7702 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007703fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007704
7705rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007706 done
7707else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007708 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007709sed 's/^/| /' conftest.$ac_ext >&5
7710
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007711 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007712fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007713
7714rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007715fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007716
7717rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007718# Binary search between lo and hi bounds.
7719while test "x$ac_lo" != "x$ac_hi"; do
7720 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7721 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007722/* confdefs.h. */
7723_ACEOF
7724cat confdefs.h >>conftest.$ac_ext
7725cat >>conftest.$ac_ext <<_ACEOF
7726/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007727$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007728 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007729int
7730main ()
7731{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007732static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007733test_array [0] = 0
7734
7735 ;
7736 return 0;
7737}
7738_ACEOF
7739rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007740if { (ac_try="$ac_compile"
7741case "(($ac_try" in
7742 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7743 *) ac_try_echo=$ac_try;;
7744esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007745eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007746 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007747 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007748 grep -v '^ *+' conftest.er1 >conftest.err
7749 rm -f conftest.er1
7750 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007752 (exit $ac_status); } && {
7753 test -z "$ac_c_werror_flag" ||
7754 test ! -s conftest.err
7755 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007756 ac_hi=$ac_mid
7757else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007758 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007759sed 's/^/| /' conftest.$ac_ext >&5
7760
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007761 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007762fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007763
7764rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007765done
7766case $ac_lo in
7767?*) ac_cv_sizeof_int=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007768'') if test "$ac_cv_type_int" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007769 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007770See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007771echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007772See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007773 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007774 else
7775 ac_cv_sizeof_int=0
7776 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007777esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007778else
Martin v. Löwis11437992002-04-12 09:54:03 +00007779 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007780/* confdefs.h. */
7781_ACEOF
7782cat confdefs.h >>conftest.$ac_ext
7783cat >>conftest.$ac_ext <<_ACEOF
7784/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007785$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007786 typedef int ac__type_sizeof_;
7787static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7788static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007789#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007790#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007791int
7792main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007793{
Martin v. Löwis11437992002-04-12 09:54:03 +00007794
7795 FILE *f = fopen ("conftest.val", "w");
7796 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007797 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007798 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007799 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007800 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007801 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007802 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007803 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007804 }
7805 else
7806 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007807 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007808 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007809 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007810 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007811 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007812 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007813
7814 ;
7815 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007816}
Martin v. Löwis11437992002-04-12 09:54:03 +00007817_ACEOF
7818rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007819if { (ac_try="$ac_link"
7820case "(($ac_try" in
7821 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7822 *) ac_try_echo=$ac_try;;
7823esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007824eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007825 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007826 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007828 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007829 { (case "(($ac_try" in
7830 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7831 *) ac_try_echo=$ac_try;;
7832esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007833eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007834 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007835 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007837 (exit $ac_status); }; }; then
7838 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007839else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007840 echo "$as_me: program exited with status $ac_status" >&5
7841echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007842sed 's/^/| /' conftest.$ac_ext >&5
7843
Martin v. Löwis11437992002-04-12 09:54:03 +00007844( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007845if test "$ac_cv_type_int" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007846 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007847See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007848echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007849See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007850 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007851 else
7852 ac_cv_sizeof_int=0
7853 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007854fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007855rm -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 +00007856fi
7857rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007858fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007859{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
7860echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007861
7862
7863
Martin v. Löwis11437992002-04-12 09:54:03 +00007864cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007865#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007866_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007867
7868
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007869{ echo "$as_me:$LINENO: checking for long" >&5
7870echo $ECHO_N "checking for long... $ECHO_C" >&6; }
7871if test "${ac_cv_type_long+set}" = set; then
7872 echo $ECHO_N "(cached) $ECHO_C" >&6
7873else
7874 cat >conftest.$ac_ext <<_ACEOF
7875/* confdefs.h. */
7876_ACEOF
7877cat confdefs.h >>conftest.$ac_ext
7878cat >>conftest.$ac_ext <<_ACEOF
7879/* end confdefs.h. */
7880$ac_includes_default
7881typedef long ac__type_new_;
7882int
7883main ()
7884{
7885if ((ac__type_new_ *) 0)
7886 return 0;
7887if (sizeof (ac__type_new_))
7888 return 0;
7889 ;
7890 return 0;
7891}
7892_ACEOF
7893rm -f conftest.$ac_objext
7894if { (ac_try="$ac_compile"
7895case "(($ac_try" in
7896 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7897 *) ac_try_echo=$ac_try;;
7898esac
7899eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7900 (eval "$ac_compile") 2>conftest.er1
7901 ac_status=$?
7902 grep -v '^ *+' conftest.er1 >conftest.err
7903 rm -f conftest.er1
7904 cat conftest.err >&5
7905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7906 (exit $ac_status); } && {
7907 test -z "$ac_c_werror_flag" ||
7908 test ! -s conftest.err
7909 } && test -s conftest.$ac_objext; then
7910 ac_cv_type_long=yes
7911else
7912 echo "$as_me: failed program was:" >&5
7913sed 's/^/| /' conftest.$ac_ext >&5
7914
7915 ac_cv_type_long=no
7916fi
7917
7918rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7919fi
7920{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
7921echo "${ECHO_T}$ac_cv_type_long" >&6; }
7922
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007923# The cast to long int works around a bug in the HP C Compiler
7924# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7925# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7926# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007927{ echo "$as_me:$LINENO: checking size of long" >&5
7928echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007929if test "${ac_cv_sizeof_long+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007930 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007931else
Martin v. Löwis11437992002-04-12 09:54:03 +00007932 if test "$cross_compiling" = yes; then
7933 # Depending upon the size, compute the lo and hi bounds.
7934cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007935/* confdefs.h. */
7936_ACEOF
7937cat confdefs.h >>conftest.$ac_ext
7938cat >>conftest.$ac_ext <<_ACEOF
7939/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007940$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007941 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007942int
7943main ()
7944{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007945static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007946test_array [0] = 0
7947
7948 ;
7949 return 0;
7950}
7951_ACEOF
7952rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007953if { (ac_try="$ac_compile"
7954case "(($ac_try" in
7955 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7956 *) ac_try_echo=$ac_try;;
7957esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007958eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007959 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007960 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007961 grep -v '^ *+' conftest.er1 >conftest.err
7962 rm -f conftest.er1
7963 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007964 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007965 (exit $ac_status); } && {
7966 test -z "$ac_c_werror_flag" ||
7967 test ! -s conftest.err
7968 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007969 ac_lo=0 ac_mid=0
7970 while :; do
7971 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007972/* confdefs.h. */
7973_ACEOF
7974cat confdefs.h >>conftest.$ac_ext
7975cat >>conftest.$ac_ext <<_ACEOF
7976/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007977$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007978 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007979int
7980main ()
7981{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007982static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007983test_array [0] = 0
7984
7985 ;
7986 return 0;
7987}
7988_ACEOF
7989rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007990if { (ac_try="$ac_compile"
7991case "(($ac_try" in
7992 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7993 *) ac_try_echo=$ac_try;;
7994esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007995eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007996 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007997 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007998 grep -v '^ *+' conftest.er1 >conftest.err
7999 rm -f conftest.er1
8000 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008001 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008002 (exit $ac_status); } && {
8003 test -z "$ac_c_werror_flag" ||
8004 test ! -s conftest.err
8005 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008006 ac_hi=$ac_mid; break
8007else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008008 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008009sed 's/^/| /' conftest.$ac_ext >&5
8010
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008011 ac_lo=`expr $ac_mid + 1`
8012 if test $ac_lo -le $ac_mid; then
8013 ac_lo= ac_hi=
8014 break
8015 fi
8016 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008017fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008018
8019rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008020 done
8021else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008022 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008023sed 's/^/| /' conftest.$ac_ext >&5
8024
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008025 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008026/* confdefs.h. */
8027_ACEOF
8028cat confdefs.h >>conftest.$ac_ext
8029cat >>conftest.$ac_ext <<_ACEOF
8030/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008031$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008032 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008033int
8034main ()
8035{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008036static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008037test_array [0] = 0
8038
8039 ;
8040 return 0;
8041}
8042_ACEOF
8043rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008044if { (ac_try="$ac_compile"
8045case "(($ac_try" in
8046 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8047 *) ac_try_echo=$ac_try;;
8048esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008049eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008050 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008051 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008052 grep -v '^ *+' conftest.er1 >conftest.err
8053 rm -f conftest.er1
8054 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008056 (exit $ac_status); } && {
8057 test -z "$ac_c_werror_flag" ||
8058 test ! -s conftest.err
8059 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008060 ac_hi=-1 ac_mid=-1
8061 while :; do
8062 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008063/* confdefs.h. */
8064_ACEOF
8065cat confdefs.h >>conftest.$ac_ext
8066cat >>conftest.$ac_ext <<_ACEOF
8067/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008068$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008069 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008070int
8071main ()
8072{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008073static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008074test_array [0] = 0
8075
8076 ;
8077 return 0;
8078}
8079_ACEOF
8080rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008081if { (ac_try="$ac_compile"
8082case "(($ac_try" in
8083 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8084 *) ac_try_echo=$ac_try;;
8085esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008086eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008087 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008088 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008089 grep -v '^ *+' conftest.er1 >conftest.err
8090 rm -f conftest.er1
8091 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008093 (exit $ac_status); } && {
8094 test -z "$ac_c_werror_flag" ||
8095 test ! -s conftest.err
8096 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008097 ac_lo=$ac_mid; break
8098else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008099 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008100sed 's/^/| /' conftest.$ac_ext >&5
8101
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008102 ac_hi=`expr '(' $ac_mid ')' - 1`
8103 if test $ac_mid -le $ac_hi; then
8104 ac_lo= ac_hi=
8105 break
8106 fi
8107 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008108fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008109
8110rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008111 done
8112else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008113 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008114sed 's/^/| /' conftest.$ac_ext >&5
8115
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008116 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008117fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008118
8119rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008120fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008121
8122rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008123# Binary search between lo and hi bounds.
8124while test "x$ac_lo" != "x$ac_hi"; do
8125 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8126 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008127/* confdefs.h. */
8128_ACEOF
8129cat confdefs.h >>conftest.$ac_ext
8130cat >>conftest.$ac_ext <<_ACEOF
8131/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008132$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008133 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008134int
8135main ()
8136{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008137static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008138test_array [0] = 0
8139
8140 ;
8141 return 0;
8142}
8143_ACEOF
8144rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008145if { (ac_try="$ac_compile"
8146case "(($ac_try" in
8147 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8148 *) ac_try_echo=$ac_try;;
8149esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008150eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008151 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008152 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008153 grep -v '^ *+' conftest.er1 >conftest.err
8154 rm -f conftest.er1
8155 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008156 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008157 (exit $ac_status); } && {
8158 test -z "$ac_c_werror_flag" ||
8159 test ! -s conftest.err
8160 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008161 ac_hi=$ac_mid
8162else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008163 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008164sed 's/^/| /' conftest.$ac_ext >&5
8165
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008166 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008167fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008168
8169rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008170done
8171case $ac_lo in
8172?*) ac_cv_sizeof_long=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008173'') if test "$ac_cv_type_long" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008174 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008175See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008176echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008177See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008178 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008179 else
8180 ac_cv_sizeof_long=0
8181 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008182esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008183else
Martin v. Löwis11437992002-04-12 09:54:03 +00008184 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008185/* confdefs.h. */
8186_ACEOF
8187cat confdefs.h >>conftest.$ac_ext
8188cat >>conftest.$ac_ext <<_ACEOF
8189/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008190$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008191 typedef long ac__type_sizeof_;
8192static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8193static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008194#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008195#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008196int
8197main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008198{
Martin v. Löwis11437992002-04-12 09:54:03 +00008199
8200 FILE *f = fopen ("conftest.val", "w");
8201 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008202 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008203 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008204 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008205 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008206 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008207 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008208 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008209 }
8210 else
8211 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008212 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008213 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008214 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008215 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008216 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008217 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008218
8219 ;
8220 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008221}
Martin v. Löwis11437992002-04-12 09:54:03 +00008222_ACEOF
8223rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008224if { (ac_try="$ac_link"
8225case "(($ac_try" in
8226 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8227 *) ac_try_echo=$ac_try;;
8228esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008229eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008230 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008231 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008233 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008234 { (case "(($ac_try" in
8235 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8236 *) ac_try_echo=$ac_try;;
8237esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008238eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008239 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008240 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008242 (exit $ac_status); }; }; then
8243 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008244else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008245 echo "$as_me: program exited with status $ac_status" >&5
8246echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008247sed 's/^/| /' conftest.$ac_ext >&5
8248
Martin v. Löwis11437992002-04-12 09:54:03 +00008249( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008250if test "$ac_cv_type_long" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008251 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008252See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008253echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008254See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008255 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008256 else
8257 ac_cv_sizeof_long=0
8258 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008259fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008260rm -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 +00008261fi
8262rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008263fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008264{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
8265echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008266
8267
8268
Martin v. Löwis11437992002-04-12 09:54:03 +00008269cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008270#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008271_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008272
8273
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008274{ echo "$as_me:$LINENO: checking for void *" >&5
8275echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
8276if test "${ac_cv_type_void_p+set}" = set; then
8277 echo $ECHO_N "(cached) $ECHO_C" >&6
8278else
8279 cat >conftest.$ac_ext <<_ACEOF
8280/* confdefs.h. */
8281_ACEOF
8282cat confdefs.h >>conftest.$ac_ext
8283cat >>conftest.$ac_ext <<_ACEOF
8284/* end confdefs.h. */
8285$ac_includes_default
8286typedef void * ac__type_new_;
8287int
8288main ()
8289{
8290if ((ac__type_new_ *) 0)
8291 return 0;
8292if (sizeof (ac__type_new_))
8293 return 0;
8294 ;
8295 return 0;
8296}
8297_ACEOF
8298rm -f conftest.$ac_objext
8299if { (ac_try="$ac_compile"
8300case "(($ac_try" in
8301 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8302 *) ac_try_echo=$ac_try;;
8303esac
8304eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8305 (eval "$ac_compile") 2>conftest.er1
8306 ac_status=$?
8307 grep -v '^ *+' conftest.er1 >conftest.err
8308 rm -f conftest.er1
8309 cat conftest.err >&5
8310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8311 (exit $ac_status); } && {
8312 test -z "$ac_c_werror_flag" ||
8313 test ! -s conftest.err
8314 } && test -s conftest.$ac_objext; then
8315 ac_cv_type_void_p=yes
8316else
8317 echo "$as_me: failed program was:" >&5
8318sed 's/^/| /' conftest.$ac_ext >&5
8319
8320 ac_cv_type_void_p=no
8321fi
8322
8323rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8324fi
8325{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
8326echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
8327
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008328# The cast to long int works around a bug in the HP C Compiler
8329# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8330# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8331# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008332{ echo "$as_me:$LINENO: checking size of void *" >&5
8333echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008334if test "${ac_cv_sizeof_void_p+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008335 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008336else
Martin v. Löwis11437992002-04-12 09:54:03 +00008337 if test "$cross_compiling" = yes; then
8338 # Depending upon the size, compute the lo and hi bounds.
8339cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008340/* confdefs.h. */
8341_ACEOF
8342cat confdefs.h >>conftest.$ac_ext
8343cat >>conftest.$ac_ext <<_ACEOF
8344/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008345$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008346 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008347int
8348main ()
8349{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008350static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008351test_array [0] = 0
8352
8353 ;
8354 return 0;
8355}
8356_ACEOF
8357rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008358if { (ac_try="$ac_compile"
8359case "(($ac_try" in
8360 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8361 *) ac_try_echo=$ac_try;;
8362esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008363eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008364 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008365 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008366 grep -v '^ *+' conftest.er1 >conftest.err
8367 rm -f conftest.er1
8368 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008369 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008370 (exit $ac_status); } && {
8371 test -z "$ac_c_werror_flag" ||
8372 test ! -s conftest.err
8373 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008374 ac_lo=0 ac_mid=0
8375 while :; do
8376 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008377/* confdefs.h. */
8378_ACEOF
8379cat confdefs.h >>conftest.$ac_ext
8380cat >>conftest.$ac_ext <<_ACEOF
8381/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008382$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008383 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008384int
8385main ()
8386{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008387static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008388test_array [0] = 0
8389
8390 ;
8391 return 0;
8392}
8393_ACEOF
8394rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008395if { (ac_try="$ac_compile"
8396case "(($ac_try" in
8397 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8398 *) ac_try_echo=$ac_try;;
8399esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008400eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008401 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008402 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008403 grep -v '^ *+' conftest.er1 >conftest.err
8404 rm -f conftest.er1
8405 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008407 (exit $ac_status); } && {
8408 test -z "$ac_c_werror_flag" ||
8409 test ! -s conftest.err
8410 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008411 ac_hi=$ac_mid; break
8412else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008413 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008414sed 's/^/| /' conftest.$ac_ext >&5
8415
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008416 ac_lo=`expr $ac_mid + 1`
8417 if test $ac_lo -le $ac_mid; then
8418 ac_lo= ac_hi=
8419 break
8420 fi
8421 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008422fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008423
8424rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008425 done
8426else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008427 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008428sed 's/^/| /' conftest.$ac_ext >&5
8429
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008430 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008431/* confdefs.h. */
8432_ACEOF
8433cat confdefs.h >>conftest.$ac_ext
8434cat >>conftest.$ac_ext <<_ACEOF
8435/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008436$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008437 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008438int
8439main ()
8440{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008441static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008442test_array [0] = 0
8443
8444 ;
8445 return 0;
8446}
8447_ACEOF
8448rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008449if { (ac_try="$ac_compile"
8450case "(($ac_try" in
8451 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8452 *) ac_try_echo=$ac_try;;
8453esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008454eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008455 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008456 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008457 grep -v '^ *+' conftest.er1 >conftest.err
8458 rm -f conftest.er1
8459 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008460 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008461 (exit $ac_status); } && {
8462 test -z "$ac_c_werror_flag" ||
8463 test ! -s conftest.err
8464 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008465 ac_hi=-1 ac_mid=-1
8466 while :; do
8467 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008468/* confdefs.h. */
8469_ACEOF
8470cat confdefs.h >>conftest.$ac_ext
8471cat >>conftest.$ac_ext <<_ACEOF
8472/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008473$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008474 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008475int
8476main ()
8477{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008478static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008479test_array [0] = 0
8480
8481 ;
8482 return 0;
8483}
8484_ACEOF
8485rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008486if { (ac_try="$ac_compile"
8487case "(($ac_try" in
8488 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8489 *) ac_try_echo=$ac_try;;
8490esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008491eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008492 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008493 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008494 grep -v '^ *+' conftest.er1 >conftest.err
8495 rm -f conftest.er1
8496 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008498 (exit $ac_status); } && {
8499 test -z "$ac_c_werror_flag" ||
8500 test ! -s conftest.err
8501 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008502 ac_lo=$ac_mid; break
8503else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008504 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008505sed 's/^/| /' conftest.$ac_ext >&5
8506
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008507 ac_hi=`expr '(' $ac_mid ')' - 1`
8508 if test $ac_mid -le $ac_hi; then
8509 ac_lo= ac_hi=
8510 break
8511 fi
8512 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008513fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008514
8515rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008516 done
8517else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008518 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008519sed 's/^/| /' conftest.$ac_ext >&5
8520
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008521 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008522fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008523
8524rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008525fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008526
8527rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008528# Binary search between lo and hi bounds.
8529while test "x$ac_lo" != "x$ac_hi"; do
8530 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8531 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008532/* confdefs.h. */
8533_ACEOF
8534cat confdefs.h >>conftest.$ac_ext
8535cat >>conftest.$ac_ext <<_ACEOF
8536/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008537$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008538 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008539int
8540main ()
8541{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008542static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008543test_array [0] = 0
8544
8545 ;
8546 return 0;
8547}
8548_ACEOF
8549rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008550if { (ac_try="$ac_compile"
8551case "(($ac_try" in
8552 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8553 *) ac_try_echo=$ac_try;;
8554esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008555eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008556 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008557 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008558 grep -v '^ *+' conftest.er1 >conftest.err
8559 rm -f conftest.er1
8560 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008562 (exit $ac_status); } && {
8563 test -z "$ac_c_werror_flag" ||
8564 test ! -s conftest.err
8565 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008566 ac_hi=$ac_mid
8567else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008568 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008569sed 's/^/| /' conftest.$ac_ext >&5
8570
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008571 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008572fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008573
8574rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008575done
8576case $ac_lo in
8577?*) ac_cv_sizeof_void_p=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008578'') if test "$ac_cv_type_void_p" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008579 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008580See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008581echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008582See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008583 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008584 else
8585 ac_cv_sizeof_void_p=0
8586 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008587esac
Guido van Rossumad678af1998-10-02 14:42:15 +00008588else
Martin v. Löwis11437992002-04-12 09:54:03 +00008589 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008590/* confdefs.h. */
8591_ACEOF
8592cat confdefs.h >>conftest.$ac_ext
8593cat >>conftest.$ac_ext <<_ACEOF
8594/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008595$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008596 typedef void * ac__type_sizeof_;
8597static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8598static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008599#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008600#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008601int
8602main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00008603{
Martin v. Löwis11437992002-04-12 09:54:03 +00008604
8605 FILE *f = fopen ("conftest.val", "w");
8606 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008607 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008608 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008609 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008610 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008611 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008612 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008613 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008614 }
8615 else
8616 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008617 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008618 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008619 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008620 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008621 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008622 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008623
8624 ;
8625 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00008626}
Martin v. Löwis11437992002-04-12 09:54:03 +00008627_ACEOF
8628rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008629if { (ac_try="$ac_link"
8630case "(($ac_try" in
8631 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8632 *) ac_try_echo=$ac_try;;
8633esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008634eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008635 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008636 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008638 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008639 { (case "(($ac_try" in
8640 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8641 *) ac_try_echo=$ac_try;;
8642esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008643eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008644 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008645 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008647 (exit $ac_status); }; }; then
8648 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00008649else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008650 echo "$as_me: program exited with status $ac_status" >&5
8651echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008652sed 's/^/| /' conftest.$ac_ext >&5
8653
Martin v. Löwis11437992002-04-12 09:54:03 +00008654( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008655if test "$ac_cv_type_void_p" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008656 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008657See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008658echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008659See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008660 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008661 else
8662 ac_cv_sizeof_void_p=0
8663 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008664fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008665rm -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 +00008666fi
8667rm -f conftest.val
Guido van Rossumad678af1998-10-02 14:42:15 +00008668fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008669{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
8670echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008671
8672
8673
Martin v. Löwis11437992002-04-12 09:54:03 +00008674cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008675#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008676_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008677
8678
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008679{ echo "$as_me:$LINENO: checking for short" >&5
8680echo $ECHO_N "checking for short... $ECHO_C" >&6; }
8681if test "${ac_cv_type_short+set}" = set; then
8682 echo $ECHO_N "(cached) $ECHO_C" >&6
8683else
8684 cat >conftest.$ac_ext <<_ACEOF
8685/* confdefs.h. */
8686_ACEOF
8687cat confdefs.h >>conftest.$ac_ext
8688cat >>conftest.$ac_ext <<_ACEOF
8689/* end confdefs.h. */
8690$ac_includes_default
8691typedef short ac__type_new_;
8692int
8693main ()
8694{
8695if ((ac__type_new_ *) 0)
8696 return 0;
8697if (sizeof (ac__type_new_))
8698 return 0;
8699 ;
8700 return 0;
8701}
8702_ACEOF
8703rm -f conftest.$ac_objext
8704if { (ac_try="$ac_compile"
8705case "(($ac_try" in
8706 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8707 *) ac_try_echo=$ac_try;;
8708esac
8709eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8710 (eval "$ac_compile") 2>conftest.er1
8711 ac_status=$?
8712 grep -v '^ *+' conftest.er1 >conftest.err
8713 rm -f conftest.er1
8714 cat conftest.err >&5
8715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8716 (exit $ac_status); } && {
8717 test -z "$ac_c_werror_flag" ||
8718 test ! -s conftest.err
8719 } && test -s conftest.$ac_objext; then
8720 ac_cv_type_short=yes
8721else
8722 echo "$as_me: failed program was:" >&5
8723sed 's/^/| /' conftest.$ac_ext >&5
8724
8725 ac_cv_type_short=no
8726fi
8727
8728rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8729fi
8730{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
8731echo "${ECHO_T}$ac_cv_type_short" >&6; }
8732
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008733# The cast to long int works around a bug in the HP C Compiler
8734# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8735# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8736# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008737{ echo "$as_me:$LINENO: checking size of short" >&5
8738echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008739if test "${ac_cv_sizeof_short+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008740 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008741else
Martin v. Löwis11437992002-04-12 09:54:03 +00008742 if test "$cross_compiling" = yes; then
8743 # Depending upon the size, compute the lo and hi bounds.
8744cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008745/* confdefs.h. */
8746_ACEOF
8747cat confdefs.h >>conftest.$ac_ext
8748cat >>conftest.$ac_ext <<_ACEOF
8749/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008750$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008751 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008752int
8753main ()
8754{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008755static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008756test_array [0] = 0
8757
8758 ;
8759 return 0;
8760}
8761_ACEOF
8762rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008763if { (ac_try="$ac_compile"
8764case "(($ac_try" in
8765 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8766 *) ac_try_echo=$ac_try;;
8767esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008768eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008769 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008770 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008771 grep -v '^ *+' conftest.er1 >conftest.err
8772 rm -f conftest.er1
8773 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008775 (exit $ac_status); } && {
8776 test -z "$ac_c_werror_flag" ||
8777 test ! -s conftest.err
8778 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008779 ac_lo=0 ac_mid=0
8780 while :; do
8781 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008782/* confdefs.h. */
8783_ACEOF
8784cat confdefs.h >>conftest.$ac_ext
8785cat >>conftest.$ac_ext <<_ACEOF
8786/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008787$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008788 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008789int
8790main ()
8791{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008792static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008793test_array [0] = 0
8794
8795 ;
8796 return 0;
8797}
8798_ACEOF
8799rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008800if { (ac_try="$ac_compile"
8801case "(($ac_try" in
8802 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8803 *) ac_try_echo=$ac_try;;
8804esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008805eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008806 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008807 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008808 grep -v '^ *+' conftest.er1 >conftest.err
8809 rm -f conftest.er1
8810 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008812 (exit $ac_status); } && {
8813 test -z "$ac_c_werror_flag" ||
8814 test ! -s conftest.err
8815 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008816 ac_hi=$ac_mid; break
8817else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008818 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008819sed 's/^/| /' conftest.$ac_ext >&5
8820
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008821 ac_lo=`expr $ac_mid + 1`
8822 if test $ac_lo -le $ac_mid; then
8823 ac_lo= ac_hi=
8824 break
8825 fi
8826 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008827fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008828
8829rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008830 done
8831else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008832 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008833sed 's/^/| /' conftest.$ac_ext >&5
8834
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008835 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008836/* confdefs.h. */
8837_ACEOF
8838cat confdefs.h >>conftest.$ac_ext
8839cat >>conftest.$ac_ext <<_ACEOF
8840/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008841$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008842 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008843int
8844main ()
8845{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008846static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008847test_array [0] = 0
8848
8849 ;
8850 return 0;
8851}
8852_ACEOF
8853rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008854if { (ac_try="$ac_compile"
8855case "(($ac_try" in
8856 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8857 *) ac_try_echo=$ac_try;;
8858esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008859eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008860 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008861 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008862 grep -v '^ *+' conftest.er1 >conftest.err
8863 rm -f conftest.er1
8864 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008866 (exit $ac_status); } && {
8867 test -z "$ac_c_werror_flag" ||
8868 test ! -s conftest.err
8869 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008870 ac_hi=-1 ac_mid=-1
8871 while :; do
8872 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008873/* confdefs.h. */
8874_ACEOF
8875cat confdefs.h >>conftest.$ac_ext
8876cat >>conftest.$ac_ext <<_ACEOF
8877/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008878$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008879 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008880int
8881main ()
8882{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008883static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008884test_array [0] = 0
8885
8886 ;
8887 return 0;
8888}
8889_ACEOF
8890rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008891if { (ac_try="$ac_compile"
8892case "(($ac_try" in
8893 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8894 *) ac_try_echo=$ac_try;;
8895esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008896eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008897 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008898 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008899 grep -v '^ *+' conftest.er1 >conftest.err
8900 rm -f conftest.er1
8901 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008903 (exit $ac_status); } && {
8904 test -z "$ac_c_werror_flag" ||
8905 test ! -s conftest.err
8906 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008907 ac_lo=$ac_mid; break
8908else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008909 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008910sed 's/^/| /' conftest.$ac_ext >&5
8911
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008912 ac_hi=`expr '(' $ac_mid ')' - 1`
8913 if test $ac_mid -le $ac_hi; then
8914 ac_lo= ac_hi=
8915 break
8916 fi
8917 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008918fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008919
8920rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008921 done
8922else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008923 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008924sed 's/^/| /' conftest.$ac_ext >&5
8925
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008926 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008927fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008928
8929rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008930fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008931
8932rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008933# Binary search between lo and hi bounds.
8934while test "x$ac_lo" != "x$ac_hi"; do
8935 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8936 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008937/* confdefs.h. */
8938_ACEOF
8939cat confdefs.h >>conftest.$ac_ext
8940cat >>conftest.$ac_ext <<_ACEOF
8941/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008942$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008943 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008944int
8945main ()
8946{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008947static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008948test_array [0] = 0
8949
8950 ;
8951 return 0;
8952}
8953_ACEOF
8954rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008955if { (ac_try="$ac_compile"
8956case "(($ac_try" in
8957 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8958 *) ac_try_echo=$ac_try;;
8959esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008960eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008961 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008962 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008963 grep -v '^ *+' conftest.er1 >conftest.err
8964 rm -f conftest.er1
8965 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008966 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008967 (exit $ac_status); } && {
8968 test -z "$ac_c_werror_flag" ||
8969 test ! -s conftest.err
8970 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008971 ac_hi=$ac_mid
8972else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008973 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008974sed 's/^/| /' conftest.$ac_ext >&5
8975
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008976 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008977fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008978
8979rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008980done
8981case $ac_lo in
8982?*) ac_cv_sizeof_short=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008983'') if test "$ac_cv_type_short" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008984 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008985See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008986echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008987See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008988 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008989 else
8990 ac_cv_sizeof_short=0
8991 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008992esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008993else
Martin v. Löwis11437992002-04-12 09:54:03 +00008994 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008995/* confdefs.h. */
8996_ACEOF
8997cat confdefs.h >>conftest.$ac_ext
8998cat >>conftest.$ac_ext <<_ACEOF
8999/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009000$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009001 typedef short ac__type_sizeof_;
9002static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9003static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009004#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009005#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009006int
9007main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009008{
Martin v. Löwis11437992002-04-12 09:54:03 +00009009
9010 FILE *f = fopen ("conftest.val", "w");
9011 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009012 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009013 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009014 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009015 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009016 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009017 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009018 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009019 }
9020 else
9021 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009022 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009023 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009024 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009025 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009026 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009027 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009028
9029 ;
9030 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009031}
Martin v. Löwis11437992002-04-12 09:54:03 +00009032_ACEOF
9033rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009034if { (ac_try="$ac_link"
9035case "(($ac_try" in
9036 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9037 *) ac_try_echo=$ac_try;;
9038esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009039eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009040 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009041 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009043 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009044 { (case "(($ac_try" in
9045 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9046 *) ac_try_echo=$ac_try;;
9047esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009048eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009049 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009050 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009052 (exit $ac_status); }; }; then
9053 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009054else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009055 echo "$as_me: program exited with status $ac_status" >&5
9056echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009057sed 's/^/| /' conftest.$ac_ext >&5
9058
Martin v. Löwis11437992002-04-12 09:54:03 +00009059( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009060if test "$ac_cv_type_short" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009061 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009062See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009063echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009064See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009065 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009066 else
9067 ac_cv_sizeof_short=0
9068 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009069fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009070rm -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 +00009071fi
9072rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009073fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009074{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
9075echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009076
9077
9078
Martin v. Löwis11437992002-04-12 09:54:03 +00009079cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009080#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00009081_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009082
9083
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009084{ echo "$as_me:$LINENO: checking for float" >&5
9085echo $ECHO_N "checking for float... $ECHO_C" >&6; }
9086if test "${ac_cv_type_float+set}" = set; then
9087 echo $ECHO_N "(cached) $ECHO_C" >&6
9088else
9089 cat >conftest.$ac_ext <<_ACEOF
9090/* confdefs.h. */
9091_ACEOF
9092cat confdefs.h >>conftest.$ac_ext
9093cat >>conftest.$ac_ext <<_ACEOF
9094/* end confdefs.h. */
9095$ac_includes_default
9096typedef float ac__type_new_;
9097int
9098main ()
9099{
9100if ((ac__type_new_ *) 0)
9101 return 0;
9102if (sizeof (ac__type_new_))
9103 return 0;
9104 ;
9105 return 0;
9106}
9107_ACEOF
9108rm -f conftest.$ac_objext
9109if { (ac_try="$ac_compile"
9110case "(($ac_try" in
9111 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9112 *) ac_try_echo=$ac_try;;
9113esac
9114eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9115 (eval "$ac_compile") 2>conftest.er1
9116 ac_status=$?
9117 grep -v '^ *+' conftest.er1 >conftest.err
9118 rm -f conftest.er1
9119 cat conftest.err >&5
9120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9121 (exit $ac_status); } && {
9122 test -z "$ac_c_werror_flag" ||
9123 test ! -s conftest.err
9124 } && test -s conftest.$ac_objext; then
9125 ac_cv_type_float=yes
9126else
9127 echo "$as_me: failed program was:" >&5
9128sed 's/^/| /' conftest.$ac_ext >&5
9129
9130 ac_cv_type_float=no
9131fi
9132
9133rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9134fi
9135{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
9136echo "${ECHO_T}$ac_cv_type_float" >&6; }
9137
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009138# The cast to long int works around a bug in the HP C Compiler
9139# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9140# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9141# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009142{ echo "$as_me:$LINENO: checking size of float" >&5
9143echo $ECHO_N "checking size of float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009144if test "${ac_cv_sizeof_float+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009145 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009146else
Martin v. Löwis11437992002-04-12 09:54:03 +00009147 if test "$cross_compiling" = yes; then
9148 # Depending upon the size, compute the lo and hi bounds.
9149cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009150/* confdefs.h. */
9151_ACEOF
9152cat confdefs.h >>conftest.$ac_ext
9153cat >>conftest.$ac_ext <<_ACEOF
9154/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009155$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009156 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009157int
9158main ()
9159{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009160static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009161test_array [0] = 0
9162
9163 ;
9164 return 0;
9165}
9166_ACEOF
9167rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009168if { (ac_try="$ac_compile"
9169case "(($ac_try" in
9170 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9171 *) ac_try_echo=$ac_try;;
9172esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009173eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009174 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009175 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009176 grep -v '^ *+' conftest.er1 >conftest.err
9177 rm -f conftest.er1
9178 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009180 (exit $ac_status); } && {
9181 test -z "$ac_c_werror_flag" ||
9182 test ! -s conftest.err
9183 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009184 ac_lo=0 ac_mid=0
9185 while :; do
9186 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009187/* confdefs.h. */
9188_ACEOF
9189cat confdefs.h >>conftest.$ac_ext
9190cat >>conftest.$ac_ext <<_ACEOF
9191/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009192$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009193 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009194int
9195main ()
9196{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009197static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009198test_array [0] = 0
9199
9200 ;
9201 return 0;
9202}
9203_ACEOF
9204rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009205if { (ac_try="$ac_compile"
9206case "(($ac_try" in
9207 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9208 *) ac_try_echo=$ac_try;;
9209esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009210eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009211 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009212 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009213 grep -v '^ *+' conftest.er1 >conftest.err
9214 rm -f conftest.er1
9215 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009217 (exit $ac_status); } && {
9218 test -z "$ac_c_werror_flag" ||
9219 test ! -s conftest.err
9220 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009221 ac_hi=$ac_mid; break
9222else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009223 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009224sed 's/^/| /' conftest.$ac_ext >&5
9225
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009226 ac_lo=`expr $ac_mid + 1`
9227 if test $ac_lo -le $ac_mid; then
9228 ac_lo= ac_hi=
9229 break
9230 fi
9231 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009232fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009233
9234rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009235 done
9236else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009237 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009238sed 's/^/| /' conftest.$ac_ext >&5
9239
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009240 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009241/* confdefs.h. */
9242_ACEOF
9243cat confdefs.h >>conftest.$ac_ext
9244cat >>conftest.$ac_ext <<_ACEOF
9245/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009246$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009247 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009248int
9249main ()
9250{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009251static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009252test_array [0] = 0
9253
9254 ;
9255 return 0;
9256}
9257_ACEOF
9258rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009259if { (ac_try="$ac_compile"
9260case "(($ac_try" in
9261 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9262 *) ac_try_echo=$ac_try;;
9263esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009264eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009265 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009266 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009267 grep -v '^ *+' conftest.er1 >conftest.err
9268 rm -f conftest.er1
9269 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009271 (exit $ac_status); } && {
9272 test -z "$ac_c_werror_flag" ||
9273 test ! -s conftest.err
9274 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009275 ac_hi=-1 ac_mid=-1
9276 while :; do
9277 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009278/* confdefs.h. */
9279_ACEOF
9280cat confdefs.h >>conftest.$ac_ext
9281cat >>conftest.$ac_ext <<_ACEOF
9282/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009283$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009284 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009285int
9286main ()
9287{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009288static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009289test_array [0] = 0
9290
9291 ;
9292 return 0;
9293}
9294_ACEOF
9295rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009296if { (ac_try="$ac_compile"
9297case "(($ac_try" in
9298 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9299 *) ac_try_echo=$ac_try;;
9300esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009301eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009302 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009303 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009304 grep -v '^ *+' conftest.er1 >conftest.err
9305 rm -f conftest.er1
9306 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009308 (exit $ac_status); } && {
9309 test -z "$ac_c_werror_flag" ||
9310 test ! -s conftest.err
9311 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009312 ac_lo=$ac_mid; break
9313else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009314 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009315sed 's/^/| /' conftest.$ac_ext >&5
9316
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009317 ac_hi=`expr '(' $ac_mid ')' - 1`
9318 if test $ac_mid -le $ac_hi; then
9319 ac_lo= ac_hi=
9320 break
9321 fi
9322 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009323fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009324
9325rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009326 done
9327else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009328 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009329sed 's/^/| /' conftest.$ac_ext >&5
9330
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009331 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009332fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009333
9334rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009335fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009336
9337rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009338# Binary search between lo and hi bounds.
9339while test "x$ac_lo" != "x$ac_hi"; do
9340 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9341 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009342/* confdefs.h. */
9343_ACEOF
9344cat confdefs.h >>conftest.$ac_ext
9345cat >>conftest.$ac_ext <<_ACEOF
9346/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009347$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009348 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009349int
9350main ()
9351{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009352static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009353test_array [0] = 0
9354
9355 ;
9356 return 0;
9357}
9358_ACEOF
9359rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009360if { (ac_try="$ac_compile"
9361case "(($ac_try" in
9362 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9363 *) ac_try_echo=$ac_try;;
9364esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009365eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009366 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009367 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009368 grep -v '^ *+' conftest.er1 >conftest.err
9369 rm -f conftest.er1
9370 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009371 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009372 (exit $ac_status); } && {
9373 test -z "$ac_c_werror_flag" ||
9374 test ! -s conftest.err
9375 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009376 ac_hi=$ac_mid
9377else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009378 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009379sed 's/^/| /' conftest.$ac_ext >&5
9380
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009381 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009382fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009383
9384rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009385done
9386case $ac_lo in
9387?*) ac_cv_sizeof_float=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009388'') if test "$ac_cv_type_float" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009389 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009390See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009391echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009392See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009393 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009394 else
9395 ac_cv_sizeof_float=0
9396 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009397esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009398else
Martin v. Löwis11437992002-04-12 09:54:03 +00009399 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009400/* confdefs.h. */
9401_ACEOF
9402cat confdefs.h >>conftest.$ac_ext
9403cat >>conftest.$ac_ext <<_ACEOF
9404/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009405$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009406 typedef float ac__type_sizeof_;
9407static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9408static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009409#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009410#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009411int
9412main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009413{
Martin v. Löwis11437992002-04-12 09:54:03 +00009414
9415 FILE *f = fopen ("conftest.val", "w");
9416 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009417 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009418 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009419 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009420 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009421 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009422 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009423 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009424 }
9425 else
9426 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009427 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009428 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009429 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009430 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009431 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009432 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009433
9434 ;
9435 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009436}
Martin v. Löwis11437992002-04-12 09:54:03 +00009437_ACEOF
9438rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009439if { (ac_try="$ac_link"
9440case "(($ac_try" in
9441 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9442 *) ac_try_echo=$ac_try;;
9443esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009444eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009445 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009446 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009448 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009449 { (case "(($ac_try" in
9450 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9451 *) ac_try_echo=$ac_try;;
9452esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009453eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009454 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009455 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009457 (exit $ac_status); }; }; then
9458 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009459else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009460 echo "$as_me: program exited with status $ac_status" >&5
9461echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009462sed 's/^/| /' conftest.$ac_ext >&5
9463
Martin v. Löwis11437992002-04-12 09:54:03 +00009464( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009465if test "$ac_cv_type_float" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009466 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009467See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009468echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009469See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009470 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009471 else
9472 ac_cv_sizeof_float=0
9473 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009474fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009475rm -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 +00009476fi
9477rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009478fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009479{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
9480echo "${ECHO_T}$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009481
9482
9483
Martin v. Löwis11437992002-04-12 09:54:03 +00009484cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009485#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00009486_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009487
9488
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009489{ echo "$as_me:$LINENO: checking for double" >&5
9490echo $ECHO_N "checking for double... $ECHO_C" >&6; }
9491if test "${ac_cv_type_double+set}" = set; then
9492 echo $ECHO_N "(cached) $ECHO_C" >&6
9493else
9494 cat >conftest.$ac_ext <<_ACEOF
9495/* confdefs.h. */
9496_ACEOF
9497cat confdefs.h >>conftest.$ac_ext
9498cat >>conftest.$ac_ext <<_ACEOF
9499/* end confdefs.h. */
9500$ac_includes_default
9501typedef double ac__type_new_;
9502int
9503main ()
9504{
9505if ((ac__type_new_ *) 0)
9506 return 0;
9507if (sizeof (ac__type_new_))
9508 return 0;
9509 ;
9510 return 0;
9511}
9512_ACEOF
9513rm -f conftest.$ac_objext
9514if { (ac_try="$ac_compile"
9515case "(($ac_try" in
9516 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9517 *) ac_try_echo=$ac_try;;
9518esac
9519eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9520 (eval "$ac_compile") 2>conftest.er1
9521 ac_status=$?
9522 grep -v '^ *+' conftest.er1 >conftest.err
9523 rm -f conftest.er1
9524 cat conftest.err >&5
9525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9526 (exit $ac_status); } && {
9527 test -z "$ac_c_werror_flag" ||
9528 test ! -s conftest.err
9529 } && test -s conftest.$ac_objext; then
9530 ac_cv_type_double=yes
9531else
9532 echo "$as_me: failed program was:" >&5
9533sed 's/^/| /' conftest.$ac_ext >&5
9534
9535 ac_cv_type_double=no
9536fi
9537
9538rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9539fi
9540{ echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
9541echo "${ECHO_T}$ac_cv_type_double" >&6; }
9542
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009543# The cast to long int works around a bug in the HP C Compiler
9544# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9545# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9546# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009547{ echo "$as_me:$LINENO: checking size of double" >&5
9548echo $ECHO_N "checking size of double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009549if test "${ac_cv_sizeof_double+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009550 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009551else
Martin v. Löwis11437992002-04-12 09:54:03 +00009552 if test "$cross_compiling" = yes; then
9553 # Depending upon the size, compute the lo and hi bounds.
9554cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009555/* confdefs.h. */
9556_ACEOF
9557cat confdefs.h >>conftest.$ac_ext
9558cat >>conftest.$ac_ext <<_ACEOF
9559/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009560$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009561 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009562int
9563main ()
9564{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009565static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009566test_array [0] = 0
9567
9568 ;
9569 return 0;
9570}
9571_ACEOF
9572rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009573if { (ac_try="$ac_compile"
9574case "(($ac_try" in
9575 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9576 *) ac_try_echo=$ac_try;;
9577esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009578eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009579 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009580 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009581 grep -v '^ *+' conftest.er1 >conftest.err
9582 rm -f conftest.er1
9583 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009585 (exit $ac_status); } && {
9586 test -z "$ac_c_werror_flag" ||
9587 test ! -s conftest.err
9588 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009589 ac_lo=0 ac_mid=0
9590 while :; do
9591 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009592/* confdefs.h. */
9593_ACEOF
9594cat confdefs.h >>conftest.$ac_ext
9595cat >>conftest.$ac_ext <<_ACEOF
9596/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009597$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009598 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009599int
9600main ()
9601{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009602static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009603test_array [0] = 0
9604
9605 ;
9606 return 0;
9607}
9608_ACEOF
9609rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009610if { (ac_try="$ac_compile"
9611case "(($ac_try" in
9612 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9613 *) ac_try_echo=$ac_try;;
9614esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009615eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009616 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009617 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009618 grep -v '^ *+' conftest.er1 >conftest.err
9619 rm -f conftest.er1
9620 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009622 (exit $ac_status); } && {
9623 test -z "$ac_c_werror_flag" ||
9624 test ! -s conftest.err
9625 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009626 ac_hi=$ac_mid; break
9627else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009628 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009629sed 's/^/| /' conftest.$ac_ext >&5
9630
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009631 ac_lo=`expr $ac_mid + 1`
9632 if test $ac_lo -le $ac_mid; then
9633 ac_lo= ac_hi=
9634 break
9635 fi
9636 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009637fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009638
9639rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009640 done
9641else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009642 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009643sed 's/^/| /' conftest.$ac_ext >&5
9644
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009645 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009646/* confdefs.h. */
9647_ACEOF
9648cat confdefs.h >>conftest.$ac_ext
9649cat >>conftest.$ac_ext <<_ACEOF
9650/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009651$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009652 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009653int
9654main ()
9655{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009656static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009657test_array [0] = 0
9658
9659 ;
9660 return 0;
9661}
9662_ACEOF
9663rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009664if { (ac_try="$ac_compile"
9665case "(($ac_try" in
9666 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9667 *) ac_try_echo=$ac_try;;
9668esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009669eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009670 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009671 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009672 grep -v '^ *+' conftest.er1 >conftest.err
9673 rm -f conftest.er1
9674 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009676 (exit $ac_status); } && {
9677 test -z "$ac_c_werror_flag" ||
9678 test ! -s conftest.err
9679 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009680 ac_hi=-1 ac_mid=-1
9681 while :; do
9682 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009683/* confdefs.h. */
9684_ACEOF
9685cat confdefs.h >>conftest.$ac_ext
9686cat >>conftest.$ac_ext <<_ACEOF
9687/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009688$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009689 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009690int
9691main ()
9692{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009693static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009694test_array [0] = 0
9695
9696 ;
9697 return 0;
9698}
9699_ACEOF
9700rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009701if { (ac_try="$ac_compile"
9702case "(($ac_try" in
9703 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9704 *) ac_try_echo=$ac_try;;
9705esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009706eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009707 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009708 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009709 grep -v '^ *+' conftest.er1 >conftest.err
9710 rm -f conftest.er1
9711 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009713 (exit $ac_status); } && {
9714 test -z "$ac_c_werror_flag" ||
9715 test ! -s conftest.err
9716 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009717 ac_lo=$ac_mid; break
9718else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009719 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009720sed 's/^/| /' conftest.$ac_ext >&5
9721
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009722 ac_hi=`expr '(' $ac_mid ')' - 1`
9723 if test $ac_mid -le $ac_hi; then
9724 ac_lo= ac_hi=
9725 break
9726 fi
9727 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009728fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009729
9730rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009731 done
9732else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009733 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009734sed 's/^/| /' conftest.$ac_ext >&5
9735
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009736 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009737fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009738
9739rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009740fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009741
9742rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009743# Binary search between lo and hi bounds.
9744while test "x$ac_lo" != "x$ac_hi"; do
9745 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9746 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009747/* confdefs.h. */
9748_ACEOF
9749cat confdefs.h >>conftest.$ac_ext
9750cat >>conftest.$ac_ext <<_ACEOF
9751/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009752$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009753 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009754int
9755main ()
9756{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009757static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009758test_array [0] = 0
9759
9760 ;
9761 return 0;
9762}
9763_ACEOF
9764rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009765if { (ac_try="$ac_compile"
9766case "(($ac_try" in
9767 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9768 *) ac_try_echo=$ac_try;;
9769esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009770eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009771 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009772 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009773 grep -v '^ *+' conftest.er1 >conftest.err
9774 rm -f conftest.er1
9775 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009777 (exit $ac_status); } && {
9778 test -z "$ac_c_werror_flag" ||
9779 test ! -s conftest.err
9780 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009781 ac_hi=$ac_mid
9782else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009783 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009784sed 's/^/| /' conftest.$ac_ext >&5
9785
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009786 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009787fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009788
9789rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009790done
9791case $ac_lo in
9792?*) ac_cv_sizeof_double=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009793'') if test "$ac_cv_type_double" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009794 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009795See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009796echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009797See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009798 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009799 else
9800 ac_cv_sizeof_double=0
9801 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009802esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009803else
Martin v. Löwis11437992002-04-12 09:54:03 +00009804 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009805/* confdefs.h. */
9806_ACEOF
9807cat confdefs.h >>conftest.$ac_ext
9808cat >>conftest.$ac_ext <<_ACEOF
9809/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009810$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009811 typedef double ac__type_sizeof_;
9812static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9813static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009814#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009815#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009816int
9817main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009818{
Martin v. Löwis11437992002-04-12 09:54:03 +00009819
9820 FILE *f = fopen ("conftest.val", "w");
9821 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009822 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009823 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009824 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009825 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009826 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009827 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009828 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009829 }
9830 else
9831 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009832 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009833 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009834 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009835 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009836 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009837 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009838
9839 ;
9840 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009841}
Martin v. Löwis11437992002-04-12 09:54:03 +00009842_ACEOF
9843rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009844if { (ac_try="$ac_link"
9845case "(($ac_try" in
9846 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9847 *) ac_try_echo=$ac_try;;
9848esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009849eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009850 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009851 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009853 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009854 { (case "(($ac_try" in
9855 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9856 *) ac_try_echo=$ac_try;;
9857esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009858eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009859 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009860 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009862 (exit $ac_status); }; }; then
9863 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009864else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009865 echo "$as_me: program exited with status $ac_status" >&5
9866echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009867sed 's/^/| /' conftest.$ac_ext >&5
9868
Martin v. Löwis11437992002-04-12 09:54:03 +00009869( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009870if test "$ac_cv_type_double" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009871 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009872See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009873echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009874See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009875 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009876 else
9877 ac_cv_sizeof_double=0
9878 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009879fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009880rm -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 +00009881fi
9882rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009883fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009884{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
9885echo "${ECHO_T}$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009886
9887
9888
Martin v. Löwis11437992002-04-12 09:54:03 +00009889cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009890#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00009891_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009892
9893
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009894{ echo "$as_me:$LINENO: checking for fpos_t" >&5
9895echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6; }
9896if test "${ac_cv_type_fpos_t+set}" = set; then
9897 echo $ECHO_N "(cached) $ECHO_C" >&6
9898else
9899 cat >conftest.$ac_ext <<_ACEOF
9900/* confdefs.h. */
9901_ACEOF
9902cat confdefs.h >>conftest.$ac_ext
9903cat >>conftest.$ac_ext <<_ACEOF
9904/* end confdefs.h. */
9905$ac_includes_default
9906typedef fpos_t ac__type_new_;
9907int
9908main ()
9909{
9910if ((ac__type_new_ *) 0)
9911 return 0;
9912if (sizeof (ac__type_new_))
9913 return 0;
9914 ;
9915 return 0;
9916}
9917_ACEOF
9918rm -f conftest.$ac_objext
9919if { (ac_try="$ac_compile"
9920case "(($ac_try" in
9921 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9922 *) ac_try_echo=$ac_try;;
9923esac
9924eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9925 (eval "$ac_compile") 2>conftest.er1
9926 ac_status=$?
9927 grep -v '^ *+' conftest.er1 >conftest.err
9928 rm -f conftest.er1
9929 cat conftest.err >&5
9930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9931 (exit $ac_status); } && {
9932 test -z "$ac_c_werror_flag" ||
9933 test ! -s conftest.err
9934 } && test -s conftest.$ac_objext; then
9935 ac_cv_type_fpos_t=yes
9936else
9937 echo "$as_me: failed program was:" >&5
9938sed 's/^/| /' conftest.$ac_ext >&5
9939
9940 ac_cv_type_fpos_t=no
9941fi
9942
9943rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9944fi
9945{ echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
9946echo "${ECHO_T}$ac_cv_type_fpos_t" >&6; }
9947
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009948# The cast to long int works around a bug in the HP C Compiler
9949# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9950# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9951# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009952{ echo "$as_me:$LINENO: checking size of fpos_t" >&5
9953echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009954if test "${ac_cv_sizeof_fpos_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009955 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009956else
Martin v. Löwis11437992002-04-12 09:54:03 +00009957 if test "$cross_compiling" = yes; then
9958 # Depending upon the size, compute the lo and hi bounds.
9959cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009960/* confdefs.h. */
9961_ACEOF
9962cat confdefs.h >>conftest.$ac_ext
9963cat >>conftest.$ac_ext <<_ACEOF
9964/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009965$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009966 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009967int
9968main ()
9969{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009970static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009971test_array [0] = 0
9972
9973 ;
9974 return 0;
9975}
9976_ACEOF
9977rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009978if { (ac_try="$ac_compile"
9979case "(($ac_try" in
9980 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9981 *) ac_try_echo=$ac_try;;
9982esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009983eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009984 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009985 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009986 grep -v '^ *+' conftest.er1 >conftest.err
9987 rm -f conftest.er1
9988 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009990 (exit $ac_status); } && {
9991 test -z "$ac_c_werror_flag" ||
9992 test ! -s conftest.err
9993 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009994 ac_lo=0 ac_mid=0
9995 while :; do
9996 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009997/* confdefs.h. */
9998_ACEOF
9999cat confdefs.h >>conftest.$ac_ext
10000cat >>conftest.$ac_ext <<_ACEOF
10001/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010002$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010003 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010004int
10005main ()
10006{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010007static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010008test_array [0] = 0
10009
10010 ;
10011 return 0;
10012}
10013_ACEOF
10014rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010015if { (ac_try="$ac_compile"
10016case "(($ac_try" in
10017 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10018 *) ac_try_echo=$ac_try;;
10019esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010020eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010021 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010022 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010023 grep -v '^ *+' conftest.er1 >conftest.err
10024 rm -f conftest.er1
10025 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010027 (exit $ac_status); } && {
10028 test -z "$ac_c_werror_flag" ||
10029 test ! -s conftest.err
10030 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010031 ac_hi=$ac_mid; break
10032else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010033 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010034sed 's/^/| /' conftest.$ac_ext >&5
10035
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010036 ac_lo=`expr $ac_mid + 1`
10037 if test $ac_lo -le $ac_mid; then
10038 ac_lo= ac_hi=
10039 break
10040 fi
10041 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010042fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010043
10044rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010045 done
10046else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010047 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010048sed 's/^/| /' conftest.$ac_ext >&5
10049
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010050 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010051/* confdefs.h. */
10052_ACEOF
10053cat confdefs.h >>conftest.$ac_ext
10054cat >>conftest.$ac_ext <<_ACEOF
10055/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010056$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010057 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010058int
10059main ()
10060{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010061static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010062test_array [0] = 0
10063
10064 ;
10065 return 0;
10066}
10067_ACEOF
10068rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010069if { (ac_try="$ac_compile"
10070case "(($ac_try" in
10071 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10072 *) ac_try_echo=$ac_try;;
10073esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010074eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010075 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010076 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010077 grep -v '^ *+' conftest.er1 >conftest.err
10078 rm -f conftest.er1
10079 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010081 (exit $ac_status); } && {
10082 test -z "$ac_c_werror_flag" ||
10083 test ! -s conftest.err
10084 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010085 ac_hi=-1 ac_mid=-1
10086 while :; do
10087 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010088/* confdefs.h. */
10089_ACEOF
10090cat confdefs.h >>conftest.$ac_ext
10091cat >>conftest.$ac_ext <<_ACEOF
10092/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010093$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010094 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010095int
10096main ()
10097{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010098static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010099test_array [0] = 0
10100
10101 ;
10102 return 0;
10103}
10104_ACEOF
10105rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010106if { (ac_try="$ac_compile"
10107case "(($ac_try" in
10108 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10109 *) ac_try_echo=$ac_try;;
10110esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010111eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010112 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010113 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010114 grep -v '^ *+' conftest.er1 >conftest.err
10115 rm -f conftest.er1
10116 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010118 (exit $ac_status); } && {
10119 test -z "$ac_c_werror_flag" ||
10120 test ! -s conftest.err
10121 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010122 ac_lo=$ac_mid; break
10123else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010124 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010125sed 's/^/| /' conftest.$ac_ext >&5
10126
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010127 ac_hi=`expr '(' $ac_mid ')' - 1`
10128 if test $ac_mid -le $ac_hi; then
10129 ac_lo= ac_hi=
10130 break
10131 fi
10132 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010133fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010134
10135rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010136 done
10137else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010138 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010139sed 's/^/| /' conftest.$ac_ext >&5
10140
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010141 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010142fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010143
10144rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010145fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010146
10147rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010148# Binary search between lo and hi bounds.
10149while test "x$ac_lo" != "x$ac_hi"; do
10150 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10151 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010152/* confdefs.h. */
10153_ACEOF
10154cat confdefs.h >>conftest.$ac_ext
10155cat >>conftest.$ac_ext <<_ACEOF
10156/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010157$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010158 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010159int
10160main ()
10161{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010162static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010163test_array [0] = 0
10164
10165 ;
10166 return 0;
10167}
10168_ACEOF
10169rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010170if { (ac_try="$ac_compile"
10171case "(($ac_try" in
10172 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10173 *) ac_try_echo=$ac_try;;
10174esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010175eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010176 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010177 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010178 grep -v '^ *+' conftest.er1 >conftest.err
10179 rm -f conftest.er1
10180 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010182 (exit $ac_status); } && {
10183 test -z "$ac_c_werror_flag" ||
10184 test ! -s conftest.err
10185 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010186 ac_hi=$ac_mid
10187else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010188 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010189sed 's/^/| /' conftest.$ac_ext >&5
10190
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010191 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010192fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010193
10194rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010195done
10196case $ac_lo in
10197?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010198'') if test "$ac_cv_type_fpos_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010199 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010200See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010201echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010202See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010203 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010204 else
10205 ac_cv_sizeof_fpos_t=0
10206 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010207esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010208else
Martin v. Löwis11437992002-04-12 09:54:03 +000010209 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010210/* confdefs.h. */
10211_ACEOF
10212cat confdefs.h >>conftest.$ac_ext
10213cat >>conftest.$ac_ext <<_ACEOF
10214/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010215$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010216 typedef fpos_t ac__type_sizeof_;
10217static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10218static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010219#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010220#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010221int
10222main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010223{
Martin v. Löwis11437992002-04-12 09:54:03 +000010224
10225 FILE *f = fopen ("conftest.val", "w");
10226 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010227 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010228 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010229 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010230 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010231 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010232 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010233 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010234 }
10235 else
10236 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010237 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010238 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010239 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010240 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010241 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010242 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010243
10244 ;
10245 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010246}
Martin v. Löwis11437992002-04-12 09:54:03 +000010247_ACEOF
10248rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010249if { (ac_try="$ac_link"
10250case "(($ac_try" in
10251 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10252 *) ac_try_echo=$ac_try;;
10253esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010254eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010255 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010256 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010258 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010259 { (case "(($ac_try" in
10260 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10261 *) ac_try_echo=$ac_try;;
10262esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010263eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010264 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010265 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010267 (exit $ac_status); }; }; then
10268 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010269else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010270 echo "$as_me: program exited with status $ac_status" >&5
10271echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010272sed 's/^/| /' conftest.$ac_ext >&5
10273
Martin v. Löwis11437992002-04-12 09:54:03 +000010274( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010275if test "$ac_cv_type_fpos_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010276 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010277See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010278echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010279See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010280 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010281 else
10282 ac_cv_sizeof_fpos_t=0
10283 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010284fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010285rm -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 +000010286fi
10287rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010288fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010289{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
10290echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010291
10292
10293
Martin v. Löwis11437992002-04-12 09:54:03 +000010294cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010295#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010296_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010297
Michael W. Hudson54241132001-12-07 15:38:26 +000010298
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010299{ echo "$as_me:$LINENO: checking for size_t" >&5
10300echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
10301if test "${ac_cv_type_size_t+set}" = set; then
10302 echo $ECHO_N "(cached) $ECHO_C" >&6
10303else
10304 cat >conftest.$ac_ext <<_ACEOF
10305/* confdefs.h. */
10306_ACEOF
10307cat confdefs.h >>conftest.$ac_ext
10308cat >>conftest.$ac_ext <<_ACEOF
10309/* end confdefs.h. */
10310$ac_includes_default
10311typedef size_t ac__type_new_;
10312int
10313main ()
10314{
10315if ((ac__type_new_ *) 0)
10316 return 0;
10317if (sizeof (ac__type_new_))
10318 return 0;
10319 ;
10320 return 0;
10321}
10322_ACEOF
10323rm -f conftest.$ac_objext
10324if { (ac_try="$ac_compile"
10325case "(($ac_try" in
10326 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10327 *) ac_try_echo=$ac_try;;
10328esac
10329eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10330 (eval "$ac_compile") 2>conftest.er1
10331 ac_status=$?
10332 grep -v '^ *+' conftest.er1 >conftest.err
10333 rm -f conftest.er1
10334 cat conftest.err >&5
10335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10336 (exit $ac_status); } && {
10337 test -z "$ac_c_werror_flag" ||
10338 test ! -s conftest.err
10339 } && test -s conftest.$ac_objext; then
10340 ac_cv_type_size_t=yes
10341else
10342 echo "$as_me: failed program was:" >&5
10343sed 's/^/| /' conftest.$ac_ext >&5
10344
10345 ac_cv_type_size_t=no
10346fi
10347
10348rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10349fi
10350{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
10351echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
10352
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010353# The cast to long int works around a bug in the HP C Compiler
10354# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10355# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10356# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010357{ echo "$as_me:$LINENO: checking size of size_t" >&5
10358echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010359if test "${ac_cv_sizeof_size_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010360 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +000010361else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010362 if test "$cross_compiling" = yes; then
10363 # Depending upon the size, compute the lo and hi bounds.
10364cat >conftest.$ac_ext <<_ACEOF
10365/* confdefs.h. */
10366_ACEOF
10367cat confdefs.h >>conftest.$ac_ext
10368cat >>conftest.$ac_ext <<_ACEOF
10369/* end confdefs.h. */
10370$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010371 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010372int
10373main ()
10374{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010375static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010376test_array [0] = 0
10377
10378 ;
10379 return 0;
10380}
10381_ACEOF
10382rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010383if { (ac_try="$ac_compile"
10384case "(($ac_try" in
10385 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10386 *) ac_try_echo=$ac_try;;
10387esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010388eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010389 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010390 ac_status=$?
10391 grep -v '^ *+' conftest.er1 >conftest.err
10392 rm -f conftest.er1
10393 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010395 (exit $ac_status); } && {
10396 test -z "$ac_c_werror_flag" ||
10397 test ! -s conftest.err
10398 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010399 ac_lo=0 ac_mid=0
10400 while :; do
10401 cat >conftest.$ac_ext <<_ACEOF
10402/* confdefs.h. */
10403_ACEOF
10404cat confdefs.h >>conftest.$ac_ext
10405cat >>conftest.$ac_ext <<_ACEOF
10406/* end confdefs.h. */
10407$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010408 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010409int
10410main ()
10411{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010412static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010413test_array [0] = 0
10414
10415 ;
10416 return 0;
10417}
10418_ACEOF
10419rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010420if { (ac_try="$ac_compile"
10421case "(($ac_try" in
10422 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10423 *) ac_try_echo=$ac_try;;
10424esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010425eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010426 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010427 ac_status=$?
10428 grep -v '^ *+' conftest.er1 >conftest.err
10429 rm -f conftest.er1
10430 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010432 (exit $ac_status); } && {
10433 test -z "$ac_c_werror_flag" ||
10434 test ! -s conftest.err
10435 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010436 ac_hi=$ac_mid; break
10437else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010438 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010439sed 's/^/| /' conftest.$ac_ext >&5
10440
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010441 ac_lo=`expr $ac_mid + 1`
10442 if test $ac_lo -le $ac_mid; then
10443 ac_lo= ac_hi=
10444 break
10445 fi
10446 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010447fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010448
10449rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010450 done
10451else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010452 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010453sed 's/^/| /' conftest.$ac_ext >&5
10454
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010455 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +000010456/* confdefs.h. */
10457_ACEOF
10458cat confdefs.h >>conftest.$ac_ext
10459cat >>conftest.$ac_ext <<_ACEOF
10460/* end confdefs.h. */
10461$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010462 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010463int
10464main ()
10465{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010466static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010467test_array [0] = 0
10468
10469 ;
10470 return 0;
10471}
10472_ACEOF
10473rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010474if { (ac_try="$ac_compile"
10475case "(($ac_try" in
10476 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10477 *) ac_try_echo=$ac_try;;
10478esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010479eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010480 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010481 ac_status=$?
10482 grep -v '^ *+' conftest.er1 >conftest.err
10483 rm -f conftest.er1
10484 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010486 (exit $ac_status); } && {
10487 test -z "$ac_c_werror_flag" ||
10488 test ! -s conftest.err
10489 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010490 ac_hi=-1 ac_mid=-1
10491 while :; do
10492 cat >conftest.$ac_ext <<_ACEOF
10493/* confdefs.h. */
10494_ACEOF
10495cat confdefs.h >>conftest.$ac_ext
10496cat >>conftest.$ac_ext <<_ACEOF
10497/* end confdefs.h. */
10498$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010499 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010500int
10501main ()
10502{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010503static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010504test_array [0] = 0
10505
10506 ;
10507 return 0;
10508}
10509_ACEOF
10510rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010511if { (ac_try="$ac_compile"
10512case "(($ac_try" in
10513 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10514 *) ac_try_echo=$ac_try;;
10515esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010516eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010517 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010518 ac_status=$?
10519 grep -v '^ *+' conftest.er1 >conftest.err
10520 rm -f conftest.er1
10521 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010523 (exit $ac_status); } && {
10524 test -z "$ac_c_werror_flag" ||
10525 test ! -s conftest.err
10526 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010527 ac_lo=$ac_mid; break
10528else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010529 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010530sed 's/^/| /' conftest.$ac_ext >&5
10531
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010532 ac_hi=`expr '(' $ac_mid ')' - 1`
10533 if test $ac_mid -le $ac_hi; then
10534 ac_lo= ac_hi=
10535 break
10536 fi
10537 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010538fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010539
10540rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010541 done
10542else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010543 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010544sed 's/^/| /' conftest.$ac_ext >&5
10545
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010546 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +000010547fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010548
10549rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010550fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010551
10552rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010553# Binary search between lo and hi bounds.
10554while test "x$ac_lo" != "x$ac_hi"; do
10555 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10556 cat >conftest.$ac_ext <<_ACEOF
10557/* confdefs.h. */
10558_ACEOF
10559cat confdefs.h >>conftest.$ac_ext
10560cat >>conftest.$ac_ext <<_ACEOF
10561/* end confdefs.h. */
10562$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010563 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010564int
10565main ()
10566{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010567static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010568test_array [0] = 0
10569
10570 ;
10571 return 0;
10572}
10573_ACEOF
10574rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010575if { (ac_try="$ac_compile"
10576case "(($ac_try" in
10577 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10578 *) ac_try_echo=$ac_try;;
10579esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010580eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010581 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010582 ac_status=$?
10583 grep -v '^ *+' conftest.er1 >conftest.err
10584 rm -f conftest.er1
10585 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010587 (exit $ac_status); } && {
10588 test -z "$ac_c_werror_flag" ||
10589 test ! -s conftest.err
10590 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010591 ac_hi=$ac_mid
10592else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010593 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010594sed 's/^/| /' conftest.$ac_ext >&5
10595
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010596 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010597fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010598
10599rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010600done
10601case $ac_lo in
10602?*) ac_cv_sizeof_size_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010603'') if test "$ac_cv_type_size_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010604 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010605See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010606echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010607See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010608 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010609 else
10610 ac_cv_sizeof_size_t=0
10611 fi ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010612esac
10613else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010614 cat >conftest.$ac_ext <<_ACEOF
10615/* confdefs.h. */
10616_ACEOF
10617cat confdefs.h >>conftest.$ac_ext
10618cat >>conftest.$ac_ext <<_ACEOF
10619/* end confdefs.h. */
10620$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010621 typedef size_t ac__type_sizeof_;
10622static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10623static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010624#include <stdio.h>
10625#include <stdlib.h>
10626int
10627main ()
10628{
10629
10630 FILE *f = fopen ("conftest.val", "w");
10631 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010632 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010633 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010634 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010635 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010636 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010637 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010638 fprintf (f, "%ld\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010639 }
10640 else
10641 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010642 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010643 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010644 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010645 fprintf (f, "%lu\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010646 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010647 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010648
10649 ;
10650 return 0;
10651}
10652_ACEOF
10653rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010654if { (ac_try="$ac_link"
10655case "(($ac_try" in
10656 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10657 *) ac_try_echo=$ac_try;;
10658esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010659eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010660 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010661 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010663 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010664 { (case "(($ac_try" in
10665 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10666 *) ac_try_echo=$ac_try;;
10667esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010668eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010669 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010670 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010672 (exit $ac_status); }; }; then
10673 ac_cv_sizeof_size_t=`cat conftest.val`
10674else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010675 echo "$as_me: program exited with status $ac_status" >&5
10676echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010677sed 's/^/| /' conftest.$ac_ext >&5
10678
10679( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010680if test "$ac_cv_type_size_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010681 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010682See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010683echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010684See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010685 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010686 else
10687 ac_cv_sizeof_size_t=0
10688 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +000010689fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010690rm -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 +000010691fi
10692rm -f conftest.val
Martin v. Löwis18e16552006-02-15 17:27:45 +000010693fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010694{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
10695echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010696
10697
10698
Martin v. Löwis18e16552006-02-15 17:27:45 +000010699cat >>confdefs.h <<_ACEOF
10700#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
10701_ACEOF
10702
10703
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010704{ echo "$as_me:$LINENO: checking for pid_t" >&5
10705echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
10706if test "${ac_cv_type_pid_t+set}" = set; then
10707 echo $ECHO_N "(cached) $ECHO_C" >&6
10708else
10709 cat >conftest.$ac_ext <<_ACEOF
10710/* confdefs.h. */
10711_ACEOF
10712cat confdefs.h >>conftest.$ac_ext
10713cat >>conftest.$ac_ext <<_ACEOF
10714/* end confdefs.h. */
10715$ac_includes_default
10716typedef pid_t ac__type_new_;
10717int
10718main ()
10719{
10720if ((ac__type_new_ *) 0)
10721 return 0;
10722if (sizeof (ac__type_new_))
10723 return 0;
10724 ;
10725 return 0;
10726}
10727_ACEOF
10728rm -f conftest.$ac_objext
10729if { (ac_try="$ac_compile"
10730case "(($ac_try" in
10731 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10732 *) ac_try_echo=$ac_try;;
10733esac
10734eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10735 (eval "$ac_compile") 2>conftest.er1
10736 ac_status=$?
10737 grep -v '^ *+' conftest.er1 >conftest.err
10738 rm -f conftest.er1
10739 cat conftest.err >&5
10740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10741 (exit $ac_status); } && {
10742 test -z "$ac_c_werror_flag" ||
10743 test ! -s conftest.err
10744 } && test -s conftest.$ac_objext; then
10745 ac_cv_type_pid_t=yes
10746else
10747 echo "$as_me: failed program was:" >&5
10748sed 's/^/| /' conftest.$ac_ext >&5
10749
10750 ac_cv_type_pid_t=no
10751fi
10752
10753rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10754fi
10755{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10756echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
10757
Christian Heimes400adb02008-02-01 08:12:03 +000010758# The cast to long int works around a bug in the HP C Compiler
10759# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10760# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10761# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010762{ echo "$as_me:$LINENO: checking size of pid_t" >&5
10763echo $ECHO_N "checking size of pid_t... $ECHO_C" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +000010764if test "${ac_cv_sizeof_pid_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010765 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes400adb02008-02-01 08:12:03 +000010766else
10767 if test "$cross_compiling" = yes; then
10768 # Depending upon the size, compute the lo and hi bounds.
10769cat >conftest.$ac_ext <<_ACEOF
10770/* confdefs.h. */
10771_ACEOF
10772cat confdefs.h >>conftest.$ac_ext
10773cat >>conftest.$ac_ext <<_ACEOF
10774/* end confdefs.h. */
10775$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010776 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010777int
10778main ()
10779{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010780static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Christian Heimes400adb02008-02-01 08:12:03 +000010781test_array [0] = 0
10782
10783 ;
10784 return 0;
10785}
10786_ACEOF
10787rm -f conftest.$ac_objext
10788if { (ac_try="$ac_compile"
10789case "(($ac_try" in
10790 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10791 *) ac_try_echo=$ac_try;;
10792esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010793eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010794 (eval "$ac_compile") 2>conftest.er1
10795 ac_status=$?
10796 grep -v '^ *+' conftest.er1 >conftest.err
10797 rm -f conftest.er1
10798 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010800 (exit $ac_status); } && {
10801 test -z "$ac_c_werror_flag" ||
10802 test ! -s conftest.err
10803 } && test -s conftest.$ac_objext; then
10804 ac_lo=0 ac_mid=0
10805 while :; do
10806 cat >conftest.$ac_ext <<_ACEOF
10807/* confdefs.h. */
10808_ACEOF
10809cat confdefs.h >>conftest.$ac_ext
10810cat >>conftest.$ac_ext <<_ACEOF
10811/* end confdefs.h. */
10812$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010813 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010814int
10815main ()
10816{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010817static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000010818test_array [0] = 0
10819
10820 ;
10821 return 0;
10822}
10823_ACEOF
10824rm -f conftest.$ac_objext
10825if { (ac_try="$ac_compile"
10826case "(($ac_try" in
10827 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10828 *) ac_try_echo=$ac_try;;
10829esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010830eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010831 (eval "$ac_compile") 2>conftest.er1
10832 ac_status=$?
10833 grep -v '^ *+' conftest.er1 >conftest.err
10834 rm -f conftest.er1
10835 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010837 (exit $ac_status); } && {
10838 test -z "$ac_c_werror_flag" ||
10839 test ! -s conftest.err
10840 } && test -s conftest.$ac_objext; then
10841 ac_hi=$ac_mid; break
10842else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010843 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010844sed 's/^/| /' conftest.$ac_ext >&5
10845
10846 ac_lo=`expr $ac_mid + 1`
10847 if test $ac_lo -le $ac_mid; then
10848 ac_lo= ac_hi=
10849 break
10850 fi
10851 ac_mid=`expr 2 '*' $ac_mid + 1`
10852fi
10853
10854rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10855 done
10856else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010857 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010858sed 's/^/| /' conftest.$ac_ext >&5
10859
10860 cat >conftest.$ac_ext <<_ACEOF
10861/* confdefs.h. */
10862_ACEOF
10863cat confdefs.h >>conftest.$ac_ext
10864cat >>conftest.$ac_ext <<_ACEOF
10865/* end confdefs.h. */
10866$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010867 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010868int
10869main ()
10870{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010871static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Christian Heimes400adb02008-02-01 08:12:03 +000010872test_array [0] = 0
10873
10874 ;
10875 return 0;
10876}
10877_ACEOF
10878rm -f conftest.$ac_objext
10879if { (ac_try="$ac_compile"
10880case "(($ac_try" in
10881 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10882 *) ac_try_echo=$ac_try;;
10883esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010884eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010885 (eval "$ac_compile") 2>conftest.er1
10886 ac_status=$?
10887 grep -v '^ *+' conftest.er1 >conftest.err
10888 rm -f conftest.er1
10889 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010891 (exit $ac_status); } && {
10892 test -z "$ac_c_werror_flag" ||
10893 test ! -s conftest.err
10894 } && test -s conftest.$ac_objext; then
10895 ac_hi=-1 ac_mid=-1
10896 while :; do
10897 cat >conftest.$ac_ext <<_ACEOF
10898/* confdefs.h. */
10899_ACEOF
10900cat confdefs.h >>conftest.$ac_ext
10901cat >>conftest.$ac_ext <<_ACEOF
10902/* end confdefs.h. */
10903$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010904 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010905int
10906main ()
10907{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010908static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000010909test_array [0] = 0
10910
10911 ;
10912 return 0;
10913}
10914_ACEOF
10915rm -f conftest.$ac_objext
10916if { (ac_try="$ac_compile"
10917case "(($ac_try" in
10918 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10919 *) ac_try_echo=$ac_try;;
10920esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010921eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010922 (eval "$ac_compile") 2>conftest.er1
10923 ac_status=$?
10924 grep -v '^ *+' conftest.er1 >conftest.err
10925 rm -f conftest.er1
10926 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010928 (exit $ac_status); } && {
10929 test -z "$ac_c_werror_flag" ||
10930 test ! -s conftest.err
10931 } && test -s conftest.$ac_objext; then
10932 ac_lo=$ac_mid; break
10933else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010934 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010935sed 's/^/| /' conftest.$ac_ext >&5
10936
10937 ac_hi=`expr '(' $ac_mid ')' - 1`
10938 if test $ac_mid -le $ac_hi; then
10939 ac_lo= ac_hi=
10940 break
10941 fi
10942 ac_mid=`expr 2 '*' $ac_mid`
10943fi
10944
10945rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10946 done
10947else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010948 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010949sed 's/^/| /' conftest.$ac_ext >&5
10950
10951 ac_lo= ac_hi=
10952fi
10953
10954rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10955fi
10956
10957rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10958# Binary search between lo and hi bounds.
10959while test "x$ac_lo" != "x$ac_hi"; do
10960 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10961 cat >conftest.$ac_ext <<_ACEOF
10962/* confdefs.h. */
10963_ACEOF
10964cat confdefs.h >>conftest.$ac_ext
10965cat >>conftest.$ac_ext <<_ACEOF
10966/* end confdefs.h. */
10967$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010968 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010969int
10970main ()
10971{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010972static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000010973test_array [0] = 0
10974
10975 ;
10976 return 0;
10977}
10978_ACEOF
10979rm -f conftest.$ac_objext
10980if { (ac_try="$ac_compile"
10981case "(($ac_try" in
10982 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10983 *) ac_try_echo=$ac_try;;
10984esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010985eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010986 (eval "$ac_compile") 2>conftest.er1
10987 ac_status=$?
10988 grep -v '^ *+' conftest.er1 >conftest.err
10989 rm -f conftest.er1
10990 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010992 (exit $ac_status); } && {
10993 test -z "$ac_c_werror_flag" ||
10994 test ! -s conftest.err
10995 } && test -s conftest.$ac_objext; then
10996 ac_hi=$ac_mid
10997else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010998 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010999sed 's/^/| /' conftest.$ac_ext >&5
11000
11001 ac_lo=`expr '(' $ac_mid ')' + 1`
11002fi
11003
11004rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11005done
11006case $ac_lo in
11007?*) ac_cv_sizeof_pid_t=$ac_lo;;
11008'') if test "$ac_cv_type_pid_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011009 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011010See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011011echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011012See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011013 { (exit 77); exit 77; }; }
Christian Heimes400adb02008-02-01 08:12:03 +000011014 else
11015 ac_cv_sizeof_pid_t=0
11016 fi ;;
11017esac
11018else
11019 cat >conftest.$ac_ext <<_ACEOF
11020/* confdefs.h. */
11021_ACEOF
11022cat confdefs.h >>conftest.$ac_ext
11023cat >>conftest.$ac_ext <<_ACEOF
11024/* end confdefs.h. */
11025$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011026 typedef pid_t ac__type_sizeof_;
11027static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11028static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Christian Heimes400adb02008-02-01 08:12:03 +000011029#include <stdio.h>
11030#include <stdlib.h>
11031int
11032main ()
11033{
11034
11035 FILE *f = fopen ("conftest.val", "w");
11036 if (! f)
11037 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011038 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Christian Heimes400adb02008-02-01 08:12:03 +000011039 {
11040 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011041 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes400adb02008-02-01 08:12:03 +000011042 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011043 fprintf (f, "%ld\n", i);
Christian Heimes400adb02008-02-01 08:12:03 +000011044 }
11045 else
11046 {
11047 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011048 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes400adb02008-02-01 08:12:03 +000011049 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011050 fprintf (f, "%lu\n", i);
Christian Heimes400adb02008-02-01 08:12:03 +000011051 }
11052 return ferror (f) || fclose (f) != 0;
11053
11054 ;
11055 return 0;
11056}
11057_ACEOF
11058rm -f conftest$ac_exeext
11059if { (ac_try="$ac_link"
11060case "(($ac_try" in
11061 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11062 *) ac_try_echo=$ac_try;;
11063esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011064eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011065 (eval "$ac_link") 2>&5
11066 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011068 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11069 { (case "(($ac_try" in
11070 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11071 *) ac_try_echo=$ac_try;;
11072esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011073eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011074 (eval "$ac_try") 2>&5
11075 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011077 (exit $ac_status); }; }; then
11078 ac_cv_sizeof_pid_t=`cat conftest.val`
11079else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011080 echo "$as_me: program exited with status $ac_status" >&5
11081echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011082sed 's/^/| /' conftest.$ac_ext >&5
11083
11084( exit $ac_status )
11085if test "$ac_cv_type_pid_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011086 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011087See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011088echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011089See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011090 { (exit 77); exit 77; }; }
Christian Heimes400adb02008-02-01 08:12:03 +000011091 else
11092 ac_cv_sizeof_pid_t=0
11093 fi
11094fi
11095rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11096fi
11097rm -f conftest.val
11098fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011099{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5
11100echo "${ECHO_T}$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +000011101
11102
11103
11104cat >>confdefs.h <<_ACEOF
11105#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
11106_ACEOF
11107
11108
Michael W. Hudson54241132001-12-07 15:38:26 +000011109
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011110{ echo "$as_me:$LINENO: checking for long long support" >&5
11111echo $ECHO_N "checking for long long support... $ECHO_C" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011112have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011113cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011114/* confdefs.h. */
11115_ACEOF
11116cat confdefs.h >>conftest.$ac_ext
11117cat >>conftest.$ac_ext <<_ACEOF
11118/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011119
Martin v. Löwis11437992002-04-12 09:54:03 +000011120int
11121main ()
11122{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011123long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011124 ;
11125 return 0;
11126}
11127_ACEOF
11128rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011129if { (ac_try="$ac_compile"
11130case "(($ac_try" in
11131 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11132 *) ac_try_echo=$ac_try;;
11133esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011134eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011135 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011136 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011137 grep -v '^ *+' conftest.er1 >conftest.err
11138 rm -f conftest.er1
11139 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011141 (exit $ac_status); } && {
11142 test -z "$ac_c_werror_flag" ||
11143 test ! -s conftest.err
11144 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011145
11146
11147cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011148#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011149_ACEOF
11150
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011151 have_long_long=yes
11152
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011153else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011154 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011155sed 's/^/| /' conftest.$ac_ext >&5
11156
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011157
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011158fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011159
11160rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011161{ echo "$as_me:$LINENO: result: $have_long_long" >&5
11162echo "${ECHO_T}$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000011163if test "$have_long_long" = yes ; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011164{ echo "$as_me:$LINENO: checking for long long" >&5
11165echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
11166if test "${ac_cv_type_long_long+set}" = set; then
11167 echo $ECHO_N "(cached) $ECHO_C" >&6
11168else
11169 cat >conftest.$ac_ext <<_ACEOF
11170/* confdefs.h. */
11171_ACEOF
11172cat confdefs.h >>conftest.$ac_ext
11173cat >>conftest.$ac_ext <<_ACEOF
11174/* end confdefs.h. */
11175$ac_includes_default
11176typedef long long ac__type_new_;
11177int
11178main ()
11179{
11180if ((ac__type_new_ *) 0)
11181 return 0;
11182if (sizeof (ac__type_new_))
11183 return 0;
11184 ;
11185 return 0;
11186}
11187_ACEOF
11188rm -f conftest.$ac_objext
11189if { (ac_try="$ac_compile"
11190case "(($ac_try" in
11191 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11192 *) ac_try_echo=$ac_try;;
11193esac
11194eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11195 (eval "$ac_compile") 2>conftest.er1
11196 ac_status=$?
11197 grep -v '^ *+' conftest.er1 >conftest.err
11198 rm -f conftest.er1
11199 cat conftest.err >&5
11200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11201 (exit $ac_status); } && {
11202 test -z "$ac_c_werror_flag" ||
11203 test ! -s conftest.err
11204 } && test -s conftest.$ac_objext; then
11205 ac_cv_type_long_long=yes
11206else
11207 echo "$as_me: failed program was:" >&5
11208sed 's/^/| /' conftest.$ac_ext >&5
11209
11210 ac_cv_type_long_long=no
11211fi
11212
11213rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11214fi
11215{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
11216echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
11217
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011218# The cast to long int works around a bug in the HP C Compiler
11219# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11220# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11221# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011222{ echo "$as_me:$LINENO: checking size of long long" >&5
11223echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011224if test "${ac_cv_sizeof_long_long+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011225 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011226else
Martin v. Löwis11437992002-04-12 09:54:03 +000011227 if test "$cross_compiling" = yes; then
11228 # Depending upon the size, compute the lo and hi bounds.
11229cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011230/* confdefs.h. */
11231_ACEOF
11232cat confdefs.h >>conftest.$ac_ext
11233cat >>conftest.$ac_ext <<_ACEOF
11234/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011235$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011236 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011237int
11238main ()
11239{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011240static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011241test_array [0] = 0
11242
11243 ;
11244 return 0;
11245}
11246_ACEOF
11247rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011248if { (ac_try="$ac_compile"
11249case "(($ac_try" in
11250 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11251 *) ac_try_echo=$ac_try;;
11252esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011253eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011254 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011255 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011256 grep -v '^ *+' conftest.er1 >conftest.err
11257 rm -f conftest.er1
11258 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011260 (exit $ac_status); } && {
11261 test -z "$ac_c_werror_flag" ||
11262 test ! -s conftest.err
11263 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011264 ac_lo=0 ac_mid=0
11265 while :; do
11266 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011267/* confdefs.h. */
11268_ACEOF
11269cat confdefs.h >>conftest.$ac_ext
11270cat >>conftest.$ac_ext <<_ACEOF
11271/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011272$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011273 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011274int
11275main ()
11276{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011277static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011278test_array [0] = 0
11279
11280 ;
11281 return 0;
11282}
11283_ACEOF
11284rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011285if { (ac_try="$ac_compile"
11286case "(($ac_try" in
11287 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11288 *) ac_try_echo=$ac_try;;
11289esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011290eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011291 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011292 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011293 grep -v '^ *+' conftest.er1 >conftest.err
11294 rm -f conftest.er1
11295 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011297 (exit $ac_status); } && {
11298 test -z "$ac_c_werror_flag" ||
11299 test ! -s conftest.err
11300 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011301 ac_hi=$ac_mid; break
11302else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011303 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011304sed 's/^/| /' conftest.$ac_ext >&5
11305
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011306 ac_lo=`expr $ac_mid + 1`
11307 if test $ac_lo -le $ac_mid; then
11308 ac_lo= ac_hi=
11309 break
11310 fi
11311 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011312fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011313
11314rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011315 done
11316else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011317 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011318sed 's/^/| /' conftest.$ac_ext >&5
11319
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011320 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011321/* confdefs.h. */
11322_ACEOF
11323cat confdefs.h >>conftest.$ac_ext
11324cat >>conftest.$ac_ext <<_ACEOF
11325/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011326$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011327 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011328int
11329main ()
11330{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011331static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011332test_array [0] = 0
11333
11334 ;
11335 return 0;
11336}
11337_ACEOF
11338rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011339if { (ac_try="$ac_compile"
11340case "(($ac_try" in
11341 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11342 *) ac_try_echo=$ac_try;;
11343esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011344eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011345 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011346 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011347 grep -v '^ *+' conftest.er1 >conftest.err
11348 rm -f conftest.er1
11349 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011351 (exit $ac_status); } && {
11352 test -z "$ac_c_werror_flag" ||
11353 test ! -s conftest.err
11354 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011355 ac_hi=-1 ac_mid=-1
11356 while :; do
11357 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011358/* confdefs.h. */
11359_ACEOF
11360cat confdefs.h >>conftest.$ac_ext
11361cat >>conftest.$ac_ext <<_ACEOF
11362/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011363$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011364 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011365int
11366main ()
11367{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011368static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011369test_array [0] = 0
11370
11371 ;
11372 return 0;
11373}
11374_ACEOF
11375rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011376if { (ac_try="$ac_compile"
11377case "(($ac_try" in
11378 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11379 *) ac_try_echo=$ac_try;;
11380esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011381eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011382 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011383 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011384 grep -v '^ *+' conftest.er1 >conftest.err
11385 rm -f conftest.er1
11386 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011388 (exit $ac_status); } && {
11389 test -z "$ac_c_werror_flag" ||
11390 test ! -s conftest.err
11391 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011392 ac_lo=$ac_mid; break
11393else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011394 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011395sed 's/^/| /' conftest.$ac_ext >&5
11396
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011397 ac_hi=`expr '(' $ac_mid ')' - 1`
11398 if test $ac_mid -le $ac_hi; then
11399 ac_lo= ac_hi=
11400 break
11401 fi
11402 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000011403fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011404
11405rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011406 done
11407else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011408 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011409sed 's/^/| /' conftest.$ac_ext >&5
11410
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011411 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000011412fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011413
11414rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011415fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011416
11417rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011418# Binary search between lo and hi bounds.
11419while test "x$ac_lo" != "x$ac_hi"; do
11420 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11421 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011422/* confdefs.h. */
11423_ACEOF
11424cat confdefs.h >>conftest.$ac_ext
11425cat >>conftest.$ac_ext <<_ACEOF
11426/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011427$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011428 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011429int
11430main ()
11431{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011432static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011433test_array [0] = 0
11434
11435 ;
11436 return 0;
11437}
11438_ACEOF
11439rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011440if { (ac_try="$ac_compile"
11441case "(($ac_try" in
11442 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11443 *) ac_try_echo=$ac_try;;
11444esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011445eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011446 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011447 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011448 grep -v '^ *+' conftest.er1 >conftest.err
11449 rm -f conftest.er1
11450 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011452 (exit $ac_status); } && {
11453 test -z "$ac_c_werror_flag" ||
11454 test ! -s conftest.err
11455 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011456 ac_hi=$ac_mid
11457else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011458 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011459sed 's/^/| /' conftest.$ac_ext >&5
11460
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011461 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011462fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011463
11464rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011465done
11466case $ac_lo in
11467?*) ac_cv_sizeof_long_long=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011468'') if test "$ac_cv_type_long_long" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011469 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011470See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011471echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011472See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011473 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011474 else
11475 ac_cv_sizeof_long_long=0
11476 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011477esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011478else
Martin v. Löwis11437992002-04-12 09:54:03 +000011479 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011480/* confdefs.h. */
11481_ACEOF
11482cat confdefs.h >>conftest.$ac_ext
11483cat >>conftest.$ac_ext <<_ACEOF
11484/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011485$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011486 typedef long long ac__type_sizeof_;
11487static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11488static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011489#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011490#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011491int
11492main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011493{
Martin v. Löwis11437992002-04-12 09:54:03 +000011494
11495 FILE *f = fopen ("conftest.val", "w");
11496 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011497 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011498 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011499 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011500 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011501 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011502 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011503 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011504 }
11505 else
11506 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011507 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011508 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011509 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011510 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011511 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011512 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011513
11514 ;
11515 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011516}
Martin v. Löwis11437992002-04-12 09:54:03 +000011517_ACEOF
11518rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011519if { (ac_try="$ac_link"
11520case "(($ac_try" in
11521 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11522 *) ac_try_echo=$ac_try;;
11523esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011524eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011525 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011526 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011528 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011529 { (case "(($ac_try" in
11530 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11531 *) ac_try_echo=$ac_try;;
11532esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011533eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011534 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011535 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011537 (exit $ac_status); }; }; then
11538 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011539else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011540 echo "$as_me: program exited with status $ac_status" >&5
11541echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011542sed 's/^/| /' conftest.$ac_ext >&5
11543
Martin v. Löwis11437992002-04-12 09:54:03 +000011544( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011545if test "$ac_cv_type_long_long" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011546 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011547See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011548echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011549See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011550 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011551 else
11552 ac_cv_sizeof_long_long=0
11553 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011554fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011555rm -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 +000011556fi
11557rm -f conftest.val
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011558fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011559{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
11560echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011561
11562
11563
Martin v. Löwis11437992002-04-12 09:54:03 +000011564cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011565#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000011566_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011567
Michael W. Hudson54241132001-12-07 15:38:26 +000011568
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011569fi
11570
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011571{ echo "$as_me:$LINENO: checking for long double support" >&5
11572echo $ECHO_N "checking for long double support... $ECHO_C" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011573have_long_double=no
11574cat >conftest.$ac_ext <<_ACEOF
11575/* confdefs.h. */
11576_ACEOF
11577cat confdefs.h >>conftest.$ac_ext
11578cat >>conftest.$ac_ext <<_ACEOF
11579/* end confdefs.h. */
11580
11581int
11582main ()
11583{
11584long double x; x = (long double)0;
11585 ;
11586 return 0;
11587}
11588_ACEOF
11589rm -f conftest.$ac_objext
11590if { (ac_try="$ac_compile"
11591case "(($ac_try" in
11592 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11593 *) ac_try_echo=$ac_try;;
11594esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011595eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011596 (eval "$ac_compile") 2>conftest.er1
11597 ac_status=$?
11598 grep -v '^ *+' conftest.er1 >conftest.err
11599 rm -f conftest.er1
11600 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011602 (exit $ac_status); } && {
11603 test -z "$ac_c_werror_flag" ||
11604 test ! -s conftest.err
11605 } && test -s conftest.$ac_objext; then
11606
11607
11608cat >>confdefs.h <<\_ACEOF
11609#define HAVE_LONG_DOUBLE 1
11610_ACEOF
11611
11612 have_long_double=yes
11613
11614else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011615 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011616sed 's/^/| /' conftest.$ac_ext >&5
11617
11618
11619fi
11620
11621rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011622{ echo "$as_me:$LINENO: result: $have_long_double" >&5
11623echo "${ECHO_T}$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011624if test "$have_long_double" = yes ; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011625{ echo "$as_me:$LINENO: checking for long double" >&5
11626echo $ECHO_N "checking for long double... $ECHO_C" >&6; }
11627if test "${ac_cv_type_long_double+set}" = set; then
11628 echo $ECHO_N "(cached) $ECHO_C" >&6
11629else
11630 cat >conftest.$ac_ext <<_ACEOF
11631/* confdefs.h. */
11632_ACEOF
11633cat confdefs.h >>conftest.$ac_ext
11634cat >>conftest.$ac_ext <<_ACEOF
11635/* end confdefs.h. */
11636$ac_includes_default
11637typedef long double ac__type_new_;
11638int
11639main ()
11640{
11641if ((ac__type_new_ *) 0)
11642 return 0;
11643if (sizeof (ac__type_new_))
11644 return 0;
11645 ;
11646 return 0;
11647}
11648_ACEOF
11649rm -f conftest.$ac_objext
11650if { (ac_try="$ac_compile"
11651case "(($ac_try" in
11652 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11653 *) ac_try_echo=$ac_try;;
11654esac
11655eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11656 (eval "$ac_compile") 2>conftest.er1
11657 ac_status=$?
11658 grep -v '^ *+' conftest.er1 >conftest.err
11659 rm -f conftest.er1
11660 cat conftest.err >&5
11661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11662 (exit $ac_status); } && {
11663 test -z "$ac_c_werror_flag" ||
11664 test ! -s conftest.err
11665 } && test -s conftest.$ac_objext; then
11666 ac_cv_type_long_double=yes
11667else
11668 echo "$as_me: failed program was:" >&5
11669sed 's/^/| /' conftest.$ac_ext >&5
11670
11671 ac_cv_type_long_double=no
11672fi
11673
11674rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11675fi
11676{ echo "$as_me:$LINENO: result: $ac_cv_type_long_double" >&5
11677echo "${ECHO_T}$ac_cv_type_long_double" >&6; }
11678
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011679# The cast to long int works around a bug in the HP C Compiler
11680# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11681# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11682# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011683{ echo "$as_me:$LINENO: checking size of long double" >&5
11684echo $ECHO_N "checking size of long double... $ECHO_C" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011685if test "${ac_cv_sizeof_long_double+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011686 echo $ECHO_N "(cached) $ECHO_C" >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011687else
11688 if test "$cross_compiling" = yes; then
11689 # Depending upon the size, compute the lo and hi bounds.
11690cat >conftest.$ac_ext <<_ACEOF
11691/* confdefs.h. */
11692_ACEOF
11693cat confdefs.h >>conftest.$ac_ext
11694cat >>conftest.$ac_ext <<_ACEOF
11695/* end confdefs.h. */
11696$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011697 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011698int
11699main ()
11700{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011701static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011702test_array [0] = 0
11703
11704 ;
11705 return 0;
11706}
11707_ACEOF
11708rm -f conftest.$ac_objext
11709if { (ac_try="$ac_compile"
11710case "(($ac_try" in
11711 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11712 *) ac_try_echo=$ac_try;;
11713esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011714eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011715 (eval "$ac_compile") 2>conftest.er1
11716 ac_status=$?
11717 grep -v '^ *+' conftest.er1 >conftest.err
11718 rm -f conftest.er1
11719 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011721 (exit $ac_status); } && {
11722 test -z "$ac_c_werror_flag" ||
11723 test ! -s conftest.err
11724 } && test -s conftest.$ac_objext; then
11725 ac_lo=0 ac_mid=0
11726 while :; do
11727 cat >conftest.$ac_ext <<_ACEOF
11728/* confdefs.h. */
11729_ACEOF
11730cat confdefs.h >>conftest.$ac_ext
11731cat >>conftest.$ac_ext <<_ACEOF
11732/* end confdefs.h. */
11733$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011734 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011735int
11736main ()
11737{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011738static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011739test_array [0] = 0
11740
11741 ;
11742 return 0;
11743}
11744_ACEOF
11745rm -f conftest.$ac_objext
11746if { (ac_try="$ac_compile"
11747case "(($ac_try" in
11748 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11749 *) ac_try_echo=$ac_try;;
11750esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011751eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011752 (eval "$ac_compile") 2>conftest.er1
11753 ac_status=$?
11754 grep -v '^ *+' conftest.er1 >conftest.err
11755 rm -f conftest.er1
11756 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011757 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011758 (exit $ac_status); } && {
11759 test -z "$ac_c_werror_flag" ||
11760 test ! -s conftest.err
11761 } && test -s conftest.$ac_objext; then
11762 ac_hi=$ac_mid; break
11763else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011764 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011765sed 's/^/| /' conftest.$ac_ext >&5
11766
11767 ac_lo=`expr $ac_mid + 1`
11768 if test $ac_lo -le $ac_mid; then
11769 ac_lo= ac_hi=
11770 break
11771 fi
11772 ac_mid=`expr 2 '*' $ac_mid + 1`
11773fi
11774
11775rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11776 done
11777else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011778 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011779sed 's/^/| /' conftest.$ac_ext >&5
11780
11781 cat >conftest.$ac_ext <<_ACEOF
11782/* confdefs.h. */
11783_ACEOF
11784cat confdefs.h >>conftest.$ac_ext
11785cat >>conftest.$ac_ext <<_ACEOF
11786/* end confdefs.h. */
11787$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011788 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011789int
11790main ()
11791{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011792static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011793test_array [0] = 0
11794
11795 ;
11796 return 0;
11797}
11798_ACEOF
11799rm -f conftest.$ac_objext
11800if { (ac_try="$ac_compile"
11801case "(($ac_try" in
11802 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11803 *) ac_try_echo=$ac_try;;
11804esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011805eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011806 (eval "$ac_compile") 2>conftest.er1
11807 ac_status=$?
11808 grep -v '^ *+' conftest.er1 >conftest.err
11809 rm -f conftest.er1
11810 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011812 (exit $ac_status); } && {
11813 test -z "$ac_c_werror_flag" ||
11814 test ! -s conftest.err
11815 } && test -s conftest.$ac_objext; then
11816 ac_hi=-1 ac_mid=-1
11817 while :; do
11818 cat >conftest.$ac_ext <<_ACEOF
11819/* confdefs.h. */
11820_ACEOF
11821cat confdefs.h >>conftest.$ac_ext
11822cat >>conftest.$ac_ext <<_ACEOF
11823/* end confdefs.h. */
11824$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011825 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011826int
11827main ()
11828{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011829static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011830test_array [0] = 0
11831
11832 ;
11833 return 0;
11834}
11835_ACEOF
11836rm -f conftest.$ac_objext
11837if { (ac_try="$ac_compile"
11838case "(($ac_try" in
11839 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11840 *) ac_try_echo=$ac_try;;
11841esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011842eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011843 (eval "$ac_compile") 2>conftest.er1
11844 ac_status=$?
11845 grep -v '^ *+' conftest.er1 >conftest.err
11846 rm -f conftest.er1
11847 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011849 (exit $ac_status); } && {
11850 test -z "$ac_c_werror_flag" ||
11851 test ! -s conftest.err
11852 } && test -s conftest.$ac_objext; then
11853 ac_lo=$ac_mid; break
11854else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011855 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011856sed 's/^/| /' conftest.$ac_ext >&5
11857
11858 ac_hi=`expr '(' $ac_mid ')' - 1`
11859 if test $ac_mid -le $ac_hi; then
11860 ac_lo= ac_hi=
11861 break
11862 fi
11863 ac_mid=`expr 2 '*' $ac_mid`
11864fi
11865
11866rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11867 done
11868else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011869 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011870sed 's/^/| /' conftest.$ac_ext >&5
11871
11872 ac_lo= ac_hi=
11873fi
11874
11875rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11876fi
11877
11878rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11879# Binary search between lo and hi bounds.
11880while test "x$ac_lo" != "x$ac_hi"; do
11881 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11882 cat >conftest.$ac_ext <<_ACEOF
11883/* confdefs.h. */
11884_ACEOF
11885cat confdefs.h >>conftest.$ac_ext
11886cat >>conftest.$ac_ext <<_ACEOF
11887/* end confdefs.h. */
11888$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011889 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011890int
11891main ()
11892{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011893static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011894test_array [0] = 0
11895
11896 ;
11897 return 0;
11898}
11899_ACEOF
11900rm -f conftest.$ac_objext
11901if { (ac_try="$ac_compile"
11902case "(($ac_try" in
11903 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11904 *) ac_try_echo=$ac_try;;
11905esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011906eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011907 (eval "$ac_compile") 2>conftest.er1
11908 ac_status=$?
11909 grep -v '^ *+' conftest.er1 >conftest.err
11910 rm -f conftest.er1
11911 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011913 (exit $ac_status); } && {
11914 test -z "$ac_c_werror_flag" ||
11915 test ! -s conftest.err
11916 } && test -s conftest.$ac_objext; then
11917 ac_hi=$ac_mid
11918else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011919 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011920sed 's/^/| /' conftest.$ac_ext >&5
11921
11922 ac_lo=`expr '(' $ac_mid ')' + 1`
11923fi
11924
11925rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11926done
11927case $ac_lo in
11928?*) ac_cv_sizeof_long_double=$ac_lo;;
11929'') if test "$ac_cv_type_long_double" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011930 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011931See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011932echo "$as_me: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011933See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011934 { (exit 77); exit 77; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011935 else
11936 ac_cv_sizeof_long_double=0
11937 fi ;;
11938esac
11939else
11940 cat >conftest.$ac_ext <<_ACEOF
11941/* confdefs.h. */
11942_ACEOF
11943cat confdefs.h >>conftest.$ac_ext
11944cat >>conftest.$ac_ext <<_ACEOF
11945/* end confdefs.h. */
11946$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011947 typedef long double ac__type_sizeof_;
11948static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11949static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011950#include <stdio.h>
11951#include <stdlib.h>
11952int
11953main ()
11954{
11955
11956 FILE *f = fopen ("conftest.val", "w");
11957 if (! f)
11958 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011959 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011960 {
11961 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011962 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011963 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011964 fprintf (f, "%ld\n", i);
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011965 }
11966 else
11967 {
11968 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011969 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011970 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011971 fprintf (f, "%lu\n", i);
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011972 }
11973 return ferror (f) || fclose (f) != 0;
11974
11975 ;
11976 return 0;
11977}
11978_ACEOF
11979rm -f conftest$ac_exeext
11980if { (ac_try="$ac_link"
11981case "(($ac_try" in
11982 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11983 *) ac_try_echo=$ac_try;;
11984esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011985eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011986 (eval "$ac_link") 2>&5
11987 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011989 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11990 { (case "(($ac_try" in
11991 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11992 *) ac_try_echo=$ac_try;;
11993esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011994eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011995 (eval "$ac_try") 2>&5
11996 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011998 (exit $ac_status); }; }; then
11999 ac_cv_sizeof_long_double=`cat conftest.val`
12000else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012001 echo "$as_me: program exited with status $ac_status" >&5
12002echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012003sed 's/^/| /' conftest.$ac_ext >&5
12004
12005( exit $ac_status )
12006if test "$ac_cv_type_long_double" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012007 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012008See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012009echo "$as_me: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012010See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012011 { (exit 77); exit 77; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012012 else
12013 ac_cv_sizeof_long_double=0
12014 fi
12015fi
12016rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12017fi
12018rm -f conftest.val
12019fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012020{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5
12021echo "${ECHO_T}$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012022
12023
12024
12025cat >>confdefs.h <<_ACEOF
12026#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
12027_ACEOF
12028
12029
12030fi
12031
12032
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012033{ echo "$as_me:$LINENO: checking for _Bool support" >&5
12034echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012035have_c99_bool=no
12036cat >conftest.$ac_ext <<_ACEOF
12037/* confdefs.h. */
12038_ACEOF
12039cat confdefs.h >>conftest.$ac_ext
12040cat >>conftest.$ac_ext <<_ACEOF
12041/* end confdefs.h. */
12042
12043int
12044main ()
12045{
12046_Bool x; x = (_Bool)0;
12047 ;
12048 return 0;
12049}
12050_ACEOF
12051rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012052if { (ac_try="$ac_compile"
12053case "(($ac_try" in
12054 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12055 *) ac_try_echo=$ac_try;;
12056esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012057eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012058 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012059 ac_status=$?
12060 grep -v '^ *+' conftest.er1 >conftest.err
12061 rm -f conftest.er1
12062 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012064 (exit $ac_status); } && {
12065 test -z "$ac_c_werror_flag" ||
12066 test ! -s conftest.err
12067 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012068
12069
12070cat >>confdefs.h <<\_ACEOF
12071#define HAVE_C99_BOOL 1
12072_ACEOF
12073
12074 have_c99_bool=yes
12075
12076else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012077 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012078sed 's/^/| /' conftest.$ac_ext >&5
12079
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012080
Thomas Woutersb2137042007-02-01 18:02:27 +000012081fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012082
12083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012084{ echo "$as_me:$LINENO: result: $have_c99_bool" >&5
12085echo "${ECHO_T}$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012086if test "$have_c99_bool" = yes ; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012087{ echo "$as_me:$LINENO: checking for _Bool" >&5
12088echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; }
12089if test "${ac_cv_type__Bool+set}" = set; then
12090 echo $ECHO_N "(cached) $ECHO_C" >&6
12091else
12092 cat >conftest.$ac_ext <<_ACEOF
12093/* confdefs.h. */
12094_ACEOF
12095cat confdefs.h >>conftest.$ac_ext
12096cat >>conftest.$ac_ext <<_ACEOF
12097/* end confdefs.h. */
12098$ac_includes_default
12099typedef _Bool ac__type_new_;
12100int
12101main ()
12102{
12103if ((ac__type_new_ *) 0)
12104 return 0;
12105if (sizeof (ac__type_new_))
12106 return 0;
12107 ;
12108 return 0;
12109}
12110_ACEOF
12111rm -f conftest.$ac_objext
12112if { (ac_try="$ac_compile"
12113case "(($ac_try" in
12114 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12115 *) ac_try_echo=$ac_try;;
12116esac
12117eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12118 (eval "$ac_compile") 2>conftest.er1
12119 ac_status=$?
12120 grep -v '^ *+' conftest.er1 >conftest.err
12121 rm -f conftest.er1
12122 cat conftest.err >&5
12123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12124 (exit $ac_status); } && {
12125 test -z "$ac_c_werror_flag" ||
12126 test ! -s conftest.err
12127 } && test -s conftest.$ac_objext; then
12128 ac_cv_type__Bool=yes
12129else
12130 echo "$as_me: failed program was:" >&5
12131sed 's/^/| /' conftest.$ac_ext >&5
12132
12133 ac_cv_type__Bool=no
12134fi
12135
12136rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12137fi
12138{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
12139echo "${ECHO_T}$ac_cv_type__Bool" >&6; }
12140
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012141# The cast to long int works around a bug in the HP C Compiler
12142# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12143# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12144# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012145{ echo "$as_me:$LINENO: checking size of _Bool" >&5
12146echo $ECHO_N "checking size of _Bool... $ECHO_C" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012147if test "${ac_cv_sizeof__Bool+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012148 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Woutersb2137042007-02-01 18:02:27 +000012149else
12150 if test "$cross_compiling" = yes; then
12151 # Depending upon the size, compute the lo and hi bounds.
12152cat >conftest.$ac_ext <<_ACEOF
12153/* confdefs.h. */
12154_ACEOF
12155cat confdefs.h >>conftest.$ac_ext
12156cat >>conftest.$ac_ext <<_ACEOF
12157/* end confdefs.h. */
12158$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012159 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012160int
12161main ()
12162{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012163static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012164test_array [0] = 0
12165
12166 ;
12167 return 0;
12168}
12169_ACEOF
12170rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012171if { (ac_try="$ac_compile"
12172case "(($ac_try" in
12173 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12174 *) ac_try_echo=$ac_try;;
12175esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012176eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012177 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012178 ac_status=$?
12179 grep -v '^ *+' conftest.er1 >conftest.err
12180 rm -f conftest.er1
12181 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012183 (exit $ac_status); } && {
12184 test -z "$ac_c_werror_flag" ||
12185 test ! -s conftest.err
12186 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012187 ac_lo=0 ac_mid=0
12188 while :; do
12189 cat >conftest.$ac_ext <<_ACEOF
12190/* confdefs.h. */
12191_ACEOF
12192cat confdefs.h >>conftest.$ac_ext
12193cat >>conftest.$ac_ext <<_ACEOF
12194/* end confdefs.h. */
12195$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012196 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012197int
12198main ()
12199{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012200static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012201test_array [0] = 0
12202
12203 ;
12204 return 0;
12205}
12206_ACEOF
12207rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012208if { (ac_try="$ac_compile"
12209case "(($ac_try" in
12210 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12211 *) ac_try_echo=$ac_try;;
12212esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012213eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012214 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012215 ac_status=$?
12216 grep -v '^ *+' conftest.er1 >conftest.err
12217 rm -f conftest.er1
12218 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012220 (exit $ac_status); } && {
12221 test -z "$ac_c_werror_flag" ||
12222 test ! -s conftest.err
12223 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012224 ac_hi=$ac_mid; break
12225else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012226 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012227sed 's/^/| /' conftest.$ac_ext >&5
12228
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012229 ac_lo=`expr $ac_mid + 1`
12230 if test $ac_lo -le $ac_mid; then
12231 ac_lo= ac_hi=
12232 break
12233 fi
12234 ac_mid=`expr 2 '*' $ac_mid + 1`
Thomas Woutersb2137042007-02-01 18:02:27 +000012235fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012236
12237rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012238 done
12239else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012240 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012241sed 's/^/| /' conftest.$ac_ext >&5
12242
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012243 cat >conftest.$ac_ext <<_ACEOF
Thomas Woutersb2137042007-02-01 18:02:27 +000012244/* confdefs.h. */
12245_ACEOF
12246cat confdefs.h >>conftest.$ac_ext
12247cat >>conftest.$ac_ext <<_ACEOF
12248/* end confdefs.h. */
12249$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012250 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012251int
12252main ()
12253{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012254static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012255test_array [0] = 0
12256
12257 ;
12258 return 0;
12259}
12260_ACEOF
12261rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012262if { (ac_try="$ac_compile"
12263case "(($ac_try" in
12264 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12265 *) ac_try_echo=$ac_try;;
12266esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012267eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012268 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012269 ac_status=$?
12270 grep -v '^ *+' conftest.er1 >conftest.err
12271 rm -f conftest.er1
12272 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012274 (exit $ac_status); } && {
12275 test -z "$ac_c_werror_flag" ||
12276 test ! -s conftest.err
12277 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012278 ac_hi=-1 ac_mid=-1
12279 while :; do
12280 cat >conftest.$ac_ext <<_ACEOF
12281/* confdefs.h. */
12282_ACEOF
12283cat confdefs.h >>conftest.$ac_ext
12284cat >>conftest.$ac_ext <<_ACEOF
12285/* end confdefs.h. */
12286$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012287 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012288int
12289main ()
12290{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012291static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012292test_array [0] = 0
12293
12294 ;
12295 return 0;
12296}
12297_ACEOF
12298rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012299if { (ac_try="$ac_compile"
12300case "(($ac_try" in
12301 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12302 *) ac_try_echo=$ac_try;;
12303esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012304eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012305 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012306 ac_status=$?
12307 grep -v '^ *+' conftest.er1 >conftest.err
12308 rm -f conftest.er1
12309 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012311 (exit $ac_status); } && {
12312 test -z "$ac_c_werror_flag" ||
12313 test ! -s conftest.err
12314 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012315 ac_lo=$ac_mid; break
12316else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012317 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012318sed 's/^/| /' conftest.$ac_ext >&5
12319
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012320 ac_hi=`expr '(' $ac_mid ')' - 1`
12321 if test $ac_mid -le $ac_hi; then
12322 ac_lo= ac_hi=
12323 break
12324 fi
12325 ac_mid=`expr 2 '*' $ac_mid`
Thomas Woutersb2137042007-02-01 18:02:27 +000012326fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012327
12328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012329 done
12330else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012331 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012332sed 's/^/| /' conftest.$ac_ext >&5
12333
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012334 ac_lo= ac_hi=
Thomas Woutersb2137042007-02-01 18:02:27 +000012335fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012336
12337rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012338fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012339
12340rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012341# Binary search between lo and hi bounds.
12342while test "x$ac_lo" != "x$ac_hi"; do
12343 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12344 cat >conftest.$ac_ext <<_ACEOF
12345/* confdefs.h. */
12346_ACEOF
12347cat confdefs.h >>conftest.$ac_ext
12348cat >>conftest.$ac_ext <<_ACEOF
12349/* end confdefs.h. */
12350$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012351 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012352int
12353main ()
12354{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012355static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012356test_array [0] = 0
12357
12358 ;
12359 return 0;
12360}
12361_ACEOF
12362rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012363if { (ac_try="$ac_compile"
12364case "(($ac_try" in
12365 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12366 *) ac_try_echo=$ac_try;;
12367esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012368eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012369 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012370 ac_status=$?
12371 grep -v '^ *+' conftest.er1 >conftest.err
12372 rm -f conftest.er1
12373 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012375 (exit $ac_status); } && {
12376 test -z "$ac_c_werror_flag" ||
12377 test ! -s conftest.err
12378 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012379 ac_hi=$ac_mid
12380else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012381 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012382sed 's/^/| /' conftest.$ac_ext >&5
12383
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012384 ac_lo=`expr '(' $ac_mid ')' + 1`
Thomas Woutersb2137042007-02-01 18:02:27 +000012385fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012386
12387rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012388done
12389case $ac_lo in
12390?*) ac_cv_sizeof__Bool=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012391'') if test "$ac_cv_type__Bool" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012392 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012393See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012394echo "$as_me: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012395See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012396 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012397 else
12398 ac_cv_sizeof__Bool=0
12399 fi ;;
Thomas Woutersb2137042007-02-01 18:02:27 +000012400esac
12401else
12402 cat >conftest.$ac_ext <<_ACEOF
12403/* confdefs.h. */
12404_ACEOF
12405cat confdefs.h >>conftest.$ac_ext
12406cat >>conftest.$ac_ext <<_ACEOF
12407/* end confdefs.h. */
12408$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012409 typedef _Bool ac__type_sizeof_;
12410static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12411static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Thomas Woutersb2137042007-02-01 18:02:27 +000012412#include <stdio.h>
12413#include <stdlib.h>
12414int
12415main ()
12416{
12417
12418 FILE *f = fopen ("conftest.val", "w");
12419 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012420 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012421 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Thomas Woutersb2137042007-02-01 18:02:27 +000012422 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012423 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012424 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012425 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012426 fprintf (f, "%ld\n", i);
Thomas Woutersb2137042007-02-01 18:02:27 +000012427 }
12428 else
12429 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012430 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012431 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012432 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012433 fprintf (f, "%lu\n", i);
Thomas Woutersb2137042007-02-01 18:02:27 +000012434 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012435 return ferror (f) || fclose (f) != 0;
Thomas Woutersb2137042007-02-01 18:02:27 +000012436
12437 ;
12438 return 0;
12439}
12440_ACEOF
12441rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012442if { (ac_try="$ac_link"
12443case "(($ac_try" in
12444 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12445 *) ac_try_echo=$ac_try;;
12446esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012447eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012448 (eval "$ac_link") 2>&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012449 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012451 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012452 { (case "(($ac_try" in
12453 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12454 *) ac_try_echo=$ac_try;;
12455esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012456eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012457 (eval "$ac_try") 2>&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012458 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012460 (exit $ac_status); }; }; then
12461 ac_cv_sizeof__Bool=`cat conftest.val`
12462else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012463 echo "$as_me: program exited with status $ac_status" >&5
12464echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012465sed 's/^/| /' conftest.$ac_ext >&5
12466
12467( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012468if test "$ac_cv_type__Bool" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012469 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012470See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012471echo "$as_me: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012472See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012473 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012474 else
12475 ac_cv_sizeof__Bool=0
12476 fi
Thomas Woutersb2137042007-02-01 18:02:27 +000012477fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012478rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012479fi
12480rm -f conftest.val
12481fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012482{ echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
12483echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012484
12485
12486
Thomas Woutersb2137042007-02-01 18:02:27 +000012487cat >>confdefs.h <<_ACEOF
12488#define SIZEOF__BOOL $ac_cv_sizeof__Bool
12489_ACEOF
12490
12491
12492fi
12493
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012494{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12495echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000012496if test "${ac_cv_type_uintptr_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012497 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters89f507f2006-12-13 04:49:30 +000012498else
12499 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012500/* confdefs.h. */
12501_ACEOF
12502cat confdefs.h >>conftest.$ac_ext
12503cat >>conftest.$ac_ext <<_ACEOF
12504/* end confdefs.h. */
Thomas Wouters89f507f2006-12-13 04:49:30 +000012505#ifdef HAVE_STDINT_H
12506 #include <stdint.h>
12507 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012508
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012509typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012510int
12511main ()
12512{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012513if ((ac__type_new_ *) 0)
12514 return 0;
12515if (sizeof (ac__type_new_))
12516 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012517 ;
12518 return 0;
12519}
12520_ACEOF
12521rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012522if { (ac_try="$ac_compile"
12523case "(($ac_try" in
12524 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12525 *) ac_try_echo=$ac_try;;
12526esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012527eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012528 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012529 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012530 grep -v '^ *+' conftest.er1 >conftest.err
12531 rm -f conftest.er1
12532 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012534 (exit $ac_status); } && {
12535 test -z "$ac_c_werror_flag" ||
12536 test ! -s conftest.err
12537 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012538 ac_cv_type_uintptr_t=yes
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012539else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012540 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012541sed 's/^/| /' conftest.$ac_ext >&5
12542
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012543 ac_cv_type_uintptr_t=no
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012544fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012545
12546rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters89f507f2006-12-13 04:49:30 +000012547fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012548{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12549echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12550if test $ac_cv_type_uintptr_t = yes; then
Thomas Wouters89f507f2006-12-13 04:49:30 +000012551
12552cat >>confdefs.h <<_ACEOF
12553#define HAVE_UINTPTR_T 1
12554_ACEOF
12555
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012556{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12557echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
12558if test "${ac_cv_type_uintptr_t+set}" = set; then
12559 echo $ECHO_N "(cached) $ECHO_C" >&6
12560else
12561 cat >conftest.$ac_ext <<_ACEOF
12562/* confdefs.h. */
12563_ACEOF
12564cat confdefs.h >>conftest.$ac_ext
12565cat >>conftest.$ac_ext <<_ACEOF
12566/* end confdefs.h. */
12567$ac_includes_default
12568typedef uintptr_t ac__type_new_;
12569int
12570main ()
12571{
12572if ((ac__type_new_ *) 0)
12573 return 0;
12574if (sizeof (ac__type_new_))
12575 return 0;
12576 ;
12577 return 0;
12578}
12579_ACEOF
12580rm -f conftest.$ac_objext
12581if { (ac_try="$ac_compile"
12582case "(($ac_try" in
12583 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12584 *) ac_try_echo=$ac_try;;
12585esac
12586eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12587 (eval "$ac_compile") 2>conftest.er1
12588 ac_status=$?
12589 grep -v '^ *+' conftest.er1 >conftest.err
12590 rm -f conftest.er1
12591 cat conftest.err >&5
12592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12593 (exit $ac_status); } && {
12594 test -z "$ac_c_werror_flag" ||
12595 test ! -s conftest.err
12596 } && test -s conftest.$ac_objext; then
12597 ac_cv_type_uintptr_t=yes
12598else
12599 echo "$as_me: failed program was:" >&5
12600sed 's/^/| /' conftest.$ac_ext >&5
12601
12602 ac_cv_type_uintptr_t=no
12603fi
12604
12605rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12606fi
12607{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12608echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12609
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012610# The cast to long int works around a bug in the HP C Compiler
12611# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12612# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12613# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012614{ echo "$as_me:$LINENO: checking size of uintptr_t" >&5
12615echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012616if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012617 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012618else
Martin v. Löwis11437992002-04-12 09:54:03 +000012619 if test "$cross_compiling" = yes; then
12620 # Depending upon the size, compute the lo and hi bounds.
12621cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012622/* confdefs.h. */
12623_ACEOF
12624cat confdefs.h >>conftest.$ac_ext
12625cat >>conftest.$ac_ext <<_ACEOF
12626/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012627$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012628 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012629int
12630main ()
12631{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012632static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012633test_array [0] = 0
12634
12635 ;
12636 return 0;
12637}
12638_ACEOF
12639rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012640if { (ac_try="$ac_compile"
12641case "(($ac_try" in
12642 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12643 *) ac_try_echo=$ac_try;;
12644esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012645eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012646 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012647 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012648 grep -v '^ *+' conftest.er1 >conftest.err
12649 rm -f conftest.er1
12650 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012652 (exit $ac_status); } && {
12653 test -z "$ac_c_werror_flag" ||
12654 test ! -s conftest.err
12655 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012656 ac_lo=0 ac_mid=0
12657 while :; do
12658 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012659/* confdefs.h. */
12660_ACEOF
12661cat confdefs.h >>conftest.$ac_ext
12662cat >>conftest.$ac_ext <<_ACEOF
12663/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012664$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012665 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012666int
12667main ()
12668{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012669static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012670test_array [0] = 0
12671
12672 ;
12673 return 0;
12674}
12675_ACEOF
12676rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012677if { (ac_try="$ac_compile"
12678case "(($ac_try" in
12679 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12680 *) ac_try_echo=$ac_try;;
12681esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012682eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012683 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012684 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012685 grep -v '^ *+' conftest.er1 >conftest.err
12686 rm -f conftest.er1
12687 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012688 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012689 (exit $ac_status); } && {
12690 test -z "$ac_c_werror_flag" ||
12691 test ! -s conftest.err
12692 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012693 ac_hi=$ac_mid; break
12694else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012695 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012696sed 's/^/| /' conftest.$ac_ext >&5
12697
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012698 ac_lo=`expr $ac_mid + 1`
12699 if test $ac_lo -le $ac_mid; then
12700 ac_lo= ac_hi=
12701 break
12702 fi
12703 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012704fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012705
12706rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012707 done
12708else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012709 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012710sed 's/^/| /' conftest.$ac_ext >&5
12711
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012712 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012713/* confdefs.h. */
12714_ACEOF
12715cat confdefs.h >>conftest.$ac_ext
12716cat >>conftest.$ac_ext <<_ACEOF
12717/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012718$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012719 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012720int
12721main ()
12722{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012723static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012724test_array [0] = 0
12725
12726 ;
12727 return 0;
12728}
12729_ACEOF
12730rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012731if { (ac_try="$ac_compile"
12732case "(($ac_try" in
12733 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12734 *) ac_try_echo=$ac_try;;
12735esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012736eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012737 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012738 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012739 grep -v '^ *+' conftest.er1 >conftest.err
12740 rm -f conftest.er1
12741 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012743 (exit $ac_status); } && {
12744 test -z "$ac_c_werror_flag" ||
12745 test ! -s conftest.err
12746 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012747 ac_hi=-1 ac_mid=-1
12748 while :; do
12749 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012750/* confdefs.h. */
12751_ACEOF
12752cat confdefs.h >>conftest.$ac_ext
12753cat >>conftest.$ac_ext <<_ACEOF
12754/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012755$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012756 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012757int
12758main ()
12759{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012760static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012761test_array [0] = 0
12762
12763 ;
12764 return 0;
12765}
12766_ACEOF
12767rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012768if { (ac_try="$ac_compile"
12769case "(($ac_try" in
12770 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12771 *) ac_try_echo=$ac_try;;
12772esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012773eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012774 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012775 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012776 grep -v '^ *+' conftest.er1 >conftest.err
12777 rm -f conftest.er1
12778 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012779 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012780 (exit $ac_status); } && {
12781 test -z "$ac_c_werror_flag" ||
12782 test ! -s conftest.err
12783 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012784 ac_lo=$ac_mid; break
12785else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012786 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012787sed 's/^/| /' conftest.$ac_ext >&5
12788
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012789 ac_hi=`expr '(' $ac_mid ')' - 1`
12790 if test $ac_mid -le $ac_hi; then
12791 ac_lo= ac_hi=
12792 break
12793 fi
12794 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000012795fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012796
12797rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012798 done
12799else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012800 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012801sed 's/^/| /' conftest.$ac_ext >&5
12802
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012803 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000012804fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012805
12806rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012807fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012808
12809rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012810# Binary search between lo and hi bounds.
12811while test "x$ac_lo" != "x$ac_hi"; do
12812 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12813 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012814/* confdefs.h. */
12815_ACEOF
12816cat confdefs.h >>conftest.$ac_ext
12817cat >>conftest.$ac_ext <<_ACEOF
12818/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012819$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012820 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012821int
12822main ()
12823{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012824static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012825test_array [0] = 0
12826
12827 ;
12828 return 0;
12829}
12830_ACEOF
12831rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012832if { (ac_try="$ac_compile"
12833case "(($ac_try" in
12834 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12835 *) ac_try_echo=$ac_try;;
12836esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012837eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012838 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012839 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012840 grep -v '^ *+' conftest.er1 >conftest.err
12841 rm -f conftest.er1
12842 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012844 (exit $ac_status); } && {
12845 test -z "$ac_c_werror_flag" ||
12846 test ! -s conftest.err
12847 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012848 ac_hi=$ac_mid
12849else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012850 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012851sed 's/^/| /' conftest.$ac_ext >&5
12852
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012853 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012854fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012855
12856rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012857done
12858case $ac_lo in
12859?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012860'') if test "$ac_cv_type_uintptr_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012861 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012862See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012863echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012864See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012865 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012866 else
12867 ac_cv_sizeof_uintptr_t=0
12868 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012869esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012870else
Martin v. Löwis11437992002-04-12 09:54:03 +000012871 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012872/* confdefs.h. */
12873_ACEOF
12874cat confdefs.h >>conftest.$ac_ext
12875cat >>conftest.$ac_ext <<_ACEOF
12876/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012877$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012878 typedef uintptr_t ac__type_sizeof_;
12879static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12880static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000012881#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012882#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012883int
12884main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012885{
Martin v. Löwis11437992002-04-12 09:54:03 +000012886
12887 FILE *f = fopen ("conftest.val", "w");
12888 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012889 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012890 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000012891 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012892 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012893 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012894 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012895 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012896 }
12897 else
12898 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012899 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012900 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012901 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012902 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012903 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012904 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012905
12906 ;
12907 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012908}
Martin v. Löwis11437992002-04-12 09:54:03 +000012909_ACEOF
12910rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012911if { (ac_try="$ac_link"
12912case "(($ac_try" in
12913 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12914 *) ac_try_echo=$ac_try;;
12915esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012916eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012917 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012918 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012920 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012921 { (case "(($ac_try" in
12922 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12923 *) ac_try_echo=$ac_try;;
12924esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012925eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012926 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012927 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012929 (exit $ac_status); }; }; then
12930 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012931else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012932 echo "$as_me: program exited with status $ac_status" >&5
12933echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012934sed 's/^/| /' conftest.$ac_ext >&5
12935
Martin v. Löwis11437992002-04-12 09:54:03 +000012936( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012937if test "$ac_cv_type_uintptr_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012938 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012939See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012940echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012941See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012942 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012943 else
12944 ac_cv_sizeof_uintptr_t=0
12945 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012946fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012947rm -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 +000012948fi
12949rm -f conftest.val
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012950fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012951{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
12952echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012953
12954
12955
Martin v. Löwis11437992002-04-12 09:54:03 +000012956cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012957#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012958_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012959
Michael W. Hudson54241132001-12-07 15:38:26 +000012960
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012961fi
12962
Thomas Wouters89f507f2006-12-13 04:49:30 +000012963
12964
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012965# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012966{ echo "$as_me:$LINENO: checking size of off_t" >&5
12967echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012968if test "${ac_cv_sizeof_off_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012969 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012970else
12971 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000012972 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012973else
Martin v. Löwis11437992002-04-12 09:54:03 +000012974 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012975/* confdefs.h. */
12976_ACEOF
12977cat confdefs.h >>conftest.$ac_ext
12978cat >>conftest.$ac_ext <<_ACEOF
12979/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012980#include <stdio.h>
12981#include <sys/types.h>
12982main()
12983{
12984 FILE *f=fopen("conftestval", "w");
12985 if (!f) exit(1);
12986 fprintf(f, "%d\n", sizeof(off_t));
12987 exit(0);
12988}
Martin v. Löwis11437992002-04-12 09:54:03 +000012989_ACEOF
12990rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012991if { (ac_try="$ac_link"
12992case "(($ac_try" in
12993 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12994 *) ac_try_echo=$ac_try;;
12995esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012996eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012997 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012998 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013000 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013001 { (case "(($ac_try" in
13002 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13003 *) ac_try_echo=$ac_try;;
13004esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013005eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013006 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013007 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013009 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013010 ac_cv_sizeof_off_t=`cat conftestval`
13011else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013012 echo "$as_me: program exited with status $ac_status" >&5
13013echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013014sed 's/^/| /' conftest.$ac_ext >&5
13015
Martin v. Löwis11437992002-04-12 09:54:03 +000013016( exit $ac_status )
13017ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013018fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013019rm -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 +000013020fi
13021
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013022
13023
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013024fi
13025
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013026{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
13027echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013028
13029cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013030#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013031_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013032
Michael W. Hudson54241132001-12-07 15:38:26 +000013033
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013034{ echo "$as_me:$LINENO: checking whether to enable large file support" >&5
13035echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000013036if test "$have_long_long" = yes -a \
13037 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
13038 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013039
Martin v. Löwis11437992002-04-12 09:54:03 +000013040cat >>confdefs.h <<\_ACEOF
13041#define HAVE_LARGEFILE_SUPPORT 1
13042_ACEOF
13043
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013044 { echo "$as_me:$LINENO: result: yes" >&5
13045echo "${ECHO_T}yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013046else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013047 { echo "$as_me:$LINENO: result: no" >&5
13048echo "${ECHO_T}no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013049fi
13050
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013051# AC_CHECK_SIZEOF() doesn't include <time.h>.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013052{ echo "$as_me:$LINENO: checking size of time_t" >&5
13053echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013054if test "${ac_cv_sizeof_time_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013055 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013056else
13057 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000013058 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013059else
Martin v. Löwis11437992002-04-12 09:54:03 +000013060 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013061/* confdefs.h. */
13062_ACEOF
13063cat confdefs.h >>conftest.$ac_ext
13064cat >>conftest.$ac_ext <<_ACEOF
13065/* end confdefs.h. */
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013066#include <stdio.h>
13067#include <time.h>
13068main()
13069{
13070 FILE *f=fopen("conftestval", "w");
13071 if (!f) exit(1);
13072 fprintf(f, "%d\n", sizeof(time_t));
13073 exit(0);
13074}
Martin v. Löwis11437992002-04-12 09:54:03 +000013075_ACEOF
13076rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013077if { (ac_try="$ac_link"
13078case "(($ac_try" in
13079 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13080 *) ac_try_echo=$ac_try;;
13081esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013082eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013083 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013084 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013085 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013086 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013087 { (case "(($ac_try" in
13088 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13089 *) ac_try_echo=$ac_try;;
13090esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013091eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013092 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013093 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013095 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013096 ac_cv_sizeof_time_t=`cat conftestval`
13097else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013098 echo "$as_me: program exited with status $ac_status" >&5
13099echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013100sed 's/^/| /' conftest.$ac_ext >&5
13101
Martin v. Löwis11437992002-04-12 09:54:03 +000013102( exit $ac_status )
13103ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013104fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013105rm -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 +000013106fi
13107
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013108
13109
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013110fi
13111
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013112{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
13113echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013114
13115cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013116#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013117_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013118
Michael W. Hudson54241132001-12-07 15:38:26 +000013119
13120
Trent Mick635f6fb2000-08-23 21:33:05 +000013121# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013122ac_save_cc="$CC"
13123if test "$ac_cv_kpthread" = "yes"
13124then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013125elif test "$ac_cv_kthread" = "yes"
13126then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013127elif test "$ac_cv_pthread" = "yes"
13128then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013129fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013130{ echo "$as_me:$LINENO: checking for pthread_t" >&5
13131echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013132have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013133cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013134/* confdefs.h. */
13135_ACEOF
13136cat confdefs.h >>conftest.$ac_ext
13137cat >>conftest.$ac_ext <<_ACEOF
13138/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000013139#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013140int
13141main ()
13142{
Guido van Rossum12580492000-09-24 16:47:19 +000013143pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013144 ;
13145 return 0;
13146}
13147_ACEOF
13148rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013149if { (ac_try="$ac_compile"
13150case "(($ac_try" in
13151 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13152 *) ac_try_echo=$ac_try;;
13153esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013154eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013155 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013156 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013157 grep -v '^ *+' conftest.er1 >conftest.err
13158 rm -f conftest.er1
13159 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013160 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013161 (exit $ac_status); } && {
13162 test -z "$ac_c_werror_flag" ||
13163 test ! -s conftest.err
13164 } && test -s conftest.$ac_objext; then
Trent Mick635f6fb2000-08-23 21:33:05 +000013165 have_pthread_t=yes
13166else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013167 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013168sed 's/^/| /' conftest.$ac_ext >&5
13169
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013170
Trent Mick635f6fb2000-08-23 21:33:05 +000013171fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013172
13173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013174{ echo "$as_me:$LINENO: result: $have_pthread_t" >&5
13175echo "${ECHO_T}$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013176if test "$have_pthread_t" = yes ; then
13177 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013178 { echo "$as_me:$LINENO: checking size of pthread_t" >&5
13179echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013180 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013181 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000013182else
13183 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000013184 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +000013185else
Martin v. Löwis11437992002-04-12 09:54:03 +000013186 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013187/* confdefs.h. */
13188_ACEOF
13189cat confdefs.h >>conftest.$ac_ext
13190cat >>conftest.$ac_ext <<_ACEOF
13191/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000013192#include <stdio.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013193#include <pthread.h>
Trent Mick635f6fb2000-08-23 21:33:05 +000013194 main()
13195 {
13196 FILE *f=fopen("conftestval", "w");
13197 if (!f) exit(1);
13198 fprintf(f, "%d\n", sizeof(pthread_t));
13199 exit(0);
13200 }
Martin v. Löwis11437992002-04-12 09:54:03 +000013201_ACEOF
13202rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013203if { (ac_try="$ac_link"
13204case "(($ac_try" in
13205 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13206 *) ac_try_echo=$ac_try;;
13207esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013208eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013209 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013210 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013212 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013213 { (case "(($ac_try" in
13214 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13215 *) ac_try_echo=$ac_try;;
13216esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013217eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013218 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013219 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013221 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +000013222 ac_cv_sizeof_pthread_t=`cat conftestval`
13223else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013224 echo "$as_me: program exited with status $ac_status" >&5
13225echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013226sed 's/^/| /' conftest.$ac_ext >&5
13227
Martin v. Löwis11437992002-04-12 09:54:03 +000013228( exit $ac_status )
13229ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +000013230fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013231rm -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 +000013232fi
13233
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013234
13235
Trent Mick635f6fb2000-08-23 21:33:05 +000013236fi
13237
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013238 { echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
13239echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013240
13241cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000013242#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013243_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000013244
13245fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013246CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000013247
Michael W. Hudson54241132001-12-07 15:38:26 +000013248
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013249
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000013250
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013251case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013252 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000013253 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
13254 ;;
13255 Darwin/*)
13256 OTHER_LIBTOOL_OPT=""
13257 ;;
13258esac
13259
13260
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013261ARCH_RUN_32BIT=""
13262
Bob Ippolito7026a0a2005-03-28 23:23:47 +000013263case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013264 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +000013265 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
13266 if test "${enable_universalsdk}"; then
13267 :
13268 else
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013269 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +000013270 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000013271 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000013272 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000013273 Darwin/*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000013274 gcc_version=`gcc -v 2>&1 | grep version | cut -d\ -f3`
13275 if test ${gcc_version} '<' 4.0
13276 then
13277 LIBTOOL_CRUFT="-lcc_dynamic"
13278 else
13279 LIBTOOL_CRUFT=""
13280 fi
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013281 if test "$cross_compiling" = yes; then
Ronald Oussoren856624d2009-09-08 07:13:53 +000013282 ac_osx_32bit=yes
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013283else
13284 cat >conftest.$ac_ext <<_ACEOF
13285/* confdefs.h. */
13286_ACEOF
13287cat confdefs.h >>conftest.$ac_ext
13288cat >>conftest.$ac_ext <<_ACEOF
13289/* end confdefs.h. */
Ronald Oussoren856624d2009-09-08 07:13:53 +000013290
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013291 #include <unistd.h>
13292 int main(int argc, char*argv[])
13293 {
13294 if (sizeof(long) == 4) {
13295 return 0;
13296 } else {
13297 return 1;
13298 }
Ronald Oussoren856624d2009-09-08 07:13:53 +000013299 }
13300
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013301_ACEOF
13302rm -f conftest$ac_exeext
13303if { (ac_try="$ac_link"
13304case "(($ac_try" in
13305 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13306 *) ac_try_echo=$ac_try;;
13307esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013308eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013309 (eval "$ac_link") 2>&5
13310 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013312 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13313 { (case "(($ac_try" in
13314 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13315 *) ac_try_echo=$ac_try;;
13316esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013317eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013318 (eval "$ac_try") 2>&5
13319 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013321 (exit $ac_status); }; }; then
13322 ac_osx_32bit=yes
13323else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013324 echo "$as_me: program exited with status $ac_status" >&5
13325echo "$as_me: failed program was:" >&5
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013326sed 's/^/| /' conftest.$ac_ext >&5
13327
13328( exit $ac_status )
13329ac_osx_32bit=no
13330fi
13331rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13332fi
13333
13334
13335
13336 if test "${ac_osx_32bit}" = "yes"; then
13337 case `arch` in
13338 i386)
13339 MACOSX_DEFAULT_ARCH="i386"
13340 ;;
13341 ppc)
13342 MACOSX_DEFAULT_ARCH="ppc"
13343 ;;
13344 *)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013345 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
13346echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013347 { (exit 1); exit 1; }; }
13348 ;;
13349 esac
13350 else
13351 case `arch` in
13352 i386)
13353 MACOSX_DEFAULT_ARCH="x86_64"
13354 ;;
13355 ppc)
13356 MACOSX_DEFAULT_ARCH="ppc64"
13357 ;;
13358 *)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013359 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
13360echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013361 { (exit 1); exit 1; }; }
13362 ;;
13363 esac
13364
13365 #ARCH_RUN_32BIT="true"
13366 fi
13367
13368 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +000013369 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000013370 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013371esac
13372
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013373{ echo "$as_me:$LINENO: checking for --enable-framework" >&5
13374echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000013375if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013376then
Skip Montanarodecc6a42003-01-01 20:07:49 +000013377 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000013378 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000013379 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013380
Martin v. Löwis11437992002-04-12 09:54:03 +000013381cat >>confdefs.h <<\_ACEOF
13382#define WITH_NEXT_FRAMEWORK 1
13383_ACEOF
13384
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013385 { echo "$as_me:$LINENO: result: yes" >&5
13386echo "${ECHO_T}yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +000013387 if test $enable_shared = "yes"
13388 then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013389 { { echo "$as_me:$LINENO: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" >&5
13390echo "$as_me: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" >&2;}
Ronald Oussoren99aab652009-06-08 21:22:57 +000013391 { (exit 1); exit 1; }; }
13392 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013393else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013394 { echo "$as_me:$LINENO: result: no" >&5
13395echo "${ECHO_T}no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013396fi
13397
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013398{ echo "$as_me:$LINENO: checking for dyld" >&5
13399echo $ECHO_N "checking for dyld... $ECHO_C" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013400case $ac_sys_system/$ac_sys_release in
13401 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013402
Martin v. Löwis11437992002-04-12 09:54:03 +000013403cat >>confdefs.h <<\_ACEOF
13404#define WITH_DYLD 1
13405_ACEOF
13406
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013407 { echo "$as_me:$LINENO: result: always on for Darwin" >&5
13408echo "${ECHO_T}always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013409 ;;
13410 *)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013411 { echo "$as_me:$LINENO: result: no" >&5
13412echo "${ECHO_T}no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000013413 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013414esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013415
Guido van Rossum0a516c91994-09-12 10:58:40 +000013416# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000013417
Michael W. Hudson54241132001-12-07 15:38:26 +000013418
13419
13420
13421
Guido van Rossum0a516c91994-09-12 10:58:40 +000013422# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000013423# -- usually .so, .sl on HP-UX, .dll on Cygwin
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013424{ echo "$as_me:$LINENO: checking SO" >&5
13425echo $ECHO_N "checking SO... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013426if test -z "$SO"
13427then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013428 case $ac_sys_system in
Thomas Wouters477c8d52006-05-27 19:21:47 +000013429 hp*|HP*)
13430 case `uname -m` in
13431 ia64) SO=.so;;
13432 *) SO=.sl;;
13433 esac
13434 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000013435 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013436 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013437 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000013438else
13439 # this might also be a termcap variable, see #610332
13440 echo
13441 echo '====================================================================='
13442 echo '+ +'
13443 echo '+ WARNING: You have set SO in your environment. +'
13444 echo '+ Do you really mean to change the extension for shared libraries? +'
13445 echo '+ Continuing in 10 seconds to let you to ponder. +'
13446 echo '+ +'
13447 echo '====================================================================='
13448 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000013449fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013450{ echo "$as_me:$LINENO: result: $SO" >&5
13451echo "${ECHO_T}$SO" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000013452
Georg Brandlb1441c72009-01-03 22:33:39 +000013453
Thomas Wouters477c8d52006-05-27 19:21:47 +000013454cat >>confdefs.h <<_ACEOF
13455#define SHLIB_EXT "$SO"
13456_ACEOF
13457
Guido van Rossum0a516c91994-09-12 10:58:40 +000013458# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000013459# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013460# (Shared libraries in this instance are shared modules to be loaded into
13461# Python, as opposed to building Python itself as a shared library.)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013462{ echo "$as_me:$LINENO: checking LDSHARED" >&5
13463echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013464if test -z "$LDSHARED"
13465then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013466 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013467 AIX*)
13468 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000013469 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013470 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000013471 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000013472 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000013473 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +000013474 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000013475 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000013476 else LDSHARED='$(CC) -G';
Greg Ward57c9a6632000-05-26 12:22:54 +000013477 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +000013478 hp*|HP*)
13479 if test "$GCC" = "yes"
13480 then LDSHARED='$(CC) -shared'
13481 else LDSHARED='ld -b';
13482 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +000013483 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000013484 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000013485 LDSHARED='$(CC) $(LDFLAGS) -bundle'
13486 if test "$enable_framework" ; then
13487 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000013488 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
13489 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000013490 else
13491 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000013492 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000013493 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000013494 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000013495 LDSHARED='$(CC) $(LDFLAGS) -bundle'
13496 if test "$enable_framework" ; then
13497 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000013498 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
13499 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000013500 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000013501 # No framework, use the Python app as bundle-loader
13502 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000013503 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013504 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000013505 Darwin/*)
13506 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
13507 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +000013508
Benjamin Peterson14ae9592008-07-16 02:20:15 +000013509 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000013510 then
Thomas Wouters477c8d52006-05-27 19:21:47 +000013511 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +000013512 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +000013513 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000013514 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
13515 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000013516 else
13517 LDSHARED='$(CC) $(LDFLAGS) -bundle'
13518 if test "$enable_framework" ; then
13519 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000013520 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
13521 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000013522 else
13523 # No framework, use the Python app as bundle-loader
13524 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
13525 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
13526 fi
13527 fi
13528 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +000013529 Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000013530 BSD/OS*/4*) LDSHARED="gcc -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013531 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000013532 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000013533 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000013534 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000013535 else
13536 LDSHARED="ld -Bshareable ${LDFLAGS}"
13537 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013538 OpenBSD*)
13539 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
13540 then
13541 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
13542 else
13543 case `uname -r` in
13544 [01].* | 2.[0-7] | 2.[0-7].*)
13545 LDSHARED="ld -Bshareable ${LDFLAGS}"
13546 ;;
13547 *)
13548 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
13549 ;;
13550 esac
13551 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013552 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013553 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000013554 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000013555 then LDSHARED='$(CC) -shared'
13556 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000013557 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000013558 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Guido van Rossumaef734b2001-01-10 21:09:12 +000013559 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013560 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013561 *) LDSHARED="ld";;
13562 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013563fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013564{ echo "$as_me:$LINENO: result: $LDSHARED" >&5
13565echo "${ECHO_T}$LDSHARED" >&6; }
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013566BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000013567# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013568# library (module) -- this is only needed for a few systems
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013569{ echo "$as_me:$LINENO: checking CCSHARED" >&5
13570echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013571if test -z "$CCSHARED"
13572then
Guido van Rossum07397971997-04-29 21:49:50 +000013573 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000013574 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013575 then CCSHARED="-fPIC";
13576 elif test `uname -p` = sparc;
13577 then CCSHARED="-xcode=pic32";
13578 else CCSHARED="-Kpic";
13579 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000013580 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000013581 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000013582 else CCSHARED="+z";
13583 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013584 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000013585 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013586 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013587 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000013588 if test "$GCC" = "yes"
13589 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000013590 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000013591 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000013592 SCO_SV*)
13593 if test "$GCC" = "yes"
13594 then CCSHARED="-fPIC"
13595 else CCSHARED="-Kpic -belf"
13596 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013597 IRIX*/6*) case $CC in
13598 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000013599 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013600 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013601 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013602 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013603fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013604{ echo "$as_me:$LINENO: result: $CCSHARED" >&5
13605echo "${ECHO_T}$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013606# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013607# the python executable -- this is only needed for a few systems
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013608{ echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
13609echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013610if test -z "$LINKFORSHARED"
13611then
Guido van Rossum07397971997-04-29 21:49:50 +000013612 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013613 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000013614 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000013615 LINKFORSHARED="-Wl,-E -Wl,+s";;
13616# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000013617 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013618 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013619 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000013620 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +000013621 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +000013622 if test "$enable_framework"
13623 then
Jack Jansenda49e192005-01-07 13:08:22 +000013624 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000013625 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000013626 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013627 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000013628 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000013629 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013630 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000013631 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
13632 then
13633 LINKFORSHARED="-Wl,--export-dynamic"
13634 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013635 SunOS/5*) case $CC in
13636 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000013637 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000013638 then
13639 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013640 fi;;
13641 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000013642 CYGWIN*)
13643 if test $enable_shared = "no"
13644 then
13645 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
13646 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +000013647 QNX*)
13648 # -Wl,-E causes the symbols to be added to the dynamic
13649 # symbol table so that they can be found when a module
13650 # is loaded. -N 2048K causes the stack size to be set
13651 # to 2048 kilobytes so that the stack doesn't overflow
13652 # when running test_compile.py.
13653 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013654 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013655fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013656{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
13657echo "${ECHO_T}$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013658
Michael W. Hudson54241132001-12-07 15:38:26 +000013659
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000013660
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013661{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
13662echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013663if test ! "$LIBRARY" = "$LDLIBRARY"
13664then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000013665 case $ac_sys_system in
13666 CYGWIN*)
13667 # Cygwin needs CCSHARED when building extension DLLs
13668 # but not when building the interpreter DLL.
13669 CFLAGSFORSHARED='';;
13670 *)
13671 CFLAGSFORSHARED='$(CCSHARED)'
13672 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013673fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013674{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
13675echo "${ECHO_T}$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013676
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013677# SHLIBS are libraries (except -lc and -lm) to link to the python shared
13678# library (with --enable-shared).
13679# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000013680# symbols, this must be set to $(LIBS) (expanded by make). We do this even
13681# if it is not required, since it creates a dependency of the shared library
13682# to LIBS. This, in turn, means that applications linking the shared libpython
13683# don't need to link LIBS explicitly. The default should be only changed
13684# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013685
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013686{ echo "$as_me:$LINENO: checking SHLIBS" >&5
13687echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013688case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013689 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000013690 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013691esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013692{ echo "$as_me:$LINENO: result: $SHLIBS" >&5
13693echo "${ECHO_T}$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013694
13695
Guido van Rossum627b2d71993-12-24 10:39:16 +000013696# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000013697
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013698{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
13699echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013700if test "${ac_cv_lib_dl_dlopen+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013701 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013702else
Martin v. Löwis11437992002-04-12 09:54:03 +000013703 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013704LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013705cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013706/* confdefs.h. */
13707_ACEOF
13708cat confdefs.h >>conftest.$ac_ext
13709cat >>conftest.$ac_ext <<_ACEOF
13710/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013711
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013712/* Override any GCC internal prototype to avoid an error.
13713 Use char because int might match the return type of a GCC
13714 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013715#ifdef __cplusplus
13716extern "C"
13717#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013718char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013719int
13720main ()
13721{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013722return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013723 ;
13724 return 0;
13725}
13726_ACEOF
13727rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013728if { (ac_try="$ac_link"
13729case "(($ac_try" in
13730 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13731 *) ac_try_echo=$ac_try;;
13732esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013733eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013734 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013735 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013736 grep -v '^ *+' conftest.er1 >conftest.err
13737 rm -f conftest.er1
13738 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013740 (exit $ac_status); } && {
13741 test -z "$ac_c_werror_flag" ||
13742 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013743 } && test -s conftest$ac_exeext &&
13744 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013745 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013746else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013747 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013748sed 's/^/| /' conftest.$ac_ext >&5
13749
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013750 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013751fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013752
13753rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013754 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013755LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000013756fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013757{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
13758echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
13759if test $ac_cv_lib_dl_dlopen = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013760 cat >>confdefs.h <<_ACEOF
13761#define HAVE_LIBDL 1
13762_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013763
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013764 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013765
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013766fi
13767 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000013768
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013769{ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
13770echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013771if test "${ac_cv_lib_dld_shl_load+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013772 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013773else
Martin v. Löwis11437992002-04-12 09:54:03 +000013774 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013775LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013776cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013777/* confdefs.h. */
13778_ACEOF
13779cat confdefs.h >>conftest.$ac_ext
13780cat >>conftest.$ac_ext <<_ACEOF
13781/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013782
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013783/* Override any GCC internal prototype to avoid an error.
13784 Use char because int might match the return type of a GCC
13785 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013786#ifdef __cplusplus
13787extern "C"
13788#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013789char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013790int
13791main ()
13792{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013793return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013794 ;
13795 return 0;
13796}
13797_ACEOF
13798rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013799if { (ac_try="$ac_link"
13800case "(($ac_try" in
13801 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13802 *) ac_try_echo=$ac_try;;
13803esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013804eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013805 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013806 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013807 grep -v '^ *+' conftest.er1 >conftest.err
13808 rm -f conftest.er1
13809 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013811 (exit $ac_status); } && {
13812 test -z "$ac_c_werror_flag" ||
13813 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013814 } && test -s conftest$ac_exeext &&
13815 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013816 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013817else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013818 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013819sed 's/^/| /' conftest.$ac_ext >&5
13820
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013821 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013822fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013823
13824rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013825 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013826LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000013827fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013828{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
13829echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
13830if test $ac_cv_lib_dld_shl_load = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013831 cat >>confdefs.h <<_ACEOF
13832#define HAVE_LIBDLD 1
13833_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013834
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013835 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013836
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013837fi
13838 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000013839
Georg Brandlb1441c72009-01-03 22:33:39 +000013840# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +000013841if test "$with_threads" = "yes" -o -z "$with_threads"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013842 { echo "$as_me:$LINENO: checking for library containing sem_init" >&5
13843echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013844if test "${ac_cv_search_sem_init+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013845 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000013846else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013847 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000013848cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013849/* confdefs.h. */
13850_ACEOF
13851cat confdefs.h >>conftest.$ac_ext
13852cat >>conftest.$ac_ext <<_ACEOF
13853/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013854
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013855/* Override any GCC internal prototype to avoid an error.
13856 Use char because int might match the return type of a GCC
13857 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013858#ifdef __cplusplus
13859extern "C"
13860#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013861char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013862int
13863main ()
13864{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013865return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013866 ;
13867 return 0;
13868}
13869_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013870for ac_lib in '' pthread rt posix4; do
13871 if test -z "$ac_lib"; then
13872 ac_res="none required"
13873 else
13874 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013875 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013876 fi
13877 rm -f conftest.$ac_objext conftest$ac_exeext
13878if { (ac_try="$ac_link"
13879case "(($ac_try" in
13880 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13881 *) ac_try_echo=$ac_try;;
13882esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013883eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013884 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013885 ac_status=$?
13886 grep -v '^ *+' conftest.er1 >conftest.err
13887 rm -f conftest.er1
13888 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013890 (exit $ac_status); } && {
13891 test -z "$ac_c_werror_flag" ||
13892 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013893 } && test -s conftest$ac_exeext &&
13894 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013895 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +000013896else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013897 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013898sed 's/^/| /' conftest.$ac_ext >&5
13899
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013900
Thomas Wouters477c8d52006-05-27 19:21:47 +000013901fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013902
13903rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13904 conftest$ac_exeext
13905 if test "${ac_cv_search_sem_init+set}" = set; then
13906 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013907fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013908done
13909if test "${ac_cv_search_sem_init+set}" = set; then
13910 :
13911else
13912 ac_cv_search_sem_init=no
13913fi
13914rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013915LIBS=$ac_func_search_save_LIBS
13916fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013917{ echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
13918echo "${ECHO_T}$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013919ac_res=$ac_cv_search_sem_init
13920if test "$ac_res" != no; then
13921 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000013922
Martin v. Löwis41933dd2002-03-21 15:10:58 +000013923fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000013924 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000013925 # posix4 on Solaris 2.6
13926 # pthread (first!) on Linux
13927fi
13928
Martin v. Löwis19d17342003-06-14 21:03:05 +000013929# check if we need libintl for locale functions
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013930{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
13931echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000013932if test "${ac_cv_lib_intl_textdomain+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013933 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +000013934else
13935 ac_check_lib_save_LIBS=$LIBS
13936LIBS="-lintl $LIBS"
13937cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013938/* confdefs.h. */
13939_ACEOF
13940cat confdefs.h >>conftest.$ac_ext
13941cat >>conftest.$ac_ext <<_ACEOF
13942/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000013943
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013944/* Override any GCC internal prototype to avoid an error.
13945 Use char because int might match the return type of a GCC
13946 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000013947#ifdef __cplusplus
13948extern "C"
13949#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000013950char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000013951int
13952main ()
13953{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013954return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000013955 ;
13956 return 0;
13957}
13958_ACEOF
13959rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013960if { (ac_try="$ac_link"
13961case "(($ac_try" in
13962 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13963 *) ac_try_echo=$ac_try;;
13964esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013965eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013966 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000013967 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013968 grep -v '^ *+' conftest.er1 >conftest.err
13969 rm -f conftest.er1
13970 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013971 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013972 (exit $ac_status); } && {
13973 test -z "$ac_c_werror_flag" ||
13974 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013975 } && test -s conftest$ac_exeext &&
13976 $as_test_x conftest$ac_exeext; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000013977 ac_cv_lib_intl_textdomain=yes
13978else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013979 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013980sed 's/^/| /' conftest.$ac_ext >&5
13981
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013982 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000013983fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013984
13985rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013986 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000013987LIBS=$ac_check_lib_save_LIBS
13988fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013989{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
13990echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; }
13991if test $ac_cv_lib_intl_textdomain = yes; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000013992
13993cat >>confdefs.h <<\_ACEOF
13994#define WITH_LIBINTL 1
13995_ACEOF
13996
Brett Cannonc6d936e2009-06-07 20:09:53 +000013997 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +000013998fi
13999
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014000
14001# checks for system dependent C++ extensions support
14002case "$ac_sys_system" in
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014003 AIX*) { echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
14004echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014005 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014006/* confdefs.h. */
14007_ACEOF
14008cat confdefs.h >>conftest.$ac_ext
14009cat >>conftest.$ac_ext <<_ACEOF
14010/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014011#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014012int
14013main ()
14014{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014015loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000014016 ;
14017 return 0;
14018}
14019_ACEOF
14020rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014021if { (ac_try="$ac_link"
14022case "(($ac_try" in
14023 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14024 *) ac_try_echo=$ac_try;;
14025esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014026eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014027 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014028 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014029 grep -v '^ *+' conftest.er1 >conftest.err
14030 rm -f conftest.er1
14031 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014033 (exit $ac_status); } && {
14034 test -z "$ac_c_werror_flag" ||
14035 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014036 } && test -s conftest$ac_exeext &&
14037 $as_test_x conftest$ac_exeext; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014038
Martin v. Löwis11437992002-04-12 09:54:03 +000014039cat >>confdefs.h <<\_ACEOF
14040#define AIX_GENUINE_CPLUSPLUS 1
14041_ACEOF
14042
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014043 { echo "$as_me:$LINENO: result: yes" >&5
14044echo "${ECHO_T}yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014045else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014046 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014047sed 's/^/| /' conftest.$ac_ext >&5
14048
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014049 { echo "$as_me:$LINENO: result: no" >&5
14050echo "${ECHO_T}no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014051fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014052
14053rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014054 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014055 *) ;;
14056esac
14057
Guido van Rossum70c7f481998-03-26 18:44:10 +000014058# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014059{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
14060echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014061if test "${ac_cv_lib_nsl_t_open+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014062 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014063else
Martin v. Löwis11437992002-04-12 09:54:03 +000014064 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014065LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014066cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014067/* confdefs.h. */
14068_ACEOF
14069cat confdefs.h >>conftest.$ac_ext
14070cat >>conftest.$ac_ext <<_ACEOF
14071/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014072
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014073/* Override any GCC internal prototype to avoid an error.
14074 Use char because int might match the return type of a GCC
14075 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014076#ifdef __cplusplus
14077extern "C"
14078#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014079char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014080int
14081main ()
14082{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014083return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014084 ;
14085 return 0;
14086}
14087_ACEOF
14088rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014089if { (ac_try="$ac_link"
14090case "(($ac_try" in
14091 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14092 *) ac_try_echo=$ac_try;;
14093esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014094eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014095 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014096 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014097 grep -v '^ *+' conftest.er1 >conftest.err
14098 rm -f conftest.er1
14099 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014101 (exit $ac_status); } && {
14102 test -z "$ac_c_werror_flag" ||
14103 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014104 } && test -s conftest$ac_exeext &&
14105 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014106 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014107else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014108 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014109sed 's/^/| /' conftest.$ac_ext >&5
14110
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014111 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014112fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014113
14114rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014115 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014116LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014117fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014118{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
14119echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6; }
14120if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014121 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014122fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000014123 # SVR4
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014124{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
14125echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014126if test "${ac_cv_lib_socket_socket+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014127 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014128else
Martin v. Löwis11437992002-04-12 09:54:03 +000014129 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014130LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014131cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014132/* confdefs.h. */
14133_ACEOF
14134cat confdefs.h >>conftest.$ac_ext
14135cat >>conftest.$ac_ext <<_ACEOF
14136/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014137
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014138/* Override any GCC internal prototype to avoid an error.
14139 Use char because int might match the return type of a GCC
14140 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014141#ifdef __cplusplus
14142extern "C"
14143#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014144char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014145int
14146main ()
14147{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014148return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014149 ;
14150 return 0;
14151}
14152_ACEOF
14153rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014154if { (ac_try="$ac_link"
14155case "(($ac_try" in
14156 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14157 *) ac_try_echo=$ac_try;;
14158esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014159eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014160 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014161 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014162 grep -v '^ *+' conftest.er1 >conftest.err
14163 rm -f conftest.er1
14164 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014166 (exit $ac_status); } && {
14167 test -z "$ac_c_werror_flag" ||
14168 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014169 } && test -s conftest$ac_exeext &&
14170 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014171 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014172else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014173 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014174sed 's/^/| /' conftest.$ac_ext >&5
14175
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014176 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014177fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014178
14179rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014180 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014181LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014182fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014183{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
14184echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
14185if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000014186 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000014187fi
14188 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000014189
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014190{ echo "$as_me:$LINENO: checking for --with-libs" >&5
14191echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014192
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014193# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000014194if test "${with_libs+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014195 withval=$with_libs;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014196{ echo "$as_me:$LINENO: result: $withval" >&5
14197echo "${ECHO_T}$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000014198LIBS="$withval $LIBS"
14199
14200else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014201 { echo "$as_me:$LINENO: result: no" >&5
14202echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014203fi
14204
Guido van Rossum7f43da71994-08-01 12:15:30 +000014205
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014206# Check for use of the system libffi library
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014207{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
14208echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014209
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014210# Check whether --with-system_ffi was given.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014211if test "${with_system_ffi+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014212 withval=$with_system_ffi;
14213fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014214
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014215
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014216{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5
14217echo "${ECHO_T}$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014218
Matthias Klose55708cc2009-04-30 08:06:49 +000014219# Check for --with-dbmliborder
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014220{ echo "$as_me:$LINENO: checking for --with-dbmliborder" >&5
14221echo $ECHO_N "checking for --with-dbmliborder... $ECHO_C" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000014222
14223# Check whether --with-dbmliborder was given.
14224if test "${with_dbmliborder+set}" = set; then
14225 withval=$with_dbmliborder;
14226if test x$with_dbmliborder = xyes
14227then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014228{ { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
14229echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Matthias Klose55708cc2009-04-30 08:06:49 +000014230 { (exit 1); exit 1; }; }
14231else
14232 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
14233 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
14234 then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014235 { { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
14236echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Matthias Klose55708cc2009-04-30 08:06:49 +000014237 { (exit 1); exit 1; }; }
14238 fi
14239 done
14240fi
14241fi
14242
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014243{ echo "$as_me:$LINENO: result: $with_dbmliborder" >&5
14244echo "${ECHO_T}$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000014245
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000014246# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014247
14248
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014249{ echo "$as_me:$LINENO: checking for --with-signal-module" >&5
14250echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014251
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014252# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014253if test "${with_signal_module+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014254 withval=$with_signal_module;
14255fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014256
14257
14258if test -z "$with_signal_module"
14259then with_signal_module="yes"
14260fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014261{ echo "$as_me:$LINENO: result: $with_signal_module" >&5
14262echo "${ECHO_T}$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014263
14264if test "${with_signal_module}" = "yes"; then
14265 USE_SIGNAL_MODULE=""
14266 SIGNAL_OBJS=""
14267else
14268 USE_SIGNAL_MODULE="#"
14269 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
14270fi
14271
Guido van Rossum3d15bd82001-01-10 18:53:48 +000014272# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000014273
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000014274USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000014275
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014276{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
14277echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014278
Guido van Rossumec2f0731997-01-22 20:54:01 +000014279
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014280# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000014281if test "${with_dec_threads+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014282 withval=$with_dec_threads;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014283{ echo "$as_me:$LINENO: result: $withval" >&5
14284echo "${ECHO_T}$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000014285LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000014286if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000014287 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000014288fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000014289else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014290 { echo "$as_me:$LINENO: result: no" >&5
14291echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014292fi
14293
Martin v. Löwis11437992002-04-12 09:54:03 +000014294
14295# Templates for things AC_DEFINEd more than once.
14296# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000014297
14298
Martin v. Löwis11437992002-04-12 09:54:03 +000014299
14300
14301
14302
14303
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014304{ echo "$as_me:$LINENO: checking for --with-threads" >&5
14305echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014306
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014307# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000014308if test "${with_threads+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014309 withval=$with_threads;
14310fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000014311
14312
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000014313# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000014314
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014315# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014316if test "${with_thread+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014317 withval=$with_thread; with_threads=$with_thread
14318fi
14319
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000014320
14321if test -z "$with_threads"
14322then with_threads="yes"
14323fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014324{ echo "$as_me:$LINENO: result: $with_threads" >&5
14325echo "${ECHO_T}$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000014326
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014327
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000014328if test "$with_threads" = "no"
14329then
14330 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014331elif test "$ac_cv_pthread_is_default" = yes
14332then
Martin v. Löwis11437992002-04-12 09:54:03 +000014333 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014334#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014335_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014336
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014337 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000014338 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014339#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014340_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014341
14342 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000014343 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014344elif test "$ac_cv_kpthread" = "yes"
14345then
14346 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000014347 if test "$ac_cv_cxx_thread" = "yes"; then
14348 CXX="$CXX -Kpthread"
14349 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014350 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000014351#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014352_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000014353
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014354 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014355 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000014356elif test "$ac_cv_kthread" = "yes"
14357then
14358 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000014359 if test "$ac_cv_cxx_thread" = "yes"; then
14360 CXX="$CXX -Kthread"
14361 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000014362 cat >>confdefs.h <<\_ACEOF
14363#define WITH_THREAD 1
14364_ACEOF
14365
14366 posix_threads=yes
14367 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014368elif test "$ac_cv_pthread" = "yes"
14369then
14370 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000014371 if test "$ac_cv_cxx_thread" = "yes"; then
14372 CXX="$CXX -pthread"
14373 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014374 cat >>confdefs.h <<\_ACEOF
14375#define WITH_THREAD 1
14376_ACEOF
14377
14378 posix_threads=yes
14379 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014380else
14381 if test ! -z "$with_threads" -a -d "$with_threads"
14382 then LDFLAGS="$LDFLAGS -L$with_threads"
14383 fi
14384 if test ! -z "$withval" -a -d "$withval"
14385 then LDFLAGS="$LDFLAGS -L$withval"
14386 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014387
14388 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000014389 # define _POSIX_THREADS in unistd.h. Some apparently don't
14390 # (e.g. gnu pth with pthread emulation)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014391 { echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
14392echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014393 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014394/* confdefs.h. */
14395_ACEOF
14396cat confdefs.h >>conftest.$ac_ext
14397cat >>conftest.$ac_ext <<_ACEOF
14398/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000014399
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014400#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000014401#ifdef _POSIX_THREADS
14402yes
14403#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014404
14405_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014406if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000014407 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014408 unistd_defines_pthreads=yes
14409else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014410 unistd_defines_pthreads=no
14411fi
Mark Dickinson875ada42009-11-28 12:52:39 +000014412rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014413
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014414 { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
14415echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014416
Martin v. Löwis11437992002-04-12 09:54:03 +000014417 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000014418#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014419_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000014420
Martin v. Löwis11437992002-04-12 09:54:03 +000014421 if test "${ac_cv_header_cthreads_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014422 { echo "$as_me:$LINENO: checking for cthreads.h" >&5
14423echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014424if test "${ac_cv_header_cthreads_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014425 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014426fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014427{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
14428echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014429else
Martin v. Löwis11437992002-04-12 09:54:03 +000014430 # Is the header compilable?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014431{ echo "$as_me:$LINENO: checking cthreads.h usability" >&5
14432echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014433cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014434/* confdefs.h. */
14435_ACEOF
14436cat confdefs.h >>conftest.$ac_ext
14437cat >>conftest.$ac_ext <<_ACEOF
14438/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014439$ac_includes_default
14440#include <cthreads.h>
14441_ACEOF
14442rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014443if { (ac_try="$ac_compile"
14444case "(($ac_try" in
14445 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14446 *) ac_try_echo=$ac_try;;
14447esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014448eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014449 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014450 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014451 grep -v '^ *+' conftest.er1 >conftest.err
14452 rm -f conftest.er1
14453 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014454 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014455 (exit $ac_status); } && {
14456 test -z "$ac_c_werror_flag" ||
14457 test ! -s conftest.err
14458 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014459 ac_header_compiler=yes
14460else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014461 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014462sed 's/^/| /' conftest.$ac_ext >&5
14463
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014464 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014465fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014466
14467rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014468{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14469echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014470
14471# Is the header present?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014472{ echo "$as_me:$LINENO: checking cthreads.h presence" >&5
14473echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014474cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014475/* confdefs.h. */
14476_ACEOF
14477cat confdefs.h >>conftest.$ac_ext
14478cat >>conftest.$ac_ext <<_ACEOF
14479/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014480#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014481_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014482if { (ac_try="$ac_cpp conftest.$ac_ext"
14483case "(($ac_try" in
14484 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14485 *) ac_try_echo=$ac_try;;
14486esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014487eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014488 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014489 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014490 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000014491 rm -f conftest.er1
14492 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014493 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014494 (exit $ac_status); } >/dev/null && {
14495 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14496 test ! -s conftest.err
14497 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014498 ac_header_preproc=yes
14499else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014500 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014501sed 's/^/| /' conftest.$ac_ext >&5
14502
Martin v. Löwis11437992002-04-12 09:54:03 +000014503 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014504fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014505
Martin v. Löwis11437992002-04-12 09:54:03 +000014506rm -f conftest.err conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014507{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14508echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014509
14510# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014511case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14512 yes:no: )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014513 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
14514echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
14515 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
14516echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014517 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014518 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014519 no:yes:* )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014520 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
14521echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
14522 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
14523echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
14524 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
14525echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
14526 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
14527echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
14528 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
14529echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
14530 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
14531echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014532 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000014533## -------------------------------------- ##
14534## Report this to http://bugs.python.org/ ##
14535## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014536_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014537 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014538 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014539esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014540{ echo "$as_me:$LINENO: checking for cthreads.h" >&5
14541echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014542if test "${ac_cv_header_cthreads_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014543 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014544else
14545 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014546fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014547{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
14548echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014549
14550fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014551if test $ac_cv_header_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014552 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014553#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014554_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014555
Martin v. Löwis11437992002-04-12 09:54:03 +000014556 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014557#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014558_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014559
Martin v. Löwis11437992002-04-12 09:54:03 +000014560
14561cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014562#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014563_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014564
14565 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014566 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014567else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014568
Martin v. Löwis11437992002-04-12 09:54:03 +000014569 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014570 { echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
14571echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014572if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014573 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014574fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014575{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
14576echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014577else
Martin v. Löwis11437992002-04-12 09:54:03 +000014578 # Is the header compilable?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014579{ echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
14580echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014581cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014582/* confdefs.h. */
14583_ACEOF
14584cat confdefs.h >>conftest.$ac_ext
14585cat >>conftest.$ac_ext <<_ACEOF
14586/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014587$ac_includes_default
14588#include <mach/cthreads.h>
14589_ACEOF
14590rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014591if { (ac_try="$ac_compile"
14592case "(($ac_try" in
14593 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14594 *) ac_try_echo=$ac_try;;
14595esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014596eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014597 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014598 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014599 grep -v '^ *+' conftest.er1 >conftest.err
14600 rm -f conftest.er1
14601 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014603 (exit $ac_status); } && {
14604 test -z "$ac_c_werror_flag" ||
14605 test ! -s conftest.err
14606 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014607 ac_header_compiler=yes
14608else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014609 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014610sed 's/^/| /' conftest.$ac_ext >&5
14611
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014612 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014613fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014614
14615rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014616{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14617echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014618
14619# Is the header present?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014620{ echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
14621echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014622cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014623/* confdefs.h. */
14624_ACEOF
14625cat confdefs.h >>conftest.$ac_ext
14626cat >>conftest.$ac_ext <<_ACEOF
14627/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014628#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014629_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014630if { (ac_try="$ac_cpp conftest.$ac_ext"
14631case "(($ac_try" in
14632 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14633 *) ac_try_echo=$ac_try;;
14634esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014635eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014636 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014637 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014638 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000014639 rm -f conftest.er1
14640 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014642 (exit $ac_status); } >/dev/null && {
14643 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14644 test ! -s conftest.err
14645 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014646 ac_header_preproc=yes
14647else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014648 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014649sed 's/^/| /' conftest.$ac_ext >&5
14650
Martin v. Löwis11437992002-04-12 09:54:03 +000014651 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014652fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014653
Martin v. Löwis11437992002-04-12 09:54:03 +000014654rm -f conftest.err conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014655{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14656echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014657
14658# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014659case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14660 yes:no: )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014661 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
14662echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
14663 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
14664echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014665 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014666 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014667 no:yes:* )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014668 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
14669echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
14670 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
14671echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
14672 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
14673echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
14674 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
14675echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
14676 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
14677echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
14678 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
14679echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014680 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000014681## -------------------------------------- ##
14682## Report this to http://bugs.python.org/ ##
14683## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014684_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014685 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014686 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014687esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014688{ echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
14689echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014690if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014691 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014692else
14693 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014694fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014695{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
14696echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014697
14698fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014699if test $ac_cv_header_mach_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014700 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014701#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014702_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014703
Martin v. Löwis11437992002-04-12 09:54:03 +000014704 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014705#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014706_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014707
Martin v. Löwis11437992002-04-12 09:54:03 +000014708
14709cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014710#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014711_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014712
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014713 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014714else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014715
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014716 { echo "$as_me:$LINENO: checking for --with-pth" >&5
14717echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014718
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014719# Check whether --with-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014720if test "${with_pth+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014721 withval=$with_pth; { echo "$as_me:$LINENO: result: $withval" >&5
14722echo "${ECHO_T}$withval" >&6; }
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000014723 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014724#define WITH_THREAD 1
14725_ACEOF
14726
14727
14728cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014729#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014730_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014731
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000014732 LIBS="-lpth $LIBS"
14733 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014734else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014735 { echo "$as_me:$LINENO: result: no" >&5
14736echo "${ECHO_T}no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014737
14738 # Just looking for pthread_create in libpthread is not enough:
14739 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
14740 # So we really have to include pthread.h, and then link.
14741 _libs=$LIBS
14742 LIBS="$LIBS -lpthread"
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014743 { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
14744echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014745 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014746/* confdefs.h. */
14747_ACEOF
14748cat confdefs.h >>conftest.$ac_ext
14749cat >>conftest.$ac_ext <<_ACEOF
14750/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014751#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000014752
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014753void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000014754int
14755main ()
14756{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014757
14758pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000014759 ;
14760 return 0;
14761}
14762_ACEOF
14763rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014764if { (ac_try="$ac_link"
14765case "(($ac_try" in
14766 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14767 *) ac_try_echo=$ac_try;;
14768esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014769eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014770 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014771 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014772 grep -v '^ *+' conftest.er1 >conftest.err
14773 rm -f conftest.er1
14774 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014776 (exit $ac_status); } && {
14777 test -z "$ac_c_werror_flag" ||
14778 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014779 } && test -s conftest$ac_exeext &&
14780 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014781
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014782 { echo "$as_me:$LINENO: result: yes" >&5
14783echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014784 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000014785#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014786_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000014787
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014788 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014789 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000014790else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014791 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014792sed 's/^/| /' conftest.$ac_ext >&5
14793
Martin v. Löwis11437992002-04-12 09:54:03 +000014794
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014795 LIBS=$_libs
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014796 { echo "$as_me:$LINENO: checking for pthread_detach" >&5
14797echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014798if test "${ac_cv_func_pthread_detach+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014799 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000014800else
Martin v. Löwis11437992002-04-12 09:54:03 +000014801 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014802/* confdefs.h. */
14803_ACEOF
14804cat confdefs.h >>conftest.$ac_ext
14805cat >>conftest.$ac_ext <<_ACEOF
14806/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014807/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
14808 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14809#define pthread_detach innocuous_pthread_detach
14810
Guido van Rossumad678af1998-10-02 14:42:15 +000014811/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014812 which can conflict with char pthread_detach (); below.
14813 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014814 <limits.h> exists even on freestanding compilers. */
14815
14816#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000014817# include <limits.h>
14818#else
14819# include <assert.h>
14820#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014821
14822#undef pthread_detach
14823
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014824/* Override any GCC internal prototype to avoid an error.
14825 Use char because int might match the return type of a GCC
14826 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014827#ifdef __cplusplus
14828extern "C"
14829#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014830char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000014831/* The GNU C library defines this for functions which it implements
14832 to always fail with ENOSYS. Some functions are actually named
14833 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014834#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000014835choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000014836#endif
14837
Skip Montanaro6dead952003-09-25 14:50:04 +000014838int
14839main ()
14840{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014841return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014842 ;
14843 return 0;
14844}
14845_ACEOF
14846rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014847if { (ac_try="$ac_link"
14848case "(($ac_try" in
14849 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14850 *) ac_try_echo=$ac_try;;
14851esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014852eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014853 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014854 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014855 grep -v '^ *+' conftest.er1 >conftest.err
14856 rm -f conftest.er1
14857 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014859 (exit $ac_status); } && {
14860 test -z "$ac_c_werror_flag" ||
14861 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014862 } && test -s conftest$ac_exeext &&
14863 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014864 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000014865else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014866 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014867sed 's/^/| /' conftest.$ac_ext >&5
14868
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014869 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000014870fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014871
14872rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014873 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000014874fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014875{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
14876echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; }
14877if test $ac_cv_func_pthread_detach = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014878 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000014879#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014880_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000014881
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014882 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014883 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000014884else
Guido van Rossumad678af1998-10-02 14:42:15 +000014885
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014886 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014887 { echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
14888echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014889if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014890 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014891fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014892{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
14893echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014894else
14895 # Is the header compilable?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014896{ echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
14897echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014898cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014899/* confdefs.h. */
14900_ACEOF
14901cat confdefs.h >>conftest.$ac_ext
14902cat >>conftest.$ac_ext <<_ACEOF
14903/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014904$ac_includes_default
14905#include <atheos/threads.h>
14906_ACEOF
14907rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014908if { (ac_try="$ac_compile"
14909case "(($ac_try" in
14910 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14911 *) ac_try_echo=$ac_try;;
14912esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014913eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014914 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014915 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014916 grep -v '^ *+' conftest.er1 >conftest.err
14917 rm -f conftest.er1
14918 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014920 (exit $ac_status); } && {
14921 test -z "$ac_c_werror_flag" ||
14922 test ! -s conftest.err
14923 } && test -s conftest.$ac_objext; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014924 ac_header_compiler=yes
14925else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014926 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014927sed 's/^/| /' conftest.$ac_ext >&5
14928
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014929 ac_header_compiler=no
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014930fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014931
14932rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014933{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14934echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014935
14936# Is the header present?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014937{ echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
14938echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014939cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014940/* confdefs.h. */
14941_ACEOF
14942cat confdefs.h >>conftest.$ac_ext
14943cat >>conftest.$ac_ext <<_ACEOF
14944/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014945#include <atheos/threads.h>
14946_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014947if { (ac_try="$ac_cpp conftest.$ac_ext"
14948case "(($ac_try" in
14949 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14950 *) ac_try_echo=$ac_try;;
14951esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014952eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014953 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014954 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014955 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014956 rm -f conftest.er1
14957 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014959 (exit $ac_status); } >/dev/null && {
14960 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14961 test ! -s conftest.err
14962 }; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014963 ac_header_preproc=yes
14964else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014965 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014966sed 's/^/| /' conftest.$ac_ext >&5
14967
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014968 ac_header_preproc=no
14969fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014970
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014971rm -f conftest.err conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014972{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14973echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014974
14975# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014976case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14977 yes:no: )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014978 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
14979echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
14980 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
14981echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014982 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014983 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014984 no:yes:* )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014985 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
14986echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
14987 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
14988echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
14989 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
14990echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
14991 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5
14992echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;}
14993 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
14994echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
14995 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
14996echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014997 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000014998## -------------------------------------- ##
14999## Report this to http://bugs.python.org/ ##
15000## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015001_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015002 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000015003 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015004esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015005{ echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
15006echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015007if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015008 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015009else
15010 ac_cv_header_atheos_threads_h=$ac_header_preproc
15011fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015012{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
15013echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015014
15015fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015016if test $ac_cv_header_atheos_threads_h = yes; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015017 cat >>confdefs.h <<\_ACEOF
15018#define WITH_THREAD 1
15019_ACEOF
15020
15021
15022cat >>confdefs.h <<\_ACEOF
15023#define ATHEOS_THREADS 1
15024_ACEOF
15025
15026 THREADOBJ="Python/thread.o"
15027else
15028
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015029 { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
15030echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015031if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015032 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015033else
Martin v. Löwis11437992002-04-12 09:54:03 +000015034 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015035LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015036cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015037/* confdefs.h. */
15038_ACEOF
15039cat confdefs.h >>conftest.$ac_ext
15040cat >>conftest.$ac_ext <<_ACEOF
15041/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015042
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015043/* Override any GCC internal prototype to avoid an error.
15044 Use char because int might match the return type of a GCC
15045 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015046#ifdef __cplusplus
15047extern "C"
15048#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015049char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015050int
15051main ()
15052{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015053return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015054 ;
15055 return 0;
15056}
15057_ACEOF
15058rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015059if { (ac_try="$ac_link"
15060case "(($ac_try" in
15061 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15062 *) ac_try_echo=$ac_try;;
15063esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015064eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015065 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015066 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015067 grep -v '^ *+' conftest.er1 >conftest.err
15068 rm -f conftest.er1
15069 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015071 (exit $ac_status); } && {
15072 test -z "$ac_c_werror_flag" ||
15073 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015074 } && test -s conftest$ac_exeext &&
15075 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015076 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000015077else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015078 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015079sed 's/^/| /' conftest.$ac_ext >&5
15080
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015081 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000015082fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015083
15084rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015085 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015086LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000015087fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015088{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
15089echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
15090if test $ac_cv_lib_pthreads_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015091 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000015092#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015093_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000015094
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015095 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015096 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015097 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000015098else
Greg Steinadf63d62000-07-05 10:38:09 +000015099
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015100 { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
15101echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015102if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015103 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000015104else
Martin v. Löwis11437992002-04-12 09:54:03 +000015105 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000015106LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015107cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015108/* confdefs.h. */
15109_ACEOF
15110cat confdefs.h >>conftest.$ac_ext
15111cat >>conftest.$ac_ext <<_ACEOF
15112/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015113
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015114/* Override any GCC internal prototype to avoid an error.
15115 Use char because int might match the return type of a GCC
15116 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015117#ifdef __cplusplus
15118extern "C"
15119#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015120char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015121int
15122main ()
15123{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015124return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015125 ;
15126 return 0;
15127}
15128_ACEOF
15129rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015130if { (ac_try="$ac_link"
15131case "(($ac_try" in
15132 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15133 *) ac_try_echo=$ac_try;;
15134esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015135eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015136 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015137 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015138 grep -v '^ *+' conftest.er1 >conftest.err
15139 rm -f conftest.er1
15140 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015142 (exit $ac_status); } && {
15143 test -z "$ac_c_werror_flag" ||
15144 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015145 } && test -s conftest$ac_exeext &&
15146 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015147 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000015148else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015149 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015150sed 's/^/| /' conftest.$ac_ext >&5
15151
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015152 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000015153fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015154
15155rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015156 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015157LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000015158fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015159{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
15160echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
15161if test $ac_cv_lib_c_r_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015162 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000015163#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015164_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000015165
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015166 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015167 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015168 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000015169else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000015170
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015171 { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
15172echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015173if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015174 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015175else
Martin v. Löwis11437992002-04-12 09:54:03 +000015176 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015177LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015178cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015179/* confdefs.h. */
15180_ACEOF
15181cat confdefs.h >>conftest.$ac_ext
15182cat >>conftest.$ac_ext <<_ACEOF
15183/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015184
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015185/* Override any GCC internal prototype to avoid an error.
15186 Use char because int might match the return type of a GCC
15187 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015188#ifdef __cplusplus
15189extern "C"
15190#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015191char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015192int
15193main ()
15194{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015195return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015196 ;
15197 return 0;
15198}
15199_ACEOF
15200rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015201if { (ac_try="$ac_link"
15202case "(($ac_try" in
15203 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15204 *) ac_try_echo=$ac_try;;
15205esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015206eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015207 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015208 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015209 grep -v '^ *+' conftest.er1 >conftest.err
15210 rm -f conftest.er1
15211 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015213 (exit $ac_status); } && {
15214 test -z "$ac_c_werror_flag" ||
15215 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015216 } && test -s conftest$ac_exeext &&
15217 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015218 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015219else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015220 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015221sed 's/^/| /' conftest.$ac_ext >&5
15222
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015223 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015224fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015225
15226rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015227 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015228LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015229fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015230{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
15231echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; }
15232if test $ac_cv_lib_pthread___pthread_create_system = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015233 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015234#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015235_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015236
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015237 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015238 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015239 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015240else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015241
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015242 { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
15243echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015244if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015245 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000015246else
Martin v. Löwis11437992002-04-12 09:54:03 +000015247 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000015248LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015249cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015250/* confdefs.h. */
15251_ACEOF
15252cat confdefs.h >>conftest.$ac_ext
15253cat >>conftest.$ac_ext <<_ACEOF
15254/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015255
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015256/* Override any GCC internal prototype to avoid an error.
15257 Use char because int might match the return type of a GCC
15258 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015259#ifdef __cplusplus
15260extern "C"
15261#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015262char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015263int
15264main ()
15265{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015266return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015267 ;
15268 return 0;
15269}
15270_ACEOF
15271rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015272if { (ac_try="$ac_link"
15273case "(($ac_try" in
15274 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15275 *) ac_try_echo=$ac_try;;
15276esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015277eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015278 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015279 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015280 grep -v '^ *+' conftest.er1 >conftest.err
15281 rm -f conftest.er1
15282 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015284 (exit $ac_status); } && {
15285 test -z "$ac_c_werror_flag" ||
15286 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015287 } && test -s conftest$ac_exeext &&
15288 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015289 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000015290else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015291 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015292sed 's/^/| /' conftest.$ac_ext >&5
15293
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015294 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000015295fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015296
15297rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015298 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015299LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000015300fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015301{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
15302echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; }
15303if test $ac_cv_lib_cma_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015304 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000015305#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015306_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000015307
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015308 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015309 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015310 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000015311else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000015312
Martin v. Löwis130fb172001-07-19 11:00:41 +000015313 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000015314fi
15315
Guido van Rossum627b2d71993-12-24 10:39:16 +000015316
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015317fi
15318
Guido van Rossum0be3e491997-05-22 20:33:33 +000015319fi
15320
Guido van Rossum49545951997-12-02 19:28:29 +000015321fi
15322
Guido van Rossumb93a8621998-05-07 13:27:32 +000015323fi
15324
Guido van Rossum07bd90e2000-05-08 13:41:38 +000015325
Michael W. Hudson54241132001-12-07 15:38:26 +000015326fi
15327
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015328fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015329
15330rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015331 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015332fi
15333
Martin v. Löwis11437992002-04-12 09:54:03 +000015334fi
15335
15336
15337fi
15338
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015339
Michael W. Hudson54241132001-12-07 15:38:26 +000015340
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015341 { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
15342echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015343if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015344 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015345else
Martin v. Löwis11437992002-04-12 09:54:03 +000015346 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015347LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015348cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015349/* confdefs.h. */
15350_ACEOF
15351cat confdefs.h >>conftest.$ac_ext
15352cat >>conftest.$ac_ext <<_ACEOF
15353/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015354
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015355/* Override any GCC internal prototype to avoid an error.
15356 Use char because int might match the return type of a GCC
15357 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015358#ifdef __cplusplus
15359extern "C"
15360#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015361char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015362int
15363main ()
15364{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015365return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015366 ;
15367 return 0;
15368}
15369_ACEOF
15370rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015371if { (ac_try="$ac_link"
15372case "(($ac_try" in
15373 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15374 *) ac_try_echo=$ac_try;;
15375esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015376eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015377 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015378 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015379 grep -v '^ *+' conftest.er1 >conftest.err
15380 rm -f conftest.er1
15381 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015383 (exit $ac_status); } && {
15384 test -z "$ac_c_werror_flag" ||
15385 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015386 } && test -s conftest$ac_exeext &&
15387 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015388 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015389else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015390 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015391sed 's/^/| /' conftest.$ac_ext >&5
15392
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015393 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015394fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015395
15396rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015397 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015398LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015399fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015400{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
15401echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; }
15402if test $ac_cv_lib_mpc_usconfig = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015403 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015404#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015405_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015406
Martin v. Löwis130fb172001-07-19 11:00:41 +000015407 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015408 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015409 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000015410fi
15411
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015412
Neal Norwitza978ab02002-11-02 16:58:05 +000015413 if test "$posix_threads" != "yes"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015414 { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
15415echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015416if test "${ac_cv_lib_thread_thr_create+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015417 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015418else
Martin v. Löwis11437992002-04-12 09:54:03 +000015419 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015420LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015421cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015422/* confdefs.h. */
15423_ACEOF
15424cat confdefs.h >>conftest.$ac_ext
15425cat >>conftest.$ac_ext <<_ACEOF
15426/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015427
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015428/* Override any GCC internal prototype to avoid an error.
15429 Use char because int might match the return type of a GCC
15430 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015431#ifdef __cplusplus
15432extern "C"
15433#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015434char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015435int
15436main ()
15437{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015438return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015439 ;
15440 return 0;
15441}
15442_ACEOF
15443rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015444if { (ac_try="$ac_link"
15445case "(($ac_try" in
15446 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15447 *) ac_try_echo=$ac_try;;
15448esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015449eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015450 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015451 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015452 grep -v '^ *+' conftest.er1 >conftest.err
15453 rm -f conftest.er1
15454 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015456 (exit $ac_status); } && {
15457 test -z "$ac_c_werror_flag" ||
15458 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015459 } && test -s conftest$ac_exeext &&
15460 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015461 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015462else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015463 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015464sed 's/^/| /' conftest.$ac_ext >&5
15465
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015466 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015467fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015468
15469rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015470 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015471LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015472fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015473{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
15474echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
15475if test $ac_cv_lib_thread_thr_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015476 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015477#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015478_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015479
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015480 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015481 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015482 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000015483fi
15484
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015485 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015486
Martin v. Löwis130fb172001-07-19 11:00:41 +000015487 if test "$USE_THREAD_MODULE" != "#"
15488 then
15489 # If the above checks didn't disable threads, (at least) OSF1
15490 # needs this '-threads' argument during linking.
15491 case $ac_sys_system in
15492 OSF1) LDLAST=-threads;;
15493 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000015494 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015495fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015496
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015497if test "$posix_threads" = "yes"; then
15498 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015499
15500cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015501#define _POSIX_THREADS 1
15502_ACEOF
15503
15504 fi
15505
15506 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
15507 case $ac_sys_system/$ac_sys_release in
15508 SunOS/5.6)
15509cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015510#define HAVE_PTHREAD_DESTRUCTOR 1
15511_ACEOF
15512
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015513 ;;
15514 SunOS/5.8)
15515cat >>confdefs.h <<\_ACEOF
15516#define HAVE_BROKEN_POSIX_SEMAPHORES 1
15517_ACEOF
15518
15519 ;;
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000015520 AIX/5)
15521cat >>confdefs.h <<\_ACEOF
15522#define HAVE_BROKEN_POSIX_SEMAPHORES 1
15523_ACEOF
15524
15525 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015526 esac
15527
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015528 { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
15529echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015530 if test "${ac_cv_pthread_system_supported+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015531 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015532else
15533 if test "$cross_compiling" = yes; then
15534 ac_cv_pthread_system_supported=no
15535else
15536 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015537/* confdefs.h. */
15538_ACEOF
15539cat confdefs.h >>conftest.$ac_ext
15540cat >>conftest.$ac_ext <<_ACEOF
15541/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015542#include <pthread.h>
15543 void *foo(void *parm) {
15544 return NULL;
15545 }
15546 main() {
15547 pthread_attr_t attr;
15548 pthread_t id;
15549 if (pthread_attr_init(&attr)) exit(-1);
15550 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
15551 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
15552 exit(0);
15553 }
15554_ACEOF
15555rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015556if { (ac_try="$ac_link"
15557case "(($ac_try" in
15558 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15559 *) ac_try_echo=$ac_try;;
15560esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015561eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015562 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015563 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015565 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015566 { (case "(($ac_try" in
15567 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15568 *) ac_try_echo=$ac_try;;
15569esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015570eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015571 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015572 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015574 (exit $ac_status); }; }; then
15575 ac_cv_pthread_system_supported=yes
15576else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015577 echo "$as_me: program exited with status $ac_status" >&5
15578echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015579sed 's/^/| /' conftest.$ac_ext >&5
15580
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015581( exit $ac_status )
15582ac_cv_pthread_system_supported=no
15583fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015584rm -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 +000015585fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015586
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015587
15588
Guido van Rossum627b2d71993-12-24 10:39:16 +000015589fi
15590
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015591 { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
15592echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015593 if test "$ac_cv_pthread_system_supported" = "yes"; then
15594
15595cat >>confdefs.h <<\_ACEOF
15596#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
15597_ACEOF
15598
15599 fi
15600
15601for ac_func in pthread_sigmask
15602do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015603as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15604{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15605echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015606if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015607 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015608else
15609 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015610/* confdefs.h. */
15611_ACEOF
15612cat confdefs.h >>conftest.$ac_ext
15613cat >>conftest.$ac_ext <<_ACEOF
15614/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015615/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15616 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15617#define $ac_func innocuous_$ac_func
15618
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015619/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015620 which can conflict with char $ac_func (); below.
15621 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015622 <limits.h> exists even on freestanding compilers. */
15623
15624#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015625# include <limits.h>
15626#else
15627# include <assert.h>
15628#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015629
15630#undef $ac_func
15631
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015632/* Override any GCC internal prototype to avoid an error.
15633 Use char because int might match the return type of a GCC
15634 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015635#ifdef __cplusplus
15636extern "C"
15637#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015638char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015639/* The GNU C library defines this for functions which it implements
15640 to always fail with ENOSYS. Some functions are actually named
15641 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015642#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015643choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015644#endif
15645
Skip Montanaro6dead952003-09-25 14:50:04 +000015646int
15647main ()
15648{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015649return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015650 ;
15651 return 0;
15652}
15653_ACEOF
15654rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015655if { (ac_try="$ac_link"
15656case "(($ac_try" in
15657 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15658 *) ac_try_echo=$ac_try;;
15659esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015660eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015661 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015662 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015663 grep -v '^ *+' conftest.er1 >conftest.err
15664 rm -f conftest.er1
15665 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015667 (exit $ac_status); } && {
15668 test -z "$ac_c_werror_flag" ||
15669 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015670 } && test -s conftest$ac_exeext &&
15671 $as_test_x conftest$ac_exeext; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015672 eval "$as_ac_var=yes"
15673else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015674 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015675sed 's/^/| /' conftest.$ac_ext >&5
15676
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015677 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015678fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015679
15680rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015681 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015682fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015683ac_res=`eval echo '${'$as_ac_var'}'`
15684 { echo "$as_me:$LINENO: result: $ac_res" >&5
15685echo "${ECHO_T}$ac_res" >&6; }
15686if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015687 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015688#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015689_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000015690 case $ac_sys_system in
15691 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015692
Jason Tishlerfac083d2003-07-22 15:20:49 +000015693cat >>confdefs.h <<\_ACEOF
15694#define HAVE_BROKEN_PTHREAD_SIGMASK 1
15695_ACEOF
15696
15697 ;;
15698 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015699fi
15700done
15701
15702fi
15703
15704
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015705# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000015706
15707
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015708{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
15709echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015710# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015711if test "${enable_ipv6+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015712 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015713 no)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015714 { echo "$as_me:$LINENO: result: no" >&5
15715echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015716 ipv6=no
15717 ;;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015718 *) { echo "$as_me:$LINENO: result: yes" >&5
15719echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015720 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015721#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015722_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015723
15724 ipv6=yes
15725 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015726 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015727else
Martin v. Löwis11437992002-04-12 09:54:03 +000015728
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015729 if test "$cross_compiling" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015730 { echo "$as_me:$LINENO: result: no" >&5
15731echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015732 ipv6=no
15733
15734else
Martin v. Löwis11437992002-04-12 09:54:03 +000015735 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015736/* confdefs.h. */
15737_ACEOF
15738cat confdefs.h >>conftest.$ac_ext
15739cat >>conftest.$ac_ext <<_ACEOF
15740/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015741 /* AF_INET6 available check */
15742#include <sys/types.h>
15743#include <sys/socket.h>
15744main()
15745{
15746 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
15747 exit(1);
15748 else
15749 exit(0);
15750}
15751
Martin v. Löwis11437992002-04-12 09:54:03 +000015752_ACEOF
15753rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015754if { (ac_try="$ac_link"
15755case "(($ac_try" in
15756 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15757 *) ac_try_echo=$ac_try;;
15758esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015759eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015760 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015761 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015763 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015764 { (case "(($ac_try" in
15765 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15766 *) ac_try_echo=$ac_try;;
15767esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015768eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015769 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015770 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015772 (exit $ac_status); }; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015773 { echo "$as_me:$LINENO: result: yes" >&5
15774echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015775 ipv6=yes
15776else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015777 echo "$as_me: program exited with status $ac_status" >&5
15778echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015779sed 's/^/| /' conftest.$ac_ext >&5
15780
Martin v. Löwis11437992002-04-12 09:54:03 +000015781( exit $ac_status )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015782{ echo "$as_me:$LINENO: result: no" >&5
15783echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015784 ipv6=no
15785fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015786rm -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 +000015787fi
15788
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015789
15790
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015791if test "$ipv6" = "yes"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015792 { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
15793echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015794 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015795/* confdefs.h. */
15796_ACEOF
15797cat confdefs.h >>conftest.$ac_ext
15798cat >>conftest.$ac_ext <<_ACEOF
15799/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015800#include <sys/types.h>
15801#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015802int
15803main ()
15804{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015805struct sockaddr_in6 x;
15806x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000015807 ;
15808 return 0;
15809}
15810_ACEOF
15811rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015812if { (ac_try="$ac_compile"
15813case "(($ac_try" in
15814 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15815 *) ac_try_echo=$ac_try;;
15816esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015817eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015818 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015819 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015820 grep -v '^ *+' conftest.er1 >conftest.err
15821 rm -f conftest.er1
15822 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015824 (exit $ac_status); } && {
15825 test -z "$ac_c_werror_flag" ||
15826 test ! -s conftest.err
15827 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015828 { echo "$as_me:$LINENO: result: yes" >&5
15829echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015830 ipv6=yes
15831else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015832 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015833sed 's/^/| /' conftest.$ac_ext >&5
15834
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015835 { echo "$as_me:$LINENO: result: no" >&5
15836echo "${ECHO_T}no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015837 ipv6=no
15838fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015839
15840rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015841fi
15842
15843if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015844 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015845#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015846_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015847
15848fi
15849
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015850fi
15851
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015852
15853ipv6type=unknown
15854ipv6lib=none
15855ipv6trylibc=no
15856
15857if test "$ipv6" = "yes"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015858 { echo "$as_me:$LINENO: checking ipv6 stack type" >&5
15859echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000015860 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
15861 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015862 case $i in
15863 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000015864 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015865/* confdefs.h. */
15866_ACEOF
15867cat confdefs.h >>conftest.$ac_ext
15868cat >>conftest.$ac_ext <<_ACEOF
15869/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015870
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015871#include <netinet/in.h>
15872#ifdef IPV6_INRIA_VERSION
15873yes
15874#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015875_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015876if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015877 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000015878 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015879fi
Mark Dickinson875ada42009-11-28 12:52:39 +000015880rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015881
15882 ;;
15883 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000015884 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015885/* confdefs.h. */
15886_ACEOF
15887cat confdefs.h >>conftest.$ac_ext
15888cat >>conftest.$ac_ext <<_ACEOF
15889/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015890
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015891#include <netinet/in.h>
15892#ifdef __KAME__
15893yes
15894#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015895_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015896if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015897 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015898 ipv6type=$i;
15899 ipv6lib=inet6
15900 ipv6libdir=/usr/local/v6/lib
15901 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015902fi
Mark Dickinson875ada42009-11-28 12:52:39 +000015903rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015904
15905 ;;
15906 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000015907 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015908/* confdefs.h. */
15909_ACEOF
15910cat confdefs.h >>conftest.$ac_ext
15911cat >>conftest.$ac_ext <<_ACEOF
15912/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015913
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015914#include <features.h>
15915#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
15916yes
15917#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015918_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015919if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015920 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015921 ipv6type=$i;
15922 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015923fi
Mark Dickinson875ada42009-11-28 12:52:39 +000015924rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015925
15926 ;;
15927 linux-inet6)
15928 if test -d /usr/inet6; then
15929 ipv6type=$i
15930 ipv6lib=inet6
15931 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000015932 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015933 fi
15934 ;;
15935 solaris)
15936 if test -f /etc/netconfig; then
15937 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
15938 ipv6type=$i
15939 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015940 fi
15941 fi
15942 ;;
15943 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000015944 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015945/* confdefs.h. */
15946_ACEOF
15947cat confdefs.h >>conftest.$ac_ext
15948cat >>conftest.$ac_ext <<_ACEOF
15949/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015950
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015951#include <sys/param.h>
15952#ifdef _TOSHIBA_INET6
15953yes
15954#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015955_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015956if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015957 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015958 ipv6type=$i;
15959 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000015960 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015961fi
Mark Dickinson875ada42009-11-28 12:52:39 +000015962rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015963
15964 ;;
15965 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000015966 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015967/* confdefs.h. */
15968_ACEOF
15969cat confdefs.h >>conftest.$ac_ext
15970cat >>conftest.$ac_ext <<_ACEOF
15971/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015972
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015973#include </usr/local/v6/include/sys/v6config.h>
15974#ifdef __V6D__
15975yes
15976#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015977_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015978if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015979 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015980 ipv6type=$i;
15981 ipv6lib=v6;
15982 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000015983 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015984fi
Mark Dickinson875ada42009-11-28 12:52:39 +000015985rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015986
15987 ;;
15988 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000015989 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015990/* confdefs.h. */
15991_ACEOF
15992cat confdefs.h >>conftest.$ac_ext
15993cat >>conftest.$ac_ext <<_ACEOF
15994/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015995
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015996#include <sys/param.h>
15997#ifdef _ZETA_MINAMI_INET6
15998yes
15999#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016000_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016001if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016002 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016003 ipv6type=$i;
16004 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000016005 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016006fi
Mark Dickinson875ada42009-11-28 12:52:39 +000016007rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016008
16009 ;;
16010 esac
16011 if test "$ipv6type" != "unknown"; then
16012 break
16013 fi
16014 done
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016015 { echo "$as_me:$LINENO: result: $ipv6type" >&5
16016echo "${ECHO_T}$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016017fi
16018
16019if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
16020 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
16021 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
16022 echo "using lib$ipv6lib"
16023 else
16024 if test $ipv6trylibc = "yes"; then
16025 echo "using libc"
16026 else
16027 echo 'Fatal: no $ipv6lib library found. cannot continue.'
16028 echo "You need to fetch lib$ipv6lib.a from appropriate"
16029 echo 'ipv6 kit and compile beforehand.'
16030 exit 1
16031 fi
16032 fi
16033fi
16034
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016035{ echo "$as_me:$LINENO: checking for OSX 10.5 SDK or later" >&5
16036echo $ECHO_N "checking for OSX 10.5 SDK or later... $ECHO_C" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000016037cat >conftest.$ac_ext <<_ACEOF
16038/* confdefs.h. */
16039_ACEOF
16040cat confdefs.h >>conftest.$ac_ext
16041cat >>conftest.$ac_ext <<_ACEOF
16042/* end confdefs.h. */
16043#include <Carbon/Carbon.h>
16044int
16045main ()
16046{
16047FSIORefNum fRef = 0
16048 ;
16049 return 0;
16050}
16051_ACEOF
16052rm -f conftest.$ac_objext
16053if { (ac_try="$ac_compile"
16054case "(($ac_try" in
16055 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16056 *) ac_try_echo=$ac_try;;
16057esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016058eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000016059 (eval "$ac_compile") 2>conftest.er1
16060 ac_status=$?
16061 grep -v '^ *+' conftest.er1 >conftest.err
16062 rm -f conftest.er1
16063 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000016065 (exit $ac_status); } && {
16066 test -z "$ac_c_werror_flag" ||
16067 test ! -s conftest.err
16068 } && test -s conftest.$ac_objext; then
16069
16070cat >>confdefs.h <<\_ACEOF
16071#define HAVE_OSX105_SDK 1
16072_ACEOF
16073
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016074 { echo "$as_me:$LINENO: result: yes" >&5
16075echo "${ECHO_T}yes" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000016076else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016077 echo "$as_me: failed program was:" >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000016078sed 's/^/| /' conftest.$ac_ext >&5
16079
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016080 { echo "$as_me:$LINENO: result: no" >&5
16081echo "${ECHO_T}no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000016082
16083fi
16084
16085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16086
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016087# Check for --with-doc-strings
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016088{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
16089echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016090
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016091# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016092if test "${with_doc_strings+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016093 withval=$with_doc_strings;
16094fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016095
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016096
16097if test -z "$with_doc_strings"
16098then with_doc_strings="yes"
16099fi
16100if test "$with_doc_strings" != "no"
16101then
16102
16103cat >>confdefs.h <<\_ACEOF
16104#define WITH_DOC_STRINGS 1
16105_ACEOF
16106
16107fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016108{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
16109echo "${ECHO_T}$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016110
Neil Schemenauera35c6882001-02-27 04:45:05 +000016111# Check for Python-specific malloc support
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016112{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
16113echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016114
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016115# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016116if test "${with_tsc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016117 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016118if test "$withval" != no
16119then
16120
16121cat >>confdefs.h <<\_ACEOF
16122#define WITH_TSC 1
16123_ACEOF
16124
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016125 { echo "$as_me:$LINENO: result: yes" >&5
16126echo "${ECHO_T}yes" >&6; }
16127else { echo "$as_me:$LINENO: result: no" >&5
16128echo "${ECHO_T}no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016129fi
16130else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016131 { echo "$as_me:$LINENO: result: no" >&5
16132echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016133fi
16134
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016135
16136# Check for Python-specific malloc support
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016137{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
16138echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016139
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016140# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000016141if test "${with_pymalloc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016142 withval=$with_pymalloc;
16143fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016144
Neil Schemenauera35c6882001-02-27 04:45:05 +000016145
Neil Schemenauer16c22972002-03-22 15:34:49 +000016146if test -z "$with_pymalloc"
16147then with_pymalloc="yes"
16148fi
16149if test "$with_pymalloc" != "no"
16150then
Martin v. Löwis11437992002-04-12 09:54:03 +000016151
16152cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000016153#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016154_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000016155
16156fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016157{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
16158echo "${ECHO_T}$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000016159
Barry Warsawef82cd72000-06-30 16:21:01 +000016160# Check for --with-wctype-functions
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016161{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
16162echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016163
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016164# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000016165if test "${with_wctype_functions+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016166 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000016167if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000016168then
16169
16170cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000016171#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016172_ACEOF
16173
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016174 { echo "$as_me:$LINENO: result: yes" >&5
16175echo "${ECHO_T}yes" >&6; }
16176else { echo "$as_me:$LINENO: result: no" >&5
16177echo "${ECHO_T}no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000016178fi
16179else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016180 { echo "$as_me:$LINENO: result: no" >&5
16181echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016182fi
16183
Barry Warsawef82cd72000-06-30 16:21:01 +000016184
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016185# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000016186
Guido van Rossum98935bf2001-09-05 19:13:16 +000016187DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000016188
Guido van Rossume97ee181999-12-20 21:27:22 +000016189# the dlopen() function means we might want to use dynload_shlib.o. some
16190# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000016191
Thomas Wouters3a584202000-08-05 23:28:51 +000016192for ac_func in dlopen
16193do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016194as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16195{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16196echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016197if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016198 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000016199else
Martin v. Löwis11437992002-04-12 09:54:03 +000016200 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016201/* confdefs.h. */
16202_ACEOF
16203cat confdefs.h >>conftest.$ac_ext
16204cat >>conftest.$ac_ext <<_ACEOF
16205/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016206/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16207 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16208#define $ac_func innocuous_$ac_func
16209
Guido van Rossume97ee181999-12-20 21:27:22 +000016210/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016211 which can conflict with char $ac_func (); below.
16212 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016213 <limits.h> exists even on freestanding compilers. */
16214
16215#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016216# include <limits.h>
16217#else
16218# include <assert.h>
16219#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016220
16221#undef $ac_func
16222
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016223/* Override any GCC internal prototype to avoid an error.
16224 Use char because int might match the return type of a GCC
16225 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016226#ifdef __cplusplus
16227extern "C"
16228#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016229char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000016230/* The GNU C library defines this for functions which it implements
16231 to always fail with ENOSYS. Some functions are actually named
16232 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016233#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000016234choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000016235#endif
16236
Skip Montanaro6dead952003-09-25 14:50:04 +000016237int
16238main ()
16239{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016240return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016241 ;
16242 return 0;
16243}
16244_ACEOF
16245rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016246if { (ac_try="$ac_link"
16247case "(($ac_try" in
16248 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16249 *) ac_try_echo=$ac_try;;
16250esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016251eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016252 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016253 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016254 grep -v '^ *+' conftest.er1 >conftest.err
16255 rm -f conftest.er1
16256 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016258 (exit $ac_status); } && {
16259 test -z "$ac_c_werror_flag" ||
16260 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016261 } && test -s conftest$ac_exeext &&
16262 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016263 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016264else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016265 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016266sed 's/^/| /' conftest.$ac_ext >&5
16267
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016268 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016269fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016270
16271rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016272 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016273fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016274ac_res=`eval echo '${'$as_ac_var'}'`
16275 { echo "$as_me:$LINENO: result: $ac_res" >&5
16276echo "${ECHO_T}$ac_res" >&6; }
16277if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016278 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016279#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016280_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016281
Guido van Rossume97ee181999-12-20 21:27:22 +000016282fi
Thomas Wouters3a584202000-08-05 23:28:51 +000016283done
Guido van Rossume97ee181999-12-20 21:27:22 +000016284
Michael W. Hudson54241132001-12-07 15:38:26 +000016285
Guido van Rossume97ee181999-12-20 21:27:22 +000016286# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
16287# loading of modules.
16288
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016289{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
16290echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000016291if test -z "$DYNLOADFILE"
16292then
16293 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000016294 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
16295 if test "$ac_cv_func_dlopen" = yes
16296 then DYNLOADFILE="dynload_shlib.o"
16297 else DYNLOADFILE="dynload_aix.o"
16298 fi
16299 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000016300 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016301 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
16302 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016303 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000016304 *)
16305 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
16306 # out any dynamic loading
16307 if test "$ac_cv_func_dlopen" = yes
16308 then DYNLOADFILE="dynload_shlib.o"
16309 else DYNLOADFILE="dynload_stub.o"
16310 fi
16311 ;;
16312 esac
16313fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016314{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
16315echo "${ECHO_T}$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000016316if test "$DYNLOADFILE" != "dynload_stub.o"
16317then
Martin v. Löwis11437992002-04-12 09:54:03 +000016318
16319cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016320#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016321_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016322
16323fi
16324
Neil Schemenauer4e425612001-06-19 15:44:15 +000016325# MACHDEP_OBJS can be set to platform-specific object files needed by Python
16326
Michael W. Hudson54241132001-12-07 15:38:26 +000016327
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016328{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
16329echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000016330if test -z "$MACHDEP_OBJS"
16331then
Jack Jansene578a632001-08-15 01:27:14 +000016332 MACHDEP_OBJS=$extra_machdep_objs
16333else
16334 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000016335fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016336{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
16337echo "${ECHO_T}MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000016338
Guido van Rossum627b2d71993-12-24 10:39:16 +000016339# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000016340
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
16378
16379
16380
16381
16382
16383
16384
16385
16386
16387
16388
16389
16390
16391
16392
16393
16394
16395
16396
16397
16398
16399
16400
16401
16402
16403
16404
16405
16406
16407
16408
16409
16410
Martin v. Löwisd6320502004-08-12 13:45:08 +000016411
Martin v. Löwisc3001752005-01-23 09:27:24 +000016412
16413
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016414
16415
Thomas Wouterscf297e42007-02-23 15:07:44 +000016416
16417
Gregory P. Smith25523d22007-09-03 16:44:55 +000016418
Christian Heimes4e30a842007-11-30 22:12:06 +000016419
Martin v. Löwis92fab752008-03-08 10:40:41 +000016420
Martin v. Löwis823725e2008-03-24 13:39:54 +000016421
16422
Benjamin Peterson965ce872009-04-05 21:24:58 +000016423
16424
16425
16426
Martin v. Löwis011e8422009-05-05 04:43:17 +000016427
Martin v. Löwis113a0852009-05-29 17:25:39 +000016428
Martin v. Löwis823725e2008-03-24 13:39:54 +000016429for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
16430 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000016431 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwisc3001752005-01-23 09:27:24 +000016432 getpriority getpwent getspnam getspent getsid getwd \
Martin v. Löwis011e8422009-05-05 04:43:17 +000016433 kill killpg lchmod lchown lstat mbrtowc mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000016434 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000016435 putenv readlink realpath \
Benjamin Peterson965ce872009-04-05 21:24:58 +000016436 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
16437 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000016438 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Gregory P. Smith25523d22007-09-03 16:44:55 +000016439 sigaction siginterrupt sigrelse strftime strlcpy \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000016440 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis113a0852009-05-29 17:25:39 +000016441 truncate uname unsetenv utimes waitpid wait3 wait4 \
16442 wcscoll wcsftime wcsxfrm _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000016443do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016444as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16445{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16446echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016447if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016448 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016449else
Martin v. Löwis11437992002-04-12 09:54:03 +000016450 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016451/* confdefs.h. */
16452_ACEOF
16453cat confdefs.h >>conftest.$ac_ext
16454cat >>conftest.$ac_ext <<_ACEOF
16455/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016456/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16457 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16458#define $ac_func innocuous_$ac_func
16459
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016460/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016461 which can conflict with char $ac_func (); below.
16462 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016463 <limits.h> exists even on freestanding compilers. */
16464
16465#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016466# include <limits.h>
16467#else
16468# include <assert.h>
16469#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016470
16471#undef $ac_func
16472
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016473/* Override any GCC internal prototype to avoid an error.
16474 Use char because int might match the return type of a GCC
16475 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016476#ifdef __cplusplus
16477extern "C"
16478#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016479char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000016480/* The GNU C library defines this for functions which it implements
16481 to always fail with ENOSYS. Some functions are actually named
16482 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016483#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000016484choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000016485#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016486
Skip Montanaro6dead952003-09-25 14:50:04 +000016487int
16488main ()
16489{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016490return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016491 ;
16492 return 0;
16493}
16494_ACEOF
16495rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016496if { (ac_try="$ac_link"
16497case "(($ac_try" in
16498 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16499 *) ac_try_echo=$ac_try;;
16500esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016501eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016502 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016503 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016504 grep -v '^ *+' conftest.er1 >conftest.err
16505 rm -f conftest.er1
16506 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016508 (exit $ac_status); } && {
16509 test -z "$ac_c_werror_flag" ||
16510 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016511 } && test -s conftest$ac_exeext &&
16512 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016513 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016514else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016515 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016516sed 's/^/| /' conftest.$ac_ext >&5
16517
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016518 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016519fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016520
16521rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016522 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016523fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016524ac_res=`eval echo '${'$as_ac_var'}'`
16525 { echo "$as_me:$LINENO: result: $ac_res" >&5
16526echo "${ECHO_T}$ac_res" >&6; }
16527if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016528 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016529#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016530_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000016531
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016532fi
16533done
16534
Michael W. Hudson54241132001-12-07 15:38:26 +000016535
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016536# For some functions, having a definition is not sufficient, since
16537# we want to take their address.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016538{ echo "$as_me:$LINENO: checking for chroot" >&5
16539echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016540cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016541/* confdefs.h. */
16542_ACEOF
16543cat confdefs.h >>conftest.$ac_ext
16544cat >>conftest.$ac_ext <<_ACEOF
16545/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016546#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016547int
16548main ()
16549{
16550void *x=chroot
16551 ;
16552 return 0;
16553}
16554_ACEOF
16555rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016556if { (ac_try="$ac_compile"
16557case "(($ac_try" in
16558 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16559 *) ac_try_echo=$ac_try;;
16560esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016561eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016562 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016563 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016564 grep -v '^ *+' conftest.er1 >conftest.err
16565 rm -f conftest.er1
16566 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016568 (exit $ac_status); } && {
16569 test -z "$ac_c_werror_flag" ||
16570 test ! -s conftest.err
16571 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016572
16573cat >>confdefs.h <<\_ACEOF
16574#define HAVE_CHROOT 1
16575_ACEOF
16576
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016577 { echo "$as_me:$LINENO: result: yes" >&5
16578echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016579else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016580 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016581sed 's/^/| /' conftest.$ac_ext >&5
16582
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016583 { echo "$as_me:$LINENO: result: no" >&5
16584echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016585
16586fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016587
16588rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016589{ echo "$as_me:$LINENO: checking for link" >&5
16590echo $ECHO_N "checking for link... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016591cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016592/* confdefs.h. */
16593_ACEOF
16594cat confdefs.h >>conftest.$ac_ext
16595cat >>conftest.$ac_ext <<_ACEOF
16596/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016597#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016598int
16599main ()
16600{
16601void *x=link
16602 ;
16603 return 0;
16604}
16605_ACEOF
16606rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016607if { (ac_try="$ac_compile"
16608case "(($ac_try" in
16609 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16610 *) ac_try_echo=$ac_try;;
16611esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016612eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016613 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016614 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016615 grep -v '^ *+' conftest.er1 >conftest.err
16616 rm -f conftest.er1
16617 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016619 (exit $ac_status); } && {
16620 test -z "$ac_c_werror_flag" ||
16621 test ! -s conftest.err
16622 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016623
16624cat >>confdefs.h <<\_ACEOF
16625#define HAVE_LINK 1
16626_ACEOF
16627
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016628 { echo "$as_me:$LINENO: result: yes" >&5
16629echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016630else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016631 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016632sed 's/^/| /' conftest.$ac_ext >&5
16633
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016634 { echo "$as_me:$LINENO: result: no" >&5
16635echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016636
16637fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016638
16639rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016640{ echo "$as_me:$LINENO: checking for symlink" >&5
16641echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016642cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016643/* confdefs.h. */
16644_ACEOF
16645cat confdefs.h >>conftest.$ac_ext
16646cat >>conftest.$ac_ext <<_ACEOF
16647/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016648#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016649int
16650main ()
16651{
16652void *x=symlink
16653 ;
16654 return 0;
16655}
16656_ACEOF
16657rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016658if { (ac_try="$ac_compile"
16659case "(($ac_try" in
16660 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16661 *) ac_try_echo=$ac_try;;
16662esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016663eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016664 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016665 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016666 grep -v '^ *+' conftest.er1 >conftest.err
16667 rm -f conftest.er1
16668 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016670 (exit $ac_status); } && {
16671 test -z "$ac_c_werror_flag" ||
16672 test ! -s conftest.err
16673 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016674
16675cat >>confdefs.h <<\_ACEOF
16676#define HAVE_SYMLINK 1
16677_ACEOF
16678
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016679 { echo "$as_me:$LINENO: result: yes" >&5
16680echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016681else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016682 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016683sed 's/^/| /' conftest.$ac_ext >&5
16684
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016685 { echo "$as_me:$LINENO: result: no" >&5
16686echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016687
16688fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016689
16690rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016691{ echo "$as_me:$LINENO: checking for fchdir" >&5
16692echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016693cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016694/* confdefs.h. */
16695_ACEOF
16696cat confdefs.h >>conftest.$ac_ext
16697cat >>conftest.$ac_ext <<_ACEOF
16698/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016699#include <unistd.h>
16700int
16701main ()
16702{
16703void *x=fchdir
16704 ;
16705 return 0;
16706}
16707_ACEOF
16708rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016709if { (ac_try="$ac_compile"
16710case "(($ac_try" in
16711 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16712 *) ac_try_echo=$ac_try;;
16713esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016714eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016715 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016716 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016717 grep -v '^ *+' conftest.er1 >conftest.err
16718 rm -f conftest.er1
16719 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016721 (exit $ac_status); } && {
16722 test -z "$ac_c_werror_flag" ||
16723 test ! -s conftest.err
16724 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016725
16726cat >>confdefs.h <<\_ACEOF
16727#define HAVE_FCHDIR 1
16728_ACEOF
16729
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016730 { echo "$as_me:$LINENO: result: yes" >&5
16731echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016732else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016733 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016734sed 's/^/| /' conftest.$ac_ext >&5
16735
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016736 { echo "$as_me:$LINENO: result: no" >&5
16737echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016738
16739fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016740
16741rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016742{ echo "$as_me:$LINENO: checking for fsync" >&5
16743echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016744cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016745/* confdefs.h. */
16746_ACEOF
16747cat confdefs.h >>conftest.$ac_ext
16748cat >>conftest.$ac_ext <<_ACEOF
16749/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016750#include <unistd.h>
16751int
16752main ()
16753{
16754void *x=fsync
16755 ;
16756 return 0;
16757}
16758_ACEOF
16759rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016760if { (ac_try="$ac_compile"
16761case "(($ac_try" in
16762 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16763 *) ac_try_echo=$ac_try;;
16764esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016765eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016766 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016767 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016768 grep -v '^ *+' conftest.er1 >conftest.err
16769 rm -f conftest.er1
16770 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016772 (exit $ac_status); } && {
16773 test -z "$ac_c_werror_flag" ||
16774 test ! -s conftest.err
16775 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016776
16777cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016778#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016779_ACEOF
16780
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016781 { echo "$as_me:$LINENO: result: yes" >&5
16782echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016783else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016784 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016785sed 's/^/| /' conftest.$ac_ext >&5
16786
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016787 { echo "$as_me:$LINENO: result: no" >&5
16788echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016789
16790fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016791
16792rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016793{ echo "$as_me:$LINENO: checking for fdatasync" >&5
16794echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016795cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016796/* confdefs.h. */
16797_ACEOF
16798cat confdefs.h >>conftest.$ac_ext
16799cat >>conftest.$ac_ext <<_ACEOF
16800/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016801#include <unistd.h>
16802int
16803main ()
16804{
16805void *x=fdatasync
16806 ;
16807 return 0;
16808}
16809_ACEOF
16810rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016811if { (ac_try="$ac_compile"
16812case "(($ac_try" in
16813 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16814 *) ac_try_echo=$ac_try;;
16815esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016816eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016817 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016818 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016819 grep -v '^ *+' conftest.er1 >conftest.err
16820 rm -f conftest.er1
16821 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016823 (exit $ac_status); } && {
16824 test -z "$ac_c_werror_flag" ||
16825 test ! -s conftest.err
16826 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016827
16828cat >>confdefs.h <<\_ACEOF
16829#define HAVE_FDATASYNC 1
16830_ACEOF
16831
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016832 { echo "$as_me:$LINENO: result: yes" >&5
16833echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016834else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016835 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016836sed 's/^/| /' conftest.$ac_ext >&5
16837
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016838 { echo "$as_me:$LINENO: result: no" >&5
16839echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016840
16841fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016842
16843rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016844{ echo "$as_me:$LINENO: checking for epoll" >&5
16845echo $ECHO_N "checking for epoll... $ECHO_C" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016846cat >conftest.$ac_ext <<_ACEOF
16847/* confdefs.h. */
16848_ACEOF
16849cat confdefs.h >>conftest.$ac_ext
16850cat >>conftest.$ac_ext <<_ACEOF
16851/* end confdefs.h. */
16852#include <sys/epoll.h>
16853int
16854main ()
16855{
16856void *x=epoll_create
16857 ;
16858 return 0;
16859}
16860_ACEOF
16861rm -f conftest.$ac_objext
16862if { (ac_try="$ac_compile"
16863case "(($ac_try" in
16864 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16865 *) ac_try_echo=$ac_try;;
16866esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016867eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016868 (eval "$ac_compile") 2>conftest.er1
16869 ac_status=$?
16870 grep -v '^ *+' conftest.er1 >conftest.err
16871 rm -f conftest.er1
16872 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016874 (exit $ac_status); } && {
16875 test -z "$ac_c_werror_flag" ||
16876 test ! -s conftest.err
16877 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016878
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016879cat >>confdefs.h <<\_ACEOF
16880#define HAVE_EPOLL 1
16881_ACEOF
16882
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016883 { echo "$as_me:$LINENO: result: yes" >&5
16884echo "${ECHO_T}yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016885else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016886 echo "$as_me: failed program was:" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016887sed 's/^/| /' conftest.$ac_ext >&5
16888
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016889 { echo "$as_me:$LINENO: result: no" >&5
16890echo "${ECHO_T}no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016891
16892fi
16893
16894rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016895{ echo "$as_me:$LINENO: checking for kqueue" >&5
16896echo $ECHO_N "checking for kqueue... $ECHO_C" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016897cat >conftest.$ac_ext <<_ACEOF
16898/* confdefs.h. */
16899_ACEOF
16900cat confdefs.h >>conftest.$ac_ext
16901cat >>conftest.$ac_ext <<_ACEOF
16902/* end confdefs.h. */
16903
16904#include <sys/types.h>
16905#include <sys/event.h>
16906
16907int
16908main ()
16909{
16910int x=kqueue()
16911 ;
16912 return 0;
16913}
16914_ACEOF
16915rm -f conftest.$ac_objext
16916if { (ac_try="$ac_compile"
16917case "(($ac_try" in
16918 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16919 *) ac_try_echo=$ac_try;;
16920esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016921eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016922 (eval "$ac_compile") 2>conftest.er1
16923 ac_status=$?
16924 grep -v '^ *+' conftest.er1 >conftest.err
16925 rm -f conftest.er1
16926 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016928 (exit $ac_status); } && {
16929 test -z "$ac_c_werror_flag" ||
16930 test ! -s conftest.err
16931 } && test -s conftest.$ac_objext; then
16932
16933cat >>confdefs.h <<\_ACEOF
16934#define HAVE_KQUEUE 1
16935_ACEOF
16936
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016937 { echo "$as_me:$LINENO: result: yes" >&5
16938echo "${ECHO_T}yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016939else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016940 echo "$as_me: failed program was:" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016941sed 's/^/| /' conftest.$ac_ext >&5
16942
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016943 { echo "$as_me:$LINENO: result: no" >&5
16944echo "${ECHO_T}no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016945
16946fi
16947
16948rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000016949# On some systems (eg. FreeBSD 5), we would find a definition of the
16950# functions ctermid_r, setgroups in the library, but no prototype
16951# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
16952# address to avoid compiler warnings and potential miscompilations
16953# because of the missing prototypes.
16954
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016955{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
16956echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016957cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016958/* confdefs.h. */
16959_ACEOF
16960cat confdefs.h >>conftest.$ac_ext
16961cat >>conftest.$ac_ext <<_ACEOF
16962/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000016963
16964#include "confdefs.h"
16965#include <stdio.h>
16966
Martin v. Löwisd5843682002-11-21 20:41:28 +000016967int
16968main ()
16969{
16970void* p = ctermid_r
16971 ;
16972 return 0;
16973}
16974_ACEOF
16975rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016976if { (ac_try="$ac_compile"
16977case "(($ac_try" in
16978 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16979 *) ac_try_echo=$ac_try;;
16980esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016981eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016982 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000016983 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016984 grep -v '^ *+' conftest.er1 >conftest.err
16985 rm -f conftest.er1
16986 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016988 (exit $ac_status); } && {
16989 test -z "$ac_c_werror_flag" ||
16990 test ! -s conftest.err
16991 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000016992
16993cat >>confdefs.h <<\_ACEOF
16994#define HAVE_CTERMID_R 1
16995_ACEOF
16996
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016997 { echo "$as_me:$LINENO: result: yes" >&5
16998echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016999else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017000 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017001sed 's/^/| /' conftest.$ac_ext >&5
17002
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017003 { echo "$as_me:$LINENO: result: no" >&5
17004echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017005
17006fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017007
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017008rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17009
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017010{ echo "$as_me:$LINENO: checking for flock" >&5
17011echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017012cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017013/* confdefs.h. */
17014_ACEOF
17015cat confdefs.h >>conftest.$ac_ext
17016cat >>conftest.$ac_ext <<_ACEOF
17017/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017018
17019#include "confdefs.h"
17020#include <sys/file.h>
17021
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017022int
17023main ()
17024{
17025void* p = flock
17026 ;
17027 return 0;
17028}
17029_ACEOF
17030rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017031if { (ac_try="$ac_compile"
17032case "(($ac_try" in
17033 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17034 *) ac_try_echo=$ac_try;;
17035esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017036eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017037 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017038 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017039 grep -v '^ *+' conftest.er1 >conftest.err
17040 rm -f conftest.er1
17041 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017043 (exit $ac_status); } && {
17044 test -z "$ac_c_werror_flag" ||
17045 test ! -s conftest.err
17046 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017047
17048cat >>confdefs.h <<\_ACEOF
17049#define HAVE_FLOCK 1
17050_ACEOF
17051
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017052 { echo "$as_me:$LINENO: result: yes" >&5
17053echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017054else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017055 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017056sed 's/^/| /' conftest.$ac_ext >&5
17057
Ronald Oussoren5644eb72009-09-20 20:10:02 +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 Wouters47b49bf2007-08-30 22:15:33 +000017063rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17064
Ronald Oussoren5644eb72009-09-20 20:10:02 +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 Wouters47b49bf2007-08-30 22:15:33 +000017086if { (ac_try="$ac_compile"
17087case "(($ac_try" in
17088 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17089 *) ac_try_echo=$ac_try;;
17090esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017091eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017092 (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
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017097 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017098 (exit $ac_status); } && {
17099 test -z "$ac_c_werror_flag" ||
17100 test ! -s conftest.err
17101 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017102
17103cat >>confdefs.h <<\_ACEOF
17104#define HAVE_GETPAGESIZE 1
17105_ACEOF
17106
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017107 { echo "$as_me:$LINENO: result: yes" >&5
17108echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017109else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017110 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017111sed 's/^/| /' conftest.$ac_ext >&5
17112
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017113 { echo "$as_me:$LINENO: result: no" >&5
17114echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017115
17116fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017117
17118rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017119
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017120for ac_prog in true
17121do
17122 # Extract the first word of "$ac_prog", so it can be a program name with args.
17123set dummy $ac_prog; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017124{ echo "$as_me:$LINENO: checking for $ac_word" >&5
17125echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017126if test "${ac_cv_prog_TRUE+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017127 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017128else
17129 if test -n "$TRUE"; then
17130 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
17131else
17132as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17133for as_dir in $PATH
17134do
17135 IFS=$as_save_IFS
17136 test -z "$as_dir" && as_dir=.
17137 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017138 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017139 ac_cv_prog_TRUE="$ac_prog"
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017140 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017141 break 2
17142 fi
17143done
17144done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017145IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017146
17147fi
17148fi
17149TRUE=$ac_cv_prog_TRUE
17150if test -n "$TRUE"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017151 { echo "$as_me:$LINENO: result: $TRUE" >&5
17152echo "${ECHO_T}$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017153else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017154 { echo "$as_me:$LINENO: result: no" >&5
17155echo "${ECHO_T}no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017156fi
17157
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017158
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017159 test -n "$TRUE" && break
17160done
17161test -n "$TRUE" || TRUE="/bin/true"
17162
17163
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017164{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
17165echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017166if test "${ac_cv_lib_c_inet_aton+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017167 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017168else
17169 ac_check_lib_save_LIBS=$LIBS
17170LIBS="-lc $LIBS"
17171cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017172/* confdefs.h. */
17173_ACEOF
17174cat confdefs.h >>conftest.$ac_ext
17175cat >>conftest.$ac_ext <<_ACEOF
17176/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017177
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017178/* Override any GCC internal prototype to avoid an error.
17179 Use char because int might match the return type of a GCC
17180 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017181#ifdef __cplusplus
17182extern "C"
17183#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017184char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017185int
17186main ()
17187{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017188return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017189 ;
17190 return 0;
17191}
17192_ACEOF
17193rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017194if { (ac_try="$ac_link"
17195case "(($ac_try" in
17196 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17197 *) ac_try_echo=$ac_try;;
17198esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017199eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017200 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017201 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017202 grep -v '^ *+' conftest.er1 >conftest.err
17203 rm -f conftest.er1
17204 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017206 (exit $ac_status); } && {
17207 test -z "$ac_c_werror_flag" ||
17208 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017209 } && test -s conftest$ac_exeext &&
17210 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017211 ac_cv_lib_c_inet_aton=yes
17212else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017213 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017214sed 's/^/| /' conftest.$ac_ext >&5
17215
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017216 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017217fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017218
17219rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017220 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017221LIBS=$ac_check_lib_save_LIBS
17222fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017223{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
17224echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
17225if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017226 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017227else
17228
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017229{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
17230echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017231if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017232 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017233else
17234 ac_check_lib_save_LIBS=$LIBS
17235LIBS="-lresolv $LIBS"
17236cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017237/* confdefs.h. */
17238_ACEOF
17239cat confdefs.h >>conftest.$ac_ext
17240cat >>conftest.$ac_ext <<_ACEOF
17241/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017242
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017243/* Override any GCC internal prototype to avoid an error.
17244 Use char because int might match the return type of a GCC
17245 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017246#ifdef __cplusplus
17247extern "C"
17248#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017249char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017250int
17251main ()
17252{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017253return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017254 ;
17255 return 0;
17256}
17257_ACEOF
17258rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017259if { (ac_try="$ac_link"
17260case "(($ac_try" in
17261 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17262 *) ac_try_echo=$ac_try;;
17263esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017264eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017265 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017266 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017267 grep -v '^ *+' conftest.er1 >conftest.err
17268 rm -f conftest.er1
17269 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017271 (exit $ac_status); } && {
17272 test -z "$ac_c_werror_flag" ||
17273 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017274 } && test -s conftest$ac_exeext &&
17275 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017276 ac_cv_lib_resolv_inet_aton=yes
17277else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017278 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017279sed 's/^/| /' conftest.$ac_ext >&5
17280
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017281 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017282fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017283
17284rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017285 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017286LIBS=$ac_check_lib_save_LIBS
17287fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017288{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
17289echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
17290if test $ac_cv_lib_resolv_inet_aton = yes; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017291 cat >>confdefs.h <<_ACEOF
17292#define HAVE_LIBRESOLV 1
17293_ACEOF
17294
17295 LIBS="-lresolv $LIBS"
17296
17297fi
17298
17299
17300fi
17301
17302
Christian Heimesd0764e22007-12-04 15:00:33 +000017303# On Tru64, chflags seems to be present, but calling it will
17304# exit Python
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017305{ echo "$as_me:$LINENO: checking for chflags" >&5
17306echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
Christian Heimesd0764e22007-12-04 15:00:33 +000017307if test "$cross_compiling" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017308 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
Christian Heimesd0764e22007-12-04 15:00:33 +000017309See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017310echo "$as_me: error: cannot run test program while cross compiling
Christian Heimesd0764e22007-12-04 15:00:33 +000017311See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017312 { (exit 1); exit 1; }; }
Christian Heimesd0764e22007-12-04 15:00:33 +000017313else
17314 cat >conftest.$ac_ext <<_ACEOF
17315/* confdefs.h. */
17316_ACEOF
17317cat confdefs.h >>conftest.$ac_ext
17318cat >>conftest.$ac_ext <<_ACEOF
17319/* end confdefs.h. */
17320
17321#include <sys/stat.h>
17322#include <unistd.h>
17323int main(int argc, char*argv[])
17324{
17325 if(chflags(argv[0], 0) != 0)
17326 return 1;
17327 return 0;
17328}
17329
17330_ACEOF
17331rm -f conftest$ac_exeext
17332if { (ac_try="$ac_link"
17333case "(($ac_try" in
17334 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17335 *) ac_try_echo=$ac_try;;
17336esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017337eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017338 (eval "$ac_link") 2>&5
17339 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017341 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17342 { (case "(($ac_try" in
17343 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17344 *) ac_try_echo=$ac_try;;
17345esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017346eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017347 (eval "$ac_try") 2>&5
17348 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017350 (exit $ac_status); }; }; then
17351
17352cat >>confdefs.h <<\_ACEOF
17353#define HAVE_CHFLAGS 1
17354_ACEOF
17355
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017356 { echo "$as_me:$LINENO: result: yes" >&5
17357echo "${ECHO_T}yes" >&6; }
Christian Heimesd0764e22007-12-04 15:00:33 +000017358else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017359 echo "$as_me: program exited with status $ac_status" >&5
17360echo "$as_me: failed program was:" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017361sed 's/^/| /' conftest.$ac_ext >&5
17362
17363( exit $ac_status )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017364{ echo "$as_me:$LINENO: result: no" >&5
17365echo "${ECHO_T}no" >&6; }
Christian Heimesd0764e22007-12-04 15:00:33 +000017366
17367fi
17368rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17369fi
17370
17371
17372
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017373{ echo "$as_me:$LINENO: checking for lchflags" >&5
17374echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
Christian Heimesd0764e22007-12-04 15:00:33 +000017375if test "$cross_compiling" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017376 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
Christian Heimesd0764e22007-12-04 15:00:33 +000017377See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017378echo "$as_me: error: cannot run test program while cross compiling
Christian Heimesd0764e22007-12-04 15:00:33 +000017379See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017380 { (exit 1); exit 1; }; }
Christian Heimesd0764e22007-12-04 15:00:33 +000017381else
17382 cat >conftest.$ac_ext <<_ACEOF
17383/* confdefs.h. */
17384_ACEOF
17385cat confdefs.h >>conftest.$ac_ext
17386cat >>conftest.$ac_ext <<_ACEOF
17387/* end confdefs.h. */
17388
17389#include <sys/stat.h>
17390#include <unistd.h>
17391int main(int argc, char*argv[])
17392{
17393 if(lchflags(argv[0], 0) != 0)
17394 return 1;
17395 return 0;
17396}
17397
17398_ACEOF
17399rm -f conftest$ac_exeext
17400if { (ac_try="$ac_link"
17401case "(($ac_try" in
17402 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17403 *) ac_try_echo=$ac_try;;
17404esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017405eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017406 (eval "$ac_link") 2>&5
17407 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017409 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17410 { (case "(($ac_try" in
17411 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17412 *) ac_try_echo=$ac_try;;
17413esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017414eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017415 (eval "$ac_try") 2>&5
17416 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017418 (exit $ac_status); }; }; then
17419
17420cat >>confdefs.h <<\_ACEOF
17421#define HAVE_LCHFLAGS 1
17422_ACEOF
17423
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017424 { echo "$as_me:$LINENO: result: yes" >&5
17425echo "${ECHO_T}yes" >&6; }
Christian Heimesd0764e22007-12-04 15:00:33 +000017426else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017427 echo "$as_me: program exited with status $ac_status" >&5
17428echo "$as_me: failed program was:" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017429sed 's/^/| /' conftest.$ac_ext >&5
17430
17431( exit $ac_status )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017432{ echo "$as_me:$LINENO: result: no" >&5
17433echo "${ECHO_T}no" >&6; }
Christian Heimesd0764e22007-12-04 15:00:33 +000017434
17435fi
17436rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17437fi
17438
17439
17440
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017441case $ac_sys_system/$ac_sys_release in
17442Darwin/*)
17443 _CUR_CFLAGS="${CFLAGS}"
17444 _CUR_LDFLAGS="${LDFLAGS}"
17445 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
17446 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
17447 ;;
17448esac
17449
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017450{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
17451echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017452if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017453 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017454else
17455 ac_check_lib_save_LIBS=$LIBS
17456LIBS="-lz $LIBS"
17457cat >conftest.$ac_ext <<_ACEOF
17458/* confdefs.h. */
17459_ACEOF
17460cat confdefs.h >>conftest.$ac_ext
17461cat >>conftest.$ac_ext <<_ACEOF
17462/* end confdefs.h. */
17463
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017464/* Override any GCC internal prototype to avoid an error.
17465 Use char because int might match the return type of a GCC
17466 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017467#ifdef __cplusplus
17468extern "C"
17469#endif
17470char inflateCopy ();
17471int
17472main ()
17473{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017474return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017475 ;
17476 return 0;
17477}
17478_ACEOF
17479rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017480if { (ac_try="$ac_link"
17481case "(($ac_try" in
17482 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17483 *) ac_try_echo=$ac_try;;
17484esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017485eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017486 (eval "$ac_link") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017487 ac_status=$?
17488 grep -v '^ *+' conftest.er1 >conftest.err
17489 rm -f conftest.er1
17490 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017492 (exit $ac_status); } && {
17493 test -z "$ac_c_werror_flag" ||
17494 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017495 } && test -s conftest$ac_exeext &&
17496 $as_test_x conftest$ac_exeext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017497 ac_cv_lib_z_inflateCopy=yes
17498else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017499 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017500sed 's/^/| /' conftest.$ac_ext >&5
17501
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017502 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017503fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017504
17505rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017506 conftest$ac_exeext conftest.$ac_ext
17507LIBS=$ac_check_lib_save_LIBS
17508fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017509{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
17510echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6; }
17511if test $ac_cv_lib_z_inflateCopy = yes; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017512
17513cat >>confdefs.h <<\_ACEOF
17514#define HAVE_ZLIB_COPY 1
17515_ACEOF
17516
17517fi
17518
17519
17520case $ac_sys_system/$ac_sys_release in
17521Darwin/*)
17522 CFLAGS="${_CUR_CFLAGS}"
17523 LDFLAGS="${_CUR_LDFLAGS}"
17524 ;;
17525esac
17526
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017527{ echo "$as_me:$LINENO: checking for hstrerror" >&5
17528echo $ECHO_N "checking for hstrerror... $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"
17537#include <netdb.h>
17538
Martin v. Löwise9416172003-05-03 10:12:45 +000017539int
17540main ()
17541{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017542void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000017543 ;
17544 return 0;
17545}
17546_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017547rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017548if { (ac_try="$ac_link"
17549case "(($ac_try" in
17550 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17551 *) ac_try_echo=$ac_try;;
17552esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017553eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017554 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000017555 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017556 grep -v '^ *+' conftest.er1 >conftest.err
17557 rm -f conftest.er1
17558 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017560 (exit $ac_status); } && {
17561 test -z "$ac_c_werror_flag" ||
17562 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017563 } && test -s conftest$ac_exeext &&
17564 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000017565
17566cat >>confdefs.h <<\_ACEOF
17567#define HAVE_HSTRERROR 1
17568_ACEOF
17569
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017570 { echo "$as_me:$LINENO: result: yes" >&5
17571echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017572else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017573 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017574sed 's/^/| /' conftest.$ac_ext >&5
17575
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017576 { echo "$as_me:$LINENO: result: no" >&5
17577echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017578
17579fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017580
17581rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017582 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000017583
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017584{ echo "$as_me:$LINENO: checking for inet_aton" >&5
17585echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017586cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017587/* confdefs.h. */
17588_ACEOF
17589cat confdefs.h >>conftest.$ac_ext
17590cat >>conftest.$ac_ext <<_ACEOF
17591/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000017592
17593#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000017594#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000017595#include <sys/socket.h>
17596#include <netinet/in.h>
17597#include <arpa/inet.h>
17598
Martin v. Löwise9416172003-05-03 10:12:45 +000017599int
17600main ()
17601{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017602void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000017603 ;
17604 return 0;
17605}
17606_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017607rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017608if { (ac_try="$ac_link"
17609case "(($ac_try" in
17610 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17611 *) ac_try_echo=$ac_try;;
17612esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017613eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017614 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000017615 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017616 grep -v '^ *+' conftest.er1 >conftest.err
17617 rm -f conftest.er1
17618 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017620 (exit $ac_status); } && {
17621 test -z "$ac_c_werror_flag" ||
17622 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017623 } && test -s conftest$ac_exeext &&
17624 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000017625
17626cat >>confdefs.h <<\_ACEOF
17627#define HAVE_INET_ATON 1
17628_ACEOF
17629
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017630 { echo "$as_me:$LINENO: result: yes" >&5
17631echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017632else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017633 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017634sed 's/^/| /' conftest.$ac_ext >&5
17635
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017636 { echo "$as_me:$LINENO: result: no" >&5
17637echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017638
17639fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017640
17641rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017642 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000017643
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017644{ echo "$as_me:$LINENO: checking for inet_pton" >&5
17645echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017646cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017647/* confdefs.h. */
17648_ACEOF
17649cat confdefs.h >>conftest.$ac_ext
17650cat >>conftest.$ac_ext <<_ACEOF
17651/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000017652
17653#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000017654#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000017655#include <sys/socket.h>
17656#include <netinet/in.h>
17657#include <arpa/inet.h>
17658
Martin v. Löwise9416172003-05-03 10:12:45 +000017659int
17660main ()
17661{
17662void* p = inet_pton
17663 ;
17664 return 0;
17665}
17666_ACEOF
17667rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017668if { (ac_try="$ac_compile"
17669case "(($ac_try" in
17670 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17671 *) ac_try_echo=$ac_try;;
17672esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017673eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017674 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000017675 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017676 grep -v '^ *+' conftest.er1 >conftest.err
17677 rm -f conftest.er1
17678 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017680 (exit $ac_status); } && {
17681 test -z "$ac_c_werror_flag" ||
17682 test ! -s conftest.err
17683 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000017684
17685cat >>confdefs.h <<\_ACEOF
17686#define HAVE_INET_PTON 1
17687_ACEOF
17688
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017689 { echo "$as_me:$LINENO: result: yes" >&5
17690echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017691else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017692 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017693sed 's/^/| /' conftest.$ac_ext >&5
17694
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017695 { echo "$as_me:$LINENO: result: no" >&5
17696echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017697
17698fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017699
17700rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000017701
Martin v. Löwisd6640d42003-07-06 09:29:52 +000017702# On some systems, setgroups is in unistd.h, on others, in grp.h
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017703{ echo "$as_me:$LINENO: checking for setgroups" >&5
17704echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017705cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017706/* confdefs.h. */
17707_ACEOF
17708cat confdefs.h >>conftest.$ac_ext
17709cat >>conftest.$ac_ext <<_ACEOF
17710/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000017711
17712#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000017713#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000017714#ifdef HAVE_GRP_H
17715#include <grp.h>
17716#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000017717
Martin v. Löwisd5843682002-11-21 20:41:28 +000017718int
17719main ()
17720{
17721void* p = setgroups
17722 ;
17723 return 0;
17724}
17725_ACEOF
17726rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017727if { (ac_try="$ac_compile"
17728case "(($ac_try" in
17729 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17730 *) ac_try_echo=$ac_try;;
17731esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017732eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017733 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000017734 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017735 grep -v '^ *+' conftest.er1 >conftest.err
17736 rm -f conftest.er1
17737 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017739 (exit $ac_status); } && {
17740 test -z "$ac_c_werror_flag" ||
17741 test ! -s conftest.err
17742 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000017743
17744cat >>confdefs.h <<\_ACEOF
17745#define HAVE_SETGROUPS 1
17746_ACEOF
17747
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017748 { echo "$as_me:$LINENO: result: yes" >&5
17749echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017750else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017751 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017752sed 's/^/| /' conftest.$ac_ext >&5
17753
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017754 { echo "$as_me:$LINENO: result: no" >&5
17755echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017756
17757fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017758
17759rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000017760
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017761# check for openpty and forkpty
17762
Martin v. Löwis11437992002-04-12 09:54:03 +000017763
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017764for ac_func in openpty
17765do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017766as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17767{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17768echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017769if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017770 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017771else
Martin v. Löwis11437992002-04-12 09:54:03 +000017772 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017773/* confdefs.h. */
17774_ACEOF
17775cat confdefs.h >>conftest.$ac_ext
17776cat >>conftest.$ac_ext <<_ACEOF
17777/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017778/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17779 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17780#define $ac_func innocuous_$ac_func
17781
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017782/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017783 which can conflict with char $ac_func (); below.
17784 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017785 <limits.h> exists even on freestanding compilers. */
17786
17787#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017788# include <limits.h>
17789#else
17790# include <assert.h>
17791#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017792
17793#undef $ac_func
17794
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017795/* Override any GCC internal prototype to avoid an error.
17796 Use char because int might match the return type of a GCC
17797 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017798#ifdef __cplusplus
17799extern "C"
17800#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017801char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017802/* The GNU C library defines this for functions which it implements
17803 to always fail with ENOSYS. Some functions are actually named
17804 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017805#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017806choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017807#endif
17808
Skip Montanaro6dead952003-09-25 14:50:04 +000017809int
17810main ()
17811{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017812return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017813 ;
17814 return 0;
17815}
17816_ACEOF
17817rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017818if { (ac_try="$ac_link"
17819case "(($ac_try" in
17820 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17821 *) ac_try_echo=$ac_try;;
17822esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017823eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017824 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017825 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017826 grep -v '^ *+' conftest.er1 >conftest.err
17827 rm -f conftest.er1
17828 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017829 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017830 (exit $ac_status); } && {
17831 test -z "$ac_c_werror_flag" ||
17832 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017833 } && test -s conftest$ac_exeext &&
17834 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017835 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017836else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017837 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017838sed 's/^/| /' conftest.$ac_ext >&5
17839
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017840 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017841fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017842
17843rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017844 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017845fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017846ac_res=`eval echo '${'$as_ac_var'}'`
17847 { echo "$as_me:$LINENO: result: $ac_res" >&5
17848echo "${ECHO_T}$ac_res" >&6; }
17849if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017850 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017851#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017852_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017853
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017854else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017855 { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
17856echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017857if test "${ac_cv_lib_util_openpty+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017858 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000017859else
Martin v. Löwis11437992002-04-12 09:54:03 +000017860 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000017861LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017862cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017863/* confdefs.h. */
17864_ACEOF
17865cat confdefs.h >>conftest.$ac_ext
17866cat >>conftest.$ac_ext <<_ACEOF
17867/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017868
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017869/* Override any GCC internal prototype to avoid an error.
17870 Use char because int might match the return type of a GCC
17871 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017872#ifdef __cplusplus
17873extern "C"
17874#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017875char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017876int
17877main ()
17878{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017879return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017880 ;
17881 return 0;
17882}
17883_ACEOF
17884rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017885if { (ac_try="$ac_link"
17886case "(($ac_try" in
17887 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17888 *) ac_try_echo=$ac_try;;
17889esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017890eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017891 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017892 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017893 grep -v '^ *+' conftest.er1 >conftest.err
17894 rm -f conftest.er1
17895 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017897 (exit $ac_status); } && {
17898 test -z "$ac_c_werror_flag" ||
17899 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017900 } && test -s conftest$ac_exeext &&
17901 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017902 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000017903else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017904 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017905sed 's/^/| /' conftest.$ac_ext >&5
17906
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017907 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000017908fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017909
17910rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017911 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017912LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000017913fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017914{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
17915echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
17916if test $ac_cv_lib_util_openpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017917 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017918#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017919_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017920 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017921else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017922 { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
17923echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017924if test "${ac_cv_lib_bsd_openpty+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017925 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017926else
17927 ac_check_lib_save_LIBS=$LIBS
17928LIBS="-lbsd $LIBS"
17929cat >conftest.$ac_ext <<_ACEOF
17930/* confdefs.h. */
17931_ACEOF
17932cat confdefs.h >>conftest.$ac_ext
17933cat >>conftest.$ac_ext <<_ACEOF
17934/* end confdefs.h. */
17935
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017936/* Override any GCC internal prototype to avoid an error.
17937 Use char because int might match the return type of a GCC
17938 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017939#ifdef __cplusplus
17940extern "C"
17941#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017942char openpty ();
17943int
17944main ()
17945{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017946return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017947 ;
17948 return 0;
17949}
17950_ACEOF
17951rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017952if { (ac_try="$ac_link"
17953case "(($ac_try" in
17954 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17955 *) ac_try_echo=$ac_try;;
17956esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017957eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017958 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017959 ac_status=$?
17960 grep -v '^ *+' conftest.er1 >conftest.err
17961 rm -f conftest.er1
17962 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017964 (exit $ac_status); } && {
17965 test -z "$ac_c_werror_flag" ||
17966 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017967 } && test -s conftest$ac_exeext &&
17968 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017969 ac_cv_lib_bsd_openpty=yes
17970else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017971 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017972sed 's/^/| /' conftest.$ac_ext >&5
17973
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017974 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000017975fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017976
17977rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017978 conftest$ac_exeext conftest.$ac_ext
17979LIBS=$ac_check_lib_save_LIBS
17980fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017981{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
17982echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
17983if test $ac_cv_lib_bsd_openpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017984 cat >>confdefs.h <<\_ACEOF
17985#define HAVE_OPENPTY 1
17986_ACEOF
17987 LIBS="$LIBS -lbsd"
17988fi
17989
17990
17991fi
17992
Fred Drake8cef4cf2000-06-28 16:40:38 +000017993
17994fi
17995done
17996
Martin v. Löwis11437992002-04-12 09:54:03 +000017997
Fred Drake8cef4cf2000-06-28 16:40:38 +000017998for ac_func in forkpty
17999do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018000as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18001{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18002echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018003if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018004 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000018005else
Martin v. Löwis11437992002-04-12 09:54:03 +000018006 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018007/* confdefs.h. */
18008_ACEOF
18009cat confdefs.h >>conftest.$ac_ext
18010cat >>conftest.$ac_ext <<_ACEOF
18011/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018012/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18013 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18014#define $ac_func innocuous_$ac_func
18015
Fred Drake8cef4cf2000-06-28 16:40:38 +000018016/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018017 which can conflict with char $ac_func (); below.
18018 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018019 <limits.h> exists even on freestanding compilers. */
18020
18021#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018022# include <limits.h>
18023#else
18024# include <assert.h>
18025#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018026
18027#undef $ac_func
18028
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018029/* Override any GCC internal prototype to avoid an error.
18030 Use char because int might match the return type of a GCC
18031 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018032#ifdef __cplusplus
18033extern "C"
18034#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018035char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000018036/* The GNU C library defines this for functions which it implements
18037 to always fail with ENOSYS. Some functions are actually named
18038 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018039#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000018040choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000018041#endif
18042
Skip Montanaro6dead952003-09-25 14:50:04 +000018043int
18044main ()
18045{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018046return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018047 ;
18048 return 0;
18049}
18050_ACEOF
18051rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018052if { (ac_try="$ac_link"
18053case "(($ac_try" in
18054 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18055 *) ac_try_echo=$ac_try;;
18056esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018057eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018058 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018059 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018060 grep -v '^ *+' conftest.er1 >conftest.err
18061 rm -f conftest.er1
18062 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018064 (exit $ac_status); } && {
18065 test -z "$ac_c_werror_flag" ||
18066 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018067 } && test -s conftest$ac_exeext &&
18068 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018069 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018070else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018071 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018072sed 's/^/| /' conftest.$ac_ext >&5
18073
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018074 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018075fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018076
18077rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018078 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018079fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018080ac_res=`eval echo '${'$as_ac_var'}'`
18081 { echo "$as_me:$LINENO: result: $ac_res" >&5
18082echo "${ECHO_T}$ac_res" >&6; }
18083if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018084 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018085#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018086_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018087
Fred Drake8cef4cf2000-06-28 16:40:38 +000018088else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018089 { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
18090echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018091if test "${ac_cv_lib_util_forkpty+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018092 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000018093else
Martin v. Löwis11437992002-04-12 09:54:03 +000018094 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018095LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000018096cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018097/* confdefs.h. */
18098_ACEOF
18099cat confdefs.h >>conftest.$ac_ext
18100cat >>conftest.$ac_ext <<_ACEOF
18101/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018102
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018103/* Override any GCC internal prototype to avoid an error.
18104 Use char because int might match the return type of a GCC
18105 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018106#ifdef __cplusplus
18107extern "C"
18108#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018109char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018110int
18111main ()
18112{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018113return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018114 ;
18115 return 0;
18116}
18117_ACEOF
18118rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018119if { (ac_try="$ac_link"
18120case "(($ac_try" in
18121 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18122 *) ac_try_echo=$ac_try;;
18123esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018124eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018125 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018126 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018127 grep -v '^ *+' conftest.er1 >conftest.err
18128 rm -f conftest.er1
18129 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018131 (exit $ac_status); } && {
18132 test -z "$ac_c_werror_flag" ||
18133 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018134 } && test -s conftest$ac_exeext &&
18135 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018136 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000018137else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018138 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018139sed 's/^/| /' conftest.$ac_ext >&5
18140
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018141 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018142fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018143
18144rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018145 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018146LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018147fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018148{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
18149echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
18150if test $ac_cv_lib_util_forkpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018151 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018152#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018153_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018154 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018155else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018156 { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
18157echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018158if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018159 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018160else
18161 ac_check_lib_save_LIBS=$LIBS
18162LIBS="-lbsd $LIBS"
18163cat >conftest.$ac_ext <<_ACEOF
18164/* confdefs.h. */
18165_ACEOF
18166cat confdefs.h >>conftest.$ac_ext
18167cat >>conftest.$ac_ext <<_ACEOF
18168/* end confdefs.h. */
18169
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018170/* Override any GCC internal prototype to avoid an error.
18171 Use char because int might match the return type of a GCC
18172 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018173#ifdef __cplusplus
18174extern "C"
18175#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018176char forkpty ();
18177int
18178main ()
18179{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018180return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018181 ;
18182 return 0;
18183}
18184_ACEOF
18185rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018186if { (ac_try="$ac_link"
18187case "(($ac_try" in
18188 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18189 *) ac_try_echo=$ac_try;;
18190esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018191eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018192 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018193 ac_status=$?
18194 grep -v '^ *+' conftest.er1 >conftest.err
18195 rm -f conftest.er1
18196 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018198 (exit $ac_status); } && {
18199 test -z "$ac_c_werror_flag" ||
18200 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018201 } && test -s conftest$ac_exeext &&
18202 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018203 ac_cv_lib_bsd_forkpty=yes
18204else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018205 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018206sed 's/^/| /' conftest.$ac_ext >&5
18207
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018208 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018209fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018210
18211rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018212 conftest$ac_exeext conftest.$ac_ext
18213LIBS=$ac_check_lib_save_LIBS
18214fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018215{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
18216echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
18217if test $ac_cv_lib_bsd_forkpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018218 cat >>confdefs.h <<\_ACEOF
18219#define HAVE_FORKPTY 1
18220_ACEOF
18221 LIBS="$LIBS -lbsd"
18222fi
18223
18224
18225fi
18226
Fred Drake8cef4cf2000-06-28 16:40:38 +000018227
18228fi
18229done
18230
Jack Jansendd19cf82001-12-06 22:36:17 +000018231
Christian Heimesb186d002008-03-18 15:15:01 +000018232# Stuff for expat.
18233
18234for ac_func in memmove
18235do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018236as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18237{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18238echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Christian Heimesb186d002008-03-18 15:15:01 +000018239if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018240 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimesb186d002008-03-18 15:15:01 +000018241else
18242 cat >conftest.$ac_ext <<_ACEOF
18243/* confdefs.h. */
18244_ACEOF
18245cat confdefs.h >>conftest.$ac_ext
18246cat >>conftest.$ac_ext <<_ACEOF
18247/* end confdefs.h. */
18248/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18249 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18250#define $ac_func innocuous_$ac_func
18251
18252/* System header to define __stub macros and hopefully few prototypes,
18253 which can conflict with char $ac_func (); below.
18254 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18255 <limits.h> exists even on freestanding compilers. */
18256
18257#ifdef __STDC__
18258# include <limits.h>
18259#else
18260# include <assert.h>
18261#endif
18262
18263#undef $ac_func
18264
18265/* Override any GCC internal prototype to avoid an error.
18266 Use char because int might match the return type of a GCC
18267 builtin and then its argument prototype would still apply. */
18268#ifdef __cplusplus
18269extern "C"
18270#endif
18271char $ac_func ();
18272/* The GNU C library defines this for functions which it implements
18273 to always fail with ENOSYS. Some functions are actually named
18274 something starting with __ and the normal name is an alias. */
18275#if defined __stub_$ac_func || defined __stub___$ac_func
18276choke me
18277#endif
18278
18279int
18280main ()
18281{
18282return $ac_func ();
18283 ;
18284 return 0;
18285}
18286_ACEOF
18287rm -f conftest.$ac_objext conftest$ac_exeext
18288if { (ac_try="$ac_link"
18289case "(($ac_try" in
18290 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18291 *) ac_try_echo=$ac_try;;
18292esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018293eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesb186d002008-03-18 15:15:01 +000018294 (eval "$ac_link") 2>conftest.er1
18295 ac_status=$?
18296 grep -v '^ *+' conftest.er1 >conftest.err
18297 rm -f conftest.er1
18298 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesb186d002008-03-18 15:15:01 +000018300 (exit $ac_status); } && {
18301 test -z "$ac_c_werror_flag" ||
18302 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018303 } && test -s conftest$ac_exeext &&
18304 $as_test_x conftest$ac_exeext; then
Christian Heimesb186d002008-03-18 15:15:01 +000018305 eval "$as_ac_var=yes"
18306else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018307 echo "$as_me: failed program was:" >&5
Christian Heimesb186d002008-03-18 15:15:01 +000018308sed 's/^/| /' conftest.$ac_ext >&5
18309
18310 eval "$as_ac_var=no"
18311fi
18312
18313rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18314 conftest$ac_exeext conftest.$ac_ext
18315fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018316ac_res=`eval echo '${'$as_ac_var'}'`
18317 { echo "$as_me:$LINENO: result: $ac_res" >&5
18318echo "${ECHO_T}$ac_res" >&6; }
18319if test `eval echo '${'$as_ac_var'}'` = yes; then
Christian Heimesb186d002008-03-18 15:15:01 +000018320 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018321#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimesb186d002008-03-18 15:15:01 +000018322_ACEOF
18323
18324fi
18325done
18326
18327
Michael W. Hudson54241132001-12-07 15:38:26 +000018328# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000018329
18330
18331
18332
18333
18334
Fred Drake8cef4cf2000-06-28 16:40:38 +000018335for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
18336do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018337as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18338{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18339echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018340if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018341 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018342else
Martin v. Löwis11437992002-04-12 09:54:03 +000018343 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018344/* confdefs.h. */
18345_ACEOF
18346cat confdefs.h >>conftest.$ac_ext
18347cat >>conftest.$ac_ext <<_ACEOF
18348/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018349/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18350 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18351#define $ac_func innocuous_$ac_func
18352
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018353/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018354 which can conflict with char $ac_func (); below.
18355 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018356 <limits.h> exists even on freestanding compilers. */
18357
18358#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018359# include <limits.h>
18360#else
18361# include <assert.h>
18362#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018363
18364#undef $ac_func
18365
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018366/* Override any GCC internal prototype to avoid an error.
18367 Use char because int might match the return type of a GCC
18368 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018369#ifdef __cplusplus
18370extern "C"
18371#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018372char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018373/* The GNU C library defines this for functions which it implements
18374 to always fail with ENOSYS. Some functions are actually named
18375 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018376#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018377choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018378#endif
18379
Skip Montanaro6dead952003-09-25 14:50:04 +000018380int
18381main ()
18382{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018383return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018384 ;
18385 return 0;
18386}
18387_ACEOF
18388rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018389if { (ac_try="$ac_link"
18390case "(($ac_try" in
18391 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18392 *) ac_try_echo=$ac_try;;
18393esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018394eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018395 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018396 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018397 grep -v '^ *+' conftest.er1 >conftest.err
18398 rm -f conftest.er1
18399 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018401 (exit $ac_status); } && {
18402 test -z "$ac_c_werror_flag" ||
18403 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018404 } && test -s conftest$ac_exeext &&
18405 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018406 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018407else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018408 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018409sed 's/^/| /' conftest.$ac_ext >&5
18410
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018411 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018412fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018413
18414rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018415 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018416fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018417ac_res=`eval echo '${'$as_ac_var'}'`
18418 { echo "$as_me:$LINENO: result: $ac_res" >&5
18419echo "${ECHO_T}$ac_res" >&6; }
18420if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018421 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018422#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018423_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000018424
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018425fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018426done
18427
Michael W. Hudson54241132001-12-07 15:38:26 +000018428
Martin v. Löwis11437992002-04-12 09:54:03 +000018429
18430
18431
Christian Heimesb186d002008-03-18 15:15:01 +000018432for ac_func in dup2 getcwd strdup
Thomas Wouters3a584202000-08-05 23:28:51 +000018433do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018434as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18435{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18436echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018437if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018438 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018439else
Martin v. Löwis11437992002-04-12 09:54:03 +000018440 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018441/* confdefs.h. */
18442_ACEOF
18443cat confdefs.h >>conftest.$ac_ext
18444cat >>conftest.$ac_ext <<_ACEOF
18445/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018446/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18447 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18448#define $ac_func innocuous_$ac_func
18449
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018450/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018451 which can conflict with char $ac_func (); below.
18452 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018453 <limits.h> exists even on freestanding compilers. */
18454
18455#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018456# include <limits.h>
18457#else
18458# include <assert.h>
18459#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018460
18461#undef $ac_func
18462
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018463/* Override any GCC internal prototype to avoid an error.
18464 Use char because int might match the return type of a GCC
18465 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018466#ifdef __cplusplus
18467extern "C"
18468#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018469char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000018470/* The GNU C library defines this for functions which it implements
18471 to always fail with ENOSYS. Some functions are actually named
18472 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018473#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000018474choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000018475#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018476
Skip Montanaro6dead952003-09-25 14:50:04 +000018477int
18478main ()
18479{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018480return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018481 ;
18482 return 0;
18483}
18484_ACEOF
18485rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018486if { (ac_try="$ac_link"
18487case "(($ac_try" in
18488 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18489 *) ac_try_echo=$ac_try;;
18490esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018491eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018492 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018493 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018494 grep -v '^ *+' conftest.er1 >conftest.err
18495 rm -f conftest.er1
18496 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018498 (exit $ac_status); } && {
18499 test -z "$ac_c_werror_flag" ||
18500 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018501 } && test -s conftest$ac_exeext &&
18502 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018503 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000018504else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018505 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018506sed 's/^/| /' conftest.$ac_ext >&5
18507
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018508 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000018509fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018510
18511rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018512 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000018513fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018514ac_res=`eval echo '${'$as_ac_var'}'`
18515 { echo "$as_me:$LINENO: result: $ac_res" >&5
18516echo "${ECHO_T}$ac_res" >&6; }
18517if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018518 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018519#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018520_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000018521
Martin v. Löwis1142de32002-03-29 16:28:31 +000018522else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018523 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000018524 *" $ac_func.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018525 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
18526 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000018527esac
18528
Martin v. Löwis1142de32002-03-29 16:28:31 +000018529fi
18530done
18531
18532
Martin v. Löwis11437992002-04-12 09:54:03 +000018533
Martin v. Löwis1142de32002-03-29 16:28:31 +000018534for ac_func in getpgrp
18535do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018536as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18537{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18538echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018539if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018540 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000018541else
Martin v. Löwis11437992002-04-12 09:54:03 +000018542 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018543/* confdefs.h. */
18544_ACEOF
18545cat confdefs.h >>conftest.$ac_ext
18546cat >>conftest.$ac_ext <<_ACEOF
18547/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018548/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18549 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18550#define $ac_func innocuous_$ac_func
18551
Martin v. Löwis1142de32002-03-29 16:28:31 +000018552/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018553 which can conflict with char $ac_func (); below.
18554 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018555 <limits.h> exists even on freestanding compilers. */
18556
18557#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018558# include <limits.h>
18559#else
18560# include <assert.h>
18561#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018562
18563#undef $ac_func
18564
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018565/* Override any GCC internal prototype to avoid an error.
18566 Use char because int might match the return type of a GCC
18567 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018568#ifdef __cplusplus
18569extern "C"
18570#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018571char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000018572/* The GNU C library defines this for functions which it implements
18573 to always fail with ENOSYS. Some functions are actually named
18574 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018575#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000018576choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000018577#endif
18578
Skip Montanaro6dead952003-09-25 14:50:04 +000018579int
18580main ()
18581{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018582return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018583 ;
18584 return 0;
18585}
18586_ACEOF
18587rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018588if { (ac_try="$ac_link"
18589case "(($ac_try" in
18590 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18591 *) ac_try_echo=$ac_try;;
18592esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018593eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018594 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018595 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018596 grep -v '^ *+' conftest.er1 >conftest.err
18597 rm -f conftest.er1
18598 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018599 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018600 (exit $ac_status); } && {
18601 test -z "$ac_c_werror_flag" ||
18602 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018603 } && test -s conftest$ac_exeext &&
18604 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018605 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018606else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018607 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018608sed 's/^/| /' conftest.$ac_ext >&5
18609
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018610 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018611fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018612
18613rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018614 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018615fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018616ac_res=`eval echo '${'$as_ac_var'}'`
18617 { echo "$as_me:$LINENO: result: $ac_res" >&5
18618echo "${ECHO_T}$ac_res" >&6; }
18619if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018620 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018621#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018622_ACEOF
18623 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018624/* confdefs.h. */
18625_ACEOF
18626cat confdefs.h >>conftest.$ac_ext
18627cat >>conftest.$ac_ext <<_ACEOF
18628/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018629#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018630int
18631main ()
18632{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018633getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000018634 ;
18635 return 0;
18636}
18637_ACEOF
18638rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018639if { (ac_try="$ac_compile"
18640case "(($ac_try" in
18641 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18642 *) ac_try_echo=$ac_try;;
18643esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018644eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018645 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018646 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018647 grep -v '^ *+' conftest.er1 >conftest.err
18648 rm -f conftest.er1
18649 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018651 (exit $ac_status); } && {
18652 test -z "$ac_c_werror_flag" ||
18653 test ! -s conftest.err
18654 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018655
18656cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018657#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018658_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000018659
Martin v. Löwis11437992002-04-12 09:54:03 +000018660
Guido van Rossumf78abae1997-01-21 22:02:36 +000018661else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018662 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018663sed 's/^/| /' conftest.$ac_ext >&5
18664
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018665
Guido van Rossum627b2d71993-12-24 10:39:16 +000018666fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018667
18668rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000018669
Guido van Rossum627b2d71993-12-24 10:39:16 +000018670fi
Thomas Wouters3a584202000-08-05 23:28:51 +000018671done
Guido van Rossum627b2d71993-12-24 10:39:16 +000018672
Jack Jansen150753c2003-03-29 22:07:47 +000018673
18674for ac_func in setpgrp
18675do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018676as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18677{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18678echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018679if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018680 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018681else
Martin v. Löwis11437992002-04-12 09:54:03 +000018682 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018683/* confdefs.h. */
18684_ACEOF
18685cat confdefs.h >>conftest.$ac_ext
18686cat >>conftest.$ac_ext <<_ACEOF
18687/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018688/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18689 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18690#define $ac_func innocuous_$ac_func
18691
Jack Jansen150753c2003-03-29 22:07:47 +000018692/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018693 which can conflict with char $ac_func (); below.
18694 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018695 <limits.h> exists even on freestanding compilers. */
18696
18697#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018698# include <limits.h>
18699#else
18700# include <assert.h>
18701#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018702
18703#undef $ac_func
18704
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018705/* Override any GCC internal prototype to avoid an error.
18706 Use char because int might match the return type of a GCC
18707 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000018708#ifdef __cplusplus
18709extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000018710#endif
Jack Jansen150753c2003-03-29 22:07:47 +000018711char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000018712/* The GNU C library defines this for functions which it implements
18713 to always fail with ENOSYS. Some functions are actually named
18714 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018715#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000018716choke me
Jack Jansen150753c2003-03-29 22:07:47 +000018717#endif
18718
Skip Montanaro6dead952003-09-25 14:50:04 +000018719int
18720main ()
18721{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018722return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018723 ;
18724 return 0;
18725}
18726_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000018727rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018728if { (ac_try="$ac_link"
18729case "(($ac_try" in
18730 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18731 *) ac_try_echo=$ac_try;;
18732esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018733eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018734 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018735 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018736 grep -v '^ *+' conftest.er1 >conftest.err
18737 rm -f conftest.er1
18738 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018740 (exit $ac_status); } && {
18741 test -z "$ac_c_werror_flag" ||
18742 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018743 } && test -s conftest$ac_exeext &&
18744 $as_test_x conftest$ac_exeext; then
Jack Jansen150753c2003-03-29 22:07:47 +000018745 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018746else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018747 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018748sed 's/^/| /' conftest.$ac_ext >&5
18749
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018750 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018751fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018752
18753rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018754 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018755fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018756ac_res=`eval echo '${'$as_ac_var'}'`
18757 { echo "$as_me:$LINENO: result: $ac_res" >&5
18758echo "${ECHO_T}$ac_res" >&6; }
18759if test `eval echo '${'$as_ac_var'}'` = yes; then
Jack Jansen150753c2003-03-29 22:07:47 +000018760 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018761#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Jack Jansen150753c2003-03-29 22:07:47 +000018762_ACEOF
18763 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018764/* confdefs.h. */
18765_ACEOF
18766cat confdefs.h >>conftest.$ac_ext
18767cat >>conftest.$ac_ext <<_ACEOF
18768/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000018769#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000018770int
18771main ()
18772{
18773setpgrp(0,0);
18774 ;
18775 return 0;
18776}
18777_ACEOF
18778rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018779if { (ac_try="$ac_compile"
18780case "(($ac_try" in
18781 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18782 *) ac_try_echo=$ac_try;;
18783esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018784eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018785 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000018786 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018787 grep -v '^ *+' conftest.er1 >conftest.err
18788 rm -f conftest.er1
18789 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018791 (exit $ac_status); } && {
18792 test -z "$ac_c_werror_flag" ||
18793 test ! -s conftest.err
18794 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018795
18796cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000018797#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018798_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000018799
Jack Jansen150753c2003-03-29 22:07:47 +000018800
18801else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018802 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018803sed 's/^/| /' conftest.$ac_ext >&5
18804
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018805
Guido van Rossum8eee56f1994-10-20 22:18:37 +000018806fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018807
18808rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000018809
18810fi
18811done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000018812
Martin v. Löwis11437992002-04-12 09:54:03 +000018813
Thomas Wouters3a584202000-08-05 23:28:51 +000018814for ac_func in gettimeofday
18815do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018816as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18817{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18818echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018819if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018820 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018821else
Martin v. Löwis11437992002-04-12 09:54:03 +000018822 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018823/* confdefs.h. */
18824_ACEOF
18825cat confdefs.h >>conftest.$ac_ext
18826cat >>conftest.$ac_ext <<_ACEOF
18827/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018828/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18829 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18830#define $ac_func innocuous_$ac_func
18831
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018832/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018833 which can conflict with char $ac_func (); below.
18834 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018835 <limits.h> exists even on freestanding compilers. */
18836
18837#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018838# include <limits.h>
18839#else
18840# include <assert.h>
18841#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018842
18843#undef $ac_func
18844
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018845/* Override any GCC internal prototype to avoid an error.
18846 Use char because int might match the return type of a GCC
18847 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018848#ifdef __cplusplus
18849extern "C"
18850#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018851char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018852/* The GNU C library defines this for functions which it implements
18853 to always fail with ENOSYS. Some functions are actually named
18854 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018855#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018856choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018857#endif
18858
Skip Montanaro6dead952003-09-25 14:50:04 +000018859int
18860main ()
18861{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018862return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018863 ;
18864 return 0;
18865}
18866_ACEOF
18867rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018868if { (ac_try="$ac_link"
18869case "(($ac_try" in
18870 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18871 *) ac_try_echo=$ac_try;;
18872esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018873eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018874 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018875 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018876 grep -v '^ *+' conftest.er1 >conftest.err
18877 rm -f conftest.er1
18878 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018880 (exit $ac_status); } && {
18881 test -z "$ac_c_werror_flag" ||
18882 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018883 } && test -s conftest$ac_exeext &&
18884 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018885 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018886else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018887 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018888sed 's/^/| /' conftest.$ac_ext >&5
18889
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018890 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018891fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018892
18893rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018894 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018895fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018896ac_res=`eval echo '${'$as_ac_var'}'`
18897 { echo "$as_me:$LINENO: result: $ac_res" >&5
18898echo "${ECHO_T}$ac_res" >&6; }
18899if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018900 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018901#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018902_ACEOF
18903 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018904/* confdefs.h. */
18905_ACEOF
18906cat confdefs.h >>conftest.$ac_ext
18907cat >>conftest.$ac_ext <<_ACEOF
18908/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000018909#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018910int
18911main ()
18912{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018913gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000018914 ;
18915 return 0;
18916}
18917_ACEOF
18918rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018919if { (ac_try="$ac_compile"
18920case "(($ac_try" in
18921 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18922 *) ac_try_echo=$ac_try;;
18923esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018924eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018925 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018926 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018927 grep -v '^ *+' conftest.er1 >conftest.err
18928 rm -f conftest.er1
18929 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018931 (exit $ac_status); } && {
18932 test -z "$ac_c_werror_flag" ||
18933 test ! -s conftest.err
18934 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000018935 :
18936else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018937 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018938sed 's/^/| /' conftest.$ac_ext >&5
18939
Martin v. Löwis11437992002-04-12 09:54:03 +000018940
18941cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018942#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018943_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000018944
Martin v. Löwis11437992002-04-12 09:54:03 +000018945
Guido van Rossum627b2d71993-12-24 10:39:16 +000018946fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018947
18948rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000018949
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018950fi
Thomas Wouters3a584202000-08-05 23:28:51 +000018951done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018952
Michael W. Hudson54241132001-12-07 15:38:26 +000018953
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018954{ echo "$as_me:$LINENO: checking for major" >&5
18955echo $ECHO_N "checking for major... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018956cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018957/* confdefs.h. */
18958_ACEOF
18959cat confdefs.h >>conftest.$ac_ext
18960cat >>conftest.$ac_ext <<_ACEOF
18961/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018962
Neal Norwitz6eb37f02003-02-23 23:28:15 +000018963#if defined(MAJOR_IN_MKDEV)
18964#include <sys/mkdev.h>
18965#elif defined(MAJOR_IN_SYSMACROS)
18966#include <sys/sysmacros.h>
18967#else
18968#include <sys/types.h>
18969#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018970
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018971int
18972main ()
18973{
18974
18975 makedev(major(0),minor(0));
18976
18977 ;
18978 return 0;
18979}
18980_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000018981rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018982if { (ac_try="$ac_link"
18983case "(($ac_try" in
18984 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18985 *) ac_try_echo=$ac_try;;
18986esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018987eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018988 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018989 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018990 grep -v '^ *+' conftest.er1 >conftest.err
18991 rm -f conftest.er1
18992 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018994 (exit $ac_status); } && {
18995 test -z "$ac_c_werror_flag" ||
18996 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018997 } && test -s conftest$ac_exeext &&
18998 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018999
19000
19001cat >>confdefs.h <<\_ACEOF
19002#define HAVE_DEVICE_MACROS 1
19003_ACEOF
19004
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019005 { echo "$as_me:$LINENO: result: yes" >&5
19006echo "${ECHO_T}yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019007
19008else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019009 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019010sed 's/^/| /' conftest.$ac_ext >&5
19011
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019012
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019013 { echo "$as_me:$LINENO: result: no" >&5
19014echo "${ECHO_T}no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019015
19016fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019017
19018rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019019 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019020
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019021# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000019022# for [no]getaddrinfo in netdb.h.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019023{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
19024echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019025cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019026/* confdefs.h. */
19027_ACEOF
19028cat confdefs.h >>conftest.$ac_ext
19029cat >>conftest.$ac_ext <<_ACEOF
19030/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019031
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000019032#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019033#include <sys/socket.h>
19034#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000019035#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019036
Martin v. Löwis11437992002-04-12 09:54:03 +000019037int
19038main ()
19039{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019040
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019041getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019042
Martin v. Löwis11437992002-04-12 09:54:03 +000019043 ;
19044 return 0;
19045}
19046_ACEOF
19047rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019048if { (ac_try="$ac_link"
19049case "(($ac_try" in
19050 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19051 *) ac_try_echo=$ac_try;;
19052esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019053eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019054 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019055 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019056 grep -v '^ *+' conftest.er1 >conftest.err
19057 rm -f conftest.er1
19058 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019060 (exit $ac_status); } && {
19061 test -z "$ac_c_werror_flag" ||
19062 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019063 } && test -s conftest$ac_exeext &&
19064 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019065
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019066{ echo "$as_me:$LINENO: result: yes" >&5
19067echo "${ECHO_T}yes" >&6; }
19068{ echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
19069echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019070if test "$cross_compiling" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019071 { echo "$as_me:$LINENO: result: buggy" >&5
19072echo "${ECHO_T}buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019073buggygetaddrinfo=yes
19074else
Martin v. Löwis11437992002-04-12 09:54:03 +000019075 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019076/* confdefs.h. */
19077_ACEOF
19078cat confdefs.h >>conftest.$ac_ext
19079cat >>conftest.$ac_ext <<_ACEOF
19080/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019081
19082#include <sys/types.h>
19083#include <netdb.h>
19084#include <string.h>
19085#include <sys/socket.h>
19086#include <netinet/in.h>
19087
19088main()
19089{
19090 int passive, gaierr, inet4 = 0, inet6 = 0;
19091 struct addrinfo hints, *ai, *aitop;
19092 char straddr[INET6_ADDRSTRLEN], strport[16];
19093
19094 for (passive = 0; passive <= 1; passive++) {
19095 memset(&hints, 0, sizeof(hints));
19096 hints.ai_family = AF_UNSPEC;
19097 hints.ai_flags = passive ? AI_PASSIVE : 0;
19098 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000019099 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019100 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
19101 (void)gai_strerror(gaierr);
19102 goto bad;
19103 }
19104 for (ai = aitop; ai; ai = ai->ai_next) {
19105 if (ai->ai_addr == NULL ||
19106 ai->ai_addrlen == 0 ||
19107 getnameinfo(ai->ai_addr, ai->ai_addrlen,
19108 straddr, sizeof(straddr), strport, sizeof(strport),
19109 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
19110 goto bad;
19111 }
19112 switch (ai->ai_family) {
19113 case AF_INET:
19114 if (strcmp(strport, "54321") != 0) {
19115 goto bad;
19116 }
19117 if (passive) {
19118 if (strcmp(straddr, "0.0.0.0") != 0) {
19119 goto bad;
19120 }
19121 } else {
19122 if (strcmp(straddr, "127.0.0.1") != 0) {
19123 goto bad;
19124 }
19125 }
19126 inet4++;
19127 break;
19128 case AF_INET6:
19129 if (strcmp(strport, "54321") != 0) {
19130 goto bad;
19131 }
19132 if (passive) {
19133 if (strcmp(straddr, "::") != 0) {
19134 goto bad;
19135 }
19136 } else {
19137 if (strcmp(straddr, "::1") != 0) {
19138 goto bad;
19139 }
19140 }
19141 inet6++;
19142 break;
19143 case AF_UNSPEC:
19144 goto bad;
19145 break;
19146 default:
19147 /* another family support? */
19148 break;
19149 }
19150 }
19151 }
19152
19153 if (!(inet4 == 0 || inet4 == 2))
19154 goto bad;
19155 if (!(inet6 == 0 || inet6 == 2))
19156 goto bad;
19157
19158 if (aitop)
19159 freeaddrinfo(aitop);
19160 exit(0);
19161
19162 bad:
19163 if (aitop)
19164 freeaddrinfo(aitop);
19165 exit(1);
19166}
19167
Martin v. Löwis11437992002-04-12 09:54:03 +000019168_ACEOF
19169rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019170if { (ac_try="$ac_link"
19171case "(($ac_try" in
19172 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19173 *) ac_try_echo=$ac_try;;
19174esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019175eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019176 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019177 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019179 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019180 { (case "(($ac_try" in
19181 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19182 *) ac_try_echo=$ac_try;;
19183esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019184eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019185 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019186 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019188 (exit $ac_status); }; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019189 { echo "$as_me:$LINENO: result: good" >&5
19190echo "${ECHO_T}good" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019191buggygetaddrinfo=no
19192else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019193 echo "$as_me: program exited with status $ac_status" >&5
19194echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019195sed 's/^/| /' conftest.$ac_ext >&5
19196
Martin v. Löwis11437992002-04-12 09:54:03 +000019197( exit $ac_status )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019198{ echo "$as_me:$LINENO: result: buggy" >&5
19199echo "${ECHO_T}buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019200buggygetaddrinfo=yes
19201fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019202rm -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 +000019203fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019204
19205
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019206else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019207 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019208sed 's/^/| /' conftest.$ac_ext >&5
19209
Martin v. Löwis11437992002-04-12 09:54:03 +000019210
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019211{ echo "$as_me:$LINENO: result: no" >&5
19212echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019213buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019214
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019215fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019216
19217rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019218 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019219
19220if test "$buggygetaddrinfo" = "yes"; then
19221 if test "$ipv6" = "yes"; then
19222 echo 'Fatal: You must get working getaddrinfo() function.'
19223 echo ' or you can specify "--disable-ipv6"'.
19224 exit 1
19225 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019226else
Martin v. Löwis11437992002-04-12 09:54:03 +000019227
19228cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019229#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019230_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019231
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019232fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019233
Jack Jansen9a66b6d2001-08-08 13:56:14 +000019234for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019235do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019236as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19237{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19238echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019239if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019240 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019241else
Martin v. Löwis11437992002-04-12 09:54:03 +000019242 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019243/* confdefs.h. */
19244_ACEOF
19245cat confdefs.h >>conftest.$ac_ext
19246cat >>conftest.$ac_ext <<_ACEOF
19247/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019248/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19249 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19250#define $ac_func innocuous_$ac_func
19251
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019252/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019253 which can conflict with char $ac_func (); below.
19254 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019255 <limits.h> exists even on freestanding compilers. */
19256
19257#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019258# include <limits.h>
19259#else
19260# include <assert.h>
19261#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019262
19263#undef $ac_func
19264
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019265/* Override any GCC internal prototype to avoid an error.
19266 Use char because int might match the return type of a GCC
19267 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019268#ifdef __cplusplus
19269extern "C"
19270#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019271char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019272/* The GNU C library defines this for functions which it implements
19273 to always fail with ENOSYS. Some functions are actually named
19274 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019275#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019276choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019277#endif
19278
Skip Montanaro6dead952003-09-25 14:50:04 +000019279int
19280main ()
19281{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019282return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019283 ;
19284 return 0;
19285}
19286_ACEOF
19287rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019288if { (ac_try="$ac_link"
19289case "(($ac_try" in
19290 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19291 *) ac_try_echo=$ac_try;;
19292esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019293eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019294 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019295 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019296 grep -v '^ *+' conftest.er1 >conftest.err
19297 rm -f conftest.er1
19298 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019300 (exit $ac_status); } && {
19301 test -z "$ac_c_werror_flag" ||
19302 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019303 } && test -s conftest$ac_exeext &&
19304 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019305 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019306else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019307 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019308sed 's/^/| /' conftest.$ac_ext >&5
19309
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019310 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019311fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019312
19313rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019314 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019315fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019316ac_res=`eval echo '${'$as_ac_var'}'`
19317 { echo "$as_me:$LINENO: result: $ac_res" >&5
19318echo "${ECHO_T}$ac_res" >&6; }
19319if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019320 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019321#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019322_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019323
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019324fi
19325done
19326
Michael W. Hudson54241132001-12-07 15:38:26 +000019327
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019328# checks for structures
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019329{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
19330echo $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 +000019331if test "${ac_cv_header_time+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019332 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019333else
Martin v. Löwis11437992002-04-12 09:54:03 +000019334 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019335/* confdefs.h. */
19336_ACEOF
19337cat confdefs.h >>conftest.$ac_ext
19338cat >>conftest.$ac_ext <<_ACEOF
19339/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019340#include <sys/types.h>
19341#include <sys/time.h>
19342#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019343
Martin v. Löwis11437992002-04-12 09:54:03 +000019344int
19345main ()
19346{
19347if ((struct tm *) 0)
19348return 0;
19349 ;
19350 return 0;
19351}
19352_ACEOF
19353rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019354if { (ac_try="$ac_compile"
19355case "(($ac_try" in
19356 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19357 *) ac_try_echo=$ac_try;;
19358esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019359eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019360 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019361 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019362 grep -v '^ *+' conftest.er1 >conftest.err
19363 rm -f conftest.er1
19364 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019366 (exit $ac_status); } && {
19367 test -z "$ac_c_werror_flag" ||
19368 test ! -s conftest.err
19369 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019370 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000019371else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019372 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019373sed 's/^/| /' conftest.$ac_ext >&5
19374
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019375 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000019376fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019377
19378rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019379fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019380{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
19381echo "${ECHO_T}$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019382if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019383
19384cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019385#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019386_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019387
19388fi
19389
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019390{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
19391echo $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 +000019392if test "${ac_cv_struct_tm+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019393 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019394else
Martin v. Löwis11437992002-04-12 09:54:03 +000019395 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019396/* confdefs.h. */
19397_ACEOF
19398cat confdefs.h >>conftest.$ac_ext
19399cat >>conftest.$ac_ext <<_ACEOF
19400/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019401#include <sys/types.h>
19402#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019403
Martin v. Löwis11437992002-04-12 09:54:03 +000019404int
19405main ()
19406{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019407struct tm tm;
19408 int *p = &tm.tm_sec;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019409 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000019410 ;
19411 return 0;
19412}
19413_ACEOF
19414rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019415if { (ac_try="$ac_compile"
19416case "(($ac_try" in
19417 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19418 *) ac_try_echo=$ac_try;;
19419esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019420eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019421 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019422 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019423 grep -v '^ *+' conftest.er1 >conftest.err
19424 rm -f conftest.er1
19425 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019427 (exit $ac_status); } && {
19428 test -z "$ac_c_werror_flag" ||
19429 test ! -s conftest.err
19430 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019431 ac_cv_struct_tm=time.h
19432else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019433 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019434sed 's/^/| /' conftest.$ac_ext >&5
19435
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019436 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019437fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019438
19439rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019440fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019441{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
19442echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019443if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019444
19445cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019446#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019447_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019448
19449fi
19450
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019451{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
19452echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019453if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019454 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019455else
Martin v. Löwis11437992002-04-12 09:54:03 +000019456 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019457/* confdefs.h. */
19458_ACEOF
19459cat confdefs.h >>conftest.$ac_ext
19460cat >>conftest.$ac_ext <<_ACEOF
19461/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019462#include <sys/types.h>
19463#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000019464
19465
Martin v. Löwis11437992002-04-12 09:54:03 +000019466int
19467main ()
19468{
19469static struct tm ac_aggr;
19470if (ac_aggr.tm_zone)
19471return 0;
19472 ;
19473 return 0;
19474}
19475_ACEOF
19476rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019477if { (ac_try="$ac_compile"
19478case "(($ac_try" in
19479 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19480 *) ac_try_echo=$ac_try;;
19481esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019482eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019483 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019484 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019485 grep -v '^ *+' conftest.er1 >conftest.err
19486 rm -f conftest.er1
19487 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019489 (exit $ac_status); } && {
19490 test -z "$ac_c_werror_flag" ||
19491 test ! -s conftest.err
19492 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019493 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000019494else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019495 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019496sed 's/^/| /' conftest.$ac_ext >&5
19497
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019498 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019499/* confdefs.h. */
19500_ACEOF
19501cat confdefs.h >>conftest.$ac_ext
19502cat >>conftest.$ac_ext <<_ACEOF
19503/* end confdefs.h. */
19504#include <sys/types.h>
19505#include <$ac_cv_struct_tm>
19506
19507
19508int
19509main ()
19510{
19511static struct tm ac_aggr;
19512if (sizeof ac_aggr.tm_zone)
19513return 0;
19514 ;
19515 return 0;
19516}
19517_ACEOF
19518rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019519if { (ac_try="$ac_compile"
19520case "(($ac_try" in
19521 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19522 *) ac_try_echo=$ac_try;;
19523esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019524eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019525 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000019526 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019527 grep -v '^ *+' conftest.er1 >conftest.err
19528 rm -f conftest.er1
19529 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019531 (exit $ac_status); } && {
19532 test -z "$ac_c_werror_flag" ||
19533 test ! -s conftest.err
19534 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019535 ac_cv_member_struct_tm_tm_zone=yes
19536else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019537 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019538sed 's/^/| /' conftest.$ac_ext >&5
19539
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019540 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000019541fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019542
19543rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019544fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019545
19546rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000019547fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019548{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
19549echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
19550if test $ac_cv_member_struct_tm_tm_zone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019551
19552cat >>confdefs.h <<_ACEOF
19553#define HAVE_STRUCT_TM_TM_ZONE 1
19554_ACEOF
19555
19556
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019557fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000019558
Martin v. Löwis11437992002-04-12 09:54:03 +000019559if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
19560
19561cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019562#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019563_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019564
19565else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019566 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
19567echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019568if test "${ac_cv_have_decl_tzname+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019569 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019570else
19571 cat >conftest.$ac_ext <<_ACEOF
19572/* confdefs.h. */
19573_ACEOF
19574cat confdefs.h >>conftest.$ac_ext
19575cat >>conftest.$ac_ext <<_ACEOF
19576/* end confdefs.h. */
19577#include <time.h>
19578
19579int
19580main ()
19581{
19582#ifndef tzname
19583 (void) tzname;
19584#endif
19585
19586 ;
19587 return 0;
19588}
19589_ACEOF
19590rm -f conftest.$ac_objext
19591if { (ac_try="$ac_compile"
19592case "(($ac_try" in
19593 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19594 *) ac_try_echo=$ac_try;;
19595esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019596eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019597 (eval "$ac_compile") 2>conftest.er1
19598 ac_status=$?
19599 grep -v '^ *+' conftest.er1 >conftest.err
19600 rm -f conftest.er1
19601 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019603 (exit $ac_status); } && {
19604 test -z "$ac_c_werror_flag" ||
19605 test ! -s conftest.err
19606 } && test -s conftest.$ac_objext; then
19607 ac_cv_have_decl_tzname=yes
19608else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019609 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019610sed 's/^/| /' conftest.$ac_ext >&5
19611
19612 ac_cv_have_decl_tzname=no
19613fi
19614
19615rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19616fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019617{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
19618echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
19619if test $ac_cv_have_decl_tzname = yes; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019620
19621cat >>confdefs.h <<_ACEOF
19622#define HAVE_DECL_TZNAME 1
19623_ACEOF
19624
19625
19626else
19627 cat >>confdefs.h <<_ACEOF
19628#define HAVE_DECL_TZNAME 0
19629_ACEOF
19630
19631
19632fi
19633
19634
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019635 { echo "$as_me:$LINENO: checking for tzname" >&5
19636echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019637if test "${ac_cv_var_tzname+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019638 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019639else
Martin v. Löwis11437992002-04-12 09:54:03 +000019640 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019641/* confdefs.h. */
19642_ACEOF
19643cat confdefs.h >>conftest.$ac_ext
19644cat >>conftest.$ac_ext <<_ACEOF
19645/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000019646#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019647#if !HAVE_DECL_TZNAME
19648extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000019649#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019650
Martin v. Löwis11437992002-04-12 09:54:03 +000019651int
19652main ()
19653{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019654return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000019655 ;
19656 return 0;
19657}
19658_ACEOF
19659rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019660if { (ac_try="$ac_link"
19661case "(($ac_try" in
19662 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19663 *) ac_try_echo=$ac_try;;
19664esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019665eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019666 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019667 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019668 grep -v '^ *+' conftest.er1 >conftest.err
19669 rm -f conftest.er1
19670 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019672 (exit $ac_status); } && {
19673 test -z "$ac_c_werror_flag" ||
19674 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019675 } && test -s conftest$ac_exeext &&
19676 $as_test_x conftest$ac_exeext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019677 ac_cv_var_tzname=yes
19678else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019679 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019680sed 's/^/| /' conftest.$ac_ext >&5
19681
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019682 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000019683fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019684
19685rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019686 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000019687fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019688{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
19689echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019690 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019691
19692cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019693#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019694_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019695
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019696 fi
19697fi
19698
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019699{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
19700echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019701if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019702 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000019703else
19704 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019705/* confdefs.h. */
19706_ACEOF
19707cat confdefs.h >>conftest.$ac_ext
19708cat >>conftest.$ac_ext <<_ACEOF
19709/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019710$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000019711int
19712main ()
19713{
19714static struct stat ac_aggr;
19715if (ac_aggr.st_rdev)
19716return 0;
19717 ;
19718 return 0;
19719}
19720_ACEOF
19721rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019722if { (ac_try="$ac_compile"
19723case "(($ac_try" in
19724 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19725 *) ac_try_echo=$ac_try;;
19726esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019727eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019728 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019729 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019730 grep -v '^ *+' conftest.er1 >conftest.err
19731 rm -f conftest.er1
19732 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019734 (exit $ac_status); } && {
19735 test -z "$ac_c_werror_flag" ||
19736 test ! -s conftest.err
19737 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019738 ac_cv_member_struct_stat_st_rdev=yes
19739else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019740 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019741sed 's/^/| /' conftest.$ac_ext >&5
19742
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019743 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019744/* confdefs.h. */
19745_ACEOF
19746cat confdefs.h >>conftest.$ac_ext
19747cat >>conftest.$ac_ext <<_ACEOF
19748/* end confdefs.h. */
19749$ac_includes_default
19750int
19751main ()
19752{
19753static struct stat ac_aggr;
19754if (sizeof ac_aggr.st_rdev)
19755return 0;
19756 ;
19757 return 0;
19758}
19759_ACEOF
19760rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019761if { (ac_try="$ac_compile"
19762case "(($ac_try" in
19763 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19764 *) ac_try_echo=$ac_try;;
19765esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019766eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019767 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000019768 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019769 grep -v '^ *+' conftest.er1 >conftest.err
19770 rm -f conftest.er1
19771 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019773 (exit $ac_status); } && {
19774 test -z "$ac_c_werror_flag" ||
19775 test ! -s conftest.err
19776 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019777 ac_cv_member_struct_stat_st_rdev=yes
19778else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019779 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019780sed 's/^/| /' conftest.$ac_ext >&5
19781
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019782 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000019783fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019784
19785rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019786fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019787
19788rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000019789fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019790{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
19791echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
19792if test $ac_cv_member_struct_stat_st_rdev = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019793
19794cat >>confdefs.h <<_ACEOF
19795#define HAVE_STRUCT_STAT_ST_RDEV 1
19796_ACEOF
19797
19798
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019799fi
19800
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019801{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
19802echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019803if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019804 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019805else
Martin v. Löwis11437992002-04-12 09:54:03 +000019806 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019807/* confdefs.h. */
19808_ACEOF
19809cat confdefs.h >>conftest.$ac_ext
19810cat >>conftest.$ac_ext <<_ACEOF
19811/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019812$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000019813int
19814main ()
19815{
19816static struct stat ac_aggr;
19817if (ac_aggr.st_blksize)
19818return 0;
19819 ;
19820 return 0;
19821}
19822_ACEOF
19823rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019824if { (ac_try="$ac_compile"
19825case "(($ac_try" in
19826 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19827 *) ac_try_echo=$ac_try;;
19828esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019829eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019830 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019831 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019832 grep -v '^ *+' conftest.er1 >conftest.err
19833 rm -f conftest.er1
19834 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019836 (exit $ac_status); } && {
19837 test -z "$ac_c_werror_flag" ||
19838 test ! -s conftest.err
19839 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019840 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000019841else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019842 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019843sed 's/^/| /' conftest.$ac_ext >&5
19844
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019845 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019846/* confdefs.h. */
19847_ACEOF
19848cat confdefs.h >>conftest.$ac_ext
19849cat >>conftest.$ac_ext <<_ACEOF
19850/* end confdefs.h. */
19851$ac_includes_default
19852int
19853main ()
19854{
19855static struct stat ac_aggr;
19856if (sizeof ac_aggr.st_blksize)
19857return 0;
19858 ;
19859 return 0;
19860}
19861_ACEOF
19862rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019863if { (ac_try="$ac_compile"
19864case "(($ac_try" in
19865 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19866 *) ac_try_echo=$ac_try;;
19867esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019868eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019869 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000019870 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019871 grep -v '^ *+' conftest.er1 >conftest.err
19872 rm -f conftest.er1
19873 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019875 (exit $ac_status); } && {
19876 test -z "$ac_c_werror_flag" ||
19877 test ! -s conftest.err
19878 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019879 ac_cv_member_struct_stat_st_blksize=yes
19880else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019881 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019882sed 's/^/| /' conftest.$ac_ext >&5
19883
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019884 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000019885fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019886
19887rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019888fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019889
19890rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000019891fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019892{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
19893echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
19894if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000019895
Martin v. Löwis11437992002-04-12 09:54:03 +000019896cat >>confdefs.h <<_ACEOF
19897#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
19898_ACEOF
19899
19900
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019901fi
19902
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019903{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
19904echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019905if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019906 echo $ECHO_N "(cached) $ECHO_C" >&6
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019907else
19908 cat >conftest.$ac_ext <<_ACEOF
19909/* confdefs.h. */
19910_ACEOF
19911cat confdefs.h >>conftest.$ac_ext
19912cat >>conftest.$ac_ext <<_ACEOF
19913/* end confdefs.h. */
19914$ac_includes_default
19915int
19916main ()
19917{
19918static struct stat ac_aggr;
19919if (ac_aggr.st_flags)
19920return 0;
19921 ;
19922 return 0;
19923}
19924_ACEOF
19925rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019926if { (ac_try="$ac_compile"
19927case "(($ac_try" in
19928 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19929 *) ac_try_echo=$ac_try;;
19930esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019931eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019932 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019933 ac_status=$?
19934 grep -v '^ *+' conftest.er1 >conftest.err
19935 rm -f conftest.er1
19936 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019937 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019938 (exit $ac_status); } && {
19939 test -z "$ac_c_werror_flag" ||
19940 test ! -s conftest.err
19941 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019942 ac_cv_member_struct_stat_st_flags=yes
19943else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019944 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019945sed 's/^/| /' conftest.$ac_ext >&5
19946
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019947 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019948/* confdefs.h. */
19949_ACEOF
19950cat confdefs.h >>conftest.$ac_ext
19951cat >>conftest.$ac_ext <<_ACEOF
19952/* end confdefs.h. */
19953$ac_includes_default
19954int
19955main ()
19956{
19957static struct stat ac_aggr;
19958if (sizeof ac_aggr.st_flags)
19959return 0;
19960 ;
19961 return 0;
19962}
19963_ACEOF
19964rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019965if { (ac_try="$ac_compile"
19966case "(($ac_try" in
19967 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19968 *) ac_try_echo=$ac_try;;
19969esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019970eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019971 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019972 ac_status=$?
19973 grep -v '^ *+' conftest.er1 >conftest.err
19974 rm -f conftest.er1
19975 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019977 (exit $ac_status); } && {
19978 test -z "$ac_c_werror_flag" ||
19979 test ! -s conftest.err
19980 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019981 ac_cv_member_struct_stat_st_flags=yes
19982else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019983 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019984sed 's/^/| /' conftest.$ac_ext >&5
19985
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019986 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019987fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019988
19989rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019990fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019991
19992rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019993fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019994{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
19995echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
19996if test $ac_cv_member_struct_stat_st_flags = yes; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019997
19998cat >>confdefs.h <<_ACEOF
19999#define HAVE_STRUCT_STAT_ST_FLAGS 1
20000_ACEOF
20001
20002
20003fi
20004
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020005{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
20006echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020007if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020008 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020009else
20010 cat >conftest.$ac_ext <<_ACEOF
20011/* confdefs.h. */
20012_ACEOF
20013cat confdefs.h >>conftest.$ac_ext
20014cat >>conftest.$ac_ext <<_ACEOF
20015/* end confdefs.h. */
20016$ac_includes_default
20017int
20018main ()
20019{
20020static struct stat ac_aggr;
20021if (ac_aggr.st_gen)
20022return 0;
20023 ;
20024 return 0;
20025}
20026_ACEOF
20027rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020028if { (ac_try="$ac_compile"
20029case "(($ac_try" in
20030 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20031 *) ac_try_echo=$ac_try;;
20032esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020033eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020034 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020035 ac_status=$?
20036 grep -v '^ *+' conftest.er1 >conftest.err
20037 rm -f conftest.er1
20038 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020040 (exit $ac_status); } && {
20041 test -z "$ac_c_werror_flag" ||
20042 test ! -s conftest.err
20043 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020044 ac_cv_member_struct_stat_st_gen=yes
20045else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020046 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020047sed 's/^/| /' conftest.$ac_ext >&5
20048
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020049 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020050/* confdefs.h. */
20051_ACEOF
20052cat confdefs.h >>conftest.$ac_ext
20053cat >>conftest.$ac_ext <<_ACEOF
20054/* end confdefs.h. */
20055$ac_includes_default
20056int
20057main ()
20058{
20059static struct stat ac_aggr;
20060if (sizeof ac_aggr.st_gen)
20061return 0;
20062 ;
20063 return 0;
20064}
20065_ACEOF
20066rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020067if { (ac_try="$ac_compile"
20068case "(($ac_try" in
20069 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20070 *) ac_try_echo=$ac_try;;
20071esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020072eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020073 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020074 ac_status=$?
20075 grep -v '^ *+' conftest.er1 >conftest.err
20076 rm -f conftest.er1
20077 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020079 (exit $ac_status); } && {
20080 test -z "$ac_c_werror_flag" ||
20081 test ! -s conftest.err
20082 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020083 ac_cv_member_struct_stat_st_gen=yes
20084else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020085 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020086sed 's/^/| /' conftest.$ac_ext >&5
20087
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020088 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020089fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020090
20091rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020092fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020093
20094rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020095fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020096{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
20097echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
20098if test $ac_cv_member_struct_stat_st_gen = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020099
20100cat >>confdefs.h <<_ACEOF
20101#define HAVE_STRUCT_STAT_ST_GEN 1
20102_ACEOF
20103
20104
20105fi
20106
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020107{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
20108echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020109if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020110 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020111else
20112 cat >conftest.$ac_ext <<_ACEOF
20113/* confdefs.h. */
20114_ACEOF
20115cat confdefs.h >>conftest.$ac_ext
20116cat >>conftest.$ac_ext <<_ACEOF
20117/* end confdefs.h. */
20118$ac_includes_default
20119int
20120main ()
20121{
20122static struct stat ac_aggr;
20123if (ac_aggr.st_birthtime)
20124return 0;
20125 ;
20126 return 0;
20127}
20128_ACEOF
20129rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020130if { (ac_try="$ac_compile"
20131case "(($ac_try" in
20132 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20133 *) ac_try_echo=$ac_try;;
20134esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020135eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020136 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020137 ac_status=$?
20138 grep -v '^ *+' conftest.er1 >conftest.err
20139 rm -f conftest.er1
20140 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020142 (exit $ac_status); } && {
20143 test -z "$ac_c_werror_flag" ||
20144 test ! -s conftest.err
20145 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020146 ac_cv_member_struct_stat_st_birthtime=yes
20147else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020148 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020149sed 's/^/| /' conftest.$ac_ext >&5
20150
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020151 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020152/* confdefs.h. */
20153_ACEOF
20154cat confdefs.h >>conftest.$ac_ext
20155cat >>conftest.$ac_ext <<_ACEOF
20156/* end confdefs.h. */
20157$ac_includes_default
20158int
20159main ()
20160{
20161static struct stat ac_aggr;
20162if (sizeof ac_aggr.st_birthtime)
20163return 0;
20164 ;
20165 return 0;
20166}
20167_ACEOF
20168rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020169if { (ac_try="$ac_compile"
20170case "(($ac_try" in
20171 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20172 *) ac_try_echo=$ac_try;;
20173esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020174eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020175 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020176 ac_status=$?
20177 grep -v '^ *+' conftest.er1 >conftest.err
20178 rm -f conftest.er1
20179 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020181 (exit $ac_status); } && {
20182 test -z "$ac_c_werror_flag" ||
20183 test ! -s conftest.err
20184 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020185 ac_cv_member_struct_stat_st_birthtime=yes
20186else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020187 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020188sed 's/^/| /' conftest.$ac_ext >&5
20189
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020190 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020191fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020192
20193rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020194fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020195
20196rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020197fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020198{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
20199echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
20200if test $ac_cv_member_struct_stat_st_birthtime = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020201
20202cat >>confdefs.h <<_ACEOF
20203#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
20204_ACEOF
20205
20206
20207fi
20208
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020209{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
20210echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020211if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020212 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020213else
Martin v. Löwis11437992002-04-12 09:54:03 +000020214 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020215/* confdefs.h. */
20216_ACEOF
20217cat confdefs.h >>conftest.$ac_ext
20218cat >>conftest.$ac_ext <<_ACEOF
20219/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020220$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020221int
20222main ()
20223{
20224static struct stat ac_aggr;
20225if (ac_aggr.st_blocks)
20226return 0;
20227 ;
20228 return 0;
20229}
20230_ACEOF
20231rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020232if { (ac_try="$ac_compile"
20233case "(($ac_try" in
20234 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20235 *) ac_try_echo=$ac_try;;
20236esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020237eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020238 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020239 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020240 grep -v '^ *+' conftest.er1 >conftest.err
20241 rm -f conftest.er1
20242 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020244 (exit $ac_status); } && {
20245 test -z "$ac_c_werror_flag" ||
20246 test ! -s conftest.err
20247 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020248 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000020249else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020250 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020251sed 's/^/| /' conftest.$ac_ext >&5
20252
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020253 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020254/* confdefs.h. */
20255_ACEOF
20256cat confdefs.h >>conftest.$ac_ext
20257cat >>conftest.$ac_ext <<_ACEOF
20258/* end confdefs.h. */
20259$ac_includes_default
20260int
20261main ()
20262{
20263static struct stat ac_aggr;
20264if (sizeof ac_aggr.st_blocks)
20265return 0;
20266 ;
20267 return 0;
20268}
20269_ACEOF
20270rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020271if { (ac_try="$ac_compile"
20272case "(($ac_try" in
20273 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20274 *) ac_try_echo=$ac_try;;
20275esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020276eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020277 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020278 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020279 grep -v '^ *+' conftest.er1 >conftest.err
20280 rm -f conftest.er1
20281 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020283 (exit $ac_status); } && {
20284 test -z "$ac_c_werror_flag" ||
20285 test ! -s conftest.err
20286 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020287 ac_cv_member_struct_stat_st_blocks=yes
20288else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020289 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020290sed 's/^/| /' conftest.$ac_ext >&5
20291
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020292 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000020293fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020294
20295rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020296fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020297
20298rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020299fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020300{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
20301echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
20302if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000020303
Martin v. Löwis11437992002-04-12 09:54:03 +000020304cat >>confdefs.h <<_ACEOF
20305#define HAVE_STRUCT_STAT_ST_BLOCKS 1
20306_ACEOF
20307
20308
20309cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020310#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020311_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020312
20313else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020314 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000020315 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020316 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
20317 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000020318esac
20319
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020320fi
20321
Michael W. Hudson54241132001-12-07 15:38:26 +000020322
Martin v. Löwis11437992002-04-12 09:54:03 +000020323
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020324{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
20325echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020326if test "${ac_cv_header_time_altzone+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020327 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020328else
Martin v. Löwis11437992002-04-12 09:54:03 +000020329 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020330/* confdefs.h. */
20331_ACEOF
20332cat confdefs.h >>conftest.$ac_ext
20333cat >>conftest.$ac_ext <<_ACEOF
20334/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020335#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020336int
20337main ()
20338{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020339return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000020340 ;
20341 return 0;
20342}
20343_ACEOF
20344rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020345if { (ac_try="$ac_compile"
20346case "(($ac_try" in
20347 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20348 *) ac_try_echo=$ac_try;;
20349esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020350eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020351 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020352 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020353 grep -v '^ *+' conftest.er1 >conftest.err
20354 rm -f conftest.er1
20355 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020357 (exit $ac_status); } && {
20358 test -z "$ac_c_werror_flag" ||
20359 test ! -s conftest.err
20360 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020361 ac_cv_header_time_altzone=yes
20362else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020363 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020364sed 's/^/| /' conftest.$ac_ext >&5
20365
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020366 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000020367fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020368
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020369rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20370fi
20371
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020372{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
20373echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020374if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020375
20376cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020377#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020378_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020379
20380fi
20381
Guido van Rossumda88dad1995-01-26 00:46:29 +000020382was_it_defined=no
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020383{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
20384echo $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 +000020385cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020386/* confdefs.h. */
20387_ACEOF
20388cat confdefs.h >>conftest.$ac_ext
20389cat >>conftest.$ac_ext <<_ACEOF
20390/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020391
20392#include <sys/types.h>
20393#include <sys/select.h>
20394#include <sys/time.h>
20395
Martin v. Löwis11437992002-04-12 09:54:03 +000020396int
20397main ()
20398{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020399;
Martin v. Löwis11437992002-04-12 09:54:03 +000020400 ;
20401 return 0;
20402}
20403_ACEOF
20404rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020405if { (ac_try="$ac_compile"
20406case "(($ac_try" in
20407 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20408 *) ac_try_echo=$ac_try;;
20409esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020410eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020411 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020412 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020413 grep -v '^ *+' conftest.er1 >conftest.err
20414 rm -f conftest.er1
20415 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020417 (exit $ac_status); } && {
20418 test -z "$ac_c_werror_flag" ||
20419 test ! -s conftest.err
20420 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020421
20422
20423cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020424#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020425_ACEOF
20426
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020427 was_it_defined=yes
20428
Guido van Rossumf78abae1997-01-21 22:02:36 +000020429else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020430 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020431sed 's/^/| /' conftest.$ac_ext >&5
20432
Thomas Wouters477c8d52006-05-27 19:21:47 +000020433
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020434fi
20435
20436rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020437{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
20438echo "${ECHO_T}$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020439
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020440{ echo "$as_me:$LINENO: checking for addrinfo" >&5
20441echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020442if test "${ac_cv_struct_addrinfo+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020443 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020444else
Martin v. Löwis11437992002-04-12 09:54:03 +000020445 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020446/* confdefs.h. */
20447_ACEOF
20448cat confdefs.h >>conftest.$ac_ext
20449cat >>conftest.$ac_ext <<_ACEOF
20450/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020451
20452# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020453int
20454main ()
20455{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020456struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000020457 ;
20458 return 0;
20459}
20460_ACEOF
20461rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020462if { (ac_try="$ac_compile"
20463case "(($ac_try" in
20464 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20465 *) ac_try_echo=$ac_try;;
20466esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020467eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020468 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020469 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020470 grep -v '^ *+' conftest.er1 >conftest.err
20471 rm -f conftest.er1
20472 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020474 (exit $ac_status); } && {
20475 test -z "$ac_c_werror_flag" ||
20476 test ! -s conftest.err
20477 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020478 ac_cv_struct_addrinfo=yes
20479else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020480 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020481sed 's/^/| /' conftest.$ac_ext >&5
20482
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020483 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020484fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020485
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020486rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20487fi
20488
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020489{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
20490echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020491if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020492
20493cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020494#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020495_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020496
20497fi
20498
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020499{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
20500echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020501if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020502 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020503else
Martin v. Löwis11437992002-04-12 09:54:03 +000020504 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020505/* confdefs.h. */
20506_ACEOF
20507cat confdefs.h >>conftest.$ac_ext
20508cat >>conftest.$ac_ext <<_ACEOF
20509/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020510
20511# include <sys/types.h>
20512# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020513int
20514main ()
20515{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020516struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000020517 ;
20518 return 0;
20519}
20520_ACEOF
20521rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020522if { (ac_try="$ac_compile"
20523case "(($ac_try" in
20524 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20525 *) ac_try_echo=$ac_try;;
20526esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020527eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020528 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020529 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020530 grep -v '^ *+' conftest.er1 >conftest.err
20531 rm -f conftest.er1
20532 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020534 (exit $ac_status); } && {
20535 test -z "$ac_c_werror_flag" ||
20536 test ! -s conftest.err
20537 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020538 ac_cv_struct_sockaddr_storage=yes
20539else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020540 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020541sed 's/^/| /' conftest.$ac_ext >&5
20542
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020543 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020544fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020545
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020546rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20547fi
20548
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020549{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
20550echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020551if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020552
20553cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020554#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020555_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020556
20557fi
20558
Guido van Rossum627b2d71993-12-24 10:39:16 +000020559# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000020560
Michael W. Hudson54241132001-12-07 15:38:26 +000020561
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020562{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
20563echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020564if test "${ac_cv_c_char_unsigned+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020565 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000020566else
Martin v. Löwis11437992002-04-12 09:54:03 +000020567 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020568/* confdefs.h. */
20569_ACEOF
20570cat confdefs.h >>conftest.$ac_ext
20571cat >>conftest.$ac_ext <<_ACEOF
20572/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020573$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020574int
20575main ()
20576{
20577static int test_array [1 - 2 * !(((char) -1) < 0)];
20578test_array [0] = 0
20579
20580 ;
20581 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000020582}
Martin v. Löwis11437992002-04-12 09:54:03 +000020583_ACEOF
20584rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020585if { (ac_try="$ac_compile"
20586case "(($ac_try" in
20587 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20588 *) ac_try_echo=$ac_try;;
20589esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020590eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020591 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020592 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020593 grep -v '^ *+' conftest.er1 >conftest.err
20594 rm -f conftest.er1
20595 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020597 (exit $ac_status); } && {
20598 test -z "$ac_c_werror_flag" ||
20599 test ! -s conftest.err
20600 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000020601 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000020602else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020603 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020604sed 's/^/| /' conftest.$ac_ext >&5
20605
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020606 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020607fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020608
20609rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020610fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020611{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
20612echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020613if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020614 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020615#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020616_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020617
20618fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000020619
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020620{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
20621echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020622if test "${ac_cv_c_const+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020623 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000020624else
20625 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020626/* confdefs.h. */
20627_ACEOF
20628cat confdefs.h >>conftest.$ac_ext
20629cat >>conftest.$ac_ext <<_ACEOF
20630/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020631
Martin v. Löwis11437992002-04-12 09:54:03 +000020632int
20633main ()
20634{
20635/* FIXME: Include the comments suggested by Paul. */
20636#ifndef __cplusplus
20637 /* Ultrix mips cc rejects this. */
20638 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020639 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000020640 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020641 char const *const *pcpcc;
20642 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000020643 /* NEC SVR4.0.2 mips cc rejects this. */
20644 struct point {int x, y;};
20645 static struct point const zero = {0,0};
20646 /* AIX XL C 1.02.0.0 rejects this.
20647 It does not let you subtract one const X* pointer from another in
20648 an arm of an if-expression whose if-part is not a constant
20649 expression */
20650 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020651 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020652 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020653 ++pcpcc;
20654 ppc = (char**) pcpcc;
20655 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000020656 { /* SCO 3.2v4 cc rejects this. */
20657 char *t;
20658 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020659
Martin v. Löwis11437992002-04-12 09:54:03 +000020660 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020661 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020662 }
20663 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
20664 int x[] = {25, 17};
20665 const int *foo = &x[0];
20666 ++foo;
20667 }
20668 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
20669 typedef const int *iptr;
20670 iptr p = 0;
20671 ++p;
20672 }
20673 { /* AIX XL C 1.02.0.0 rejects this saying
20674 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
20675 struct s { int j; const int *ap[3]; };
20676 struct s *b; b->j = 5;
20677 }
20678 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
20679 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020680 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020681 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020682 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000020683#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000020684
Martin v. Löwis11437992002-04-12 09:54:03 +000020685 ;
20686 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000020687}
Martin v. Löwis11437992002-04-12 09:54:03 +000020688_ACEOF
20689rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020690if { (ac_try="$ac_compile"
20691case "(($ac_try" in
20692 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20693 *) ac_try_echo=$ac_try;;
20694esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020695eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020696 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020697 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020698 grep -v '^ *+' conftest.er1 >conftest.err
20699 rm -f conftest.er1
20700 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020702 (exit $ac_status); } && {
20703 test -z "$ac_c_werror_flag" ||
20704 test ! -s conftest.err
20705 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020706 ac_cv_c_const=yes
20707else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020708 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020709sed 's/^/| /' conftest.$ac_ext >&5
20710
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020711 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020712fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020713
20714rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020715fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020716{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
20717echo "${ECHO_T}$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020718if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020719
20720cat >>confdefs.h <<\_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020721#define const
Martin v. Löwis11437992002-04-12 09:54:03 +000020722_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020723
20724fi
20725
Michael W. Hudson54241132001-12-07 15:38:26 +000020726
Guido van Rossumda88dad1995-01-26 00:46:29 +000020727works=no
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020728{ echo "$as_me:$LINENO: checking for working volatile" >&5
20729echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020730cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020731/* confdefs.h. */
20732_ACEOF
20733cat confdefs.h >>conftest.$ac_ext
20734cat >>conftest.$ac_ext <<_ACEOF
20735/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000020736
Martin v. Löwis11437992002-04-12 09:54:03 +000020737int
20738main ()
20739{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020740volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020741 ;
20742 return 0;
20743}
20744_ACEOF
20745rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020746if { (ac_try="$ac_compile"
20747case "(($ac_try" in
20748 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20749 *) ac_try_echo=$ac_try;;
20750esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020751eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020752 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020753 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020754 grep -v '^ *+' conftest.er1 >conftest.err
20755 rm -f conftest.er1
20756 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020757 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020758 (exit $ac_status); } && {
20759 test -z "$ac_c_werror_flag" ||
20760 test ! -s conftest.err
20761 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000020762 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000020763else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020764 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020765sed 's/^/| /' conftest.$ac_ext >&5
20766
Martin v. Löwis11437992002-04-12 09:54:03 +000020767
20768cat >>confdefs.h <<\_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020769#define volatile
Martin v. Löwis11437992002-04-12 09:54:03 +000020770_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020771
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020772
Guido van Rossum627b2d71993-12-24 10:39:16 +000020773fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020774
20775rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020776{ echo "$as_me:$LINENO: result: $works" >&5
20777echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000020778
Guido van Rossumda88dad1995-01-26 00:46:29 +000020779works=no
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020780{ echo "$as_me:$LINENO: checking for working signed char" >&5
20781echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020782cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020783/* confdefs.h. */
20784_ACEOF
20785cat confdefs.h >>conftest.$ac_ext
20786cat >>conftest.$ac_ext <<_ACEOF
20787/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000020788
Martin v. Löwis11437992002-04-12 09:54:03 +000020789int
20790main ()
20791{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020792signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000020793 ;
20794 return 0;
20795}
20796_ACEOF
20797rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020798if { (ac_try="$ac_compile"
20799case "(($ac_try" in
20800 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20801 *) ac_try_echo=$ac_try;;
20802esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020803eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020804 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020805 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020806 grep -v '^ *+' conftest.er1 >conftest.err
20807 rm -f conftest.er1
20808 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020810 (exit $ac_status); } && {
20811 test -z "$ac_c_werror_flag" ||
20812 test ! -s conftest.err
20813 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000020814 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000020815else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020816 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020817sed 's/^/| /' conftest.$ac_ext >&5
20818
Martin v. Löwis11437992002-04-12 09:54:03 +000020819
20820cat >>confdefs.h <<\_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020821#define signed
Martin v. Löwis11437992002-04-12 09:54:03 +000020822_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000020823
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020824
Guido van Rossum7f43da71994-08-01 12:15:30 +000020825fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020826
20827rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020828{ echo "$as_me:$LINENO: result: $works" >&5
20829echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000020830
Guido van Rossumda88dad1995-01-26 00:46:29 +000020831have_prototypes=no
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020832{ echo "$as_me:$LINENO: checking for prototypes" >&5
20833echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020834cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020835/* confdefs.h. */
20836_ACEOF
20837cat confdefs.h >>conftest.$ac_ext
20838cat >>conftest.$ac_ext <<_ACEOF
20839/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020840int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020841int
20842main ()
20843{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020844return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000020845 ;
20846 return 0;
20847}
20848_ACEOF
20849rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020850if { (ac_try="$ac_compile"
20851case "(($ac_try" in
20852 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20853 *) ac_try_echo=$ac_try;;
20854esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020855eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020856 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020857 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020858 grep -v '^ *+' conftest.er1 >conftest.err
20859 rm -f conftest.er1
20860 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020862 (exit $ac_status); } && {
20863 test -z "$ac_c_werror_flag" ||
20864 test ! -s conftest.err
20865 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020866
20867
20868cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020869#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020870_ACEOF
20871
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020872 have_prototypes=yes
20873
Guido van Rossumf78abae1997-01-21 22:02:36 +000020874else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020875 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020876sed 's/^/| /' conftest.$ac_ext >&5
20877
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020878
Guido van Rossum7f43da71994-08-01 12:15:30 +000020879fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020880
20881rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020882{ echo "$as_me:$LINENO: result: $have_prototypes" >&5
20883echo "${ECHO_T}$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020884
Guido van Rossumda88dad1995-01-26 00:46:29 +000020885works=no
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020886{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
20887echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020888cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020889/* confdefs.h. */
20890_ACEOF
20891cat confdefs.h >>conftest.$ac_ext
20892cat >>conftest.$ac_ext <<_ACEOF
20893/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020894
20895#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000020896int foo(int x, ...) {
20897 va_list va;
20898 va_start(va, x);
20899 va_arg(va, int);
20900 va_arg(va, char *);
20901 va_arg(va, double);
20902 return 0;
20903}
Guido van Rossum7f43da71994-08-01 12:15:30 +000020904
Martin v. Löwis11437992002-04-12 09:54:03 +000020905int
20906main ()
20907{
Guido van Rossum90eea071996-08-30 20:58:57 +000020908return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000020909 ;
20910 return 0;
20911}
20912_ACEOF
20913rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020914if { (ac_try="$ac_compile"
20915case "(($ac_try" in
20916 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20917 *) ac_try_echo=$ac_try;;
20918esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020919eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020920 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020921 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020922 grep -v '^ *+' conftest.er1 >conftest.err
20923 rm -f conftest.er1
20924 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020926 (exit $ac_status); } && {
20927 test -z "$ac_c_werror_flag" ||
20928 test ! -s conftest.err
20929 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020930
20931
20932cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020933#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020934_ACEOF
20935
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020936 works=yes
20937
Guido van Rossumf78abae1997-01-21 22:02:36 +000020938else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020939 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020940sed 's/^/| /' conftest.$ac_ext >&5
20941
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020942
Guido van Rossum627b2d71993-12-24 10:39:16 +000020943fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020944
20945rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020946{ echo "$as_me:$LINENO: result: $works" >&5
20947echo "${ECHO_T}$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020948
Martin v. Löwisd6320502004-08-12 13:45:08 +000020949# check for socketpair
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020950{ echo "$as_me:$LINENO: checking for socketpair" >&5
20951echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000020952cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000020953/* confdefs.h. */
20954_ACEOF
20955cat confdefs.h >>conftest.$ac_ext
20956cat >>conftest.$ac_ext <<_ACEOF
20957/* end confdefs.h. */
20958
20959#include <sys/types.h>
20960#include <sys/socket.h>
20961
20962int
20963main ()
20964{
20965void *x=socketpair
20966 ;
20967 return 0;
20968}
20969_ACEOF
20970rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020971if { (ac_try="$ac_compile"
20972case "(($ac_try" in
20973 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20974 *) ac_try_echo=$ac_try;;
20975esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020976eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020977 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000020978 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020979 grep -v '^ *+' conftest.er1 >conftest.err
20980 rm -f conftest.er1
20981 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020983 (exit $ac_status); } && {
20984 test -z "$ac_c_werror_flag" ||
20985 test ! -s conftest.err
20986 } && test -s conftest.$ac_objext; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000020987
20988cat >>confdefs.h <<\_ACEOF
20989#define HAVE_SOCKETPAIR 1
20990_ACEOF
20991
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020992 { echo "$as_me:$LINENO: result: yes" >&5
20993echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000020994else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020995 echo "$as_me: failed program was:" >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000020996sed 's/^/| /' conftest.$ac_ext >&5
20997
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020998 { echo "$as_me:$LINENO: result: no" >&5
20999echo "${ECHO_T}no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000021000
21001fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021002
21003rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000021004
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021005# check if sockaddr has sa_len member
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021006{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
21007echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021008cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021009/* confdefs.h. */
21010_ACEOF
21011cat confdefs.h >>conftest.$ac_ext
21012cat >>conftest.$ac_ext <<_ACEOF
21013/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021014#include <sys/types.h>
21015#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021016int
21017main ()
21018{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021019struct sockaddr x;
21020x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021021 ;
21022 return 0;
21023}
21024_ACEOF
21025rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021026if { (ac_try="$ac_compile"
21027case "(($ac_try" in
21028 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21029 *) ac_try_echo=$ac_try;;
21030esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021031eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021032 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021033 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021034 grep -v '^ *+' conftest.er1 >conftest.err
21035 rm -f conftest.er1
21036 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021038 (exit $ac_status); } && {
21039 test -z "$ac_c_werror_flag" ||
21040 test ! -s conftest.err
21041 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021042 { echo "$as_me:$LINENO: result: yes" >&5
21043echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021044
21045cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021046#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021047_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021048
21049else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021050 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021051sed 's/^/| /' conftest.$ac_ext >&5
21052
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021053 { echo "$as_me:$LINENO: result: no" >&5
21054echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021055fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021056
21057rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021058
Guido van Rossumda88dad1995-01-26 00:46:29 +000021059va_list_is_array=no
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021060{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
21061echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021062cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021063/* confdefs.h. */
21064_ACEOF
21065cat confdefs.h >>conftest.$ac_ext
21066cat >>conftest.$ac_ext <<_ACEOF
21067/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021068
21069#ifdef HAVE_STDARG_PROTOTYPES
21070#include <stdarg.h>
21071#else
21072#include <varargs.h>
21073#endif
21074
Martin v. Löwis11437992002-04-12 09:54:03 +000021075int
21076main ()
21077{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021078va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000021079 ;
21080 return 0;
21081}
21082_ACEOF
21083rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021084if { (ac_try="$ac_compile"
21085case "(($ac_try" in
21086 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21087 *) ac_try_echo=$ac_try;;
21088esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021089eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021090 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021091 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021092 grep -v '^ *+' conftest.er1 >conftest.err
21093 rm -f conftest.er1
21094 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021096 (exit $ac_status); } && {
21097 test -z "$ac_c_werror_flag" ||
21098 test ! -s conftest.err
21099 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021100 :
21101else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021102 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021103sed 's/^/| /' conftest.$ac_ext >&5
21104
Martin v. Löwis11437992002-04-12 09:54:03 +000021105
21106
21107cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021108#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021109_ACEOF
21110
Guido van Rossumda88dad1995-01-26 00:46:29 +000021111 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021112
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021113fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021114
21115rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021116{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
21117echo "${ECHO_T}$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021118
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021119# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000021120
21121
21122
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021123{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
21124echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021125if test "${ac_cv_func_gethostbyname_r+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021126 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021127else
Martin v. Löwis11437992002-04-12 09:54:03 +000021128 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021129/* confdefs.h. */
21130_ACEOF
21131cat confdefs.h >>conftest.$ac_ext
21132cat >>conftest.$ac_ext <<_ACEOF
21133/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021134/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
21135 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21136#define gethostbyname_r innocuous_gethostbyname_r
21137
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021138/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021139 which can conflict with char gethostbyname_r (); below.
21140 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021141 <limits.h> exists even on freestanding compilers. */
21142
21143#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021144# include <limits.h>
21145#else
21146# include <assert.h>
21147#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021148
21149#undef gethostbyname_r
21150
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021151/* Override any GCC internal prototype to avoid an error.
21152 Use char because int might match the return type of a GCC
21153 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021154#ifdef __cplusplus
21155extern "C"
21156#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021157char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021158/* The GNU C library defines this for functions which it implements
21159 to always fail with ENOSYS. Some functions are actually named
21160 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021161#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021162choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021163#endif
21164
Skip Montanaro6dead952003-09-25 14:50:04 +000021165int
21166main ()
21167{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021168return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021169 ;
21170 return 0;
21171}
21172_ACEOF
21173rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021174if { (ac_try="$ac_link"
21175case "(($ac_try" in
21176 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21177 *) ac_try_echo=$ac_try;;
21178esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021179eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021180 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021181 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021182 grep -v '^ *+' conftest.er1 >conftest.err
21183 rm -f conftest.er1
21184 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021186 (exit $ac_status); } && {
21187 test -z "$ac_c_werror_flag" ||
21188 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021189 } && test -s conftest$ac_exeext &&
21190 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021191 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021192else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021193 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021194sed 's/^/| /' conftest.$ac_ext >&5
21195
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021196 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021197fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021198
21199rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021200 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021201fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021202{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
21203echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
21204if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021205
Martin v. Löwis11437992002-04-12 09:54:03 +000021206 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021207#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021208_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021209
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021210 { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
21211echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021212 OLD_CFLAGS=$CFLAGS
21213 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000021214 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021215/* confdefs.h. */
21216_ACEOF
21217cat confdefs.h >>conftest.$ac_ext
21218cat >>conftest.$ac_ext <<_ACEOF
21219/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021220
21221# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021222
Martin v. Löwis11437992002-04-12 09:54:03 +000021223int
21224main ()
21225{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021226
21227 char *name;
21228 struct hostent *he, *res;
21229 char buffer[2048];
21230 int buflen = 2048;
21231 int h_errnop;
21232
21233 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000021234
21235 ;
21236 return 0;
21237}
21238_ACEOF
21239rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021240if { (ac_try="$ac_compile"
21241case "(($ac_try" in
21242 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21243 *) ac_try_echo=$ac_try;;
21244esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021245eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021246 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021247 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021248 grep -v '^ *+' conftest.er1 >conftest.err
21249 rm -f conftest.er1
21250 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021251 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021252 (exit $ac_status); } && {
21253 test -z "$ac_c_werror_flag" ||
21254 test ! -s conftest.err
21255 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021256
21257 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021258#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021259_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021260
Martin v. Löwis11437992002-04-12 09:54:03 +000021261
21262cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021263#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021264_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021265
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021266 { echo "$as_me:$LINENO: result: yes" >&5
21267echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021268
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021269else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021270 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021271sed 's/^/| /' conftest.$ac_ext >&5
21272
Martin v. Löwis11437992002-04-12 09:54:03 +000021273
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021274 { echo "$as_me:$LINENO: result: no" >&5
21275echo "${ECHO_T}no" >&6; }
21276 { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
21277echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021278 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021279/* confdefs.h. */
21280_ACEOF
21281cat confdefs.h >>conftest.$ac_ext
21282cat >>conftest.$ac_ext <<_ACEOF
21283/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021284
21285# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021286
Martin v. Löwis11437992002-04-12 09:54:03 +000021287int
21288main ()
21289{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021290
21291 char *name;
21292 struct hostent *he;
21293 char buffer[2048];
21294 int buflen = 2048;
21295 int h_errnop;
21296
21297 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000021298
21299 ;
21300 return 0;
21301}
21302_ACEOF
21303rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021304if { (ac_try="$ac_compile"
21305case "(($ac_try" in
21306 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21307 *) ac_try_echo=$ac_try;;
21308esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021309eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021310 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021311 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021312 grep -v '^ *+' conftest.er1 >conftest.err
21313 rm -f conftest.er1
21314 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021316 (exit $ac_status); } && {
21317 test -z "$ac_c_werror_flag" ||
21318 test ! -s conftest.err
21319 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021320
21321 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021322#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021323_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021324
Martin v. Löwis11437992002-04-12 09:54:03 +000021325
21326cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021327#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021328_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021329
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021330 { echo "$as_me:$LINENO: result: yes" >&5
21331echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021332
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021333else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021334 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021335sed 's/^/| /' conftest.$ac_ext >&5
21336
Martin v. Löwis11437992002-04-12 09:54:03 +000021337
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021338 { echo "$as_me:$LINENO: result: no" >&5
21339echo "${ECHO_T}no" >&6; }
21340 { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
21341echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021342 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021343/* confdefs.h. */
21344_ACEOF
21345cat confdefs.h >>conftest.$ac_ext
21346cat >>conftest.$ac_ext <<_ACEOF
21347/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021348
21349# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021350
Martin v. Löwis11437992002-04-12 09:54:03 +000021351int
21352main ()
21353{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021354
21355 char *name;
21356 struct hostent *he;
21357 struct hostent_data data;
21358
21359 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000021360
21361 ;
21362 return 0;
21363}
21364_ACEOF
21365rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021366if { (ac_try="$ac_compile"
21367case "(($ac_try" in
21368 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21369 *) ac_try_echo=$ac_try;;
21370esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021371eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021372 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021373 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021374 grep -v '^ *+' conftest.er1 >conftest.err
21375 rm -f conftest.er1
21376 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021377 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021378 (exit $ac_status); } && {
21379 test -z "$ac_c_werror_flag" ||
21380 test ! -s conftest.err
21381 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021382
21383 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021384#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021385_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021386
Martin v. Löwis11437992002-04-12 09:54:03 +000021387
21388cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021389#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021390_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021391
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021392 { echo "$as_me:$LINENO: result: yes" >&5
21393echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021394
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021395else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021396 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021397sed 's/^/| /' conftest.$ac_ext >&5
21398
Martin v. Löwis11437992002-04-12 09:54:03 +000021399
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021400 { echo "$as_me:$LINENO: result: no" >&5
21401echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021402
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021403fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021404
21405rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021406
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021407fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021408
21409rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021410
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021411fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021412
21413rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021414 CFLAGS=$OLD_CFLAGS
21415
21416else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021417
Martin v. Löwis11437992002-04-12 09:54:03 +000021418
21419for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000021420do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021421as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21422{ echo "$as_me:$LINENO: checking for $ac_func" >&5
21423echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021424if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021425 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021426else
Martin v. Löwis11437992002-04-12 09:54:03 +000021427 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021428/* confdefs.h. */
21429_ACEOF
21430cat confdefs.h >>conftest.$ac_ext
21431cat >>conftest.$ac_ext <<_ACEOF
21432/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021433/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21434 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21435#define $ac_func innocuous_$ac_func
21436
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021437/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021438 which can conflict with char $ac_func (); below.
21439 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021440 <limits.h> exists even on freestanding compilers. */
21441
21442#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021443# include <limits.h>
21444#else
21445# include <assert.h>
21446#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021447
21448#undef $ac_func
21449
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021450/* Override any GCC internal prototype to avoid an error.
21451 Use char because int might match the return type of a GCC
21452 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021453#ifdef __cplusplus
21454extern "C"
21455#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021456char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021457/* The GNU C library defines this for functions which it implements
21458 to always fail with ENOSYS. Some functions are actually named
21459 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021460#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021461choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021462#endif
21463
Skip Montanaro6dead952003-09-25 14:50:04 +000021464int
21465main ()
21466{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021467return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021468 ;
21469 return 0;
21470}
21471_ACEOF
21472rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021473if { (ac_try="$ac_link"
21474case "(($ac_try" in
21475 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21476 *) ac_try_echo=$ac_try;;
21477esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021478eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021479 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021480 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021481 grep -v '^ *+' conftest.er1 >conftest.err
21482 rm -f conftest.er1
21483 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021485 (exit $ac_status); } && {
21486 test -z "$ac_c_werror_flag" ||
21487 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021488 } && test -s conftest$ac_exeext &&
21489 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021490 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000021491else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021492 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021493sed 's/^/| /' conftest.$ac_ext >&5
21494
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021495 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000021496fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021497
21498rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021499 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021500fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021501ac_res=`eval echo '${'$as_ac_var'}'`
21502 { echo "$as_me:$LINENO: result: $ac_res" >&5
21503echo "${ECHO_T}$ac_res" >&6; }
21504if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021505 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021506#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021507_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021508
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021509fi
Thomas Wouters3a584202000-08-05 23:28:51 +000021510done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021511
Michael W. Hudson54241132001-12-07 15:38:26 +000021512
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021513fi
21514
Michael W. Hudson54241132001-12-07 15:38:26 +000021515
21516
21517
21518
21519
21520
Guido van Rossum627b2d71993-12-24 10:39:16 +000021521# checks for system services
21522# (none yet)
21523
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021524# Linux requires this for correct f.p. operations
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021525{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
21526echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021527if test "${ac_cv_func___fpu_control+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021528 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021529else
Martin v. Löwis11437992002-04-12 09:54:03 +000021530 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021531/* confdefs.h. */
21532_ACEOF
21533cat confdefs.h >>conftest.$ac_ext
21534cat >>conftest.$ac_ext <<_ACEOF
21535/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021536/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
21537 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21538#define __fpu_control innocuous___fpu_control
21539
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021540/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021541 which can conflict with char __fpu_control (); below.
21542 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021543 <limits.h> exists even on freestanding compilers. */
21544
21545#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021546# include <limits.h>
21547#else
21548# include <assert.h>
21549#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021550
21551#undef __fpu_control
21552
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021553/* Override any GCC internal prototype to avoid an error.
21554 Use char because int might match the return type of a GCC
21555 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021556#ifdef __cplusplus
21557extern "C"
21558#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021559char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021560/* The GNU C library defines this for functions which it implements
21561 to always fail with ENOSYS. Some functions are actually named
21562 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021563#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021564choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021565#endif
21566
Skip Montanaro6dead952003-09-25 14:50:04 +000021567int
21568main ()
21569{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021570return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021571 ;
21572 return 0;
21573}
21574_ACEOF
21575rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021576if { (ac_try="$ac_link"
21577case "(($ac_try" in
21578 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21579 *) ac_try_echo=$ac_try;;
21580esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021581eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021582 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021583 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021584 grep -v '^ *+' conftest.er1 >conftest.err
21585 rm -f conftest.er1
21586 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021588 (exit $ac_status); } && {
21589 test -z "$ac_c_werror_flag" ||
21590 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021591 } && test -s conftest$ac_exeext &&
21592 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021593 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021594else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021595 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021596sed 's/^/| /' conftest.$ac_ext >&5
21597
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021598 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021599fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021600
21601rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021602 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021603fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021604{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
21605echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
21606if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021607 :
21608else
Martin v. Löwis11437992002-04-12 09:54:03 +000021609
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021610{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
21611echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021612if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021613 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021614else
Martin v. Löwis11437992002-04-12 09:54:03 +000021615 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000021616LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000021617cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021618/* confdefs.h. */
21619_ACEOF
21620cat confdefs.h >>conftest.$ac_ext
21621cat >>conftest.$ac_ext <<_ACEOF
21622/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021623
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021624/* Override any GCC internal prototype to avoid an error.
21625 Use char because int might match the return type of a GCC
21626 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021627#ifdef __cplusplus
21628extern "C"
21629#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021630char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021631int
21632main ()
21633{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021634return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021635 ;
21636 return 0;
21637}
21638_ACEOF
21639rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021640if { (ac_try="$ac_link"
21641case "(($ac_try" in
21642 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21643 *) ac_try_echo=$ac_try;;
21644esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021645eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021646 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021647 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021648 grep -v '^ *+' conftest.er1 >conftest.err
21649 rm -f conftest.er1
21650 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021652 (exit $ac_status); } && {
21653 test -z "$ac_c_werror_flag" ||
21654 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021655 } && test -s conftest$ac_exeext &&
21656 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021657 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000021658else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021659 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021660sed 's/^/| /' conftest.$ac_ext >&5
21661
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021662 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000021663fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021664
21665rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021666 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021667LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021668fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021669{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
21670echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
21671if test $ac_cv_lib_ieee___fpu_control = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021672 cat >>confdefs.h <<_ACEOF
21673#define HAVE_LIBIEEE 1
21674_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021675
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000021676 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021677
Guido van Rossum627b2d71993-12-24 10:39:16 +000021678fi
21679
Michael W. Hudson54241132001-12-07 15:38:26 +000021680
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021681fi
21682
Michael W. Hudson54241132001-12-07 15:38:26 +000021683
Guido van Rossum7f253911997-05-09 02:42:48 +000021684# Check for --with-fpectl
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021685{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
21686echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021687
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021688# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000021689if test "${with_fpectl+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021690 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000021691if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000021692then
21693
21694cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000021695#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021696_ACEOF
21697
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021698 { echo "$as_me:$LINENO: result: yes" >&5
21699echo "${ECHO_T}yes" >&6; }
21700else { echo "$as_me:$LINENO: result: no" >&5
21701echo "${ECHO_T}no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000021702fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000021703else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021704 { echo "$as_me:$LINENO: result: no" >&5
21705echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021706fi
21707
Guido van Rossum7f253911997-05-09 02:42:48 +000021708
Guido van Rossum7f43da71994-08-01 12:15:30 +000021709# check for --with-libm=...
21710
Guido van Rossum563e7081996-09-10 18:20:48 +000021711case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000021712Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000021713*) LIBM=-lm
21714esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021715{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
21716echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021717
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021718# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000021719if test "${with_libm+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021720 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000021721if test "$withval" = no
21722then LIBM=
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021723 { echo "$as_me:$LINENO: result: force LIBM empty" >&5
21724echo "${ECHO_T}force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000021725elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000021726then LIBM=$withval
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021727 { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
21728echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
21729else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
21730echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000021731 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021732fi
Guido van Rossum7f253911997-05-09 02:42:48 +000021733else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021734 { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
21735echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021736fi
21737
Guido van Rossum7f43da71994-08-01 12:15:30 +000021738
21739# check for --with-libc=...
21740
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021741{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
21742echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021743
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021744# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000021745if test "${with_libc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021746 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000021747if test "$withval" = no
21748then LIBC=
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021749 { echo "$as_me:$LINENO: result: force LIBC empty" >&5
21750echo "${ECHO_T}force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000021751elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000021752then LIBC=$withval
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021753 { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
21754echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
21755else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
21756echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000021757 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021758fi
Guido van Rossum7f253911997-05-09 02:42:48 +000021759else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021760 { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
21761echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021762fi
21763
Guido van Rossum7f43da71994-08-01 12:15:30 +000021764
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021765# **************************************************
21766# * Check for various properties of floating point *
21767# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000021768
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021769{ echo "$as_me:$LINENO: checking whether C doubles are little-endian IEEE 754 binary64" >&5
21770echo $ECHO_N "checking whether C doubles are little-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021771if test "${ac_cv_little_endian_double+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021772 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021773else
21774
21775if test "$cross_compiling" = yes; then
21776 ac_cv_little_endian_double=no
21777else
21778 cat >conftest.$ac_ext <<_ACEOF
21779/* confdefs.h. */
21780_ACEOF
21781cat confdefs.h >>conftest.$ac_ext
21782cat >>conftest.$ac_ext <<_ACEOF
21783/* end confdefs.h. */
21784
21785#include <string.h>
21786int main() {
21787 double x = 9006104071832581.0;
21788 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
21789 return 0;
21790 else
21791 return 1;
21792}
21793
21794_ACEOF
21795rm -f conftest$ac_exeext
21796if { (ac_try="$ac_link"
21797case "(($ac_try" in
21798 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21799 *) ac_try_echo=$ac_try;;
21800esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021801eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021802 (eval "$ac_link") 2>&5
21803 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021805 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21806 { (case "(($ac_try" in
21807 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21808 *) ac_try_echo=$ac_try;;
21809esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021810eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021811 (eval "$ac_try") 2>&5
21812 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021814 (exit $ac_status); }; }; then
21815 ac_cv_little_endian_double=yes
21816else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021817 echo "$as_me: program exited with status $ac_status" >&5
21818echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021819sed 's/^/| /' conftest.$ac_ext >&5
21820
21821( exit $ac_status )
21822ac_cv_little_endian_double=no
21823fi
21824rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21825fi
21826
21827
21828fi
21829
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021830{ echo "$as_me:$LINENO: result: $ac_cv_little_endian_double" >&5
21831echo "${ECHO_T}$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021832if test "$ac_cv_little_endian_double" = yes
21833then
21834
21835cat >>confdefs.h <<\_ACEOF
21836#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1
21837_ACEOF
21838
21839fi
21840
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021841{ echo "$as_me:$LINENO: checking whether C doubles are big-endian IEEE 754 binary64" >&5
21842echo $ECHO_N "checking whether C doubles are big-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021843if test "${ac_cv_big_endian_double+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021844 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021845else
21846
21847if test "$cross_compiling" = yes; then
21848 ac_cv_big_endian_double=no
21849else
21850 cat >conftest.$ac_ext <<_ACEOF
21851/* confdefs.h. */
21852_ACEOF
21853cat confdefs.h >>conftest.$ac_ext
21854cat >>conftest.$ac_ext <<_ACEOF
21855/* end confdefs.h. */
21856
21857#include <string.h>
21858int main() {
21859 double x = 9006104071832581.0;
21860 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
21861 return 0;
21862 else
21863 return 1;
21864}
21865
21866_ACEOF
21867rm -f conftest$ac_exeext
21868if { (ac_try="$ac_link"
21869case "(($ac_try" in
21870 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21871 *) ac_try_echo=$ac_try;;
21872esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021873eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021874 (eval "$ac_link") 2>&5
21875 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021876 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021877 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21878 { (case "(($ac_try" in
21879 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21880 *) ac_try_echo=$ac_try;;
21881esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021882eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021883 (eval "$ac_try") 2>&5
21884 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021886 (exit $ac_status); }; }; then
21887 ac_cv_big_endian_double=yes
21888else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021889 echo "$as_me: program exited with status $ac_status" >&5
21890echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021891sed 's/^/| /' conftest.$ac_ext >&5
21892
21893( exit $ac_status )
21894ac_cv_big_endian_double=no
21895fi
21896rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21897fi
21898
21899
21900fi
21901
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021902{ echo "$as_me:$LINENO: result: $ac_cv_big_endian_double" >&5
21903echo "${ECHO_T}$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021904if test "$ac_cv_big_endian_double" = yes
21905then
21906
21907cat >>confdefs.h <<\_ACEOF
21908#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1
21909_ACEOF
21910
21911fi
21912
21913# Some ARM platforms use a mixed-endian representation for doubles.
21914# While Python doesn't currently have full support for these platforms
21915# (see e.g., issue 1762561), we can at least make sure that float <-> string
21916# conversions work.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021917{ echo "$as_me:$LINENO: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
21918echo $ECHO_N "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021919if test "${ac_cv_mixed_endian_double+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021920 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021921else
21922
21923if test "$cross_compiling" = yes; then
21924 ac_cv_mixed_endian_double=no
21925else
21926 cat >conftest.$ac_ext <<_ACEOF
21927/* confdefs.h. */
21928_ACEOF
21929cat confdefs.h >>conftest.$ac_ext
21930cat >>conftest.$ac_ext <<_ACEOF
21931/* end confdefs.h. */
21932
21933#include <string.h>
21934int main() {
21935 double x = 9006104071832581.0;
21936 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
21937 return 0;
21938 else
21939 return 1;
21940}
21941
21942_ACEOF
21943rm -f conftest$ac_exeext
21944if { (ac_try="$ac_link"
21945case "(($ac_try" in
21946 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21947 *) ac_try_echo=$ac_try;;
21948esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021949eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021950 (eval "$ac_link") 2>&5
21951 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021953 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21954 { (case "(($ac_try" in
21955 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21956 *) ac_try_echo=$ac_try;;
21957esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021958eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021959 (eval "$ac_try") 2>&5
21960 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021962 (exit $ac_status); }; }; then
21963 ac_cv_mixed_endian_double=yes
21964else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021965 echo "$as_me: program exited with status $ac_status" >&5
21966echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021967sed 's/^/| /' conftest.$ac_ext >&5
21968
21969( exit $ac_status )
21970ac_cv_mixed_endian_double=no
21971fi
21972rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21973fi
21974
21975
21976fi
21977
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021978{ echo "$as_me:$LINENO: result: $ac_cv_mixed_endian_double" >&5
21979echo "${ECHO_T}$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021980if test "$ac_cv_mixed_endian_double" = yes
21981then
21982
21983cat >>confdefs.h <<\_ACEOF
21984#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1
21985_ACEOF
21986
21987fi
21988
Mark Dickinson7abf8d42009-04-18 20:17:52 +000021989# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000021990# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000021991# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000021992# rounding; this is a problem on x86, where the x87 FPU has a default
21993# rounding precision of 64 bits. For gcc/x86, we try to fix this by
21994# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021995if test "$GCC" = yes && test -n "`$CC -dM -E - </dev/null | grep i386`"
21996then
Mark Dickinson7abf8d42009-04-18 20:17:52 +000021997 # Check that it's okay to use gcc inline assembler to get and set
Mark Dickinson10683072009-04-18 21:18:19 +000021998 # x87 control word. It should be, but you never know...
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021999 { echo "$as_me:$LINENO: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
22000echo $ECHO_N "checking whether we can use gcc inline assembler to get and set x87 control word... $ECHO_C" >&6; }
Mark Dickinson7abf8d42009-04-18 20:17:52 +000022001 cat >conftest.$ac_ext <<_ACEOF
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022002/* confdefs.h. */
22003_ACEOF
22004cat confdefs.h >>conftest.$ac_ext
22005cat >>conftest.$ac_ext <<_ACEOF
22006/* end confdefs.h. */
22007
22008int
22009main ()
22010{
22011
Mark Dickinson7abf8d42009-04-18 20:17:52 +000022012 unsigned short cw;
22013 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
22014 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022015
22016 ;
22017 return 0;
22018}
22019_ACEOF
22020rm -f conftest.$ac_objext
22021if { (ac_try="$ac_compile"
22022case "(($ac_try" in
22023 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22024 *) ac_try_echo=$ac_try;;
22025esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022026eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022027 (eval "$ac_compile") 2>conftest.er1
22028 ac_status=$?
22029 grep -v '^ *+' conftest.er1 >conftest.err
22030 rm -f conftest.er1
22031 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022033 (exit $ac_status); } && {
22034 test -z "$ac_c_werror_flag" ||
22035 test ! -s conftest.err
22036 } && test -s conftest.$ac_objext; then
22037 have_gcc_asm_for_x87=yes
22038else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022039 echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022040sed 's/^/| /' conftest.$ac_ext >&5
22041
22042 have_gcc_asm_for_x87=no
22043fi
22044
22045rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022046 { echo "$as_me:$LINENO: result: $have_gcc_asm_for_x87" >&5
22047echo "${ECHO_T}$have_gcc_asm_for_x87" >&6; }
Mark Dickinson7abf8d42009-04-18 20:17:52 +000022048 if test "$have_gcc_asm_for_x87" = yes
22049 then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022050
22051cat >>confdefs.h <<\_ACEOF
22052#define HAVE_GCC_ASM_FOR_X87 1
22053_ACEOF
22054
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022055 fi
22056fi
Martin v. Löwis11437992002-04-12 09:54:03 +000022057
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022058# Detect whether system arithmetic is subject to x87-style double
22059# rounding issues. The result of this test has little meaning on non
22060# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
22061# mode is round-to-nearest and double rounding issues are present, and
22062# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022063{ echo "$as_me:$LINENO: checking for x87-style double rounding" >&5
22064echo $ECHO_N "checking for x87-style double rounding... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022065# $BASECFLAGS may affect the result
22066ac_save_cc="$CC"
22067CC="$CC $BASECFLAGS"
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022068if test "$cross_compiling" = yes; then
22069 ac_cv_x87_double_rounding=no
22070else
22071 cat >conftest.$ac_ext <<_ACEOF
22072/* confdefs.h. */
22073_ACEOF
22074cat confdefs.h >>conftest.$ac_ext
22075cat >>conftest.$ac_ext <<_ACEOF
22076/* end confdefs.h. */
22077
22078#include <stdlib.h>
22079#include <math.h>
22080int main() {
22081 volatile double x, y, z;
22082 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
22083 x = 0.99999999999999989; /* 1-2**-53 */
22084 y = 1./x;
22085 if (y != 1.)
22086 exit(0);
22087 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
22088 x = 1e16;
22089 y = 2.99999;
22090 z = x + y;
22091 if (z != 1e16+4.)
22092 exit(0);
22093 /* both tests show evidence of double rounding */
22094 exit(1);
22095}
22096
22097_ACEOF
22098rm -f conftest$ac_exeext
22099if { (ac_try="$ac_link"
22100case "(($ac_try" in
22101 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22102 *) ac_try_echo=$ac_try;;
22103esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022104eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022105 (eval "$ac_link") 2>&5
22106 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022108 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22109 { (case "(($ac_try" in
22110 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22111 *) ac_try_echo=$ac_try;;
22112esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022113eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022114 (eval "$ac_try") 2>&5
22115 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022116 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022117 (exit $ac_status); }; }; then
22118 ac_cv_x87_double_rounding=no
22119else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022120 echo "$as_me: program exited with status $ac_status" >&5
22121echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022122sed 's/^/| /' conftest.$ac_ext >&5
22123
22124( exit $ac_status )
22125ac_cv_x87_double_rounding=yes
22126fi
22127rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22128fi
22129
22130
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022131CC="$ac_save_cc"
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022132{ echo "$as_me:$LINENO: result: $ac_cv_x87_double_rounding" >&5
22133echo "${ECHO_T}$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022134if test "$ac_cv_x87_double_rounding" = yes
22135then
22136
22137cat >>confdefs.h <<\_ACEOF
22138#define X87_DOUBLE_ROUNDING 1
22139_ACEOF
22140
22141fi
22142
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022143# ************************************
22144# * Check for mathematical functions *
22145# ************************************
22146
22147LIBS_SAVE=$LIBS
22148LIBS="$LIBS $LIBM"
22149
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022150# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
22151# -0. on some architectures.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022152{ echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5
22153echo $ECHO_N "checking whether tanh preserves the sign of zero... $ECHO_C" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022154if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022155 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022156else
22157
22158if test "$cross_compiling" = yes; then
22159 ac_cv_tanh_preserves_zero_sign=no
22160else
22161 cat >conftest.$ac_ext <<_ACEOF
22162/* confdefs.h. */
22163_ACEOF
22164cat confdefs.h >>conftest.$ac_ext
22165cat >>conftest.$ac_ext <<_ACEOF
22166/* end confdefs.h. */
22167
22168#include <math.h>
22169#include <stdlib.h>
22170int main() {
22171 /* return 0 if either negative zeros don't exist
22172 on this platform or if negative zeros exist
22173 and tanh(-0.) == -0. */
22174 if (atan2(0., -1.) == atan2(-0., -1.) ||
22175 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
22176 else exit(1);
22177}
22178
22179_ACEOF
22180rm -f conftest$ac_exeext
22181if { (ac_try="$ac_link"
22182case "(($ac_try" in
22183 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22184 *) ac_try_echo=$ac_try;;
22185esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022186eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022187 (eval "$ac_link") 2>&5
22188 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022189 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022190 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22191 { (case "(($ac_try" in
22192 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22193 *) ac_try_echo=$ac_try;;
22194esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022195eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022196 (eval "$ac_try") 2>&5
22197 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022199 (exit $ac_status); }; }; then
22200 ac_cv_tanh_preserves_zero_sign=yes
22201else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022202 echo "$as_me: program exited with status $ac_status" >&5
22203echo "$as_me: failed program was:" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022204sed 's/^/| /' conftest.$ac_ext >&5
22205
22206( exit $ac_status )
22207ac_cv_tanh_preserves_zero_sign=no
22208fi
22209rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22210fi
22211
22212
22213fi
22214
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022215{ echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5
22216echo "${ECHO_T}$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022217if test "$ac_cv_tanh_preserves_zero_sign" = yes
22218then
22219
22220cat >>confdefs.h <<\_ACEOF
22221#define TANH_PRESERVES_ZERO_SIGN 1
22222_ACEOF
22223
22224fi
22225
22226
Guido van Rossum2b3ac691996-08-30 15:18:41 +000022227
Michael W. Hudson54241132001-12-07 15:38:26 +000022228
Christian Heimes99170a52007-12-19 02:07:34 +000022229
22230
22231
22232
22233
Mark Dickinsonf2537862009-04-18 13:58:18 +000022234
22235for ac_func in acosh asinh atanh copysign expm1 finite hypot log1p round
Christian Heimes99170a52007-12-19 02:07:34 +000022236do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022237as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
22238{ echo "$as_me:$LINENO: checking for $ac_func" >&5
22239echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Christian Heimes99170a52007-12-19 02:07:34 +000022240if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022241 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes99170a52007-12-19 02:07:34 +000022242else
22243 cat >conftest.$ac_ext <<_ACEOF
22244/* confdefs.h. */
22245_ACEOF
22246cat confdefs.h >>conftest.$ac_ext
22247cat >>conftest.$ac_ext <<_ACEOF
22248/* end confdefs.h. */
22249/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22250 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22251#define $ac_func innocuous_$ac_func
22252
22253/* System header to define __stub macros and hopefully few prototypes,
22254 which can conflict with char $ac_func (); below.
22255 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22256 <limits.h> exists even on freestanding compilers. */
22257
22258#ifdef __STDC__
22259# include <limits.h>
22260#else
22261# include <assert.h>
22262#endif
22263
22264#undef $ac_func
22265
22266/* Override any GCC internal prototype to avoid an error.
22267 Use char because int might match the return type of a GCC
22268 builtin and then its argument prototype would still apply. */
22269#ifdef __cplusplus
22270extern "C"
22271#endif
22272char $ac_func ();
22273/* The GNU C library defines this for functions which it implements
22274 to always fail with ENOSYS. Some functions are actually named
22275 something starting with __ and the normal name is an alias. */
22276#if defined __stub_$ac_func || defined __stub___$ac_func
22277choke me
22278#endif
22279
22280int
22281main ()
22282{
22283return $ac_func ();
22284 ;
22285 return 0;
22286}
22287_ACEOF
22288rm -f conftest.$ac_objext conftest$ac_exeext
22289if { (ac_try="$ac_link"
22290case "(($ac_try" in
22291 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22292 *) ac_try_echo=$ac_try;;
22293esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022294eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes99170a52007-12-19 02:07:34 +000022295 (eval "$ac_link") 2>conftest.er1
22296 ac_status=$?
22297 grep -v '^ *+' conftest.er1 >conftest.err
22298 rm -f conftest.er1
22299 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022300 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes99170a52007-12-19 02:07:34 +000022301 (exit $ac_status); } && {
22302 test -z "$ac_c_werror_flag" ||
22303 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022304 } && test -s conftest$ac_exeext &&
22305 $as_test_x conftest$ac_exeext; then
Christian Heimes99170a52007-12-19 02:07:34 +000022306 eval "$as_ac_var=yes"
22307else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022308 echo "$as_me: failed program was:" >&5
Christian Heimes99170a52007-12-19 02:07:34 +000022309sed 's/^/| /' conftest.$ac_ext >&5
22310
22311 eval "$as_ac_var=no"
22312fi
22313
22314rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
22315 conftest$ac_exeext conftest.$ac_ext
22316fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022317ac_res=`eval echo '${'$as_ac_var'}'`
22318 { echo "$as_me:$LINENO: result: $ac_res" >&5
22319echo "${ECHO_T}$ac_res" >&6; }
22320if test `eval echo '${'$as_ac_var'}'` = yes; then
Christian Heimes99170a52007-12-19 02:07:34 +000022321 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022322#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes99170a52007-12-19 02:07:34 +000022323_ACEOF
22324
22325fi
22326done
22327
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022328{ echo "$as_me:$LINENO: checking whether isinf is declared" >&5
22329echo $ECHO_N "checking whether isinf is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022330if test "${ac_cv_have_decl_isinf+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022331 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022332else
22333 cat >conftest.$ac_ext <<_ACEOF
22334/* confdefs.h. */
22335_ACEOF
22336cat confdefs.h >>conftest.$ac_ext
22337cat >>conftest.$ac_ext <<_ACEOF
22338/* end confdefs.h. */
22339#include <math.h>
22340
22341int
22342main ()
22343{
22344#ifndef isinf
22345 (void) isinf;
22346#endif
22347
22348 ;
22349 return 0;
22350}
22351_ACEOF
22352rm -f conftest.$ac_objext
22353if { (ac_try="$ac_compile"
22354case "(($ac_try" in
22355 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22356 *) ac_try_echo=$ac_try;;
22357esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022358eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022359 (eval "$ac_compile") 2>conftest.er1
22360 ac_status=$?
22361 grep -v '^ *+' conftest.er1 >conftest.err
22362 rm -f conftest.er1
22363 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022364 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022365 (exit $ac_status); } && {
22366 test -z "$ac_c_werror_flag" ||
22367 test ! -s conftest.err
22368 } && test -s conftest.$ac_objext; then
22369 ac_cv_have_decl_isinf=yes
22370else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022371 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022372sed 's/^/| /' conftest.$ac_ext >&5
22373
22374 ac_cv_have_decl_isinf=no
22375fi
22376
22377rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22378fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022379{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isinf" >&5
22380echo "${ECHO_T}$ac_cv_have_decl_isinf" >&6; }
22381if test $ac_cv_have_decl_isinf = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022382
22383cat >>confdefs.h <<_ACEOF
22384#define HAVE_DECL_ISINF 1
22385_ACEOF
22386
22387
22388else
22389 cat >>confdefs.h <<_ACEOF
22390#define HAVE_DECL_ISINF 0
22391_ACEOF
22392
22393
22394fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022395{ echo "$as_me:$LINENO: checking whether isnan is declared" >&5
22396echo $ECHO_N "checking whether isnan is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022397if test "${ac_cv_have_decl_isnan+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022398 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022399else
22400 cat >conftest.$ac_ext <<_ACEOF
22401/* confdefs.h. */
22402_ACEOF
22403cat confdefs.h >>conftest.$ac_ext
22404cat >>conftest.$ac_ext <<_ACEOF
22405/* end confdefs.h. */
22406#include <math.h>
22407
22408int
22409main ()
22410{
22411#ifndef isnan
22412 (void) isnan;
22413#endif
22414
22415 ;
22416 return 0;
22417}
22418_ACEOF
22419rm -f conftest.$ac_objext
22420if { (ac_try="$ac_compile"
22421case "(($ac_try" in
22422 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22423 *) ac_try_echo=$ac_try;;
22424esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022425eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022426 (eval "$ac_compile") 2>conftest.er1
22427 ac_status=$?
22428 grep -v '^ *+' conftest.er1 >conftest.err
22429 rm -f conftest.er1
22430 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022432 (exit $ac_status); } && {
22433 test -z "$ac_c_werror_flag" ||
22434 test ! -s conftest.err
22435 } && test -s conftest.$ac_objext; then
22436 ac_cv_have_decl_isnan=yes
22437else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022438 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022439sed 's/^/| /' conftest.$ac_ext >&5
22440
22441 ac_cv_have_decl_isnan=no
22442fi
22443
22444rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22445fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022446{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isnan" >&5
22447echo "${ECHO_T}$ac_cv_have_decl_isnan" >&6; }
22448if test $ac_cv_have_decl_isnan = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022449
22450cat >>confdefs.h <<_ACEOF
22451#define HAVE_DECL_ISNAN 1
22452_ACEOF
22453
22454
22455else
22456 cat >>confdefs.h <<_ACEOF
22457#define HAVE_DECL_ISNAN 0
22458_ACEOF
22459
22460
22461fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022462{ echo "$as_me:$LINENO: checking whether isfinite is declared" >&5
22463echo $ECHO_N "checking whether isfinite is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022464if test "${ac_cv_have_decl_isfinite+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022465 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022466else
22467 cat >conftest.$ac_ext <<_ACEOF
22468/* confdefs.h. */
22469_ACEOF
22470cat confdefs.h >>conftest.$ac_ext
22471cat >>conftest.$ac_ext <<_ACEOF
22472/* end confdefs.h. */
22473#include <math.h>
22474
22475int
22476main ()
22477{
22478#ifndef isfinite
22479 (void) isfinite;
22480#endif
22481
22482 ;
22483 return 0;
22484}
22485_ACEOF
22486rm -f conftest.$ac_objext
22487if { (ac_try="$ac_compile"
22488case "(($ac_try" in
22489 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22490 *) ac_try_echo=$ac_try;;
22491esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022492eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022493 (eval "$ac_compile") 2>conftest.er1
22494 ac_status=$?
22495 grep -v '^ *+' conftest.er1 >conftest.err
22496 rm -f conftest.er1
22497 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022499 (exit $ac_status); } && {
22500 test -z "$ac_c_werror_flag" ||
22501 test ! -s conftest.err
22502 } && test -s conftest.$ac_objext; then
22503 ac_cv_have_decl_isfinite=yes
22504else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022505 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022506sed 's/^/| /' conftest.$ac_ext >&5
22507
22508 ac_cv_have_decl_isfinite=no
22509fi
22510
22511rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22512fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022513{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isfinite" >&5
22514echo "${ECHO_T}$ac_cv_have_decl_isfinite" >&6; }
22515if test $ac_cv_have_decl_isfinite = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022516
22517cat >>confdefs.h <<_ACEOF
22518#define HAVE_DECL_ISFINITE 1
22519_ACEOF
22520
22521
22522else
22523 cat >>confdefs.h <<_ACEOF
22524#define HAVE_DECL_ISFINITE 0
22525_ACEOF
22526
22527
22528fi
22529
22530
Christian Heimes99170a52007-12-19 02:07:34 +000022531
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000022532LIBS=$LIBS_SAVE
22533
Mark Dickinson875ada42009-11-28 12:52:39 +000022534# For multiprocessing module, check that sem_open
22535# actually works. For FreeBSD versions <= 7.2,
22536# the kernel module that provides POSIX semaphores
22537# isn't loaded by default, so an attempt to call
22538# sem_open results in a 'Signal 12' error.
22539{ echo "$as_me:$LINENO: checking whether POSIX semaphores are enabled" >&5
22540echo $ECHO_N "checking whether POSIX semaphores are enabled... $ECHO_C" >&6; }
22541if test "${ac_cv_posix_semaphores_enabled+set}" = set; then
22542 echo $ECHO_N "(cached) $ECHO_C" >&6
22543else
22544 if test "$cross_compiling" = yes; then
22545 ac_cv_posix_semaphores_enabled=yes
22546else
22547 cat >conftest.$ac_ext <<_ACEOF
22548/* confdefs.h. */
22549_ACEOF
22550cat confdefs.h >>conftest.$ac_ext
22551cat >>conftest.$ac_ext <<_ACEOF
22552/* end confdefs.h. */
22553
22554#include <unistd.h>
22555#include <fcntl.h>
22556#include <stdio.h>
22557#include <semaphore.h>
22558#include <sys/stat.h>
22559
22560int main(void) {
22561 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
22562 if (a == SEM_FAILED) {
22563 perror("sem_open");
22564 return 1;
22565 }
22566 sem_close(a);
22567 return 0;
22568}
22569
22570_ACEOF
22571rm -f conftest$ac_exeext
22572if { (ac_try="$ac_link"
22573case "(($ac_try" in
22574 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22575 *) ac_try_echo=$ac_try;;
22576esac
22577eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22578 (eval "$ac_link") 2>&5
22579 ac_status=$?
22580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22581 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22582 { (case "(($ac_try" in
22583 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22584 *) ac_try_echo=$ac_try;;
22585esac
22586eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22587 (eval "$ac_try") 2>&5
22588 ac_status=$?
22589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22590 (exit $ac_status); }; }; then
22591 ac_cv_posix_semaphores_enabled=yes
22592else
22593 echo "$as_me: program exited with status $ac_status" >&5
22594echo "$as_me: failed program was:" >&5
22595sed 's/^/| /' conftest.$ac_ext >&5
22596
22597( exit $ac_status )
22598ac_cv_posix_semaphores_enabled=no
22599fi
22600rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22601fi
22602
22603
22604
22605fi
22606
22607{ echo "$as_me:$LINENO: result: $ac_cv_posix_semaphores_enabled" >&5
22608echo "${ECHO_T}$ac_cv_posix_semaphores_enabled" >&6; }
22609if test $ac_cv_posix_semaphores_enabled = no
22610then
22611
22612cat >>confdefs.h <<\_ACEOF
22613#define POSIX_SEMAPHORES_NOT_ENABLED 1
22614_ACEOF
22615
22616fi
22617
Mark Dickinson10683072009-04-18 21:18:19 +000022618# Multiprocessing check for broken sem_getvalue
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022619{ echo "$as_me:$LINENO: checking for broken sem_getvalue" >&5
22620echo $ECHO_N "checking for broken sem_getvalue... $ECHO_C" >&6; }
Mark Dickinson10683072009-04-18 21:18:19 +000022621if test "$cross_compiling" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022622 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
Mark Dickinson10683072009-04-18 21:18:19 +000022623See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022624echo "$as_me: error: cannot run test program while cross compiling
Mark Dickinson10683072009-04-18 21:18:19 +000022625See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022626 { (exit 1); exit 1; }; }
Mark Dickinson10683072009-04-18 21:18:19 +000022627else
22628 cat >conftest.$ac_ext <<_ACEOF
22629/* confdefs.h. */
22630_ACEOF
22631cat confdefs.h >>conftest.$ac_ext
22632cat >>conftest.$ac_ext <<_ACEOF
22633/* end confdefs.h. */
22634
22635#include <unistd.h>
22636#include <fcntl.h>
22637#include <stdio.h>
22638#include <semaphore.h>
22639#include <sys/stat.h>
22640
22641int main(void){
22642 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
22643 int count;
22644 int res;
22645 if(a==SEM_FAILED){
22646 perror("sem_open");
22647 return 1;
22648
22649 }
22650 res = sem_getvalue(a, &count);
22651 sem_close(a);
22652 return res==-1 ? 1 : 0;
22653}
22654
22655
22656_ACEOF
22657rm -f conftest$ac_exeext
22658if { (ac_try="$ac_link"
22659case "(($ac_try" in
22660 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22661 *) ac_try_echo=$ac_try;;
22662esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022663eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson10683072009-04-18 21:18:19 +000022664 (eval "$ac_link") 2>&5
22665 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000022667 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22668 { (case "(($ac_try" in
22669 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22670 *) ac_try_echo=$ac_try;;
22671esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022672eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson10683072009-04-18 21:18:19 +000022673 (eval "$ac_try") 2>&5
22674 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000022676 (exit $ac_status); }; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022677 { echo "$as_me:$LINENO: result: no" >&5
22678echo "${ECHO_T}no" >&6; }
Mark Dickinson10683072009-04-18 21:18:19 +000022679else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022680 echo "$as_me: program exited with status $ac_status" >&5
22681echo "$as_me: failed program was:" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000022682sed 's/^/| /' conftest.$ac_ext >&5
22683
22684( exit $ac_status )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022685{ echo "$as_me:$LINENO: result: yes" >&5
22686echo "${ECHO_T}yes" >&6; }
Mark Dickinson10683072009-04-18 21:18:19 +000022687
22688cat >>confdefs.h <<\_ACEOF
22689#define HAVE_BROKEN_SEM_GETVALUE 1
22690_ACEOF
22691
22692
22693fi
22694rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22695fi
22696
22697
22698
Mark Dickinsonbd792642009-03-18 20:06:12 +000022699# determine what size digit to use for Python's longs
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022700{ echo "$as_me:$LINENO: checking digit size for Python's longs" >&5
22701echo $ECHO_N "checking digit size for Python's longs... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000022702# Check whether --enable-big-digits was given.
22703if test "${enable_big_digits+set}" = set; then
22704 enableval=$enable_big_digits; case $enable_big_digits in
22705yes)
22706 enable_big_digits=30 ;;
22707no)
22708 enable_big_digits=15 ;;
2270915|30)
22710 ;;
22711*)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022712 { { echo "$as_me:$LINENO: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&5
22713echo "$as_me: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&2;}
Mark Dickinsonbd792642009-03-18 20:06:12 +000022714 { (exit 1); exit 1; }; } ;;
22715esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022716{ echo "$as_me:$LINENO: result: $enable_big_digits" >&5
22717echo "${ECHO_T}$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000022718
22719cat >>confdefs.h <<_ACEOF
22720#define PYLONG_BITS_IN_DIGIT $enable_big_digits
22721_ACEOF
22722
22723
22724else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022725 { echo "$as_me:$LINENO: result: no value specified" >&5
22726echo "${ECHO_T}no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000022727fi
22728
22729
Guido van Rossumef2255b2000-03-10 22:30:29 +000022730# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000022731if test "${ac_cv_header_wchar_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022732 { echo "$as_me:$LINENO: checking for wchar.h" >&5
22733echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022734if test "${ac_cv_header_wchar_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022735 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000022736fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022737{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
22738echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000022739else
Martin v. Löwis11437992002-04-12 09:54:03 +000022740 # Is the header compilable?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022741{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
22742echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022743cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022744/* confdefs.h. */
22745_ACEOF
22746cat confdefs.h >>conftest.$ac_ext
22747cat >>conftest.$ac_ext <<_ACEOF
22748/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022749$ac_includes_default
22750#include <wchar.h>
22751_ACEOF
22752rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022753if { (ac_try="$ac_compile"
22754case "(($ac_try" in
22755 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22756 *) ac_try_echo=$ac_try;;
22757esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022758eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022759 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022760 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022761 grep -v '^ *+' conftest.er1 >conftest.err
22762 rm -f conftest.er1
22763 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022764 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022765 (exit $ac_status); } && {
22766 test -z "$ac_c_werror_flag" ||
22767 test ! -s conftest.err
22768 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022769 ac_header_compiler=yes
22770else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022771 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022772sed 's/^/| /' conftest.$ac_ext >&5
22773
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022774 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000022775fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022776
22777rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022778{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22779echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022780
22781# Is the header present?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022782{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
22783echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022784cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022785/* confdefs.h. */
22786_ACEOF
22787cat confdefs.h >>conftest.$ac_ext
22788cat >>conftest.$ac_ext <<_ACEOF
22789/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000022790#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022791_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022792if { (ac_try="$ac_cpp conftest.$ac_ext"
22793case "(($ac_try" in
22794 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22795 *) ac_try_echo=$ac_try;;
22796esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022797eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022798 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022799 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000022800 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000022801 rm -f conftest.er1
22802 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022804 (exit $ac_status); } >/dev/null && {
22805 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22806 test ! -s conftest.err
22807 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022808 ac_header_preproc=yes
22809else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022810 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022811sed 's/^/| /' conftest.$ac_ext >&5
22812
Martin v. Löwis11437992002-04-12 09:54:03 +000022813 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000022814fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022815
Martin v. Löwis11437992002-04-12 09:54:03 +000022816rm -f conftest.err conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022817{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22818echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022819
22820# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022821case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22822 yes:no: )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022823 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
22824echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
22825 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
22826echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000022827 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022828 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000022829 no:yes:* )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022830 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
22831echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
22832 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
22833echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
22834 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
22835echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
22836 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
22837echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
22838 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
22839echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
22840 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
22841echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022842 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000022843## -------------------------------------- ##
22844## Report this to http://bugs.python.org/ ##
22845## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000022846_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022847 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000022848 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000022849esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022850{ echo "$as_me:$LINENO: checking for wchar.h" >&5
22851echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022852if test "${ac_cv_header_wchar_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022853 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000022854else
22855 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000022856fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022857{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
22858echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022859
22860fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022861if test $ac_cv_header_wchar_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022862
22863
22864cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000022865#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022866_ACEOF
22867
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022868 wchar_h="yes"
22869
Guido van Rossumef2255b2000-03-10 22:30:29 +000022870else
Martin v. Löwis11437992002-04-12 09:54:03 +000022871 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000022872
22873fi
22874
Michael W. Hudson54241132001-12-07 15:38:26 +000022875
Martin v. Löwis11437992002-04-12 09:54:03 +000022876
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022877# determine wchar_t size
22878if test "$wchar_h" = yes
22879then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022880 { echo "$as_me:$LINENO: checking for wchar_t" >&5
22881echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
22882if test "${ac_cv_type_wchar_t+set}" = set; then
22883 echo $ECHO_N "(cached) $ECHO_C" >&6
22884else
22885 cat >conftest.$ac_ext <<_ACEOF
22886/* confdefs.h. */
22887_ACEOF
22888cat confdefs.h >>conftest.$ac_ext
22889cat >>conftest.$ac_ext <<_ACEOF
22890/* end confdefs.h. */
22891#include <wchar.h>
22892
22893typedef wchar_t ac__type_new_;
22894int
22895main ()
22896{
22897if ((ac__type_new_ *) 0)
22898 return 0;
22899if (sizeof (ac__type_new_))
22900 return 0;
22901 ;
22902 return 0;
22903}
22904_ACEOF
22905rm -f conftest.$ac_objext
22906if { (ac_try="$ac_compile"
22907case "(($ac_try" in
22908 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22909 *) ac_try_echo=$ac_try;;
22910esac
22911eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22912 (eval "$ac_compile") 2>conftest.er1
22913 ac_status=$?
22914 grep -v '^ *+' conftest.er1 >conftest.err
22915 rm -f conftest.er1
22916 cat conftest.err >&5
22917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22918 (exit $ac_status); } && {
22919 test -z "$ac_c_werror_flag" ||
22920 test ! -s conftest.err
22921 } && test -s conftest.$ac_objext; then
22922 ac_cv_type_wchar_t=yes
22923else
22924 echo "$as_me: failed program was:" >&5
22925sed 's/^/| /' conftest.$ac_ext >&5
22926
22927 ac_cv_type_wchar_t=no
22928fi
22929
22930rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22931fi
22932{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
22933echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
22934
22935# The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022936# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
22937# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
22938# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022939{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
22940echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022941if test "${ac_cv_sizeof_wchar_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022942 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000022943else
Martin v. Löwis11437992002-04-12 09:54:03 +000022944 if test "$cross_compiling" = yes; then
22945 # Depending upon the size, compute the lo and hi bounds.
22946cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022947/* confdefs.h. */
22948_ACEOF
22949cat confdefs.h >>conftest.$ac_ext
22950cat >>conftest.$ac_ext <<_ACEOF
22951/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022952#include <wchar.h>
22953
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022954 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022955int
22956main ()
22957{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022958static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000022959test_array [0] = 0
22960
22961 ;
22962 return 0;
22963}
22964_ACEOF
22965rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022966if { (ac_try="$ac_compile"
22967case "(($ac_try" in
22968 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22969 *) ac_try_echo=$ac_try;;
22970esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022971eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022972 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022973 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022974 grep -v '^ *+' conftest.er1 >conftest.err
22975 rm -f conftest.er1
22976 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022978 (exit $ac_status); } && {
22979 test -z "$ac_c_werror_flag" ||
22980 test ! -s conftest.err
22981 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022982 ac_lo=0 ac_mid=0
22983 while :; do
22984 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022985/* confdefs.h. */
22986_ACEOF
22987cat confdefs.h >>conftest.$ac_ext
22988cat >>conftest.$ac_ext <<_ACEOF
22989/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022990#include <wchar.h>
22991
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022992 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022993int
22994main ()
22995{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022996static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000022997test_array [0] = 0
22998
22999 ;
23000 return 0;
23001}
23002_ACEOF
23003rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023004if { (ac_try="$ac_compile"
23005case "(($ac_try" in
23006 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23007 *) ac_try_echo=$ac_try;;
23008esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023009eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023010 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023011 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023012 grep -v '^ *+' conftest.er1 >conftest.err
23013 rm -f conftest.er1
23014 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023016 (exit $ac_status); } && {
23017 test -z "$ac_c_werror_flag" ||
23018 test ! -s conftest.err
23019 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023020 ac_hi=$ac_mid; break
23021else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023022 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023023sed 's/^/| /' conftest.$ac_ext >&5
23024
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023025 ac_lo=`expr $ac_mid + 1`
23026 if test $ac_lo -le $ac_mid; then
23027 ac_lo= ac_hi=
23028 break
23029 fi
23030 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000023031fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023032
23033rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023034 done
23035else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023036 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023037sed 's/^/| /' conftest.$ac_ext >&5
23038
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023039 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023040/* confdefs.h. */
23041_ACEOF
23042cat confdefs.h >>conftest.$ac_ext
23043cat >>conftest.$ac_ext <<_ACEOF
23044/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023045#include <wchar.h>
23046
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023047 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000023048int
23049main ()
23050{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023051static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000023052test_array [0] = 0
23053
23054 ;
23055 return 0;
23056}
23057_ACEOF
23058rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023059if { (ac_try="$ac_compile"
23060case "(($ac_try" in
23061 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23062 *) ac_try_echo=$ac_try;;
23063esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023064eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023065 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023066 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023067 grep -v '^ *+' conftest.er1 >conftest.err
23068 rm -f conftest.er1
23069 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023071 (exit $ac_status); } && {
23072 test -z "$ac_c_werror_flag" ||
23073 test ! -s conftest.err
23074 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023075 ac_hi=-1 ac_mid=-1
23076 while :; do
23077 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023078/* confdefs.h. */
23079_ACEOF
23080cat confdefs.h >>conftest.$ac_ext
23081cat >>conftest.$ac_ext <<_ACEOF
23082/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023083#include <wchar.h>
23084
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023085 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000023086int
23087main ()
23088{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023089static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000023090test_array [0] = 0
23091
23092 ;
23093 return 0;
23094}
23095_ACEOF
23096rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023097if { (ac_try="$ac_compile"
23098case "(($ac_try" in
23099 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23100 *) ac_try_echo=$ac_try;;
23101esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023102eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023103 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023104 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023105 grep -v '^ *+' conftest.er1 >conftest.err
23106 rm -f conftest.er1
23107 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023109 (exit $ac_status); } && {
23110 test -z "$ac_c_werror_flag" ||
23111 test ! -s conftest.err
23112 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023113 ac_lo=$ac_mid; break
23114else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023115 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023116sed 's/^/| /' conftest.$ac_ext >&5
23117
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023118 ac_hi=`expr '(' $ac_mid ')' - 1`
23119 if test $ac_mid -le $ac_hi; then
23120 ac_lo= ac_hi=
23121 break
23122 fi
23123 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000023124fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023125
23126rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023127 done
23128else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023129 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023130sed 's/^/| /' conftest.$ac_ext >&5
23131
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023132 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000023133fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023134
23135rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023136fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023137
23138rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023139# Binary search between lo and hi bounds.
23140while test "x$ac_lo" != "x$ac_hi"; do
23141 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
23142 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023143/* confdefs.h. */
23144_ACEOF
23145cat confdefs.h >>conftest.$ac_ext
23146cat >>conftest.$ac_ext <<_ACEOF
23147/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023148#include <wchar.h>
23149
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023150 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000023151int
23152main ()
23153{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023154static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000023155test_array [0] = 0
23156
23157 ;
23158 return 0;
23159}
23160_ACEOF
23161rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023162if { (ac_try="$ac_compile"
23163case "(($ac_try" in
23164 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23165 *) ac_try_echo=$ac_try;;
23166esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023167eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023168 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023169 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023170 grep -v '^ *+' conftest.er1 >conftest.err
23171 rm -f conftest.er1
23172 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023174 (exit $ac_status); } && {
23175 test -z "$ac_c_werror_flag" ||
23176 test ! -s conftest.err
23177 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023178 ac_hi=$ac_mid
23179else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023180 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023181sed 's/^/| /' conftest.$ac_ext >&5
23182
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023183 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000023184fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023185
23186rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023187done
23188case $ac_lo in
23189?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023190'') if test "$ac_cv_type_wchar_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023191 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000023192See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023193echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000023194See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023195 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023196 else
23197 ac_cv_sizeof_wchar_t=0
23198 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000023199esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023200else
Martin v. Löwis11437992002-04-12 09:54:03 +000023201 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023202/* confdefs.h. */
23203_ACEOF
23204cat confdefs.h >>conftest.$ac_ext
23205cat >>conftest.$ac_ext <<_ACEOF
23206/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023207#include <wchar.h>
23208
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023209 typedef wchar_t ac__type_sizeof_;
23210static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
23211static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000023212#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023213#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023214int
23215main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023216{
Martin v. Löwis11437992002-04-12 09:54:03 +000023217
23218 FILE *f = fopen ("conftest.val", "w");
23219 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023220 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023221 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000023222 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023223 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023224 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023225 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023226 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000023227 }
23228 else
23229 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023230 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023231 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023232 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023233 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000023234 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023235 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000023236
23237 ;
23238 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000023239}
Martin v. Löwis11437992002-04-12 09:54:03 +000023240_ACEOF
23241rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023242if { (ac_try="$ac_link"
23243case "(($ac_try" in
23244 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23245 *) ac_try_echo=$ac_try;;
23246esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023247eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023248 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023249 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023251 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023252 { (case "(($ac_try" in
23253 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23254 *) ac_try_echo=$ac_try;;
23255esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023256eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023257 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023258 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023260 (exit $ac_status); }; }; then
23261 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000023262else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023263 echo "$as_me: program exited with status $ac_status" >&5
23264echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023265sed 's/^/| /' conftest.$ac_ext >&5
23266
Martin v. Löwis11437992002-04-12 09:54:03 +000023267( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023268if test "$ac_cv_type_wchar_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023269 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000023270See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023271echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000023272See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023273 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023274 else
23275 ac_cv_sizeof_wchar_t=0
23276 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000023277fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023278rm -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 +000023279fi
23280rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000023281fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023282{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
23283echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023284
23285
23286
Martin v. Löwis11437992002-04-12 09:54:03 +000023287cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023288#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000023289_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023290
Michael W. Hudson54241132001-12-07 15:38:26 +000023291
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023292fi
23293
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023294{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
23295echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023296have_ucs4_tcl=no
23297cat >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öwisfa3bdea2003-09-04 18:50:54 +000023303
23304#include <tcl.h>
23305#if TCL_UTF_MAX != 6
23306# error "NOT UCS4_TCL"
23307#endif
23308int
23309main ()
23310{
23311
23312 ;
23313 return 0;
23314}
23315_ACEOF
23316rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023317if { (ac_try="$ac_compile"
23318case "(($ac_try" in
23319 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23320 *) ac_try_echo=$ac_try;;
23321esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023322eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023323 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023324 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023325 grep -v '^ *+' conftest.er1 >conftest.err
23326 rm -f conftest.er1
23327 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023328 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023329 (exit $ac_status); } && {
23330 test -z "$ac_c_werror_flag" ||
23331 test ! -s conftest.err
23332 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023333
23334
23335cat >>confdefs.h <<\_ACEOF
23336#define HAVE_UCS4_TCL 1
23337_ACEOF
23338
23339 have_ucs4_tcl=yes
23340
23341else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023342 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023343sed 's/^/| /' conftest.$ac_ext >&5
23344
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023345
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023346fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023347
23348rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023349{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
23350echo "${ECHO_T}$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023351
Skip Montanaro6dead952003-09-25 14:50:04 +000023352# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023353if test "$wchar_h" = yes
23354then
23355 # check whether wchar_t is signed or not
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023356 { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
23357echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023358 if test "${ac_cv_wchar_t_signed+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023359 echo $ECHO_N "(cached) $ECHO_C" >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023360else
23361
23362 if test "$cross_compiling" = yes; then
23363 ac_cv_wchar_t_signed=yes
23364else
23365 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023366/* confdefs.h. */
23367_ACEOF
23368cat confdefs.h >>conftest.$ac_ext
23369cat >>conftest.$ac_ext <<_ACEOF
23370/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023371
23372 #include <wchar.h>
23373 int main()
23374 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000023375 /* Success: exit code 0 */
23376 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023377 }
23378
23379_ACEOF
23380rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023381if { (ac_try="$ac_link"
23382case "(($ac_try" in
23383 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23384 *) ac_try_echo=$ac_try;;
23385esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023386eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023387 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023388 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023389 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023390 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023391 { (case "(($ac_try" in
23392 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23393 *) ac_try_echo=$ac_try;;
23394esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023395eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023396 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023397 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023399 (exit $ac_status); }; }; then
23400 ac_cv_wchar_t_signed=yes
23401else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023402 echo "$as_me: program exited with status $ac_status" >&5
23403echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023404sed 's/^/| /' conftest.$ac_ext >&5
23405
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023406( exit $ac_status )
23407ac_cv_wchar_t_signed=no
23408fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023409rm -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 +000023410fi
23411
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023412
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023413fi
23414
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023415 { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
23416echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023417fi
23418
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023419{ echo "$as_me:$LINENO: checking what type to use for str" >&5
23420echo $ECHO_N "checking what type to use for str... $ECHO_C" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000023421
23422# Check whether --with-wide-unicode was given.
23423if test "${with_wide_unicode+set}" = set; then
23424 withval=$with_wide_unicode;
23425if test "$withval" != no
23426then unicode_size="4"
23427else unicode_size="2"
23428fi
23429
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023430else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023431
Georg Brandl52d168a2008-01-07 18:10:24 +000023432case "$have_ucs4_tcl" in
23433 yes) unicode_size="4" ;;
23434 *) unicode_size="2" ;;
23435esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023436
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023437fi
23438
Martin v. Löwis0036cba2002-04-12 09:58:45 +000023439
23440
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023441
Georg Brandl52d168a2008-01-07 18:10:24 +000023442case "$unicode_size" in
23443 4) cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023444#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000023445_ACEOF
Georg Brandl52d168a2008-01-07 18:10:24 +000023446 ;;
23447 *) cat >>confdefs.h <<\_ACEOF
23448#define Py_UNICODE_SIZE 2
23449_ACEOF
23450 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023451esac
23452
Michael W. Hudson54241132001-12-07 15:38:26 +000023453
Martin v. Löwis11437992002-04-12 09:54:03 +000023454
23455
Georg Brandl52d168a2008-01-07 18:10:24 +000023456# wchar_t is only usable if it maps to an unsigned type
23457if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000023458 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000023459then
23460 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023461
Martin v. Löwis11437992002-04-12 09:54:03 +000023462cat >>confdefs.h <<\_ACEOF
23463#define HAVE_USABLE_WCHAR_T 1
23464_ACEOF
23465
Georg Brandl52d168a2008-01-07 18:10:24 +000023466 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023467#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000023468_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023469
Georg Brandl52d168a2008-01-07 18:10:24 +000023470elif test "$ac_cv_sizeof_short" = "$unicode_size"
23471then
23472 PY_UNICODE_TYPE="unsigned short"
23473 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023474#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000023475_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023476
Georg Brandl52d168a2008-01-07 18:10:24 +000023477elif test "$ac_cv_sizeof_long" = "$unicode_size"
23478then
23479 PY_UNICODE_TYPE="unsigned long"
23480 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023481#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000023482_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023483
Georg Brandl52d168a2008-01-07 18:10:24 +000023484else
23485 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023486fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023487{ echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
23488echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000023489
23490# check for endianness
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023491{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
23492echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023493if test "${ac_cv_c_bigendian+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023494 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000023495else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023496 # See if sys/param.h defines the BYTE_ORDER macro.
23497cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023498/* confdefs.h. */
23499_ACEOF
23500cat confdefs.h >>conftest.$ac_ext
23501cat >>conftest.$ac_ext <<_ACEOF
23502/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000023503#include <sys/types.h>
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023504#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000023505
Martin v. Löwis11437992002-04-12 09:54:03 +000023506int
23507main ()
23508{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023509#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
23510 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
23511 bogus endian macros
23512#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023513
23514 ;
23515 return 0;
23516}
23517_ACEOF
23518rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023519if { (ac_try="$ac_compile"
23520case "(($ac_try" in
23521 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23522 *) ac_try_echo=$ac_try;;
23523esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023524eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023525 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023526 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023527 grep -v '^ *+' conftest.er1 >conftest.err
23528 rm -f conftest.er1
23529 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023531 (exit $ac_status); } && {
23532 test -z "$ac_c_werror_flag" ||
23533 test ! -s conftest.err
23534 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000023535 # It does; now see whether it defined to BIG_ENDIAN or not.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023536cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023537/* confdefs.h. */
23538_ACEOF
23539cat confdefs.h >>conftest.$ac_ext
23540cat >>conftest.$ac_ext <<_ACEOF
23541/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000023542#include <sys/types.h>
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023543#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000023544
Martin v. Löwis11437992002-04-12 09:54:03 +000023545int
23546main ()
23547{
Guido van Rossumef2255b2000-03-10 22:30:29 +000023548#if BYTE_ORDER != BIG_ENDIAN
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023549 not big endian
23550#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023551
23552 ;
23553 return 0;
23554}
23555_ACEOF
23556rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023557if { (ac_try="$ac_compile"
23558case "(($ac_try" in
23559 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23560 *) ac_try_echo=$ac_try;;
23561esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023562eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023563 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023564 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023565 grep -v '^ *+' conftest.er1 >conftest.err
23566 rm -f conftest.er1
23567 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023569 (exit $ac_status); } && {
23570 test -z "$ac_c_werror_flag" ||
23571 test ! -s conftest.err
23572 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000023573 ac_cv_c_bigendian=yes
23574else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023575 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023576sed 's/^/| /' conftest.$ac_ext >&5
23577
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023578 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000023579fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023580
23581rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000023582else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023583 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023584sed 's/^/| /' conftest.$ac_ext >&5
23585
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023586 # It does not; compile a test program.
23587if test "$cross_compiling" = yes; then
23588 # try to guess the endianness by grepping values into an object file
23589 ac_cv_c_bigendian=unknown
23590 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023591/* confdefs.h. */
23592_ACEOF
23593cat confdefs.h >>conftest.$ac_ext
23594cat >>conftest.$ac_ext <<_ACEOF
23595/* end confdefs.h. */
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023596short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
23597short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
23598void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
23599short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
23600short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
23601void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023602int
23603main ()
23604{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023605 _ascii (); _ebcdic ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023606 ;
23607 return 0;
23608}
23609_ACEOF
23610rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023611if { (ac_try="$ac_compile"
23612case "(($ac_try" in
23613 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23614 *) ac_try_echo=$ac_try;;
23615esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023616eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023617 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023618 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023619 grep -v '^ *+' conftest.er1 >conftest.err
23620 rm -f conftest.er1
23621 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023623 (exit $ac_status); } && {
23624 test -z "$ac_c_werror_flag" ||
23625 test ! -s conftest.err
23626 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023627 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023628 ac_cv_c_bigendian=yes
Benjamin Petersona8332062009-09-11 22:36:27 +000023629fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023630if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
23631 if test "$ac_cv_c_bigendian" = unknown; then
23632 ac_cv_c_bigendian=no
23633 else
23634 # finding both strings is unlikely to happen, but who knows?
23635 ac_cv_c_bigendian=unknown
23636 fi
Benjamin Petersona8332062009-09-11 22:36:27 +000023637fi
Benjamin Petersona8332062009-09-11 22:36:27 +000023638else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023639 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023640sed 's/^/| /' conftest.$ac_ext >&5
23641
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023642
Martin v. Löwis11437992002-04-12 09:54:03 +000023643fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023644
23645rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023646else
23647 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023648/* confdefs.h. */
23649_ACEOF
23650cat confdefs.h >>conftest.$ac_ext
23651cat >>conftest.$ac_ext <<_ACEOF
23652/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023653$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000023654int
23655main ()
23656{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023657
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023658 /* Are we little or big endian? From Harbison&Steele. */
23659 union
23660 {
23661 long int l;
23662 char c[sizeof (long int)];
23663 } u;
23664 u.l = 1;
23665 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023666
23667 ;
23668 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000023669}
Martin v. Löwis11437992002-04-12 09:54:03 +000023670_ACEOF
23671rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023672if { (ac_try="$ac_link"
23673case "(($ac_try" in
23674 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23675 *) ac_try_echo=$ac_try;;
23676esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023677eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023678 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023679 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023681 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023682 { (case "(($ac_try" in
23683 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23684 *) ac_try_echo=$ac_try;;
23685esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023686eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023687 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023688 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023689 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023690 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000023691 ac_cv_c_bigendian=no
23692else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023693 echo "$as_me: program exited with status $ac_status" >&5
23694echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023695sed 's/^/| /' conftest.$ac_ext >&5
23696
Martin v. Löwis11437992002-04-12 09:54:03 +000023697( exit $ac_status )
23698ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000023699fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023700rm -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 +000023701fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023702
23703
Martin v. Löwis11437992002-04-12 09:54:03 +000023704fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023705
23706rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23707fi
23708{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
23709echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
23710case $ac_cv_c_bigendian in
23711 yes)
Benjamin Petersona8332062009-09-11 22:36:27 +000023712
23713cat >>confdefs.h <<\_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023714#define WORDS_BIGENDIAN 1
Benjamin Petersona8332062009-09-11 22:36:27 +000023715_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023716 ;;
23717 no)
23718 ;;
23719 *)
23720 { { echo "$as_me:$LINENO: error: unknown endianness
23721presetting ac_cv_c_bigendian=no (or yes) will help" >&5
23722echo "$as_me: error: unknown endianness
23723presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023724 { (exit 1); exit 1; }; } ;;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023725esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000023726
Michael W. Hudson54241132001-12-07 15:38:26 +000023727
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023728# Check whether right shifting a negative integer extends the sign bit
23729# or fills with zeros (like the Cray J90, according to Tim Peters).
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023730{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
23731echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023732if test "${ac_cv_rshift_extends_sign+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023733 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000023734else
Martin v. Löwis11437992002-04-12 09:54:03 +000023735
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023736if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000023737 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023738else
Martin v. Löwis11437992002-04-12 09:54:03 +000023739 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023740/* confdefs.h. */
23741_ACEOF
23742cat confdefs.h >>conftest.$ac_ext
23743cat >>conftest.$ac_ext <<_ACEOF
23744/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023745
23746int main()
23747{
Vladimir Marangozova6180282000-07-12 05:05:06 +000023748 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023749}
23750
Martin v. Löwis11437992002-04-12 09:54:03 +000023751_ACEOF
23752rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023753if { (ac_try="$ac_link"
23754case "(($ac_try" in
23755 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23756 *) ac_try_echo=$ac_try;;
23757esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023758eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023759 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023760 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023762 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023763 { (case "(($ac_try" in
23764 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23765 *) ac_try_echo=$ac_try;;
23766esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023767eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023768 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023769 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023771 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000023772 ac_cv_rshift_extends_sign=yes
23773else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023774 echo "$as_me: program exited with status $ac_status" >&5
23775echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023776sed 's/^/| /' conftest.$ac_ext >&5
23777
Martin v. Löwis11437992002-04-12 09:54:03 +000023778( exit $ac_status )
23779ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000023780fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023781rm -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 +000023782fi
23783
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023784
23785fi
23786
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023787{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
23788echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000023789if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023790then
Martin v. Löwis11437992002-04-12 09:54:03 +000023791
23792cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023793#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023794_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023795
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023796fi
23797
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023798# check for getc_unlocked and related locking functions
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023799{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
23800echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023801if test "${ac_cv_have_getc_unlocked+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023802 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023803else
Martin v. Löwis11437992002-04-12 09:54:03 +000023804
23805cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023806/* confdefs.h. */
23807_ACEOF
23808cat confdefs.h >>conftest.$ac_ext
23809cat >>conftest.$ac_ext <<_ACEOF
23810/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023811#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023812int
23813main ()
23814{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023815
23816 FILE *f = fopen("/dev/null", "r");
23817 flockfile(f);
23818 getc_unlocked(f);
23819 funlockfile(f);
23820
Martin v. Löwis11437992002-04-12 09:54:03 +000023821 ;
23822 return 0;
23823}
23824_ACEOF
23825rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023826if { (ac_try="$ac_link"
23827case "(($ac_try" in
23828 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23829 *) ac_try_echo=$ac_try;;
23830esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023831eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023832 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023833 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023834 grep -v '^ *+' conftest.er1 >conftest.err
23835 rm -f conftest.er1
23836 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023838 (exit $ac_status); } && {
23839 test -z "$ac_c_werror_flag" ||
23840 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023841 } && test -s conftest$ac_exeext &&
23842 $as_test_x conftest$ac_exeext; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023843 ac_cv_have_getc_unlocked=yes
23844else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023845 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023846sed 's/^/| /' conftest.$ac_ext >&5
23847
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023848 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023849fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023850
23851rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023852 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023853fi
23854
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023855{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
23856echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023857if test "$ac_cv_have_getc_unlocked" = yes
23858then
Martin v. Löwis11437992002-04-12 09:54:03 +000023859
23860cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023861#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023862_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023863
23864fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023865
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023866# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000023867# save the value of LIBS so we don't actually link Python with readline
23868LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023869
Gregory P. Smith18820942008-09-07 06:24:49 +000023870# On some systems we need to link readline to a termcap compatible
23871# library. NOTE: Keep the precedence of listed libraries synchronised
23872# with setup.py.
23873py_cv_lib_readline=no
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023874{ echo "$as_me:$LINENO: checking how to link readline libs" >&5
23875echo $ECHO_N "checking how to link readline libs... $ECHO_C" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000023876for py_libtermcap in "" ncursesw ncurses curses termcap; do
23877 if test -z "$py_libtermcap"; then
23878 READLINE_LIBS="-lreadline"
23879 else
23880 READLINE_LIBS="-lreadline -l$py_libtermcap"
23881 fi
23882 LIBS="$READLINE_LIBS $LIBS_no_readline"
23883 cat >conftest.$ac_ext <<_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023884/* confdefs.h. */
23885_ACEOF
23886cat confdefs.h >>conftest.$ac_ext
23887cat >>conftest.$ac_ext <<_ACEOF
23888/* end confdefs.h. */
23889
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023890/* Override any GCC internal prototype to avoid an error.
23891 Use char because int might match the return type of a GCC
23892 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023893#ifdef __cplusplus
23894extern "C"
23895#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023896char readline ();
23897int
23898main ()
23899{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023900return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023901 ;
23902 return 0;
23903}
23904_ACEOF
23905rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023906if { (ac_try="$ac_link"
23907case "(($ac_try" in
23908 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23909 *) ac_try_echo=$ac_try;;
23910esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023911eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023912 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023913 ac_status=$?
23914 grep -v '^ *+' conftest.er1 >conftest.err
23915 rm -f conftest.er1
23916 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023918 (exit $ac_status); } && {
23919 test -z "$ac_c_werror_flag" ||
23920 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023921 } && test -s conftest$ac_exeext &&
23922 $as_test_x conftest$ac_exeext; then
Gregory P. Smith18820942008-09-07 06:24:49 +000023923 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023924else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023925 echo "$as_me: failed program was:" >&5
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023926sed 's/^/| /' conftest.$ac_ext >&5
23927
Gregory P. Smith18820942008-09-07 06:24:49 +000023928
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023929fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023930
23931rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023932 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000023933 if test $py_cv_lib_readline = yes; then
23934 break
23935 fi
23936done
23937# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
23938#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000023939if test $py_cv_lib_readline = no; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023940 { echo "$as_me:$LINENO: result: none" >&5
23941echo "${ECHO_T}none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000023942else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023943 { echo "$as_me:$LINENO: result: $READLINE_LIBS" >&5
23944echo "${ECHO_T}$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000023945
23946cat >>confdefs.h <<\_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023947#define HAVE_LIBREADLINE 1
23948_ACEOF
23949
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023950fi
23951
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023952# check for readline 2.1
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023953{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
23954echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023955if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023956 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023957else
23958 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000023959LIBS="-lreadline $READLINE_LIBS $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023960cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023961/* confdefs.h. */
23962_ACEOF
23963cat confdefs.h >>conftest.$ac_ext
23964cat >>conftest.$ac_ext <<_ACEOF
23965/* end confdefs.h. */
23966
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023967/* Override any GCC internal prototype to avoid an error.
23968 Use char because int might match the return type of a GCC
23969 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023970#ifdef __cplusplus
23971extern "C"
23972#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023973char rl_callback_handler_install ();
23974int
23975main ()
23976{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023977return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023978 ;
23979 return 0;
23980}
23981_ACEOF
23982rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023983if { (ac_try="$ac_link"
23984case "(($ac_try" in
23985 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23986 *) ac_try_echo=$ac_try;;
23987esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023988eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023989 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023990 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023991 grep -v '^ *+' conftest.er1 >conftest.err
23992 rm -f conftest.er1
23993 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023995 (exit $ac_status); } && {
23996 test -z "$ac_c_werror_flag" ||
23997 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023998 } && test -s conftest$ac_exeext &&
23999 $as_test_x conftest$ac_exeext; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024000 ac_cv_lib_readline_rl_callback_handler_install=yes
24001else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024002 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024003sed 's/^/| /' conftest.$ac_ext >&5
24004
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024005 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024006fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024007
24008rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024009 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024010LIBS=$ac_check_lib_save_LIBS
24011fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024012{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
24013echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
24014if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024015
24016cat >>confdefs.h <<\_ACEOF
24017#define HAVE_RL_CALLBACK 1
24018_ACEOF
24019
24020fi
24021
24022
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024023# check for readline 2.2
24024cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024025/* confdefs.h. */
24026_ACEOF
24027cat confdefs.h >>conftest.$ac_ext
24028cat >>conftest.$ac_ext <<_ACEOF
24029/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024030#include <readline/readline.h>
24031_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024032if { (ac_try="$ac_cpp conftest.$ac_ext"
24033case "(($ac_try" in
24034 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24035 *) ac_try_echo=$ac_try;;
24036esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024037eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024038 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024039 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000024040 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024041 rm -f conftest.er1
24042 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024044 (exit $ac_status); } >/dev/null && {
24045 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
24046 test ! -s conftest.err
24047 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024048 have_readline=yes
24049else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024050 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024051sed 's/^/| /' conftest.$ac_ext >&5
24052
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024053 have_readline=no
24054fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024055
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024056rm -f conftest.err conftest.$ac_ext
24057if test $have_readline = yes
24058then
24059 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024060/* confdefs.h. */
24061_ACEOF
24062cat confdefs.h >>conftest.$ac_ext
24063cat >>conftest.$ac_ext <<_ACEOF
24064/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024065#include <readline/readline.h>
24066
24067_ACEOF
24068if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000024069 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024070
24071cat >>confdefs.h <<\_ACEOF
24072#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
24073_ACEOF
24074
24075fi
Mark Dickinson875ada42009-11-28 12:52:39 +000024076rm -f conftest*
Antoine Pitrou37276002009-10-26 19:32:51 +000024077
24078 cat >conftest.$ac_ext <<_ACEOF
24079/* confdefs.h. */
24080_ACEOF
24081cat confdefs.h >>conftest.$ac_ext
24082cat >>conftest.$ac_ext <<_ACEOF
24083/* end confdefs.h. */
24084#include <readline/readline.h>
24085
24086_ACEOF
24087if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
24088 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then
24089
24090cat >>confdefs.h <<\_ACEOF
24091#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1
24092_ACEOF
24093
24094fi
Mark Dickinson875ada42009-11-28 12:52:39 +000024095rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024096
24097fi
24098
Martin v. Löwis0daad592001-09-30 21:09:59 +000024099# check for readline 4.0
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024100{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
24101echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024102if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024103 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000024104else
Martin v. Löwis11437992002-04-12 09:54:03 +000024105 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000024106LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000024107cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024108/* confdefs.h. */
24109_ACEOF
24110cat confdefs.h >>conftest.$ac_ext
24111cat >>conftest.$ac_ext <<_ACEOF
24112/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024113
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024114/* Override any GCC internal prototype to avoid an error.
24115 Use char because int might match the return type of a GCC
24116 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024117#ifdef __cplusplus
24118extern "C"
24119#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000024120char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000024121int
24122main ()
24123{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024124return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000024125 ;
24126 return 0;
24127}
24128_ACEOF
24129rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024130if { (ac_try="$ac_link"
24131case "(($ac_try" in
24132 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24133 *) ac_try_echo=$ac_try;;
24134esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024135eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024136 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024137 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024138 grep -v '^ *+' conftest.er1 >conftest.err
24139 rm -f conftest.er1
24140 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024142 (exit $ac_status); } && {
24143 test -z "$ac_c_werror_flag" ||
24144 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024145 } && test -s conftest$ac_exeext &&
24146 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024147 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000024148else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024149 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024150sed 's/^/| /' conftest.$ac_ext >&5
24151
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024152 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000024153fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024154
24155rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024156 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024157LIBS=$ac_check_lib_save_LIBS
24158fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024159{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
24160echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
24161if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000024162
Martin v. Löwis11437992002-04-12 09:54:03 +000024163cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000024164#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024165_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000024166
Martin v. Löwis0daad592001-09-30 21:09:59 +000024167fi
24168
Michael W. Hudson54241132001-12-07 15:38:26 +000024169
Thomas Wouters89d996e2007-09-08 17:39:28 +000024170# also in 4.0
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024171{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
24172echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; }
Thomas Wouters89d996e2007-09-08 17:39:28 +000024173if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024174 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000024175else
24176 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000024177LIBS="-lreadline $READLINE_LIBS $LIBS"
Thomas Wouters89d996e2007-09-08 17:39:28 +000024178cat >conftest.$ac_ext <<_ACEOF
24179/* confdefs.h. */
24180_ACEOF
24181cat confdefs.h >>conftest.$ac_ext
24182cat >>conftest.$ac_ext <<_ACEOF
24183/* end confdefs.h. */
24184
24185/* Override any GCC internal prototype to avoid an error.
24186 Use char because int might match the return type of a GCC
24187 builtin and then its argument prototype would still apply. */
24188#ifdef __cplusplus
24189extern "C"
24190#endif
24191char rl_completion_display_matches_hook ();
24192int
24193main ()
24194{
24195return rl_completion_display_matches_hook ();
24196 ;
24197 return 0;
24198}
24199_ACEOF
24200rm -f conftest.$ac_objext conftest$ac_exeext
24201if { (ac_try="$ac_link"
24202case "(($ac_try" in
24203 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24204 *) ac_try_echo=$ac_try;;
24205esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024206eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000024207 (eval "$ac_link") 2>conftest.er1
24208 ac_status=$?
24209 grep -v '^ *+' conftest.er1 >conftest.err
24210 rm -f conftest.er1
24211 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000024213 (exit $ac_status); } && {
24214 test -z "$ac_c_werror_flag" ||
24215 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024216 } && test -s conftest$ac_exeext &&
24217 $as_test_x conftest$ac_exeext; then
Thomas Wouters89d996e2007-09-08 17:39:28 +000024218 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
24219else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024220 echo "$as_me: failed program was:" >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000024221sed 's/^/| /' conftest.$ac_ext >&5
24222
24223 ac_cv_lib_readline_rl_completion_display_matches_hook=no
24224fi
24225
24226rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
24227 conftest$ac_exeext conftest.$ac_ext
24228LIBS=$ac_check_lib_save_LIBS
24229fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024230{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
24231echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
24232if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then
Thomas Wouters89d996e2007-09-08 17:39:28 +000024233
24234cat >>confdefs.h <<\_ACEOF
24235#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
24236_ACEOF
24237
24238fi
24239
24240
Martin v. Löwis0daad592001-09-30 21:09:59 +000024241# check for readline 4.2
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024242{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
24243echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024244if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024245 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000024246else
Martin v. Löwis11437992002-04-12 09:54:03 +000024247 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000024248LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000024249cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024250/* confdefs.h. */
24251_ACEOF
24252cat confdefs.h >>conftest.$ac_ext
24253cat >>conftest.$ac_ext <<_ACEOF
24254/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024255
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024256/* Override any GCC internal prototype to avoid an error.
24257 Use char because int might match the return type of a GCC
24258 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024259#ifdef __cplusplus
24260extern "C"
24261#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000024262char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000024263int
24264main ()
24265{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024266return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000024267 ;
24268 return 0;
24269}
24270_ACEOF
24271rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024272if { (ac_try="$ac_link"
24273case "(($ac_try" in
24274 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24275 *) ac_try_echo=$ac_try;;
24276esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024277eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024278 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024279 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024280 grep -v '^ *+' conftest.er1 >conftest.err
24281 rm -f conftest.er1
24282 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024284 (exit $ac_status); } && {
24285 test -z "$ac_c_werror_flag" ||
24286 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024287 } && test -s conftest$ac_exeext &&
24288 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024289 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000024290else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024291 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024292sed 's/^/| /' conftest.$ac_ext >&5
24293
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024294 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000024295fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024296
24297rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024298 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024299LIBS=$ac_check_lib_save_LIBS
24300fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024301{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
24302echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
24303if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000024304
Martin v. Löwis11437992002-04-12 09:54:03 +000024305cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000024306#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024307_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000024308
Guido van Rossum353ae582001-07-10 16:45:32 +000024309fi
24310
Jack Jansendd19cf82001-12-06 22:36:17 +000024311
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024312# also in readline 4.2
24313cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024314/* confdefs.h. */
24315_ACEOF
24316cat confdefs.h >>conftest.$ac_ext
24317cat >>conftest.$ac_ext <<_ACEOF
24318/* end confdefs.h. */
24319#include <readline/readline.h>
24320_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024321if { (ac_try="$ac_cpp conftest.$ac_ext"
24322case "(($ac_try" in
24323 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24324 *) ac_try_echo=$ac_try;;
24325esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024326eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024327 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024328 ac_status=$?
24329 grep -v '^ *+' conftest.er1 >conftest.err
24330 rm -f conftest.er1
24331 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024333 (exit $ac_status); } >/dev/null && {
24334 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
24335 test ! -s conftest.err
24336 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024337 have_readline=yes
24338else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024339 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024340sed 's/^/| /' conftest.$ac_ext >&5
24341
24342 have_readline=no
24343fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024344
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024345rm -f conftest.err conftest.$ac_ext
24346if test $have_readline = yes
24347then
24348 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024349/* confdefs.h. */
24350_ACEOF
24351cat confdefs.h >>conftest.$ac_ext
24352cat >>conftest.$ac_ext <<_ACEOF
24353/* end confdefs.h. */
24354#include <readline/readline.h>
24355
24356_ACEOF
24357if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
24358 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
24359
24360cat >>confdefs.h <<\_ACEOF
24361#define HAVE_RL_CATCH_SIGNAL 1
24362_ACEOF
24363
24364fi
Mark Dickinson875ada42009-11-28 12:52:39 +000024365rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024366
24367fi
24368
Martin v. Löwis82bca632006-02-10 20:49:30 +000024369# End of readline checks: restore LIBS
24370LIBS=$LIBS_no_readline
24371
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024372{ echo "$as_me:$LINENO: checking for broken nice()" >&5
24373echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024374if test "${ac_cv_broken_nice+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024375 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000024376else
Martin v. Löwis11437992002-04-12 09:54:03 +000024377
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024378if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000024379 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024380else
Martin v. Löwis11437992002-04-12 09:54:03 +000024381 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024382/* confdefs.h. */
24383_ACEOF
24384cat confdefs.h >>conftest.$ac_ext
24385cat >>conftest.$ac_ext <<_ACEOF
24386/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024387
24388int main()
24389{
24390 int val1 = nice(1);
24391 if (val1 != -1 && val1 == nice(2))
24392 exit(0);
24393 exit(1);
24394}
24395
Martin v. Löwis11437992002-04-12 09:54:03 +000024396_ACEOF
24397rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024398if { (ac_try="$ac_link"
24399case "(($ac_try" in
24400 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24401 *) ac_try_echo=$ac_try;;
24402esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024403eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024404 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024405 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024407 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024408 { (case "(($ac_try" in
24409 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24410 *) ac_try_echo=$ac_try;;
24411esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024412eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024413 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024414 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024416 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024417 ac_cv_broken_nice=yes
24418else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024419 echo "$as_me: program exited with status $ac_status" >&5
24420echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024421sed 's/^/| /' conftest.$ac_ext >&5
24422
Martin v. Löwis11437992002-04-12 09:54:03 +000024423( exit $ac_status )
24424ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024425fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024426rm -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 +000024427fi
24428
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024429
24430fi
24431
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024432{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
24433echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024434if test "$ac_cv_broken_nice" = yes
24435then
Martin v. Löwis11437992002-04-12 09:54:03 +000024436
24437cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024438#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024439_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024440
24441fi
24442
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024443{ echo "$as_me:$LINENO: checking for broken poll()" >&5
24444echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024445if test "$cross_compiling" = yes; then
24446 ac_cv_broken_poll=no
24447else
24448 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024449/* confdefs.h. */
24450_ACEOF
24451cat confdefs.h >>conftest.$ac_ext
24452cat >>conftest.$ac_ext <<_ACEOF
24453/* end confdefs.h. */
24454
24455#include <poll.h>
24456
24457int main (void)
24458 {
24459 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
24460
24461 close (42);
24462
24463 int poll_test = poll (&poll_struct, 1, 0);
24464
24465 if (poll_test < 0)
24466 {
24467 exit(0);
24468 }
24469 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
24470 {
24471 exit(0);
24472 }
24473 else
24474 {
24475 exit(1);
24476 }
24477 }
24478
24479_ACEOF
24480rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024481if { (ac_try="$ac_link"
24482case "(($ac_try" in
24483 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24484 *) ac_try_echo=$ac_try;;
24485esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024486eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024487 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024488 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024490 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024491 { (case "(($ac_try" in
24492 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24493 *) ac_try_echo=$ac_try;;
24494esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024495eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024496 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024497 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024499 (exit $ac_status); }; }; then
24500 ac_cv_broken_poll=yes
24501else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024502 echo "$as_me: program exited with status $ac_status" >&5
24503echo "$as_me: failed program was:" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024504sed 's/^/| /' conftest.$ac_ext >&5
24505
24506( exit $ac_status )
24507ac_cv_broken_poll=no
24508fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024509rm -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 +000024510fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024511
24512
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024513{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
24514echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024515if test "$ac_cv_broken_poll" = yes
24516then
24517
24518cat >>confdefs.h <<\_ACEOF
24519#define HAVE_BROKEN_POLL 1
24520_ACEOF
24521
24522fi
24523
Brett Cannon43802422005-02-10 20:48:03 +000024524# 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 +000024525# (which is not required by ISO C or UNIX spec) and/or if we support
24526# tzname[]
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024527{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
24528echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000024529if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024530 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000024531else
24532 cat >conftest.$ac_ext <<_ACEOF
24533/* confdefs.h. */
24534_ACEOF
24535cat confdefs.h >>conftest.$ac_ext
24536cat >>conftest.$ac_ext <<_ACEOF
24537/* end confdefs.h. */
24538#include <sys/types.h>
24539#include <$ac_cv_struct_tm>
24540
24541
24542int
24543main ()
24544{
24545static struct tm ac_aggr;
24546if (ac_aggr.tm_zone)
24547return 0;
24548 ;
24549 return 0;
24550}
24551_ACEOF
24552rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024553if { (ac_try="$ac_compile"
24554case "(($ac_try" in
24555 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24556 *) ac_try_echo=$ac_try;;
24557esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024558eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024559 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000024560 ac_status=$?
24561 grep -v '^ *+' conftest.er1 >conftest.err
24562 rm -f conftest.er1
24563 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024565 (exit $ac_status); } && {
24566 test -z "$ac_c_werror_flag" ||
24567 test ! -s conftest.err
24568 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000024569 ac_cv_member_struct_tm_tm_zone=yes
24570else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024571 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000024572sed 's/^/| /' conftest.$ac_ext >&5
24573
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024574 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000024575/* confdefs.h. */
24576_ACEOF
24577cat confdefs.h >>conftest.$ac_ext
24578cat >>conftest.$ac_ext <<_ACEOF
24579/* end confdefs.h. */
24580#include <sys/types.h>
24581#include <$ac_cv_struct_tm>
24582
24583
24584int
24585main ()
24586{
24587static struct tm ac_aggr;
24588if (sizeof ac_aggr.tm_zone)
24589return 0;
24590 ;
24591 return 0;
24592}
24593_ACEOF
24594rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024595if { (ac_try="$ac_compile"
24596case "(($ac_try" in
24597 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24598 *) ac_try_echo=$ac_try;;
24599esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024600eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024601 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000024602 ac_status=$?
24603 grep -v '^ *+' conftest.er1 >conftest.err
24604 rm -f conftest.er1
24605 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024606 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024607 (exit $ac_status); } && {
24608 test -z "$ac_c_werror_flag" ||
24609 test ! -s conftest.err
24610 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000024611 ac_cv_member_struct_tm_tm_zone=yes
24612else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024613 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000024614sed 's/^/| /' conftest.$ac_ext >&5
24615
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024616 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000024617fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024618
24619rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000024620fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024621
24622rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000024623fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024624{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
24625echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
24626if test $ac_cv_member_struct_tm_tm_zone = yes; then
Brett Cannon43802422005-02-10 20:48:03 +000024627
24628cat >>confdefs.h <<_ACEOF
24629#define HAVE_STRUCT_TM_TM_ZONE 1
24630_ACEOF
24631
24632
24633fi
24634
24635if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
24636
24637cat >>confdefs.h <<\_ACEOF
24638#define HAVE_TM_ZONE 1
24639_ACEOF
24640
24641else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024642 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
24643echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024644if test "${ac_cv_have_decl_tzname+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024645 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024646else
24647 cat >conftest.$ac_ext <<_ACEOF
24648/* confdefs.h. */
24649_ACEOF
24650cat confdefs.h >>conftest.$ac_ext
24651cat >>conftest.$ac_ext <<_ACEOF
24652/* end confdefs.h. */
24653#include <time.h>
24654
24655int
24656main ()
24657{
24658#ifndef tzname
24659 (void) tzname;
24660#endif
24661
24662 ;
24663 return 0;
24664}
24665_ACEOF
24666rm -f conftest.$ac_objext
24667if { (ac_try="$ac_compile"
24668case "(($ac_try" in
24669 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24670 *) ac_try_echo=$ac_try;;
24671esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024672eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024673 (eval "$ac_compile") 2>conftest.er1
24674 ac_status=$?
24675 grep -v '^ *+' conftest.er1 >conftest.err
24676 rm -f conftest.er1
24677 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024679 (exit $ac_status); } && {
24680 test -z "$ac_c_werror_flag" ||
24681 test ! -s conftest.err
24682 } && test -s conftest.$ac_objext; then
24683 ac_cv_have_decl_tzname=yes
24684else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024685 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024686sed 's/^/| /' conftest.$ac_ext >&5
24687
24688 ac_cv_have_decl_tzname=no
24689fi
24690
24691rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24692fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024693{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
24694echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
24695if test $ac_cv_have_decl_tzname = yes; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024696
24697cat >>confdefs.h <<_ACEOF
24698#define HAVE_DECL_TZNAME 1
24699_ACEOF
24700
24701
24702else
24703 cat >>confdefs.h <<_ACEOF
24704#define HAVE_DECL_TZNAME 0
24705_ACEOF
24706
24707
24708fi
24709
24710
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024711 { echo "$as_me:$LINENO: checking for tzname" >&5
24712echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000024713if test "${ac_cv_var_tzname+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024714 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000024715else
24716 cat >conftest.$ac_ext <<_ACEOF
24717/* confdefs.h. */
24718_ACEOF
24719cat confdefs.h >>conftest.$ac_ext
24720cat >>conftest.$ac_ext <<_ACEOF
24721/* end confdefs.h. */
24722#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024723#if !HAVE_DECL_TZNAME
24724extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000024725#endif
24726
24727int
24728main ()
24729{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024730return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000024731 ;
24732 return 0;
24733}
24734_ACEOF
24735rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024736if { (ac_try="$ac_link"
24737case "(($ac_try" in
24738 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24739 *) ac_try_echo=$ac_try;;
24740esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024741eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024742 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000024743 ac_status=$?
24744 grep -v '^ *+' conftest.er1 >conftest.err
24745 rm -f conftest.er1
24746 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024747 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024748 (exit $ac_status); } && {
24749 test -z "$ac_c_werror_flag" ||
24750 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024751 } && test -s conftest$ac_exeext &&
24752 $as_test_x conftest$ac_exeext; then
Brett Cannon43802422005-02-10 20:48:03 +000024753 ac_cv_var_tzname=yes
24754else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024755 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000024756sed 's/^/| /' conftest.$ac_ext >&5
24757
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024758 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000024759fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024760
24761rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000024762 conftest$ac_exeext conftest.$ac_ext
24763fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024764{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
24765echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000024766 if test $ac_cv_var_tzname = yes; then
24767
24768cat >>confdefs.h <<\_ACEOF
24769#define HAVE_TZNAME 1
24770_ACEOF
24771
24772 fi
24773fi
24774
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024775
Martin v. Löwis1d459062005-03-14 21:23:33 +000024776# check tzset(3) exists and works like we expect it to
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024777{ echo "$as_me:$LINENO: checking for working tzset()" >&5
24778echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024779if test "${ac_cv_working_tzset+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024780 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024781else
24782
24783if test "$cross_compiling" = yes; then
24784 ac_cv_working_tzset=no
24785else
24786 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024787/* confdefs.h. */
24788_ACEOF
24789cat confdefs.h >>conftest.$ac_ext
24790cat >>conftest.$ac_ext <<_ACEOF
24791/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024792
24793#include <stdlib.h>
24794#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000024795#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000024796
24797#if HAVE_TZNAME
24798extern char *tzname[];
24799#endif
24800
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024801int main()
24802{
Brett Cannon18367812003-09-19 00:59:16 +000024803 /* Note that we need to ensure that not only does tzset(3)
24804 do 'something' with localtime, but it works as documented
24805 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000024806 This includes making sure that tzname is set properly if
24807 tm->tm_zone does not exist since it is the alternative way
24808 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000024809
24810 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000024811 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000024812 */
24813
Martin v. Löwis1d459062005-03-14 21:23:33 +000024814 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000024815 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
24816
Neal Norwitz7f2588c2003-04-11 15:35:53 +000024817 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024818 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000024819 if (localtime(&groundhogday)->tm_hour != 0)
24820 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000024821#if HAVE_TZNAME
24822 /* For UTC, tzname[1] is sometimes "", sometimes " " */
24823 if (strcmp(tzname[0], "UTC") ||
24824 (tzname[1][0] != 0 && tzname[1][0] != ' '))
24825 exit(1);
24826#endif
Brett Cannon18367812003-09-19 00:59:16 +000024827
Neal Norwitz7f2588c2003-04-11 15:35:53 +000024828 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024829 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000024830 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024831 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000024832#if HAVE_TZNAME
24833 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
24834 exit(1);
24835#endif
Brett Cannon18367812003-09-19 00:59:16 +000024836
24837 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
24838 tzset();
24839 if (localtime(&groundhogday)->tm_hour != 11)
24840 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000024841#if HAVE_TZNAME
24842 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
24843 exit(1);
24844#endif
24845
24846#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000024847 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
24848 exit(1);
24849 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
24850 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000024851#endif
Brett Cannon18367812003-09-19 00:59:16 +000024852
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024853 exit(0);
24854}
24855
24856_ACEOF
24857rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024858if { (ac_try="$ac_link"
24859case "(($ac_try" in
24860 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24861 *) ac_try_echo=$ac_try;;
24862esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024863eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024864 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024865 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024867 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024868 { (case "(($ac_try" in
24869 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24870 *) ac_try_echo=$ac_try;;
24871esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024872eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024873 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024874 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024876 (exit $ac_status); }; }; then
24877 ac_cv_working_tzset=yes
24878else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024879 echo "$as_me: program exited with status $ac_status" >&5
24880echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024881sed 's/^/| /' conftest.$ac_ext >&5
24882
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024883( exit $ac_status )
24884ac_cv_working_tzset=no
24885fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024886rm -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 +000024887fi
24888
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024889
24890fi
24891
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024892{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
24893echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024894if test "$ac_cv_working_tzset" = yes
24895then
24896
24897cat >>confdefs.h <<\_ACEOF
24898#define HAVE_WORKING_TZSET 1
24899_ACEOF
24900
24901fi
24902
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024903# Look for subsecond timestamps in struct stat
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024904{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
24905echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024906if test "${ac_cv_stat_tv_nsec+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024907 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024908else
24909 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024910/* confdefs.h. */
24911_ACEOF
24912cat confdefs.h >>conftest.$ac_ext
24913cat >>conftest.$ac_ext <<_ACEOF
24914/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024915#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024916int
24917main ()
24918{
24919
24920struct stat st;
24921st.st_mtim.tv_nsec = 1;
24922
24923 ;
24924 return 0;
24925}
24926_ACEOF
24927rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024928if { (ac_try="$ac_compile"
24929case "(($ac_try" in
24930 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24931 *) ac_try_echo=$ac_try;;
24932esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024933eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024934 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024935 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024936 grep -v '^ *+' conftest.er1 >conftest.err
24937 rm -f conftest.er1
24938 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024940 (exit $ac_status); } && {
24941 test -z "$ac_c_werror_flag" ||
24942 test ! -s conftest.err
24943 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000024944 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024945else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024946 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024947sed 's/^/| /' conftest.$ac_ext >&5
24948
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024949 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024950fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000024951
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024952rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24953fi
24954
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024955{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
24956echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024957if test "$ac_cv_stat_tv_nsec" = yes
24958then
24959
24960cat >>confdefs.h <<\_ACEOF
24961#define HAVE_STAT_TV_NSEC 1
24962_ACEOF
24963
24964fi
24965
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024966# Look for BSD style subsecond timestamps in struct stat
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024967{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
24968echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024969if test "${ac_cv_stat_tv_nsec2+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024970 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024971else
24972 cat >conftest.$ac_ext <<_ACEOF
24973/* confdefs.h. */
24974_ACEOF
24975cat confdefs.h >>conftest.$ac_ext
24976cat >>conftest.$ac_ext <<_ACEOF
24977/* end confdefs.h. */
24978#include <sys/stat.h>
24979int
24980main ()
24981{
24982
24983struct stat st;
24984st.st_mtimespec.tv_nsec = 1;
24985
24986 ;
24987 return 0;
24988}
24989_ACEOF
24990rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024991if { (ac_try="$ac_compile"
24992case "(($ac_try" in
24993 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24994 *) ac_try_echo=$ac_try;;
24995esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024996eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024997 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024998 ac_status=$?
24999 grep -v '^ *+' conftest.er1 >conftest.err
25000 rm -f conftest.er1
25001 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025003 (exit $ac_status); } && {
25004 test -z "$ac_c_werror_flag" ||
25005 test ! -s conftest.err
25006 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025007 ac_cv_stat_tv_nsec2=yes
25008else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025009 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025010sed 's/^/| /' conftest.$ac_ext >&5
25011
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025012 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025013fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000025014
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025015rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25016fi
25017
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025018{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
25019echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025020if test "$ac_cv_stat_tv_nsec2" = yes
25021then
25022
25023cat >>confdefs.h <<\_ACEOF
25024#define HAVE_STAT_TV_NSEC2 1
25025_ACEOF
25026
25027fi
25028
Jack Jansen666b1e72001-10-31 12:11:48 +000025029# On HP/UX 11.0, mvwdelch is a block with a return statement
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025030{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
25031echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025032if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025033 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000025034else
Martin v. Löwis11437992002-04-12 09:54:03 +000025035 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025036/* confdefs.h. */
25037_ACEOF
25038cat confdefs.h >>conftest.$ac_ext
25039cat >>conftest.$ac_ext <<_ACEOF
25040/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000025041#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025042int
25043main ()
25044{
Jack Jansen666b1e72001-10-31 12:11:48 +000025045
25046 int rtn;
25047 rtn = mvwdelch(0,0,0);
25048
Martin v. Löwis11437992002-04-12 09:54:03 +000025049 ;
25050 return 0;
25051}
25052_ACEOF
25053rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025054if { (ac_try="$ac_compile"
25055case "(($ac_try" in
25056 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25057 *) ac_try_echo=$ac_try;;
25058esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025059eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025060 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025061 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025062 grep -v '^ *+' conftest.er1 >conftest.err
25063 rm -f conftest.er1
25064 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025066 (exit $ac_status); } && {
25067 test -z "$ac_c_werror_flag" ||
25068 test ! -s conftest.err
25069 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000025070 ac_cv_mvwdelch_is_expression=yes
25071else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025072 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025073sed 's/^/| /' conftest.$ac_ext >&5
25074
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025075 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000025076fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000025077
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025078rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25079fi
25080
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025081{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
25082echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000025083
25084if test "$ac_cv_mvwdelch_is_expression" = yes
25085then
Martin v. Löwis11437992002-04-12 09:54:03 +000025086
25087cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000025088#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025089_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000025090
25091fi
25092
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025093{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
25094echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025095if test "${ac_cv_window_has_flags+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025096 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000025097else
Martin v. Löwis11437992002-04-12 09:54:03 +000025098 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025099/* confdefs.h. */
25100_ACEOF
25101cat confdefs.h >>conftest.$ac_ext
25102cat >>conftest.$ac_ext <<_ACEOF
25103/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000025104#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025105int
25106main ()
25107{
Jack Jansen666b1e72001-10-31 12:11:48 +000025108
25109 WINDOW *w;
25110 w->_flags = 0;
25111
Martin v. Löwis11437992002-04-12 09:54:03 +000025112 ;
25113 return 0;
25114}
25115_ACEOF
25116rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025117if { (ac_try="$ac_compile"
25118case "(($ac_try" in
25119 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25120 *) ac_try_echo=$ac_try;;
25121esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025122eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025123 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025124 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025125 grep -v '^ *+' conftest.er1 >conftest.err
25126 rm -f conftest.er1
25127 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025129 (exit $ac_status); } && {
25130 test -z "$ac_c_werror_flag" ||
25131 test ! -s conftest.err
25132 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000025133 ac_cv_window_has_flags=yes
25134else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025135 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025136sed 's/^/| /' conftest.$ac_ext >&5
25137
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025138 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000025139fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000025140
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025141rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25142fi
25143
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025144{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
25145echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000025146
Jack Jansen666b1e72001-10-31 12:11:48 +000025147
25148if test "$ac_cv_window_has_flags" = yes
25149then
Martin v. Löwis11437992002-04-12 09:54:03 +000025150
25151cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000025152#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025153_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000025154
25155fi
25156
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025157{ echo "$as_me:$LINENO: checking for is_term_resized" >&5
25158echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025159cat >conftest.$ac_ext <<_ACEOF
25160/* confdefs.h. */
25161_ACEOF
25162cat confdefs.h >>conftest.$ac_ext
25163cat >>conftest.$ac_ext <<_ACEOF
25164/* end confdefs.h. */
25165#include <curses.h>
25166int
25167main ()
25168{
25169void *x=is_term_resized
25170 ;
25171 return 0;
25172}
25173_ACEOF
25174rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025175if { (ac_try="$ac_compile"
25176case "(($ac_try" in
25177 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25178 *) ac_try_echo=$ac_try;;
25179esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025180eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025181 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025182 ac_status=$?
25183 grep -v '^ *+' conftest.er1 >conftest.err
25184 rm -f conftest.er1
25185 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025186 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025187 (exit $ac_status); } && {
25188 test -z "$ac_c_werror_flag" ||
25189 test ! -s conftest.err
25190 } && test -s conftest.$ac_objext; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000025191
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025192cat >>confdefs.h <<\_ACEOF
25193#define HAVE_CURSES_IS_TERM_RESIZED 1
25194_ACEOF
25195
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025196 { echo "$as_me:$LINENO: result: yes" >&5
25197echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025198else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025199 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025200sed 's/^/| /' conftest.$ac_ext >&5
25201
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025202 { echo "$as_me:$LINENO: result: no" >&5
25203echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025204
25205fi
25206
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25208
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025209{ echo "$as_me:$LINENO: checking for resize_term" >&5
25210echo $ECHO_N "checking for resize_term... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025211cat >conftest.$ac_ext <<_ACEOF
25212/* confdefs.h. */
25213_ACEOF
25214cat confdefs.h >>conftest.$ac_ext
25215cat >>conftest.$ac_ext <<_ACEOF
25216/* end confdefs.h. */
25217#include <curses.h>
25218int
25219main ()
25220{
25221void *x=resize_term
25222 ;
25223 return 0;
25224}
25225_ACEOF
25226rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025227if { (ac_try="$ac_compile"
25228case "(($ac_try" in
25229 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25230 *) ac_try_echo=$ac_try;;
25231esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025232eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025233 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025234 ac_status=$?
25235 grep -v '^ *+' conftest.er1 >conftest.err
25236 rm -f conftest.er1
25237 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025238 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025239 (exit $ac_status); } && {
25240 test -z "$ac_c_werror_flag" ||
25241 test ! -s conftest.err
25242 } && test -s conftest.$ac_objext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025243
25244cat >>confdefs.h <<\_ACEOF
25245#define HAVE_CURSES_RESIZE_TERM 1
25246_ACEOF
25247
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025248 { echo "$as_me:$LINENO: result: yes" >&5
25249echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025250else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025251 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025252sed 's/^/| /' conftest.$ac_ext >&5
25253
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025254 { echo "$as_me:$LINENO: result: no" >&5
25255echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025256
25257fi
25258
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025259rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25260
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025261{ echo "$as_me:$LINENO: checking for resizeterm" >&5
25262echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025263cat >conftest.$ac_ext <<_ACEOF
25264/* confdefs.h. */
25265_ACEOF
25266cat confdefs.h >>conftest.$ac_ext
25267cat >>conftest.$ac_ext <<_ACEOF
25268/* end confdefs.h. */
25269#include <curses.h>
25270int
25271main ()
25272{
25273void *x=resizeterm
25274 ;
25275 return 0;
25276}
25277_ACEOF
25278rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025279if { (ac_try="$ac_compile"
25280case "(($ac_try" in
25281 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25282 *) ac_try_echo=$ac_try;;
25283esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025284eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025285 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025286 ac_status=$?
25287 grep -v '^ *+' conftest.er1 >conftest.err
25288 rm -f conftest.er1
25289 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025291 (exit $ac_status); } && {
25292 test -z "$ac_c_werror_flag" ||
25293 test ! -s conftest.err
25294 } && test -s conftest.$ac_objext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025295
25296cat >>confdefs.h <<\_ACEOF
25297#define HAVE_CURSES_RESIZETERM 1
25298_ACEOF
25299
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025300 { echo "$as_me:$LINENO: result: yes" >&5
25301echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025302else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025303 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025304sed 's/^/| /' conftest.$ac_ext >&5
25305
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025306 { echo "$as_me:$LINENO: result: no" >&5
25307echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025308
25309fi
25310
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025311rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25312
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025313{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
25314echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000025315
25316if test -r /dev/ptmx
25317then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025318 { echo "$as_me:$LINENO: result: yes" >&5
25319echo "${ECHO_T}yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000025320
25321cat >>confdefs.h <<\_ACEOF
25322#define HAVE_DEV_PTMX 1
25323_ACEOF
25324
Thomas Wouters89f507f2006-12-13 04:49:30 +000025325else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025326 { echo "$as_me:$LINENO: result: no" >&5
25327echo "${ECHO_T}no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000025328fi
25329
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025330{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
25331echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000025332
25333if test -r /dev/ptc
25334then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025335 { echo "$as_me:$LINENO: result: yes" >&5
25336echo "${ECHO_T}yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000025337
25338cat >>confdefs.h <<\_ACEOF
25339#define HAVE_DEV_PTC 1
25340_ACEOF
25341
Thomas Wouters89f507f2006-12-13 04:49:30 +000025342else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025343 { echo "$as_me:$LINENO: result: no" >&5
25344echo "${ECHO_T}no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000025345fi
25346
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025347{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
25348echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000025349if test "$cross_compiling" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025350 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
Thomas Wouters477c8d52006-05-27 19:21:47 +000025351See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025352echo "$as_me: error: cannot run test program while cross compiling
Thomas Wouters477c8d52006-05-27 19:21:47 +000025353See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025354 { (exit 1); exit 1; }; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000025355else
25356 cat >conftest.$ac_ext <<_ACEOF
25357/* confdefs.h. */
25358_ACEOF
25359cat confdefs.h >>conftest.$ac_ext
25360cat >>conftest.$ac_ext <<_ACEOF
25361/* end confdefs.h. */
25362#include <stdio.h>
25363#include <stddef.h>
25364#include <string.h>
25365
Christian Heimes2c181612007-12-17 20:04:13 +000025366#ifdef HAVE_SYS_TYPES_H
25367#include <sys/types.h>
25368#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000025369
25370#ifdef HAVE_SSIZE_T
25371typedef ssize_t Py_ssize_t;
25372#elif SIZEOF_VOID_P == SIZEOF_LONG
25373typedef long Py_ssize_t;
25374#else
25375typedef int Py_ssize_t;
25376#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000025377
Christian Heimes2c181612007-12-17 20:04:13 +000025378int main()
25379{
25380 char buffer[256];
25381
Thomas Wouters477c8d52006-05-27 19:21:47 +000025382 if(sprintf(buffer, "%zd", (size_t)123) < 0)
25383 return 1;
25384
Thomas Wouters89f507f2006-12-13 04:49:30 +000025385 if (strcmp(buffer, "123"))
25386 return 1;
25387
25388 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
25389 return 1;
25390
25391 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000025392 return 1;
25393
25394 return 0;
25395}
25396_ACEOF
25397rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025398if { (ac_try="$ac_link"
25399case "(($ac_try" in
25400 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25401 *) ac_try_echo=$ac_try;;
25402esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025403eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025404 (eval "$ac_link") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000025405 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000025407 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025408 { (case "(($ac_try" in
25409 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25410 *) ac_try_echo=$ac_try;;
25411esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025412eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025413 (eval "$ac_try") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000025414 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000025416 (exit $ac_status); }; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025417 { echo "$as_me:$LINENO: result: yes" >&5
25418echo "${ECHO_T}yes" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000025419
25420cat >>confdefs.h <<\_ACEOF
25421#define PY_FORMAT_SIZE_T "z"
25422_ACEOF
25423
25424else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025425 echo "$as_me: program exited with status $ac_status" >&5
25426echo "$as_me: failed program was:" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000025427sed 's/^/| /' conftest.$ac_ext >&5
25428
25429( exit $ac_status )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025430{ echo "$as_me:$LINENO: result: no" >&5
25431echo "${ECHO_T}no" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000025432fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025433rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000025434fi
25435
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025436
25437
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025438{ echo "$as_me:$LINENO: checking for socklen_t" >&5
25439echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025440if test "${ac_cv_type_socklen_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025441 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000025442else
Martin v. Löwis11437992002-04-12 09:54:03 +000025443 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025444/* confdefs.h. */
25445_ACEOF
25446cat confdefs.h >>conftest.$ac_ext
25447cat >>conftest.$ac_ext <<_ACEOF
25448/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000025449
25450#ifdef HAVE_SYS_TYPES_H
25451#include <sys/types.h>
25452#endif
25453#ifdef HAVE_SYS_SOCKET_H
25454#include <sys/socket.h>
25455#endif
25456
25457
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025458typedef socklen_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000025459int
25460main ()
25461{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025462if ((ac__type_new_ *) 0)
25463 return 0;
25464if (sizeof (ac__type_new_))
25465 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000025466 ;
25467 return 0;
25468}
25469_ACEOF
25470rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025471if { (ac_try="$ac_compile"
25472case "(($ac_try" in
25473 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25474 *) ac_try_echo=$ac_try;;
25475esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025476eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025477 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025478 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025479 grep -v '^ *+' conftest.er1 >conftest.err
25480 rm -f conftest.er1
25481 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025483 (exit $ac_status); } && {
25484 test -z "$ac_c_werror_flag" ||
25485 test ! -s conftest.err
25486 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025487 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000025488else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025489 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025490sed 's/^/| /' conftest.$ac_ext >&5
25491
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025492 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000025493fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025494
25495rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025496fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025497{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
25498echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
25499if test $ac_cv_type_socklen_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025500 :
25501else
Guido van Rossum95713eb2000-05-18 20:53:31 +000025502
Martin v. Löwis01c04012002-11-11 14:58:44 +000025503cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000025504#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000025505_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000025506
25507fi
25508
Michael W. Hudson54241132001-12-07 15:38:26 +000025509
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025510{ echo "$as_me:$LINENO: checking for broken mbstowcs" >&5
25511echo $ECHO_N "checking for broken mbstowcs... $ECHO_C" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000025512if test "$cross_compiling" = yes; then
25513 ac_cv_broken_mbstowcs=no
25514else
25515 cat >conftest.$ac_ext <<_ACEOF
25516/* confdefs.h. */
25517_ACEOF
25518cat confdefs.h >>conftest.$ac_ext
25519cat >>conftest.$ac_ext <<_ACEOF
25520/* end confdefs.h. */
25521
25522#include<stdlib.h>
25523int main() {
25524 size_t len = -1;
25525 const char *str = "text";
25526 len = mbstowcs(NULL, str, 0);
25527 return (len != 4);
25528}
25529
25530_ACEOF
25531rm -f conftest$ac_exeext
25532if { (ac_try="$ac_link"
25533case "(($ac_try" in
25534 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25535 *) ac_try_echo=$ac_try;;
25536esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025537eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000025538 (eval "$ac_link") 2>&5
25539 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000025541 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
25542 { (case "(($ac_try" in
25543 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25544 *) ac_try_echo=$ac_try;;
25545esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025546eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000025547 (eval "$ac_try") 2>&5
25548 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025549 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000025550 (exit $ac_status); }; }; then
25551 ac_cv_broken_mbstowcs=no
25552else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025553 echo "$as_me: program exited with status $ac_status" >&5
25554echo "$as_me: failed program was:" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000025555sed 's/^/| /' conftest.$ac_ext >&5
25556
25557( exit $ac_status )
25558ac_cv_broken_mbstowcs=yes
25559fi
25560rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
25561fi
25562
25563
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025564{ echo "$as_me:$LINENO: result: $ac_cv_broken_mbstowcs" >&5
25565echo "${ECHO_T}$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000025566if test "$ac_cv_broken_mbstowcs" = yes
25567then
25568
25569cat >>confdefs.h <<\_ACEOF
25570#define HAVE_BROKEN_MBSTOWCS 1
25571_ACEOF
25572
25573fi
25574
Antoine Pitroub52ec782009-01-25 16:34:23 +000025575# Check for --with-computed-gotos
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025576{ echo "$as_me:$LINENO: checking for --with-computed-gotos" >&5
25577echo $ECHO_N "checking for --with-computed-gotos... $ECHO_C" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000025578
25579# Check whether --with-computed-gotos was given.
25580if test "${with_computed_gotos+set}" = set; then
25581 withval=$with_computed_gotos;
25582if test "$withval" != no
25583then
25584
25585cat >>confdefs.h <<\_ACEOF
25586#define USE_COMPUTED_GOTOS 1
25587_ACEOF
25588
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025589 { echo "$as_me:$LINENO: result: yes" >&5
25590echo "${ECHO_T}yes" >&6; }
25591else { echo "$as_me:$LINENO: result: no" >&5
25592echo "${ECHO_T}no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000025593fi
25594else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025595 { echo "$as_me:$LINENO: result: no" >&5
25596echo "${ECHO_T}no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000025597fi
25598
25599
Ronald Oussoren1b2cad02009-11-19 17:30:05 +000025600if test $ac_sys_system = Darwin
25601then
25602 LIBS="$LIBS -framework CoreFoundation"
25603fi
25604
25605
Antoine Pitroub52ec782009-01-25 16:34:23 +000025606
Michael W. Hudson54241132001-12-07 15:38:26 +000025607
25608
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000025609for h in `(cd $srcdir;echo Python/thread_*.h)`
25610do
25611 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
25612done
25613
Michael W. Hudson54241132001-12-07 15:38:26 +000025614
Neal Norwitzd24499d2005-12-18 21:36:39 +000025615SRCDIRS="Parser Grammar Objects Python Modules Mac"
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025616{ echo "$as_me:$LINENO: checking for build directories" >&5
25617echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000025618for dir in $SRCDIRS; do
25619 if test ! -d $dir; then
25620 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000025621 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000025622done
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025623{ echo "$as_me:$LINENO: result: done" >&5
25624echo "${ECHO_T}done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000025625
Guido van Rossum627b2d71993-12-24 10:39:16 +000025626# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000025627ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000025628
Martin v. Löwis11437992002-04-12 09:54:03 +000025629cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025630# This file is a shell script that caches the results of configure
25631# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000025632# scripts and configure runs, see configure's option --config-cache.
25633# It is not useful on other systems. If it contains results you don't
25634# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025635#
Martin v. Löwis11437992002-04-12 09:54:03 +000025636# config.status only pays attention to the cache file if you give it
25637# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025638#
Skip Montanaro6dead952003-09-25 14:50:04 +000025639# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000025640# loading this file, other *unset* `ac_cv_foo' will be assigned the
25641# following values.
25642
25643_ACEOF
25644
Guido van Rossumf78abae1997-01-21 22:02:36 +000025645# The following way of writing the cache mishandles newlines in values,
25646# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025647# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000025648# Ultrix sh set writes to stderr and can't be redirected directly,
25649# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025650(
25651 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
25652 eval ac_val=\$$ac_var
25653 case $ac_val in #(
25654 *${as_nl}*)
25655 case $ac_var in #(
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025656 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
25657echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025658 esac
25659 case $ac_var in #(
25660 _ | IFS | as_nl) ;; #(
25661 *) $as_unset $ac_var ;;
25662 esac ;;
25663 esac
25664 done
25665
Martin v. Löwis11437992002-04-12 09:54:03 +000025666 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025667 case $as_nl`(ac_space=' '; set) 2>&1` in #(
25668 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000025669 # `set' does not quote correctly, so add quotes (double-quote
25670 # substitution turns \\\\ into \\, and sed turns \\ into \).
25671 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025672 "s/'/'\\\\''/g;
25673 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025674 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000025675 *)
25676 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025677 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000025678 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025679 esac |
25680 sort
25681) |
Martin v. Löwis11437992002-04-12 09:54:03 +000025682 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025683 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000025684 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025685 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000025686 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
25687 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025688 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
25689 :end' >>confcache
25690if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
25691 if test -w "$cache_file"; then
25692 test "x$cache_file" != "x/dev/null" &&
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025693 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
25694echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000025695 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000025696 else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025697 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
25698echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000025699 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025700fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000025701rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000025702
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025703test "x$prefix" = xNONE && prefix=$ac_default_prefix
25704# Let make expand exec_prefix.
25705test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000025706
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025707DEFS=-DHAVE_CONFIG_H
25708
Skip Montanaro6dead952003-09-25 14:50:04 +000025709ac_libobjs=
25710ac_ltlibobjs=
25711for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
25712 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025713 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025714 ac_i=`echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025715 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
25716 # will be set to the directory where LIBOBJS objects are built.
25717 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
25718 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000025719done
25720LIBOBJS=$ac_libobjs
25721
25722LTLIBOBJS=$ac_ltlibobjs
25723
25724
Martin v. Löwis11437992002-04-12 09:54:03 +000025725
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025726: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000025727ac_clean_files_save=$ac_clean_files
25728ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025729{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
25730echo "$as_me: creating $CONFIG_STATUS" >&6;}
25731cat >$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025732#! $SHELL
25733# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000025734# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025735# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000025736# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000025737
Martin v. Löwis11437992002-04-12 09:54:03 +000025738debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000025739ac_cs_recheck=false
25740ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000025741SHELL=\${CONFIG_SHELL-$SHELL}
25742_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000025743
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025744cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025745## --------------------- ##
25746## M4sh Initialization. ##
25747## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000025748
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025749# Be more Bourne compatible
25750DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000025751if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
25752 emulate sh
25753 NULLCMD=:
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025754 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000025755 # is contrary to our usage. Disable this feature.
25756 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025757 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000025758else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025759 case `(set -o) 2>/dev/null` in
25760 *posix*) set -o posix ;;
25761esac
25762
Michael W. Hudson54241132001-12-07 15:38:26 +000025763fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000025764
25765
Michael W. Hudson54241132001-12-07 15:38:26 +000025766
Michael W. Hudson54241132001-12-07 15:38:26 +000025767
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025768# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000025769# Avoid depending upon Character Ranges.
25770as_cr_letters='abcdefghijklmnopqrstuvwxyz'
25771as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
25772as_cr_Letters=$as_cr_letters$as_cr_LETTERS
25773as_cr_digits='0123456789'
25774as_cr_alnum=$as_cr_Letters$as_cr_digits
25775
25776# The user is always right.
25777if test "${PATH_SEPARATOR+set}" != set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025778 echo "#! /bin/sh" >conf$$.sh
25779 echo "exit 0" >>conf$$.sh
25780 chmod +x conf$$.sh
25781 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
25782 PATH_SEPARATOR=';'
25783 else
25784 PATH_SEPARATOR=:
25785 fi
25786 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000025787fi
25788
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025789# Support unset when possible.
25790if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
25791 as_unset=unset
25792else
25793 as_unset=false
25794fi
Martin v. Löwis11437992002-04-12 09:54:03 +000025795
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025796
25797# IFS
25798# We need space, tab and new line, in precisely that order. Quoting is
25799# there to prevent editors from complaining about space-tab.
25800# (If _AS_PATH_WALK were called with IFS unset, it would disable word
25801# splitting by setting IFS to empty value.)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025802as_nl='
25803'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025804IFS=" "" $as_nl"
25805
25806# Find who we are. Look in the path if we contain no directory separator.
25807case $0 in
25808 *[\\/]* ) as_myself=$0 ;;
25809 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000025810for as_dir in $PATH
25811do
25812 IFS=$as_save_IFS
25813 test -z "$as_dir" && as_dir=.
25814 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
25815done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025816IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000025817
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025818 ;;
25819esac
25820# We did not find ourselves, most probably we were run as `sh COMMAND'
25821# in which case we are not to be found in the path.
25822if test "x$as_myself" = x; then
25823 as_myself=$0
25824fi
25825if test ! -f "$as_myself"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025826 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025827 { (exit 1); exit 1; }
25828fi
25829
25830# Work around bugs in pre-3.0 UWIN ksh.
25831for as_var in ENV MAIL MAILPATH
25832do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
25833done
25834PS1='$ '
25835PS2='> '
25836PS4='+ '
25837
25838# NLS nuisances.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025839for as_var in \
25840 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
25841 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
25842 LC_TELEPHONE LC_TIME
25843do
25844 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
25845 eval $as_var=C; export $as_var
25846 else
25847 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
25848 fi
25849done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025850
25851# Required to use basename.
25852if expr a : '\(a\)' >/dev/null 2>&1 &&
25853 test "X`expr 00001 : '.*\(...\)'`" = X001; then
25854 as_expr=expr
25855else
25856 as_expr=false
25857fi
25858
25859if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
25860 as_basename=basename
25861else
25862 as_basename=false
25863fi
25864
25865
25866# Name of the executable.
25867as_me=`$as_basename -- "$0" ||
25868$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
25869 X"$0" : 'X\(//\)$' \| \
25870 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025871echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025872 sed '/^.*\/\([^/][^/]*\)\/*$/{
25873 s//\1/
25874 q
25875 }
25876 /^X\/\(\/\/\)$/{
25877 s//\1/
25878 q
25879 }
25880 /^X\/\(\/\).*/{
25881 s//\1/
25882 q
25883 }
25884 s/.*/./; q'`
25885
25886# CDPATH.
25887$as_unset CDPATH
25888
25889
25890
Martin v. Löwis11437992002-04-12 09:54:03 +000025891 as_lineno_1=$LINENO
25892 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000025893 test "x$as_lineno_1" != "x$as_lineno_2" &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025894 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000025895
Martin v. Löwis11437992002-04-12 09:54:03 +000025896 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
25897 # uniformly replaced by the line number. The first 'sed' inserts a
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025898 # line-number line after each line using $LINENO; the second 'sed'
25899 # does the real work. The second script uses 'N' to pair each
25900 # line-number line with the line containing $LINENO, and appends
25901 # trailing '-' during substitution so that $LINENO is not a special
25902 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000025903 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025904 # scripts with optimization help from Paolo Bonzini. Blame Lee
25905 # E. McMahon (1931-1989) for sed's syntax. :-)
25906 sed -n '
25907 p
25908 /[$]LINENO/=
25909 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000025910 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025911 s/[$]LINENO.*/&-/
25912 t lineno
25913 b
25914 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000025915 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025916 :loop
25917 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000025918 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025919 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000025920 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025921 chmod +x "$as_me.lineno" ||
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025922 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000025923 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000025924
Martin v. Löwis11437992002-04-12 09:54:03 +000025925 # Don't try to exec as it changes $[0], causing all sort of problems
25926 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025927 # original and so on. Autoconf is especially sensitive to this).
25928 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000025929 # Exit status is that of the last command.
25930 exit
25931}
25932
25933
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025934if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
25935 as_dirname=dirname
25936else
25937 as_dirname=false
25938fi
25939
25940ECHO_C= ECHO_N= ECHO_T=
25941case `echo -n x` in
25942-n*)
25943 case `echo 'x\c'` in
25944 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
25945 *) ECHO_C='\c';;
25946 esac;;
25947*)
25948 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000025949esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025950
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025951if expr a : '\(a\)' >/dev/null 2>&1 &&
25952 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025953 as_expr=expr
25954else
25955 as_expr=false
25956fi
25957
25958rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025959if test -d conf$$.dir; then
25960 rm -f conf$$.dir/conf$$.file
25961else
25962 rm -f conf$$.dir
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025963 mkdir conf$$.dir
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025964fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025965echo >conf$$.file
25966if ln -s conf$$.file conf$$ 2>/dev/null; then
25967 as_ln_s='ln -s'
25968 # ... but there are two gotchas:
25969 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
25970 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
25971 # In both cases, we have to default to `cp -p'.
25972 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +000025973 as_ln_s='cp -p'
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025974elif ln conf$$.file conf$$ 2>/dev/null; then
25975 as_ln_s=ln
Martin v. Löwis11437992002-04-12 09:54:03 +000025976else
25977 as_ln_s='cp -p'
25978fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025979rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
25980rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000025981
Skip Montanaro6dead952003-09-25 14:50:04 +000025982if mkdir -p . 2>/dev/null; then
25983 as_mkdir_p=:
25984else
Skip Montanarof0d5f792004-08-15 14:08:23 +000025985 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000025986 as_mkdir_p=false
25987fi
25988
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025989if test -x / >/dev/null 2>&1; then
25990 as_test_x='test -x'
25991else
25992 if ls -dL / >/dev/null 2>&1; then
25993 as_ls_L_option=L
25994 else
25995 as_ls_L_option=
25996 fi
25997 as_test_x='
25998 eval sh -c '\''
25999 if test -d "$1"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026000 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026001 else
26002 case $1 in
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026003 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026004 esac;
26005 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
26006 ???[sx]*):;;*)false;;esac;fi
26007 '\'' sh
26008 '
26009fi
26010as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000026011
26012# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000026013as_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 +000026014
26015# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000026016as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000026017
26018
Martin v. Löwis11437992002-04-12 09:54:03 +000026019exec 6>&1
26020
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026021# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000026022# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026023# values after options handling.
26024ac_log="
Christian Heimes70e5cab2008-12-03 18:18:23 +000026025This file was extended by python $as_me 3.1, which was
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026026generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000026027
26028 CONFIG_FILES = $CONFIG_FILES
26029 CONFIG_HEADERS = $CONFIG_HEADERS
26030 CONFIG_LINKS = $CONFIG_LINKS
26031 CONFIG_COMMANDS = $CONFIG_COMMANDS
26032 $ $0 $@
26033
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026034on `(hostname || uname -n) 2>/dev/null | sed 1q`
26035"
26036
Martin v. Löwis11437992002-04-12 09:54:03 +000026037_ACEOF
26038
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026039cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026040# Files that config.status was made for.
Martin v. Löwis113a0852009-05-29 17:25:39 +000026041config_files="$ac_config_files"
26042config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000026043
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026044_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026045
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026046cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026047ac_cs_usage="\
26048\`$as_me' instantiates files from templates according to the
26049current configuration.
26050
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026051Usage: $0 [OPTIONS] [FILE]...
Martin v. Löwis11437992002-04-12 09:54:03 +000026052
26053 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026054 -V, --version print version number and configuration settings, then exit
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026055 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000026056 -d, --debug don't remove temporary files
26057 --recheck update $as_me by reconfiguring in the same conditions
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026058 --file=FILE[:TEMPLATE]
26059 instantiate the configuration file FILE
26060 --header=FILE[:TEMPLATE]
26061 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000026062
26063Configuration files:
26064$config_files
26065
26066Configuration headers:
26067$config_headers
26068
26069Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000026070
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026071_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026072cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026073ac_cs_version="\\
Christian Heimes70e5cab2008-12-03 18:18:23 +000026074python config.status 3.1
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026075configured by $0, generated by GNU Autoconf 2.61,
26076 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000026077
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026078Copyright (C) 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000026079This config.status script is free software; the Free Software Foundation
26080gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026081
26082ac_pwd='$ac_pwd'
26083srcdir='$srcdir'
26084INSTALL='$INSTALL'
Martin v. Löwis11437992002-04-12 09:54:03 +000026085_ACEOF
26086
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026087cat >>$CONFIG_STATUS <<\_ACEOF
26088# If no file are specified by the user, then we need to provide default
26089# value. By we need to know if files were specified by the user.
Martin v. Löwis11437992002-04-12 09:54:03 +000026090ac_need_defaults=:
26091while test $# != 0
26092do
26093 case $1 in
26094 --*=*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026095 ac_option=`expr "X$1" : 'X\([^=]*\)='`
26096 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000026097 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000026098 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026099 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000026100 ac_option=$1
26101 ac_optarg=$2
26102 ac_shift=shift
26103 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026104 esac
26105
Skip Montanaro6dead952003-09-25 14:50:04 +000026106 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000026107 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000026108 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
26109 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026110 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026111 echo "$ac_cs_version"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026112 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000026113 debug=: ;;
26114 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000026115 $ac_shift
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026116 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000026117 ac_need_defaults=false;;
26118 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000026119 $ac_shift
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026120 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000026121 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026122 --he | --h)
26123 # Conflict between --help and --header
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026124 { echo "$as_me: error: ambiguous option: $1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026125Try \`$0 --help' for more information." >&2
26126 { (exit 1); exit 1; }; };;
26127 --help | --hel | -h )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026128 echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000026129 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
26130 | -silent | --silent | --silen | --sile | --sil | --si | --s)
26131 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026132
26133 # This is an error.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026134 -*) { echo "$as_me: error: unrecognized option: $1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026135Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000026136 { (exit 1); exit 1; }; } ;;
26137
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026138 *) ac_config_targets="$ac_config_targets $1"
26139 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026140
26141 esac
26142 shift
26143done
26144
Skip Montanaro6dead952003-09-25 14:50:04 +000026145ac_configure_extra_args=
26146
26147if $ac_cs_silent; then
26148 exec 6>/dev/null
26149 ac_configure_extra_args="$ac_configure_extra_args --silent"
26150fi
26151
26152_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026153cat >>$CONFIG_STATUS <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026154if \$ac_cs_recheck; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026155 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
26156 CONFIG_SHELL=$SHELL
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026157 export CONFIG_SHELL
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026158 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000026159fi
26160
Martin v. Löwis11437992002-04-12 09:54:03 +000026161_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026162cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026163exec 5>>config.log
26164{
26165 echo
26166 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
26167## Running $as_me. ##
26168_ASBOX
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026169 echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026170} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026171
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026172_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026173cat >>$CONFIG_STATUS <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026174_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026175
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026176cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026177
26178# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000026179for ac_config_target in $ac_config_targets
26180do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026181 case $ac_config_target in
26182 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
26183 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
26184 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000026185 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
26186 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026187 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
26188 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000026189 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026190
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026191 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
26192echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000026193 { (exit 1); exit 1; }; };;
26194 esac
26195done
26196
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026197
Martin v. Löwis11437992002-04-12 09:54:03 +000026198# If the user did not use the arguments to specify the items to instantiate,
26199# then the envvar interface is used. Set only those that are not.
26200# We use the long form for the default assignment because of an extremely
26201# bizarre bug on SunOS 4.1.3.
26202if $ac_need_defaults; then
26203 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
26204 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
26205fi
26206
Skip Montanaro6dead952003-09-25 14:50:04 +000026207# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026208# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000026209# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026210# Hook for its removal unless debugging.
26211# Note that there is a small window in which the directory will not be cleaned:
26212# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000026213$debug ||
26214{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026215 tmp=
26216 trap 'exit_status=$?
26217 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
26218' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000026219 trap '{ (exit 1); exit 1; }' 1 2 13 15
26220}
Martin v. Löwis11437992002-04-12 09:54:03 +000026221# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000026222
Martin v. Löwis11437992002-04-12 09:54:03 +000026223{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026224 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000026225 test -n "$tmp" && test -d "$tmp"
26226} ||
26227{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026228 tmp=./conf$$-$RANDOM
26229 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000026230} ||
26231{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026232 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000026233 { (exit 1); exit 1; }
26234}
26235
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026236#
26237# Set up the sed scripts for CONFIG_FILES section.
26238#
26239
26240# No need to generate the scripts if there are no CONFIG_FILES.
26241# This happens for instance when ./config.status config.h
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026242if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026243
26244_ACEOF
26245
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026246
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026247
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026248ac_delim='%!_!# '
26249for ac_last_try in false false false false false :; do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026250 cat >conf$$subs.sed <<_ACEOF
26251SHELL!$SHELL$ac_delim
26252PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
26253PACKAGE_NAME!$PACKAGE_NAME$ac_delim
26254PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
26255PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
26256PACKAGE_STRING!$PACKAGE_STRING$ac_delim
26257PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
26258exec_prefix!$exec_prefix$ac_delim
26259prefix!$prefix$ac_delim
26260program_transform_name!$program_transform_name$ac_delim
26261bindir!$bindir$ac_delim
26262sbindir!$sbindir$ac_delim
26263libexecdir!$libexecdir$ac_delim
26264datarootdir!$datarootdir$ac_delim
26265datadir!$datadir$ac_delim
26266sysconfdir!$sysconfdir$ac_delim
26267sharedstatedir!$sharedstatedir$ac_delim
26268localstatedir!$localstatedir$ac_delim
26269includedir!$includedir$ac_delim
26270oldincludedir!$oldincludedir$ac_delim
26271docdir!$docdir$ac_delim
26272infodir!$infodir$ac_delim
26273htmldir!$htmldir$ac_delim
26274dvidir!$dvidir$ac_delim
26275pdfdir!$pdfdir$ac_delim
26276psdir!$psdir$ac_delim
26277libdir!$libdir$ac_delim
26278localedir!$localedir$ac_delim
26279mandir!$mandir$ac_delim
26280DEFS!$DEFS$ac_delim
26281ECHO_C!$ECHO_C$ac_delim
26282ECHO_N!$ECHO_N$ac_delim
26283ECHO_T!$ECHO_T$ac_delim
26284LIBS!$LIBS$ac_delim
26285build_alias!$build_alias$ac_delim
26286host_alias!$host_alias$ac_delim
26287target_alias!$target_alias$ac_delim
26288VERSION!$VERSION$ac_delim
26289SOVERSION!$SOVERSION$ac_delim
26290CONFIG_ARGS!$CONFIG_ARGS$ac_delim
26291UNIVERSALSDK!$UNIVERSALSDK$ac_delim
26292ARCH_RUN_32BIT!$ARCH_RUN_32BIT$ac_delim
26293PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
26294PYTHONFRAMEWORKIDENTIFIER!$PYTHONFRAMEWORKIDENTIFIER$ac_delim
26295PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
26296PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
26297PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
26298FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
26299FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
26300FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
26301FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
26302FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
26303MACHDEP!$MACHDEP$ac_delim
26304SGI_ABI!$SGI_ABI$ac_delim
26305CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
26306EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim
26307CC!$CC$ac_delim
26308CFLAGS!$CFLAGS$ac_delim
26309LDFLAGS!$LDFLAGS$ac_delim
26310CPPFLAGS!$CPPFLAGS$ac_delim
26311ac_ct_CC!$ac_ct_CC$ac_delim
26312EXEEXT!$EXEEXT$ac_delim
26313OBJEXT!$OBJEXT$ac_delim
26314CXX!$CXX$ac_delim
26315MAINCC!$MAINCC$ac_delim
26316CPP!$CPP$ac_delim
26317GREP!$GREP$ac_delim
26318EGREP!$EGREP$ac_delim
26319BUILDEXEEXT!$BUILDEXEEXT$ac_delim
26320LIBRARY!$LIBRARY$ac_delim
26321LDLIBRARY!$LDLIBRARY$ac_delim
26322DLLLIBRARY!$DLLLIBRARY$ac_delim
26323BLDLIBRARY!$BLDLIBRARY$ac_delim
26324LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
26325INSTSONAME!$INSTSONAME$ac_delim
26326RUNSHARED!$RUNSHARED$ac_delim
26327LINKCC!$LINKCC$ac_delim
26328GNULD!$GNULD$ac_delim
26329RANLIB!$RANLIB$ac_delim
26330AR!$AR$ac_delim
26331ARFLAGS!$ARFLAGS$ac_delim
26332SVNVERSION!$SVNVERSION$ac_delim
26333INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
26334INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
26335INSTALL_DATA!$INSTALL_DATA$ac_delim
26336LN!$LN$ac_delim
26337OPT!$OPT$ac_delim
26338BASECFLAGS!$BASECFLAGS$ac_delim
26339UNIVERSAL_ARCH_FLAGS!$UNIVERSAL_ARCH_FLAGS$ac_delim
26340OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
26341LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
26342SO!$SO$ac_delim
26343LDSHARED!$LDSHARED$ac_delim
26344BLDSHARED!$BLDSHARED$ac_delim
26345CCSHARED!$CCSHARED$ac_delim
26346LINKFORSHARED!$LINKFORSHARED$ac_delim
26347CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
26348_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026349
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026350 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026351 break
26352 elif $ac_last_try; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026353 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
26354echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026355 { (exit 1); exit 1; }; }
26356 else
26357 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000026358 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026359done
26360
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026361ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
26362if test -n "$ac_eof"; then
26363 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
26364 ac_eof=`expr $ac_eof + 1`
26365fi
26366
26367cat >>$CONFIG_STATUS <<_ACEOF
26368cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
26369/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026370_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026371sed '
26372s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
26373s/^/s,@/; s/!/@,|#_!!_#|/
26374:n
26375t n
26376s/'"$ac_delim"'$/,g/; t
26377s/$/\\/; p
26378N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
26379' >>$CONFIG_STATUS <conf$$subs.sed
26380rm -f conf$$subs.sed
26381cat >>$CONFIG_STATUS <<_ACEOF
26382CEOF$ac_eof
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026383_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026384
26385
26386ac_delim='%!_!# '
26387for ac_last_try in false false false false false :; do
26388 cat >conf$$subs.sed <<_ACEOF
26389SHLIBS!$SHLIBS$ac_delim
26390USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
26391SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
26392USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
26393LDLAST!$LDLAST$ac_delim
26394THREADOBJ!$THREADOBJ$ac_delim
26395DLINCLDIR!$DLINCLDIR$ac_delim
26396DYNLOADFILE!$DYNLOADFILE$ac_delim
26397MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
26398TRUE!$TRUE$ac_delim
26399LIBOBJS!$LIBOBJS$ac_delim
26400HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
26401HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
26402HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
26403HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
26404HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
26405LIBM!$LIBM$ac_delim
26406LIBC!$LIBC$ac_delim
26407THREADHEADERS!$THREADHEADERS$ac_delim
26408SRCDIRS!$SRCDIRS$ac_delim
26409LTLIBOBJS!$LTLIBOBJS$ac_delim
26410_ACEOF
26411
26412 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 21; then
26413 break
26414 elif $ac_last_try; then
26415 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
26416echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026417 { (exit 1); exit 1; }; }
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026418 else
26419 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
26420 fi
26421done
26422
26423ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
26424if test -n "$ac_eof"; then
26425 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
26426 ac_eof=`expr $ac_eof + 1`
26427fi
26428
26429cat >>$CONFIG_STATUS <<_ACEOF
26430cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
26431/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026432_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026433sed '
26434s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
26435s/^/s,@/; s/!/@,|#_!!_#|/
26436:n
26437t n
26438s/'"$ac_delim"'$/,g/; t
26439s/$/\\/; p
26440N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
26441' >>$CONFIG_STATUS <conf$$subs.sed
26442rm -f conf$$subs.sed
26443cat >>$CONFIG_STATUS <<_ACEOF
26444:end
26445s/|#_!!_#|//g
26446CEOF$ac_eof
26447_ACEOF
26448
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026449
26450# VPATH may cause trouble with some makes, so we remove $(srcdir),
26451# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
26452# trailing colons and then remove the whole line if VPATH becomes empty
26453# (actually we leave an empty line to preserve line numbers).
26454if test "x$srcdir" = x.; then
26455 ac_vpsub='/^[ ]*VPATH[ ]*=/{
26456s/:*\$(srcdir):*/:/
26457s/:*\${srcdir}:*/:/
26458s/:*@srcdir@:*/:/
26459s/^\([^=]*=[ ]*\):*/\1/
26460s/:*$//
26461s/^[^=]*=[ ]*$//
26462}'
26463fi
26464
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026465cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026466fi # test -n "$CONFIG_FILES"
26467
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026468
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026469for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026470do
26471 case $ac_tag in
26472 :[FHLC]) ac_mode=$ac_tag; continue;;
26473 esac
26474 case $ac_mode$ac_tag in
26475 :[FHL]*:*);;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026476 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
26477echo "$as_me: error: Invalid tag $ac_tag." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026478 { (exit 1); exit 1; }; };;
26479 :[FH]-) ac_tag=-:-;;
26480 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
26481 esac
26482 ac_save_IFS=$IFS
26483 IFS=:
26484 set x $ac_tag
26485 IFS=$ac_save_IFS
26486 shift
26487 ac_file=$1
26488 shift
26489
26490 case $ac_mode in
26491 :L) ac_source=$1;;
26492 :[FH])
26493 ac_file_inputs=
26494 for ac_f
26495 do
26496 case $ac_f in
26497 -) ac_f="$tmp/stdin";;
26498 *) # Look for the file first in the build tree, then in the source tree
26499 # (if the path is not absolute). The absolute path cannot be DOS-style,
26500 # because $ac_f cannot contain `:'.
26501 test -f "$ac_f" ||
26502 case $ac_f in
26503 [\\/$]*) false;;
26504 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
26505 esac ||
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026506 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
26507echo "$as_me: error: cannot find input file: $ac_f" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026508 { (exit 1); exit 1; }; };;
26509 esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026510 ac_file_inputs="$ac_file_inputs $ac_f"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026511 done
26512
26513 # Let's still pretend it is `configure' which instantiates (i.e., don't
26514 # use $as_me), people would be surprised to read:
26515 # /* config.h. Generated by config.status. */
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026516 configure_input="Generated from "`IFS=:
26517 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026518 if test x"$ac_file" != x-; then
26519 configure_input="$ac_file. $configure_input"
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026520 { echo "$as_me:$LINENO: creating $ac_file" >&5
26521echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026522 fi
26523
26524 case $ac_tag in
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026525 *:-:* | *:-) cat >"$tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026526 esac
26527 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026528 esac
26529
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026530 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000026531$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026532 X"$ac_file" : 'X\(//\)[^/]' \| \
26533 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026534 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026535echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026536 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26537 s//\1/
26538 q
26539 }
26540 /^X\(\/\/\)[^/].*/{
26541 s//\1/
26542 q
26543 }
26544 /^X\(\/\/\)$/{
26545 s//\1/
26546 q
26547 }
26548 /^X\(\/\).*/{
26549 s//\1/
26550 q
26551 }
26552 s/.*/./; q'`
26553 { as_dir="$ac_dir"
26554 case $as_dir in #(
26555 -*) as_dir=./$as_dir;;
26556 esac
26557 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000026558 as_dirs=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026559 while :; do
26560 case $as_dir in #(
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026561 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026562 *) as_qdir=$as_dir;;
26563 esac
26564 as_dirs="'$as_qdir' $as_dirs"
26565 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000026566$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026567 X"$as_dir" : 'X\(//\)[^/]' \| \
26568 X"$as_dir" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026569 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026570echo X"$as_dir" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026571 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26572 s//\1/
26573 q
26574 }
26575 /^X\(\/\/\)[^/].*/{
26576 s//\1/
26577 q
26578 }
26579 /^X\(\/\/\)$/{
26580 s//\1/
26581 q
26582 }
26583 /^X\(\/\).*/{
26584 s//\1/
26585 q
26586 }
26587 s/.*/./; q'`
26588 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000026589 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026590 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026591 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
26592echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000026593 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026594 ac_builddir=.
26595
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026596case "$ac_dir" in
26597.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
26598*)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026599 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026600 # A ".." for each directory in $ac_dir_suffix.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026601 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026602 case $ac_top_builddir_sub in
26603 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
26604 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
26605 esac ;;
26606esac
26607ac_abs_top_builddir=$ac_pwd
26608ac_abs_builddir=$ac_pwd$ac_dir_suffix
26609# for backward compatibility:
26610ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000026611
26612case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026613 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000026614 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026615 ac_top_srcdir=$ac_top_builddir_sub
26616 ac_abs_top_srcdir=$ac_pwd ;;
26617 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000026618 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026619 ac_top_srcdir=$srcdir
26620 ac_abs_top_srcdir=$srcdir ;;
26621 *) # Relative name.
26622 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
26623 ac_top_srcdir=$ac_top_build_prefix$srcdir
26624 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026625esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026626ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000026627
Martin v. Löwis11437992002-04-12 09:54:03 +000026628
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026629 case $ac_mode in
26630 :F)
26631 #
26632 # CONFIG_FILE
26633 #
Martin v. Löwis11437992002-04-12 09:54:03 +000026634
26635 case $INSTALL in
26636 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026637 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026638 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000026639_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026640
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026641cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026642# If the template does not know about datarootdir, expand it.
26643# FIXME: This hack should be removed a few years after 2.60.
26644ac_datarootdir_hack=; ac_datarootdir_seen=
26645
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026646case `sed -n '/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026647 p
26648 q
26649}
26650/@datadir@/p
26651/@docdir@/p
26652/@infodir@/p
26653/@localedir@/p
26654/@mandir@/p
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026655' $ac_file_inputs` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026656*datarootdir*) ac_datarootdir_seen=yes;;
26657*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026658 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
26659echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026660_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026661cat >>$CONFIG_STATUS <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026662 ac_datarootdir_hack='
26663 s&@datadir@&$datadir&g
26664 s&@docdir@&$docdir&g
26665 s&@infodir@&$infodir&g
26666 s&@localedir@&$localedir&g
26667 s&@mandir@&$mandir&g
26668 s&\\\${datarootdir}&$datarootdir&g' ;;
26669esac
26670_ACEOF
26671
26672# Neutralize VPATH when `$srcdir' = `.'.
26673# Shell code in configure.ac might set extrasub.
26674# FIXME: do we really want to maintain this feature?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026675cat >>$CONFIG_STATUS <<_ACEOF
26676 sed "$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000026677$extrasub
26678_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026679cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026680:t
26681/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026682s&@configure_input@&$configure_input&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026683s&@top_builddir@&$ac_top_builddir_sub&;t t
26684s&@srcdir@&$ac_srcdir&;t t
26685s&@abs_srcdir@&$ac_abs_srcdir&;t t
26686s&@top_srcdir@&$ac_top_srcdir&;t t
26687s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
26688s&@builddir@&$ac_builddir&;t t
26689s&@abs_builddir@&$ac_abs_builddir&;t t
26690s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
26691s&@INSTALL@&$ac_INSTALL&;t t
26692$ac_datarootdir_hack
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026693" $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 +000026694
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026695test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
26696 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
26697 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026698 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026699which seems to be undefined. Please make sure it is defined." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026700echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026701which seems to be undefined. Please make sure it is defined." >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000026702
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026703 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000026704 case $ac_file in
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026705 -) cat "$tmp/out"; rm -f "$tmp/out";;
26706 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
26707 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026708 ;;
26709 :H)
26710 #
26711 # CONFIG_HEADER
26712 #
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026713_ACEOF
26714
26715# Transform confdefs.h into a sed script `conftest.defines', that
26716# substitutes the proper values into config.h.in to produce config.h.
26717rm -f conftest.defines conftest.tail
26718# First, append a space to every undef/define line, to ease matching.
26719echo 's/$/ /' >conftest.defines
26720# Then, protect against being on the right side of a sed subst, or in
26721# an unquoted here document, in config.status. If some macros were
26722# called several times there might be several #defines for the same
26723# symbol, which is useless. But do not sort them, since the last
26724# AC_DEFINE must be honored.
26725ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
26726# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
26727# NAME is the cpp macro being defined, VALUE is the value it is being given.
26728# PARAMS is the parameter list in the macro definition--in most cases, it's
26729# just an empty string.
26730ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
26731ac_dB='\\)[ (].*,\\1define\\2'
26732ac_dC=' '
26733ac_dD=' ,'
26734
26735uniq confdefs.h |
26736 sed -n '
26737 t rset
26738 :rset
26739 s/^[ ]*#[ ]*define[ ][ ]*//
26740 t ok
26741 d
26742 :ok
26743 s/[\\&,]/\\&/g
26744 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
26745 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
26746 ' >>conftest.defines
26747
26748# Remove the space that was appended to ease matching.
26749# Then replace #undef with comments. This is necessary, for
26750# example, in the case of _POSIX_SOURCE, which is predefined and required
26751# on some systems where configure will not decide to define it.
26752# (The regexp can be short, since the line contains either #define or #undef.)
26753echo 's/ $//
26754s,^[ #]*u.*,/* & */,' >>conftest.defines
26755
26756# Break up conftest.defines:
26757ac_max_sed_lines=50
26758
26759# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
26760# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
26761# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
26762# et cetera.
26763ac_in='$ac_file_inputs'
26764ac_out='"$tmp/out1"'
26765ac_nxt='"$tmp/out2"'
26766
26767while :
26768do
26769 # Write a here document:
26770 cat >>$CONFIG_STATUS <<_ACEOF
26771 # First, check the format of the line:
26772 cat >"\$tmp/defines.sed" <<\\CEOF
26773/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
26774/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
26775b
26776:def
26777_ACEOF
26778 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
26779 echo 'CEOF
26780 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
26781 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
26782 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
26783 grep . conftest.tail >/dev/null || break
26784 rm -f conftest.defines
26785 mv conftest.tail conftest.defines
26786done
26787rm -f conftest.defines conftest.tail
26788
26789echo "ac_result=$ac_in" >>$CONFIG_STATUS
26790cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026791 if test x"$ac_file" != x-; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026792 echo "/* $configure_input */" >"$tmp/config.h"
26793 cat "$ac_result" >>"$tmp/config.h"
26794 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
26795 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
26796echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000026797 else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026798 rm -f $ac_file
26799 mv "$tmp/config.h" $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000026800 fi
26801 else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026802 echo "/* $configure_input */"
26803 cat "$ac_result"
Martin v. Löwis11437992002-04-12 09:54:03 +000026804 fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026805 rm -f "$tmp/out12"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026806 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000026807
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026808
26809 esac
26810
26811done # for ac_tag
26812
Guido van Rossum627b2d71993-12-24 10:39:16 +000026813
Martin v. Löwis11437992002-04-12 09:54:03 +000026814{ (exit 0); exit 0; }
26815_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026816chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000026817ac_clean_files=$ac_clean_files_save
26818
26819
26820# configure is writing to config.log, and then calls config.status.
26821# config.status does its own redirection, appending to config.log.
26822# Unfortunately, on DOS this fails, as config.log is still kept open
26823# by configure, so config.status won't be able to write to it; its
26824# output is simply discarded. So we exec the FD to /dev/null,
26825# effectively closing config.log, so it can be properly (re)opened and
26826# appended to by config.status. When coming back to configure, we
26827# need to make the FD available again.
26828if test "$no_create" != yes; then
26829 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000026830 ac_config_status_args=
26831 test "$silent" = yes &&
26832 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000026833 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000026834 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000026835 exec 5>>config.log
26836 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
26837 # would make configure fail if this is the last instruction.
26838 $ac_cs_success || { (exit 1); exit 1; }
26839fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000026840
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000026841
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000026842echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000026843if test ! -f Modules/Setup
26844then
26845 cp $srcdir/Modules/Setup.dist Modules/Setup
26846fi
26847
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000026848echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000026849if test ! -f Modules/Setup.local
26850then
26851 echo "# Edit this file for local setup changes" >Modules/Setup.local
26852fi
26853
26854echo "creating Makefile"
26855$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
26856 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000026857 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000026858mv config.c Modules