blob: 46a1a4f125b0ac0ca9bf239e8d566f54adc04dc7 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Jesus Cea0f752ee2010-04-28 12:03:06 +00002# From configure.in Revision: 80192 .
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
Benjamin Petersone7e59c22010-03-23 21:05:56 +0000661LIPO_32BIT_FLAGS
662LIPO_64BIT_FLAGS
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000663PYTHONFRAMEWORK
664PYTHONFRAMEWORKIDENTIFIER
665PYTHONFRAMEWORKDIR
666PYTHONFRAMEWORKPREFIX
667PYTHONFRAMEWORKINSTALLDIR
668FRAMEWORKINSTALLFIRST
669FRAMEWORKINSTALLLAST
670FRAMEWORKALTINSTALLFIRST
671FRAMEWORKALTINSTALLLAST
672FRAMEWORKUNIXTOOLSPREFIX
673MACHDEP
674SGI_ABI
675CONFIGURE_MACOSX_DEPLOYMENT_TARGET
676EXPORT_MACOSX_DEPLOYMENT_TARGET
677CC
678CFLAGS
679LDFLAGS
680CPPFLAGS
681ac_ct_CC
682EXEEXT
683OBJEXT
684CXX
685MAINCC
686CPP
687GREP
688EGREP
689BUILDEXEEXT
690LIBRARY
691LDLIBRARY
692DLLLIBRARY
693BLDLIBRARY
694LDLIBRARYDIR
695INSTSONAME
696RUNSHARED
697LINKCC
698GNULD
699RANLIB
700AR
701ARFLAGS
702SVNVERSION
703INSTALL_PROGRAM
704INSTALL_SCRIPT
705INSTALL_DATA
706LN
707OPT
708BASECFLAGS
709UNIVERSAL_ARCH_FLAGS
710OTHER_LIBTOOL_OPT
711LIBTOOL_CRUFT
712SO
713LDSHARED
714BLDSHARED
715CCSHARED
716LINKFORSHARED
717CFLAGSFORSHARED
718SHLIBS
719USE_SIGNAL_MODULE
720SIGNAL_OBJS
721USE_THREAD_MODULE
722LDLAST
723THREADOBJ
724DLINCLDIR
725DYNLOADFILE
726MACHDEP_OBJS
727TRUE
728LIBOBJS
729HAVE_GETHOSTBYNAME_R_6_ARG
730HAVE_GETHOSTBYNAME_R_5_ARG
731HAVE_GETHOSTBYNAME_R_3_ARG
732HAVE_GETHOSTBYNAME_R
733HAVE_GETHOSTBYNAME
734LIBM
735LIBC
736THREADHEADERS
737SRCDIRS
738LTLIBOBJS'
Skip Montanaro6dead952003-09-25 14:50:04 +0000739ac_subst_files=''
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000740 ac_precious_vars='build_alias
741host_alias
742target_alias
743CC
744CFLAGS
745LDFLAGS
746LIBS
747CPPFLAGS
748CPP'
749
Guido van Rossum627b2d71993-12-24 10:39:16 +0000750
Guido van Rossum7f43da71994-08-01 12:15:30 +0000751# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000752ac_init_help=
753ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000754# The variables have the same names as the options, with
755# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000756cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000757exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000758no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000759no_recursion=
760prefix=NONE
761program_prefix=NONE
762program_suffix=NONE
763program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000764silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000765site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000766srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000767verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000768x_includes=NONE
769x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000770
771# Installation directory options.
772# These are left unexpanded so users can "make install exec_prefix=/foo"
773# and all the variables that are supposed to be based on exec_prefix
774# by default will actually change.
775# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000776# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000777bindir='${exec_prefix}/bin'
778sbindir='${exec_prefix}/sbin'
779libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000780datarootdir='${prefix}/share'
781datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000782sysconfdir='${prefix}/etc'
783sharedstatedir='${prefix}/com'
784localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000785includedir='${prefix}/include'
786oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000787docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
788infodir='${datarootdir}/info'
789htmldir='${docdir}'
790dvidir='${docdir}'
791pdfdir='${docdir}'
792psdir='${docdir}'
793libdir='${exec_prefix}/lib'
794localedir='${datarootdir}/locale'
795mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000796
Guido van Rossum7f43da71994-08-01 12:15:30 +0000797ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000798ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000799for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000800do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000801 # If the previous option needs an argument, assign it.
802 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000803 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000804 ac_prev=
805 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000806 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000807
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000808 case $ac_option in
809 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
810 *) ac_optarg=yes ;;
811 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000812
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000813 # Accept the important Cygnus configure options, so we can diagnose typos.
814
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000815 case $ac_dashdash$ac_option in
816 --)
817 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000818
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000819 -bindir | --bindir | --bindi | --bind | --bin | --bi)
820 ac_prev=bindir ;;
821 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000822 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000823
824 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000825 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000826 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000827 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000828
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000829 -cache-file | --cache-file | --cache-fil | --cache-fi \
830 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
831 ac_prev=cache_file ;;
832 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
833 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000834 cache_file=$ac_optarg ;;
835
836 --config-cache | -C)
837 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000838
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000839 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000840 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000841 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000842 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000843
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000844 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
845 | --dataroo | --dataro | --datar)
846 ac_prev=datarootdir ;;
847 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
848 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
849 datarootdir=$ac_optarg ;;
850
Guido van Rossum7f43da71994-08-01 12:15:30 +0000851 -disable-* | --disable-*)
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000852 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000853 # Reject names that are not valid shell variable names.
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000854 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
855 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000856 { (exit 1); exit 1; }; }
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000857 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
858 eval enable_$ac_feature=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000859
860 -docdir | --docdir | --docdi | --doc | --do)
861 ac_prev=docdir ;;
862 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
863 docdir=$ac_optarg ;;
864
865 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
866 ac_prev=dvidir ;;
867 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
868 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000869
870 -enable-* | --enable-*)
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000871 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000872 # Reject names that are not valid shell variable names.
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000873 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
874 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000875 { (exit 1); exit 1; }; }
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000876 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
877 eval enable_$ac_feature=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000878
Guido van Rossum7f43da71994-08-01 12:15:30 +0000879 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
880 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
881 | --exec | --exe | --ex)
882 ac_prev=exec_prefix ;;
883 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
884 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
885 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000886 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000887
888 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000889 # Obsolete; use --with-gas.
890 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000891
Martin v. Löwis11437992002-04-12 09:54:03 +0000892 -help | --help | --hel | --he | -h)
893 ac_init_help=long ;;
894 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
895 ac_init_help=recursive ;;
896 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
897 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000898
899 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000900 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000901 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000902 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000903
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000904 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
905 ac_prev=htmldir ;;
906 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
907 | --ht=*)
908 htmldir=$ac_optarg ;;
909
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000910 -includedir | --includedir | --includedi | --included | --include \
911 | --includ | --inclu | --incl | --inc)
912 ac_prev=includedir ;;
913 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
914 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000915 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000916
917 -infodir | --infodir | --infodi | --infod | --info | --inf)
918 ac_prev=infodir ;;
919 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000920 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000921
922 -libdir | --libdir | --libdi | --libd)
923 ac_prev=libdir ;;
924 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000925 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000926
927 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
928 | --libexe | --libex | --libe)
929 ac_prev=libexecdir ;;
930 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
931 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000932 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000933
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000934 -localedir | --localedir | --localedi | --localed | --locale)
935 ac_prev=localedir ;;
936 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
937 localedir=$ac_optarg ;;
938
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000939 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000940 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000941 ac_prev=localstatedir ;;
942 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000943 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000944 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000945
946 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
947 ac_prev=mandir ;;
948 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000949 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000950
Guido van Rossum7f43da71994-08-01 12:15:30 +0000951 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000952 # Obsolete; use --without-fp.
953 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000954
955 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000956 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000957 no_create=yes ;;
958
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000959 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
960 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
961 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000962
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000963 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
964 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
965 | --oldin | --oldi | --old | --ol | --o)
966 ac_prev=oldincludedir ;;
967 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
968 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
969 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000970 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000971
Guido van Rossum7f43da71994-08-01 12:15:30 +0000972 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
973 ac_prev=prefix ;;
974 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000975 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000976
977 -program-prefix | --program-prefix | --program-prefi | --program-pref \
978 | --program-pre | --program-pr | --program-p)
979 ac_prev=program_prefix ;;
980 -program-prefix=* | --program-prefix=* | --program-prefi=* \
981 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000982 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000983
984 -program-suffix | --program-suffix | --program-suffi | --program-suff \
985 | --program-suf | --program-su | --program-s)
986 ac_prev=program_suffix ;;
987 -program-suffix=* | --program-suffix=* | --program-suffi=* \
988 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000989 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000990
991 -program-transform-name | --program-transform-name \
992 | --program-transform-nam | --program-transform-na \
993 | --program-transform-n | --program-transform- \
994 | --program-transform | --program-transfor \
995 | --program-transfo | --program-transf \
996 | --program-trans | --program-tran \
997 | --progr-tra | --program-tr | --program-t)
998 ac_prev=program_transform_name ;;
999 -program-transform-name=* | --program-transform-name=* \
1000 | --program-transform-nam=* | --program-transform-na=* \
1001 | --program-transform-n=* | --program-transform-=* \
1002 | --program-transform=* | --program-transfor=* \
1003 | --program-transfo=* | --program-transf=* \
1004 | --program-trans=* | --program-tran=* \
1005 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001006 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001007
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001008 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1009 ac_prev=pdfdir ;;
1010 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1011 pdfdir=$ac_optarg ;;
1012
1013 -psdir | --psdir | --psdi | --psd | --ps)
1014 ac_prev=psdir ;;
1015 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1016 psdir=$ac_optarg ;;
1017
Guido van Rossum7f43da71994-08-01 12:15:30 +00001018 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1019 | -silent | --silent | --silen | --sile | --sil)
1020 silent=yes ;;
1021
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001022 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1023 ac_prev=sbindir ;;
1024 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1025 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001026 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001027
1028 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1029 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1030 | --sharedst | --shareds | --shared | --share | --shar \
1031 | --sha | --sh)
1032 ac_prev=sharedstatedir ;;
1033 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1034 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1035 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1036 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001037 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001038
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001039 -site | --site | --sit)
1040 ac_prev=site ;;
1041 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001042 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001043
Guido van Rossum7f43da71994-08-01 12:15:30 +00001044 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1045 ac_prev=srcdir ;;
1046 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001047 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001048
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001049 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1050 | --syscon | --sysco | --sysc | --sys | --sy)
1051 ac_prev=sysconfdir ;;
1052 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1053 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001054 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001055
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 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001058 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001059 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001060
1061 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1062 verbose=yes ;;
1063
Martin v. Löwis11437992002-04-12 09:54:03 +00001064 -version | --version | --versio | --versi | --vers | -V)
1065 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001066
1067 -with-* | --with-*)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001068 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001069 # Reject names that are not valid shell variable names.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001070 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1071 { echo "$as_me: error: invalid package name: $ac_package" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001072 { (exit 1); exit 1; }; }
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001073 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1074 eval with_$ac_package=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001075
1076 -without-* | --without-*)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001077 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001078 # Reject names that are not valid shell variable names.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001079 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1080 { echo "$as_me: error: invalid package name: $ac_package" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001081 { (exit 1); exit 1; }; }
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001082 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1083 eval with_$ac_package=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001084
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001085 --x)
1086 # Obsolete; use --with-x.
1087 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001088
1089 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1090 | --x-incl | --x-inc | --x-in | --x-i)
1091 ac_prev=x_includes ;;
1092 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1093 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001094 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001095
1096 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1097 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1098 ac_prev=x_libraries ;;
1099 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1100 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001101 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001102
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001103 -*) { echo "$as_me: error: unrecognized option: $ac_option
Martin v. Löwis11437992002-04-12 09:54:03 +00001104Try \`$0 --help' for more information." >&2
1105 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001106 ;;
1107
Martin v. Löwis11437992002-04-12 09:54:03 +00001108 *=*)
1109 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1110 # Reject names that are not valid shell variable names.
1111 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001112 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001113 { (exit 1); exit 1; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001114 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001115 export $ac_envvar ;;
1116
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001117 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001118 # FIXME: should be removed in autoconf 3.0.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001119 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001120 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001121 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001122 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001123 ;;
1124
1125 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001126done
1127
Guido van Rossum7f43da71994-08-01 12:15:30 +00001128if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001129 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001130 { echo "$as_me: error: missing argument to $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001131 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001132fi
1133
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001134# Be sure to have absolute directory names.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001135for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1136 datadir sysconfdir sharedstatedir localstatedir includedir \
1137 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1138 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001139do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001140 eval ac_val=\$$ac_var
Martin v. Löwis11437992002-04-12 09:54:03 +00001141 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001142 [\\/$]* | ?:[\\/]* ) continue;;
1143 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001144 esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001145 { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001146 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001147done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001148
Martin v. Löwis11437992002-04-12 09:54:03 +00001149# There might be people who depend on the old broken behavior: `$host'
1150# used to hold the argument of --host etc.
1151# FIXME: To remove some day.
1152build=$build_alias
1153host=$host_alias
1154target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001155
Martin v. Löwis11437992002-04-12 09:54:03 +00001156# FIXME: To remove some day.
1157if test "x$host_alias" != x; then
1158 if test "x$build_alias" = x; then
1159 cross_compiling=maybe
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001160 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 +00001161 If a cross compiler is detected then cross compile mode will be used." >&2
1162 elif test "x$build_alias" != "x$host_alias"; then
1163 cross_compiling=yes
1164 fi
1165fi
1166
1167ac_tool_prefix=
1168test -n "$host_alias" && ac_tool_prefix=$host_alias-
1169
1170test "$silent" = yes && exec 6>/dev/null
1171
Guido van Rossum627b2d71993-12-24 10:39:16 +00001172
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001173ac_pwd=`pwd` && test -n "$ac_pwd" &&
1174ac_ls_di=`ls -di .` &&
1175ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001176 { echo "$as_me: error: Working directory cannot be determined" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001177 { (exit 1); exit 1; }; }
1178test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001179 { echo "$as_me: error: pwd does not report name of working directory" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001180 { (exit 1); exit 1; }; }
1181
1182
Guido van Rossum627b2d71993-12-24 10:39:16 +00001183# Find the source files, if location was not specified.
1184if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001185 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001186 # Try the directory containing this script, then the parent directory.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001187 ac_confdir=`$as_dirname -- "$0" ||
1188$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1189 X"$0" : 'X\(//\)[^/]' \| \
1190 X"$0" : 'X\(//\)$' \| \
1191 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
1192echo X"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001193 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1194 s//\1/
1195 q
1196 }
1197 /^X\(\/\/\)[^/].*/{
1198 s//\1/
1199 q
1200 }
1201 /^X\(\/\/\)$/{
1202 s//\1/
1203 q
1204 }
1205 /^X\(\/\).*/{
1206 s//\1/
1207 q
1208 }
1209 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001210 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001211 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001212 srcdir=..
1213 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001214else
1215 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001216fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001217if test ! -r "$srcdir/$ac_unique_file"; then
1218 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001219 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001220 { (exit 1); exit 1; }; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00001221fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001222ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1223ac_abs_confdir=`(
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001224 cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001225 { (exit 1); exit 1; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001226 pwd)`
1227# When building in place, set srcdir=.
1228if test "$ac_abs_confdir" = "$ac_pwd"; then
1229 srcdir=.
1230fi
1231# Remove unnecessary trailing slashes from srcdir.
1232# Double slashes in file names in object file debugging info
1233# mess up M-x gdb in Emacs.
1234case $srcdir in
1235*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1236esac
1237for ac_var in $ac_precious_vars; do
1238 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1239 eval ac_env_${ac_var}_value=\$${ac_var}
1240 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1241 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1242done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001243
Martin v. Löwis11437992002-04-12 09:54:03 +00001244#
1245# Report the --help message.
1246#
1247if test "$ac_init_help" = "long"; then
1248 # Omit some internal or obsolete options to make the list less imposing.
1249 # This message is too long to be a string in the A/UX 3.1 sh.
1250 cat <<_ACEOF
Christian Heimes70e5cab2008-12-03 18:18:23 +00001251\`configure' configures python 3.1 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001252
1253Usage: $0 [OPTION]... [VAR=VALUE]...
1254
1255To assign environment variables (e.g., CC, CFLAGS...), specify them as
1256VAR=VALUE. See below for descriptions of some of the useful variables.
1257
1258Defaults for the options are specified in brackets.
1259
1260Configuration:
1261 -h, --help display this help and exit
1262 --help=short display options specific to this package
1263 --help=recursive display the short help of all the included packages
1264 -V, --version display version information and exit
1265 -q, --quiet, --silent do not print \`checking...' messages
1266 --cache-file=FILE cache test results in FILE [disabled]
1267 -C, --config-cache alias for \`--cache-file=config.cache'
1268 -n, --no-create do not create output files
1269 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1270
Martin v. Löwis11437992002-04-12 09:54:03 +00001271Installation directories:
1272 --prefix=PREFIX install architecture-independent files in PREFIX
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001273 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001274 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001275 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001276
1277By default, \`make install' will install all the files in
1278\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1279an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1280for instance \`--prefix=\$HOME'.
1281
1282For better control, use the options below.
1283
1284Fine tuning of the installation directories:
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001285 --bindir=DIR user executables [EPREFIX/bin]
1286 --sbindir=DIR system admin executables [EPREFIX/sbin]
1287 --libexecdir=DIR program executables [EPREFIX/libexec]
1288 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1289 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1290 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1291 --libdir=DIR object code libraries [EPREFIX/lib]
1292 --includedir=DIR C header files [PREFIX/include]
1293 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1294 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1295 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1296 --infodir=DIR info documentation [DATAROOTDIR/info]
1297 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1298 --mandir=DIR man documentation [DATAROOTDIR/man]
1299 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1300 --htmldir=DIR html documentation [DOCDIR]
1301 --dvidir=DIR dvi documentation [DOCDIR]
1302 --pdfdir=DIR pdf documentation [DOCDIR]
1303 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001304_ACEOF
1305
1306 cat <<\_ACEOF
1307_ACEOF
1308fi
1309
1310if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001311 case $ac_init_help in
Christian Heimes70e5cab2008-12-03 18:18:23 +00001312 short | recursive ) echo "Configuration of python 3.1:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001313 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001314 cat <<\_ACEOF
1315
1316Optional Features:
1317 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1318 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001319 --enable-universalsdk[=SDKDIR]
Christian Heimes292d3512008-02-03 16:51:08 +00001320 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001321 --enable-framework[=INSTALLDIR]
1322 Build (MacOSX|Darwin) framework
1323 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001324 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001325 --enable-ipv6 Enable ipv6 (with ipv4) support
1326 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001327 --enable-big-digits[=BITS]
1328 use big digits for Python longs [BITS=30]
Martin v. Löwis11437992002-04-12 09:54:03 +00001329
1330Optional Packages:
1331 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1332 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001333 --with-universal-archs=ARCH
1334 select architectures for universal build ("32-bit",
Ronald Oussoren856624d2009-09-08 07:13:53 +00001335 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001336 --with-framework-name=FRAMEWORK
1337 specify an alternate name of the framework built
1338 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001339 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001340 --with-cxx-main=<compiler>
1341 compile main() and link python executable with C++
1342 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001343 --with-suffix=.exe set executable suffix
1344 --with-pydebug build with Py_DEBUG defined
1345 --with-libs='lib1 ...' link against additional libs
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001346 --with-system-ffi build _ctypes module using an installed ffi library
Matthias Klose55708cc2009-04-30 08:06:49 +00001347 --with-dbmliborder=db1:db2:...
1348 order to check db backends for dbm. Valid value is a
1349 colon separated string with the backend names
1350 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001351 --with-signal-module disable/enable signal module
1352 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1353 --with(out)-threads[=DIRECTORY]
1354 disable/enable thread support
1355 --with(out)-thread[=DIRECTORY]
1356 deprecated; use --with(out)-threads
1357 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001358 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001359 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001360 --with(out)-pymalloc disable/enable specialized mallocs
1361 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001362 --with-fpectl enable SIGFPE catching
1363 --with-libm=STRING math library
1364 --with-libc=STRING C library
Georg Brandl52d168a2008-01-07 18:10:24 +00001365 --with-wide-unicode Use 4-byte Unicode characters (default is 2 bytes)
Antoine Pitroub52ec782009-01-25 16:34:23 +00001366 --with-computed-gotos Use computed gotos / threaded dispatch in evaluation
1367 loop (not available on all compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001368
1369Some influential environment variables:
1370 CC C compiler command
1371 CFLAGS C compiler flags
1372 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1373 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001374 LIBS libraries to pass to the linker, e.g. -l<library>
1375 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1376 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001377 CPP C preprocessor
1378
1379Use these variables to override the choices made by `configure' or to help
1380it to find libraries and programs with nonstandard names/locations.
1381
Georg Brandle2e15612009-05-20 18:25:10 +00001382Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001383_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001384ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001385fi
1386
1387if test "$ac_init_help" = "recursive"; then
1388 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001389 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001390 test -d "$ac_dir" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001391 ac_builddir=.
1392
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001393case "$ac_dir" in
1394.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1395*)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001396 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001397 # A ".." for each directory in $ac_dir_suffix.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001398 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001399 case $ac_top_builddir_sub in
1400 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1401 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1402 esac ;;
1403esac
1404ac_abs_top_builddir=$ac_pwd
1405ac_abs_builddir=$ac_pwd$ac_dir_suffix
1406# for backward compatibility:
1407ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001408
1409case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001410 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001411 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001412 ac_top_srcdir=$ac_top_builddir_sub
1413 ac_abs_top_srcdir=$ac_pwd ;;
1414 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001415 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001416 ac_top_srcdir=$srcdir
1417 ac_abs_top_srcdir=$srcdir ;;
1418 *) # Relative name.
1419 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1420 ac_top_srcdir=$ac_top_build_prefix$srcdir
1421 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001422esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001423ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001424
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001425 cd "$ac_dir" || { ac_status=$?; continue; }
1426 # Check for guested configure.
1427 if test -f "$ac_srcdir/configure.gnu"; then
1428 echo &&
1429 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1430 elif test -f "$ac_srcdir/configure"; then
1431 echo &&
1432 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001433 else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001434 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001435 fi || ac_status=$?
1436 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001437 done
1438fi
1439
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001440test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001441if $ac_init_version; then
1442 cat <<\_ACEOF
Christian Heimes70e5cab2008-12-03 18:18:23 +00001443python configure 3.1
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001444generated by GNU Autoconf 2.61
Martin v. Löwis11437992002-04-12 09:54:03 +00001445
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001446Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014472002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001448This configure script is free software; the Free Software Foundation
1449gives unlimited permission to copy, distribute and modify it.
1450_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001451 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001452fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001453cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00001454This file contains any messages produced by compilers while
1455running configure, to aid debugging if configure makes a mistake.
1456
Christian Heimes70e5cab2008-12-03 18:18:23 +00001457It was created by python $as_me 3.1, which was
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001458generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00001459
1460 $ $0 $@
1461
1462_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001463exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00001464{
1465cat <<_ASUNAME
1466## --------- ##
1467## Platform. ##
1468## --------- ##
1469
1470hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1471uname -m = `(uname -m) 2>/dev/null || echo unknown`
1472uname -r = `(uname -r) 2>/dev/null || echo unknown`
1473uname -s = `(uname -s) 2>/dev/null || echo unknown`
1474uname -v = `(uname -v) 2>/dev/null || echo unknown`
1475
1476/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1477/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1478
1479/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1480/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1481/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001482/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00001483/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1484/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1485/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1486
1487_ASUNAME
1488
1489as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1490for as_dir in $PATH
1491do
1492 IFS=$as_save_IFS
1493 test -z "$as_dir" && as_dir=.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001494 echo "PATH: $as_dir"
Martin v. Löwis11437992002-04-12 09:54:03 +00001495done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001496IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00001497
1498} >&5
1499
1500cat >&5 <<_ACEOF
1501
1502
1503## ----------- ##
1504## Core tests. ##
1505## ----------- ##
1506
1507_ACEOF
1508
1509
1510# Keep a trace of the command line.
1511# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001512# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001513# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001514# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001515ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001516ac_configure_args0=
1517ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00001518ac_must_keep_next=false
1519for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001520do
Skip Montanaro6dead952003-09-25 14:50:04 +00001521 for ac_arg
1522 do
1523 case $ac_arg in
1524 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1525 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1526 | -silent | --silent | --silen | --sile | --sil)
1527 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001528 *\'*)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001529 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00001530 esac
1531 case $ac_pass in
1532 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1533 2)
1534 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1535 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001536 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00001537 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00001538 case $ac_arg in
1539 *=* | --config-cache | -C | -disable-* | --disable-* \
1540 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1541 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1542 | -with-* | --with-* | -without-* | --without-* | --x)
1543 case "$ac_configure_args0 " in
1544 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1545 esac
1546 ;;
1547 -* ) ac_must_keep_next=true ;;
1548 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00001549 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001550 ac_configure_args="$ac_configure_args '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00001551 ;;
1552 esac
1553 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001554done
Skip Montanaro6dead952003-09-25 14:50:04 +00001555$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1556$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 +00001557
1558# When interrupted or exit'd, cleanup temporary files, and complete
1559# config.log. We remove comments because anyway the quotes in there
1560# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001561# WARNING: Use '\'' to represent an apostrophe within the trap.
1562# 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 +00001563trap 'exit_status=$?
1564 # Save into config.log some information that might help in debugging.
1565 {
1566 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001567
Martin v. Löwis11437992002-04-12 09:54:03 +00001568 cat <<\_ASBOX
1569## ---------------- ##
1570## Cache variables. ##
1571## ---------------- ##
1572_ASBOX
1573 echo
1574 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001575(
1576 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1577 eval ac_val=\$$ac_var
1578 case $ac_val in #(
1579 *${as_nl}*)
1580 case $ac_var in #(
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001581 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1582echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001583 esac
1584 case $ac_var in #(
1585 _ | IFS | as_nl) ;; #(
1586 *) $as_unset $ac_var ;;
1587 esac ;;
1588 esac
1589 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001590 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001591 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1592 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001593 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001594 "s/'\''/'\''\\\\'\'''\''/g;
1595 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1596 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001597 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001598 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001599 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001600 esac |
1601 sort
1602)
Martin v. Löwis11437992002-04-12 09:54:03 +00001603 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001604
1605 cat <<\_ASBOX
1606## ----------------- ##
1607## Output variables. ##
1608## ----------------- ##
1609_ASBOX
1610 echo
1611 for ac_var in $ac_subst_vars
1612 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001613 eval ac_val=\$$ac_var
1614 case $ac_val in
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001615 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001616 esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001617 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001618 done | sort
1619 echo
1620
1621 if test -n "$ac_subst_files"; then
1622 cat <<\_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001623## ------------------- ##
1624## File substitutions. ##
1625## ------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00001626_ASBOX
1627 echo
1628 for ac_var in $ac_subst_files
1629 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001630 eval ac_val=\$$ac_var
1631 case $ac_val in
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001632 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001633 esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001634 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001635 done | sort
1636 echo
1637 fi
1638
Martin v. Löwis11437992002-04-12 09:54:03 +00001639 if test -s confdefs.h; then
1640 cat <<\_ASBOX
1641## ----------- ##
1642## confdefs.h. ##
1643## ----------- ##
1644_ASBOX
1645 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001646 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001647 echo
1648 fi
1649 test "$ac_signal" != 0 &&
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001650 echo "$as_me: caught signal $ac_signal"
1651 echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00001652 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001653 rm -f core *.core core.conftest.* &&
1654 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001655 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001656' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00001657for ac_signal in 1 2 13 15; do
1658 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1659done
1660ac_signal=0
1661
1662# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001663rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001664
1665# Predefined preprocessor variables.
1666
1667cat >>confdefs.h <<_ACEOF
1668#define PACKAGE_NAME "$PACKAGE_NAME"
1669_ACEOF
1670
1671
1672cat >>confdefs.h <<_ACEOF
1673#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1674_ACEOF
1675
1676
1677cat >>confdefs.h <<_ACEOF
1678#define PACKAGE_VERSION "$PACKAGE_VERSION"
1679_ACEOF
1680
1681
1682cat >>confdefs.h <<_ACEOF
1683#define PACKAGE_STRING "$PACKAGE_STRING"
1684_ACEOF
1685
1686
1687cat >>confdefs.h <<_ACEOF
1688#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1689_ACEOF
1690
1691
1692# Let the site file select an alternate cache file if it wants to.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001693# Prefer explicitly selected file to automatically selected ones.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001694if test -n "$CONFIG_SITE"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001695 set x "$CONFIG_SITE"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001696elif test "x$prefix" != xNONE; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001697 set x "$prefix/share/config.site" "$prefix/etc/config.site"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001698else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001699 set x "$ac_default_prefix/share/config.site" \
1700 "$ac_default_prefix/etc/config.site"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001701fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001702shift
1703for ac_site_file
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001704do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001705 if test -r "$ac_site_file"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001706 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1707echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001708 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001709 . "$ac_site_file"
1710 fi
1711done
1712
1713if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001714 # Some versions of bash will fail to source /dev/null (special
1715 # files actually), so we avoid doing that.
1716 if test -f "$cache_file"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001717 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1718echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001719 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001720 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1721 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00001722 esac
1723 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001724else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001725 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1726echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001727 >$cache_file
1728fi
1729
1730# Check that the precious variables saved in the cache have kept the same
1731# value.
1732ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001733for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001734 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1735 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001736 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1737 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00001738 case $ac_old_set,$ac_new_set in
1739 set,)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001740 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1741echo "$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 +00001742 ac_cache_corrupted=: ;;
1743 ,set)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001744 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1745echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001746 ac_cache_corrupted=: ;;
1747 ,);;
1748 *)
1749 if test "x$ac_old_val" != "x$ac_new_val"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001750 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1751echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1752 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1753echo "$as_me: former value: $ac_old_val" >&2;}
1754 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1755echo "$as_me: current value: $ac_new_val" >&2;}
1756 ac_cache_corrupted=:
Martin v. Löwis11437992002-04-12 09:54:03 +00001757 fi;;
1758 esac
1759 # Pass precious variables to config.status.
1760 if test "$ac_new_set" = set; then
1761 case $ac_new_val in
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001762 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001763 *) ac_arg=$ac_var=$ac_new_val ;;
1764 esac
1765 case " $ac_configure_args " in
1766 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1767 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1768 esac
1769 fi
1770done
1771if $ac_cache_corrupted; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001772 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1773echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1774 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1775echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001776 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001777fi
1778
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
Guido van Rossum7f43da71994-08-01 12:15:30 +00001803ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001804ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001805ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1806ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1807ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001808
Guido van Rossum627b2d71993-12-24 10:39:16 +00001809
Michael W. Hudson54241132001-12-07 15:38:26 +00001810
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001811ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001812
1813
Martin v. Löwis11437992002-04-12 09:54:03 +00001814
Benjamin Petersond23f8222009-04-05 19:13:16 +00001815if test "$prefix" != "/"; then
1816 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
1817fi
1818
1819
Martin v. Löwis11437992002-04-12 09:54:03 +00001820
1821
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001822
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001823
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001824# We don't use PACKAGE_ variables, and they cause conflicts
1825# with other autoconf-based packages that include Python.h
1826grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1827rm confdefs.h
1828mv confdefs.h.new confdefs.h
1829
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001830
Christian Heimes70e5cab2008-12-03 18:18:23 +00001831VERSION=3.1
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001832
Martin v. Löwis1142de32002-03-29 16:28:31 +00001833
1834SOVERSION=1.0
1835
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001836# The later defininition of _XOPEN_SOURCE disables certain features
1837# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1838
1839cat >>confdefs.h <<\_ACEOF
1840#define _GNU_SOURCE 1
1841_ACEOF
1842
1843
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001844# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1845# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1846# them.
1847
1848cat >>confdefs.h <<\_ACEOF
1849#define _NETBSD_SOURCE 1
1850_ACEOF
1851
1852
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001853# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1854# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1855# them.
1856
1857cat >>confdefs.h <<\_ACEOF
1858#define __BSD_VISIBLE 1
1859_ACEOF
1860
1861
Martin v. Löwisd6320502004-08-12 13:45:08 +00001862# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1863# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
1864
1865cat >>confdefs.h <<\_ACEOF
1866#define _BSD_TYPES 1
1867_ACEOF
1868
1869
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001870# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1871# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
1872# them.
1873
1874cat >>confdefs.h <<\_ACEOF
1875#define _DARWIN_C_SOURCE 1
1876_ACEOF
1877
1878
1879
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001880define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001881
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001882# Arguments passed to configure.
1883
1884CONFIG_ARGS="$ac_configure_args"
1885
Ronald Oussorend5736812010-02-07 12:04:41 +00001886{ echo "$as_me:$LINENO: checking for --enable-universalsdk" >&5
1887echo $ECHO_N "checking for --enable-universalsdk... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001888# Check whether --enable-universalsdk was given.
Thomas Wouters477c8d52006-05-27 19:21:47 +00001889if test "${enable_universalsdk+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001890 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00001891 case $enableval in
1892 yes)
1893 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussorend5736812010-02-07 12:04:41 +00001894 if test ! -d "${enableval}"
1895 then
1896 enableval=/
1897 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00001898 ;;
1899 esac
1900 case $enableval in
1901 no)
1902 UNIVERSALSDK=
1903 enable_universalsdk=
1904 ;;
1905 *)
1906 UNIVERSALSDK=$enableval
Ronald Oussorend5736812010-02-07 12:04:41 +00001907 if test ! -d "${UNIVERSALSDK}"
1908 then
1909 { { echo "$as_me:$LINENO: error: --enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" >&5
1910echo "$as_me: error: --enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" >&2;}
1911 { (exit 1); exit 1; }; }
1912 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00001913 ;;
1914 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001915
Ronald Oussorend5736812010-02-07 12:04:41 +00001916
Thomas Wouters477c8d52006-05-27 19:21:47 +00001917else
1918
1919 UNIVERSALSDK=
1920 enable_universalsdk=
1921
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001922fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00001923
Ronald Oussorend5736812010-02-07 12:04:41 +00001924if test -n "${UNIVERSALSDK}"
1925then
1926 { echo "$as_me:$LINENO: result: ${UNIVERSALSDK}" >&5
1927echo "${ECHO_T}${UNIVERSALSDK}" >&6; }
1928else
1929 { echo "$as_me:$LINENO: result: no" >&5
1930echo "${ECHO_T}no" >&6; }
1931fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00001932
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001933
Benjamin Peterson6794aa32008-07-16 20:33:37 +00001934
1935
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001936UNIVERSAL_ARCHS="32-bit"
Benjamin Petersone7e59c22010-03-23 21:05:56 +00001937
1938
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001939{ echo "$as_me:$LINENO: checking for --with-universal-archs" >&5
1940echo $ECHO_N "checking for --with-universal-archs... $ECHO_C" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001941
1942# Check whether --with-universal-archs was given.
1943if test "${with_universal_archs+set}" = set; then
1944 withval=$with_universal_archs;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001945 { echo "$as_me:$LINENO: result: $withval" >&5
1946echo "${ECHO_T}$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001947 UNIVERSAL_ARCHS="$withval"
1948
1949else
1950
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001951 { echo "$as_me:$LINENO: result: 32-bit" >&5
1952echo "${ECHO_T}32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001953
1954fi
1955
1956
1957
1958
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001959
1960# Check whether --with-framework-name was given.
1961if test "${with_framework_name+set}" = set; then
1962 withval=$with_framework_name;
1963 PYTHONFRAMEWORK=${withval}
1964 PYTHONFRAMEWORKDIR=${withval}.framework
1965 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
1966
1967else
1968
1969 PYTHONFRAMEWORK=Python
1970 PYTHONFRAMEWORKDIR=Python.framework
1971 PYTHONFRAMEWORKIDENTIFIER=org.python.python
1972
1973fi
1974
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001975# Check whether --enable-framework was given.
Thomas Wouters477c8d52006-05-27 19:21:47 +00001976if test "${enable_framework+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001977 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00001978 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001979 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001980 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001981 esac
1982 case $enableval in
1983 no)
1984 PYTHONFRAMEWORK=
1985 PYTHONFRAMEWORKDIR=no-framework
1986 PYTHONFRAMEWORKPREFIX=
1987 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00001988 FRAMEWORKINSTALLFIRST=
1989 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00001990 FRAMEWORKALTINSTALLFIRST=
1991 FRAMEWORKALTINSTALLLAST=
1992 if test "x${prefix}" = "xNONE"; then
1993 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1994 else
1995 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1996 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001997 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001998 ;;
1999 *)
2000 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00002001 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00002002 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00002003 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Benjamin Petersone7e59c22010-03-23 21:05:56 +00002004 case "${UNIVERSAL_ARCHS}" in
2005 all|3-way|intel)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002006 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkinstallunixtools4way"
Ronald Oussorene3918352009-03-30 18:00:28 +00002007 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkaltinstallunixtools4way"
Benjamin Petersone7e59c22010-03-23 21:05:56 +00002008 ;;
2009 *)
Ronald Oussorene3918352009-03-30 18:00:28 +00002010 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002011 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Benjamin Petersone7e59c22010-03-23 21:05:56 +00002012 ;;
2013 esac
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002014
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002015 if test "x${prefix}" = "xNONE" ; then
2016 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2017 else
2018 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2019 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002020 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00002021
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002022 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00002023 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002024 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002025
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002026 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002027
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002028 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2029
2030 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2031
Jack Jansene578a632001-08-15 01:27:14 +00002032 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002033
Guido van Rossum563e7081996-09-10 18:20:48 +00002034else
Martin v. Löwis11437992002-04-12 09:54:03 +00002035
Jack Jansene578a632001-08-15 01:27:14 +00002036 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002037 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002038 PYTHONFRAMEWORKPREFIX=
2039 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002040 FRAMEWORKINSTALLFIRST=
2041 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002042 FRAMEWORKALTINSTALLFIRST=
2043 FRAMEWORKALTINSTALLLAST=
2044 if test "x${prefix}" = "xNONE" ; then
2045 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2046 else
2047 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2048 fi
Jack Jansene578a632001-08-15 01:27:14 +00002049 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002050
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002051 if test "$UNIVERSAL_ARCHS" = "all"
2052 then
2053 FRAMEWORKINSTALLLAST=update4wayuniversal
2054 FRAMEWORKALTINSTALLLAST=update4wayuniversal
2055 fi
2056
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002057fi
2058
Thomas Wouters477c8d52006-05-27 19:21:47 +00002059
2060
Michael W. Hudson54241132001-12-07 15:38:26 +00002061
2062
2063
2064
Jack Jansene578a632001-08-15 01:27:14 +00002065
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002066
2067
2068
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002069
Jack Jansene578a632001-08-15 01:27:14 +00002070##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00002071## AC_HELP_STRING(--with-dyld,
2072## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00002073##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002074# Set name for machine-dependent library files
2075
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002076{ echo "$as_me:$LINENO: checking MACHDEP" >&5
2077echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002078if test -z "$MACHDEP"
2079then
Guido van Rossum563e7081996-09-10 18:20:48 +00002080 ac_sys_system=`uname -s`
Benjamin Petersona8332062009-09-11 22:36:27 +00002081 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002082 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002083 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002084 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002085 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002086 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002087 ac_md_system=`echo $ac_sys_system |
2088 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2089 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002090 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002091 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002092
Guido van Rossum07397971997-04-29 21:49:50 +00002093 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002094 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002095 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00002096 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002097 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002098 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002099 esac
2100fi
Guido van Rossum91922671997-10-09 20:24:13 +00002101
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002102# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2103# disable features if it is defined, without any means to access these
2104# features as extensions. For these systems, we skip the definition of
2105# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2106# some feature, make sure there is no alternative way to access this
2107# feature. Also, when using wildcards, make sure you have verified the
2108# need for not defining _XOPEN_SOURCE on all systems matching the
2109# wildcard, and that the wildcard does not include future systems
2110# (which may remove their limitations).
2111case $ac_sys_system/$ac_sys_release in
2112 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2113 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002114 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis4d0a20a2010-02-15 21:46:27 +00002115 # In addition, Stefan Krah confirms that issue #1244610 exists through
2116 # OpenBSD 4.6, but is fixed in 4.7.
2117 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00002118 define_xopen_source=no
2119 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2120 # also defined. This can be overridden by defining _BSD_SOURCE
2121 # As this has a different meaning on Linux, only define it on OpenBSD
2122
2123cat >>confdefs.h <<\_ACEOF
2124#define _BSD_SOURCE 1
2125_ACEOF
2126
2127 ;;
Martin v. Löwis4d0a20a2010-02-15 21:46:27 +00002128 OpenBSD/4.[789])
Martin v. Löwisf6594222010-02-15 08:37:47 +00002129 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2130 # also defined. This can be overridden by defining _BSD_SOURCE
2131 # As this has a different meaning on Linux, only define it on OpenBSD
2132
2133cat >>confdefs.h <<\_ACEOF
2134#define _BSD_SOURCE 1
2135_ACEOF
2136
2137 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00002138 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
2139 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
2140 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00002141 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 +00002142 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00002143 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
2144 # of union __?sigval. Reported by Stuart Bishop.
2145 SunOS/5.6)
2146 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002147 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
2148 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00002149 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00002150 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002151 define_xopen_source=no;;
2152 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002153 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002154 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002155 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00002156 # On FreeBSD 4, the math functions C89 does not cover are never defined
2157 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
2158 FreeBSD/4.*)
2159 define_xopen_source=no;;
2160 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
2161 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
2162 # identifies itself as Darwin/7.*
2163 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2164 # disables platform specific features beyond repair.
2165 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2166 # has no effect, don't bother defining them
2167 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00002168 define_xopen_source=no;;
Ronald Oussorend4be7a22010-03-09 06:41:58 +00002169 Darwin/1[0-9].*)
Ronald Oussoren095d2822010-03-08 07:03:14 +00002170 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002171 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
2172 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
2173 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00002174 AIX/4)
2175 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002176 AIX/5)
2177 if test `uname -r` -eq 1; then
2178 define_xopen_source=no
2179 fi
2180 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00002181 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
2182 # defining NI_NUMERICHOST.
2183 QNX/6.3.2)
2184 define_xopen_source=no
2185 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002186
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002187esac
2188
2189if test $define_xopen_source = yes
2190then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002191 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
2192 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00002193 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
2194 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00002195 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00002196 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00002197
2198cat >>confdefs.h <<\_ACEOF
2199#define _XOPEN_SOURCE 500
2200_ACEOF
2201
2202 ;;
2203 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002204
2205cat >>confdefs.h <<\_ACEOF
2206#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002207_ACEOF
2208
Skip Montanarof0d5f792004-08-15 14:08:23 +00002209 ;;
2210 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002211
2212 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
2213 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
2214 # several APIs are not declared. Since this is also needed in some
2215 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00002216 # except for Solaris 10, where it must not be defined,
2217 # as it implies XPG4.2
2218 case $ac_sys_system/$ac_sys_release in
2219 SunOS/5.10)
2220 ;;
2221 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002222
2223cat >>confdefs.h <<\_ACEOF
2224#define _XOPEN_SOURCE_EXTENDED 1
2225_ACEOF
2226
Martin v. Löwis7dece662005-11-26 11:38:24 +00002227 ;;
2228 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002229
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002230
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002231cat >>confdefs.h <<\_ACEOF
2232#define _POSIX_C_SOURCE 200112L
2233_ACEOF
2234
2235
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002236fi
2237
Guido van Rossum91922671997-10-09 20:24:13 +00002238#
2239# SGI compilers allow the specification of the both the ABI and the
2240# ISA on the command line. Depending on the values of these switches,
2241# different and often incompatable code will be generated.
2242#
2243# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
2244# thus supply support for various ABI/ISA combinations. The MACHDEP
2245# variable is also adjusted.
2246#
2247
2248if test ! -z "$SGI_ABI"
2249then
2250 CC="cc $SGI_ABI"
2251 LDFLAGS="$SGI_ABI $LDFLAGS"
2252 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
2253fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002254{ echo "$as_me:$LINENO: result: $MACHDEP" >&5
2255echo "${ECHO_T}$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002256
Jack Jansen6b08a402004-06-03 12:41:45 +00002257# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
2258# it may influence the way we can build extensions, so distutils
2259# needs to check it
2260
Thomas Wouters477c8d52006-05-27 19:21:47 +00002261
Jack Jansen6b08a402004-06-03 12:41:45 +00002262CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002263EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00002264
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002265{ echo "$as_me:$LINENO: checking machine type as reported by uname -m" >&5
2266echo $ECHO_N "checking machine type as reported by uname -m... $ECHO_C" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00002267ac_sys_machine=`uname -m`
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002268{ echo "$as_me:$LINENO: result: $ac_sys_machine" >&5
2269echo "${ECHO_T}$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00002270
Guido van Rossum627b2d71993-12-24 10:39:16 +00002271# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00002272
2273# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
2274# for debug/optimization stuff. BASECFLAGS is for flags that are required
2275# just to get things to compile and link. Users are free to override OPT
2276# when running configure or make. The build should not break if they do.
2277# BASECFLAGS should generally not be messed with, however.
2278
2279# XXX shouldn't some/most/all of this code be merged with the stuff later
2280# on that fiddles with OPT and BASECFLAGS?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002281{ echo "$as_me:$LINENO: checking for --without-gcc" >&5
2282echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002283
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002284# Check whether --with-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002285if test "${with_gcc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002286 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002287 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00002288 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00002289 without_gcc=yes;;
2290 yes) CC=gcc
2291 without_gcc=no;;
2292 *) CC=$withval
2293 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002294 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00002295else
Martin v. Löwis11437992002-04-12 09:54:03 +00002296
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002297 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002298 AIX*) CC=cc_r
2299 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00002300 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00002301 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002302fi
2303
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002304{ echo "$as_me:$LINENO: result: $without_gcc" >&5
2305echo "${ECHO_T}$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002306
Guido van Rossum8b131c51995-03-09 14:10:13 +00002307# If the user switches compilers, we can't believe the cache
2308if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
2309then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002310 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002311(it is also a good idea to do 'make clean' before compiling)" >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002312echo "$as_me: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002313(it is also a good idea to do 'make clean' before compiling)" >&2;}
2314 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00002315fi
2316
Martin v. Löwis11437992002-04-12 09:54:03 +00002317ac_ext=c
2318ac_cpp='$CPP $CPPFLAGS'
2319ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2320ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2321ac_compiler_gnu=$ac_cv_c_compiler_gnu
2322if test -n "$ac_tool_prefix"; then
2323 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2324set dummy ${ac_tool_prefix}gcc; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002325{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2326echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002327if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002328 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002329else
2330 if test -n "$CC"; then
2331 ac_cv_prog_CC="$CC" # Let the user override the test.
2332else
Martin v. Löwis11437992002-04-12 09:54:03 +00002333as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2334for as_dir in $PATH
2335do
2336 IFS=$as_save_IFS
2337 test -z "$as_dir" && as_dir=.
2338 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002339 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 +00002340 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002341 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002342 break 2
2343 fi
2344done
2345done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002346IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002347
Jack Jansendd19cf82001-12-06 22:36:17 +00002348fi
2349fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002350CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00002351if test -n "$CC"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002352 { echo "$as_me:$LINENO: result: $CC" >&5
2353echo "${ECHO_T}$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002354else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002355 { echo "$as_me:$LINENO: result: no" >&5
2356echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002357fi
2358
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002359
Martin v. Löwis11437992002-04-12 09:54:03 +00002360fi
2361if test -z "$ac_cv_prog_CC"; then
2362 ac_ct_CC=$CC
2363 # Extract the first word of "gcc", so it can be a program name with args.
2364set dummy gcc; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002365{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2366echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002367if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002368 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002369else
2370 if test -n "$ac_ct_CC"; then
2371 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2372else
2373as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2374for as_dir in $PATH
2375do
2376 IFS=$as_save_IFS
2377 test -z "$as_dir" && as_dir=.
2378 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002379 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 +00002380 ac_cv_prog_ac_ct_CC="gcc"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002381 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002382 break 2
2383 fi
2384done
2385done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002386IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002387
2388fi
2389fi
2390ac_ct_CC=$ac_cv_prog_ac_ct_CC
2391if test -n "$ac_ct_CC"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002392 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2393echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002394else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002395 { echo "$as_me:$LINENO: result: no" >&5
2396echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002397fi
2398
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002399 if test "x$ac_ct_CC" = x; then
2400 CC=""
2401 else
2402 case $cross_compiling:$ac_tool_warned in
2403yes:)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002404{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2405whose name does not start with the host triplet. If you think this
2406configuration is useful to you, please write to autoconf@gnu.org." >&5
2407echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2408whose name does not start with the host triplet. If you think this
2409configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002410ac_tool_warned=yes ;;
2411esac
2412 CC=$ac_ct_CC
2413 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002414else
2415 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002416fi
2417
Jack Jansendd19cf82001-12-06 22:36:17 +00002418if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002419 if test -n "$ac_tool_prefix"; then
2420 # 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 +00002421set dummy ${ac_tool_prefix}cc; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002422{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2423echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002424if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002425 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002426else
2427 if test -n "$CC"; then
2428 ac_cv_prog_CC="$CC" # Let the user override the test.
2429else
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 ac_cv_prog_CC="${ac_tool_prefix}cc"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002438 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002439 break 2
2440 fi
2441done
2442done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002443IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002444
2445fi
2446fi
2447CC=$ac_cv_prog_CC
2448if test -n "$CC"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002449 { echo "$as_me:$LINENO: result: $CC" >&5
2450echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002451else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002452 { echo "$as_me:$LINENO: result: no" >&5
2453echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002454fi
2455
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002456
Martin v. Löwis11437992002-04-12 09:54:03 +00002457 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002458fi
2459if test -z "$CC"; then
2460 # Extract the first word of "cc", so it can be a program name with args.
2461set dummy cc; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002462{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2463echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002464if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002465 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002466else
2467 if test -n "$CC"; then
2468 ac_cv_prog_CC="$CC" # Let the user override the test.
2469else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002470 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002471as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2472for as_dir in $PATH
2473do
2474 IFS=$as_save_IFS
2475 test -z "$as_dir" && as_dir=.
2476 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002477 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 +00002478 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2479 ac_prog_rejected=yes
2480 continue
2481 fi
2482 ac_cv_prog_CC="cc"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002483 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002484 break 2
2485 fi
2486done
2487done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002488IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002489
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002490if test $ac_prog_rejected = yes; then
2491 # We found a bogon in the path, so make sure we never use it.
2492 set dummy $ac_cv_prog_CC
2493 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002494 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002495 # We chose a different compiler from the bogus one.
2496 # However, it has the same basename, so the bogon will be chosen
2497 # first if we set CC to just the basename; use the full file name.
2498 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002499 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002500 fi
2501fi
2502fi
2503fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002504CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002505if test -n "$CC"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002506 { echo "$as_me:$LINENO: result: $CC" >&5
2507echo "${ECHO_T}$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002508else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002509 { echo "$as_me:$LINENO: result: no" >&5
2510echo "${ECHO_T}no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002511fi
2512
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002513
Martin v. Löwis11437992002-04-12 09:54:03 +00002514fi
2515if test -z "$CC"; then
2516 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002517 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002518 do
2519 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2520set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002521{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2522echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002523if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002524 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002525else
2526 if test -n "$CC"; then
2527 ac_cv_prog_CC="$CC" # Let the user override the test.
2528else
Martin v. Löwis11437992002-04-12 09:54:03 +00002529as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2530for as_dir in $PATH
2531do
2532 IFS=$as_save_IFS
2533 test -z "$as_dir" && as_dir=.
2534 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002535 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 +00002536 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002537 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002538 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002539 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002540done
2541done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002542IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002543
2544fi
2545fi
2546CC=$ac_cv_prog_CC
2547if test -n "$CC"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002548 { echo "$as_me:$LINENO: result: $CC" >&5
2549echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002550else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002551 { echo "$as_me:$LINENO: result: no" >&5
2552echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002553fi
2554
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002555
Martin v. Löwis11437992002-04-12 09:54:03 +00002556 test -n "$CC" && break
2557 done
2558fi
2559if test -z "$CC"; then
2560 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002561 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002562do
2563 # Extract the first word of "$ac_prog", so it can be a program name with args.
2564set dummy $ac_prog; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002565{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2566echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002567if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002568 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002569else
2570 if test -n "$ac_ct_CC"; then
2571 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2572else
2573as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2574for as_dir in $PATH
2575do
2576 IFS=$as_save_IFS
2577 test -z "$as_dir" && as_dir=.
2578 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002579 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 +00002580 ac_cv_prog_ac_ct_CC="$ac_prog"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002581 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002582 break 2
2583 fi
2584done
2585done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002586IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00002587
Martin v. Löwis11437992002-04-12 09:54:03 +00002588fi
2589fi
2590ac_ct_CC=$ac_cv_prog_ac_ct_CC
2591if test -n "$ac_ct_CC"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002592 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2593echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002594else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002595 { echo "$as_me:$LINENO: result: no" >&5
2596echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002597fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002598
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002599
Martin v. Löwis11437992002-04-12 09:54:03 +00002600 test -n "$ac_ct_CC" && break
2601done
Michael W. Hudson54241132001-12-07 15:38:26 +00002602
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002603 if test "x$ac_ct_CC" = x; then
2604 CC=""
2605 else
2606 case $cross_compiling:$ac_tool_warned in
2607yes:)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002608{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2609whose name does not start with the host triplet. If you think this
2610configuration is useful to you, please write to autoconf@gnu.org." >&5
2611echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2612whose name does not start with the host triplet. If you think this
2613configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002614ac_tool_warned=yes ;;
2615esac
2616 CC=$ac_ct_CC
2617 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002618fi
2619
2620fi
2621
2622
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002623test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002624See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002625echo "$as_me: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002626See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002627 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002628
2629# Provide some information about the compiler.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002630echo "$as_me:$LINENO: checking for C compiler version" >&5
2631ac_compiler=`set X $ac_compile; echo $2`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002632{ (ac_try="$ac_compiler --version >&5"
2633case "(($ac_try" in
2634 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2635 *) ac_try_echo=$ac_try;;
2636esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002637eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002638 (eval "$ac_compiler --version >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002639 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002641 (exit $ac_status); }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002642{ (ac_try="$ac_compiler -v >&5"
2643case "(($ac_try" in
2644 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2645 *) ac_try_echo=$ac_try;;
2646esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002647eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002648 (eval "$ac_compiler -v >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002649 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002651 (exit $ac_status); }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002652{ (ac_try="$ac_compiler -V >&5"
2653case "(($ac_try" in
2654 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2655 *) ac_try_echo=$ac_try;;
2656esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002657eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002658 (eval "$ac_compiler -V >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002659 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002661 (exit $ac_status); }
2662
2663cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002664/* confdefs.h. */
2665_ACEOF
2666cat confdefs.h >>conftest.$ac_ext
2667cat >>conftest.$ac_ext <<_ACEOF
2668/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002669
Martin v. Löwis11437992002-04-12 09:54:03 +00002670int
2671main ()
2672{
2673
2674 ;
2675 return 0;
2676}
2677_ACEOF
2678ac_clean_files_save=$ac_clean_files
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002679ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002680# Try to create an executable without -o first, disregard a.out.
2681# It will help us diagnose broken compilers, and finding out an intuition
2682# of exeext.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002683{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2684echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
2685ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2686#
2687# List of possible output files, starting from the most likely.
2688# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2689# only as a last resort. b.out is created by i960 compilers.
2690ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2691#
2692# The IRIX 6 linker writes into existing files which may not be
2693# executable, retaining their permissions. Remove them first so a
2694# subsequent execution test works.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002695ac_rmfiles=
2696for ac_file in $ac_files
2697do
2698 case $ac_file in
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002699 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002700 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2701 esac
2702done
2703rm -f $ac_rmfiles
2704
2705if { (ac_try="$ac_link_default"
2706case "(($ac_try" in
2707 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2708 *) ac_try_echo=$ac_try;;
2709esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002710eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002711 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002712 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002714 (exit $ac_status); }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002715 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2716# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2717# in a Makefile. We should not override ac_cv_exeext if it was cached,
2718# so that the user can short-circuit this test for compilers unknown to
2719# Autoconf.
2720for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00002721do
2722 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002723 case $ac_file in
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002724 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002725 ;;
2726 [ab].out )
2727 # We found the default executable, but exeext='' is most
2728 # certainly right.
2729 break;;
2730 *.* )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002731 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2732 then :; else
2733 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2734 fi
2735 # We set ac_cv_exeext here because the later test for it is not
2736 # safe: cross compilers may not add the suffix if given an `-o'
2737 # argument, so we may need to know it at that point already.
2738 # Even if this section looks crufty: it has the advantage of
2739 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002740 break;;
2741 * )
2742 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002743 esac
2744done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002745test "$ac_cv_exeext" = no && ac_cv_exeext=
2746
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002747else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002748 ac_file=''
2749fi
2750
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002751{ echo "$as_me:$LINENO: result: $ac_file" >&5
2752echo "${ECHO_T}$ac_file" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002753if test -z "$ac_file"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002754 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002755sed 's/^/| /' conftest.$ac_ext >&5
2756
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002757{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002758See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002759echo "$as_me: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002760See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002761 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002762fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002763
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002764ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002765
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002766# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002767# the compiler is broken, or we cross compile.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002768{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2769echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002770# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2771# If not cross compiling, check that we can run a simple program.
2772if test "$cross_compiling" != yes; then
2773 if { ac_try='./$ac_file'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002774 { (case "(($ac_try" in
2775 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2776 *) ac_try_echo=$ac_try;;
2777esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002778eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002779 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002780 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002782 (exit $ac_status); }; }; then
2783 cross_compiling=no
2784 else
2785 if test "$cross_compiling" = maybe; then
2786 cross_compiling=yes
2787 else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002788 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002789If you meant to cross compile, use \`--host'.
2790See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002791echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002792If you meant to cross compile, use \`--host'.
2793See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002794 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002795 fi
2796 fi
2797fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002798{ echo "$as_me:$LINENO: result: yes" >&5
2799echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002800
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002801rm -f a.out a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002802ac_clean_files=$ac_clean_files_save
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002803# Check that the compiler produces executables we can run. If not, either
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002804# the compiler is broken, or we cross compile.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002805{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2806echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2807{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2808echo "${ECHO_T}$cross_compiling" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00002809
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002810{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2811echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002812if { (ac_try="$ac_link"
2813case "(($ac_try" in
2814 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2815 *) ac_try_echo=$ac_try;;
2816esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002817eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002818 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002819 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002821 (exit $ac_status); }; then
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002822 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2823# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2824# work properly (i.e., refer to `conftest.exe'), while it won't with
2825# `rm'.
2826for ac_file in conftest.exe conftest conftest.*; do
2827 test -f "$ac_file" || continue
2828 case $ac_file in
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002829 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002830 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2831 break;;
2832 * ) break;;
2833 esac
2834done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002835else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002836 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002837See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002838echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002839See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002840 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002841fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002842
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002843rm -f conftest$ac_cv_exeext
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002844{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2845echo "${ECHO_T}$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002846
2847rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002848EXEEXT=$ac_cv_exeext
2849ac_exeext=$EXEEXT
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002850{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
2851echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002852if test "${ac_cv_objext+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002853 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002854else
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002855 cat >conftest.$ac_ext <<_ACEOF
2856/* confdefs.h. */
2857_ACEOF
2858cat confdefs.h >>conftest.$ac_ext
2859cat >>conftest.$ac_ext <<_ACEOF
2860/* end confdefs.h. */
2861
2862int
2863main ()
2864{
2865
2866 ;
2867 return 0;
2868}
2869_ACEOF
2870rm -f conftest.o conftest.obj
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002871if { (ac_try="$ac_compile"
2872case "(($ac_try" in
2873 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2874 *) ac_try_echo=$ac_try;;
2875esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002876eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002877 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002878 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002880 (exit $ac_status); }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002881 for ac_file in conftest.o conftest.obj conftest.*; do
2882 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00002883 case $ac_file in
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002884 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002885 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2886 break;;
2887 esac
2888done
2889else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002890 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002891sed 's/^/| /' conftest.$ac_ext >&5
2892
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002893{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002894See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002895echo "$as_me: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002896See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002897 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002898fi
2899
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002900rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002901fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002902{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2903echo "${ECHO_T}$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002904OBJEXT=$ac_cv_objext
2905ac_objext=$OBJEXT
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002906{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2907echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002908if test "${ac_cv_c_compiler_gnu+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002909 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002910else
2911 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002912/* confdefs.h. */
2913_ACEOF
2914cat confdefs.h >>conftest.$ac_ext
2915cat >>conftest.$ac_ext <<_ACEOF
2916/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002917
Martin v. Löwis11437992002-04-12 09:54:03 +00002918int
2919main ()
2920{
2921#ifndef __GNUC__
2922 choke me
2923#endif
2924
2925 ;
2926 return 0;
2927}
2928_ACEOF
2929rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002930if { (ac_try="$ac_compile"
2931case "(($ac_try" in
2932 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2933 *) ac_try_echo=$ac_try;;
2934esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002935eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002936 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002937 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002938 grep -v '^ *+' conftest.er1 >conftest.err
2939 rm -f conftest.er1
2940 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002942 (exit $ac_status); } && {
2943 test -z "$ac_c_werror_flag" ||
2944 test ! -s conftest.err
2945 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002946 ac_compiler_gnu=yes
2947else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002948 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002949sed 's/^/| /' conftest.$ac_ext >&5
2950
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002951 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002952fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002953
2954rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002955ac_cv_c_compiler_gnu=$ac_compiler_gnu
2956
2957fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002958{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2959echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
2960GCC=`test $ac_compiler_gnu = yes && echo yes`
Martin v. Löwis11437992002-04-12 09:54:03 +00002961ac_test_CFLAGS=${CFLAGS+set}
2962ac_save_CFLAGS=$CFLAGS
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002963{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2964echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002965if test "${ac_cv_prog_cc_g+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002966 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002967else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002968 ac_save_c_werror_flag=$ac_c_werror_flag
2969 ac_c_werror_flag=yes
2970 ac_cv_prog_cc_g=no
2971 CFLAGS="-g"
2972 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002973/* confdefs.h. */
2974_ACEOF
2975cat confdefs.h >>conftest.$ac_ext
2976cat >>conftest.$ac_ext <<_ACEOF
2977/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002978
Martin v. Löwis11437992002-04-12 09:54:03 +00002979int
2980main ()
2981{
2982
2983 ;
2984 return 0;
2985}
2986_ACEOF
2987rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002988if { (ac_try="$ac_compile"
2989case "(($ac_try" in
2990 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2991 *) ac_try_echo=$ac_try;;
2992esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002993eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002994 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002995 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002996 grep -v '^ *+' conftest.er1 >conftest.err
2997 rm -f conftest.er1
2998 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003000 (exit $ac_status); } && {
3001 test -z "$ac_c_werror_flag" ||
3002 test ! -s conftest.err
3003 } && test -s conftest.$ac_objext; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003004 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003005else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003006 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003007sed 's/^/| /' conftest.$ac_ext >&5
3008
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003009 CFLAGS=""
3010 cat >conftest.$ac_ext <<_ACEOF
3011/* confdefs.h. */
3012_ACEOF
3013cat confdefs.h >>conftest.$ac_ext
3014cat >>conftest.$ac_ext <<_ACEOF
3015/* end confdefs.h. */
3016
3017int
3018main ()
3019{
3020
3021 ;
3022 return 0;
3023}
3024_ACEOF
3025rm -f conftest.$ac_objext
3026if { (ac_try="$ac_compile"
3027case "(($ac_try" in
3028 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3029 *) ac_try_echo=$ac_try;;
3030esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003031eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003032 (eval "$ac_compile") 2>conftest.er1
3033 ac_status=$?
3034 grep -v '^ *+' conftest.er1 >conftest.err
3035 rm -f conftest.er1
3036 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003038 (exit $ac_status); } && {
3039 test -z "$ac_c_werror_flag" ||
3040 test ! -s conftest.err
3041 } && test -s conftest.$ac_objext; then
3042 :
3043else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003044 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003045sed 's/^/| /' conftest.$ac_ext >&5
3046
3047 ac_c_werror_flag=$ac_save_c_werror_flag
3048 CFLAGS="-g"
3049 cat >conftest.$ac_ext <<_ACEOF
3050/* confdefs.h. */
3051_ACEOF
3052cat confdefs.h >>conftest.$ac_ext
3053cat >>conftest.$ac_ext <<_ACEOF
3054/* end confdefs.h. */
3055
3056int
3057main ()
3058{
3059
3060 ;
3061 return 0;
3062}
3063_ACEOF
3064rm -f conftest.$ac_objext
3065if { (ac_try="$ac_compile"
3066case "(($ac_try" in
3067 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3068 *) ac_try_echo=$ac_try;;
3069esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003070eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003071 (eval "$ac_compile") 2>conftest.er1
3072 ac_status=$?
3073 grep -v '^ *+' conftest.er1 >conftest.err
3074 rm -f conftest.er1
3075 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003077 (exit $ac_status); } && {
3078 test -z "$ac_c_werror_flag" ||
3079 test ! -s conftest.err
3080 } && test -s conftest.$ac_objext; then
3081 ac_cv_prog_cc_g=yes
3082else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003083 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003084sed 's/^/| /' conftest.$ac_ext >&5
3085
3086
Guido van Rossum627b2d71993-12-24 10:39:16 +00003087fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003088
3089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003090fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003091
3092rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3093fi
3094
3095rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3096 ac_c_werror_flag=$ac_save_c_werror_flag
3097fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003098{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3099echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003100if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003101 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003102elif test $ac_cv_prog_cc_g = yes; then
3103 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003104 CFLAGS="-g -O2"
3105 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003106 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003107 fi
3108else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003109 if test "$GCC" = yes; then
3110 CFLAGS="-O2"
3111 else
3112 CFLAGS=
3113 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003114fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003115{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3116echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003117if test "${ac_cv_prog_cc_c89+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003118 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003119else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003120 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003121ac_save_CC=$CC
3122cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003123/* confdefs.h. */
3124_ACEOF
3125cat confdefs.h >>conftest.$ac_ext
3126cat >>conftest.$ac_ext <<_ACEOF
3127/* end confdefs.h. */
3128#include <stdarg.h>
3129#include <stdio.h>
3130#include <sys/types.h>
3131#include <sys/stat.h>
3132/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3133struct buf { int x; };
3134FILE * (*rcsopen) (struct buf *, struct stat *, int);
3135static char *e (p, i)
3136 char **p;
3137 int i;
3138{
3139 return p[i];
3140}
3141static char *f (char * (*g) (char **, int), char **p, ...)
3142{
3143 char *s;
3144 va_list v;
3145 va_start (v,p);
3146 s = g (p, va_arg (v,int));
3147 va_end (v);
3148 return s;
3149}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003150
3151/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3152 function prototypes and stuff, but not '\xHH' hex character constants.
3153 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003154 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003155 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3156 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003157 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003158int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3159
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003160/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3161 inside strings and character constants. */
3162#define FOO(x) 'x'
3163int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3164
Skip Montanaro6dead952003-09-25 14:50:04 +00003165int test (int i, double x);
3166struct s1 {int (*f) (int a);};
3167struct s2 {int (*f) (double a);};
3168int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3169int argc;
3170char **argv;
3171int
3172main ()
3173{
3174return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3175 ;
3176 return 0;
3177}
3178_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003179for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3180 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003181do
3182 CC="$ac_save_CC $ac_arg"
3183 rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003184if { (ac_try="$ac_compile"
3185case "(($ac_try" in
3186 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3187 *) ac_try_echo=$ac_try;;
3188esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003189eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003190 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00003191 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003192 grep -v '^ *+' conftest.er1 >conftest.err
3193 rm -f conftest.er1
3194 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003195 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003196 (exit $ac_status); } && {
3197 test -z "$ac_c_werror_flag" ||
3198 test ! -s conftest.err
3199 } && test -s conftest.$ac_objext; then
3200 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003201else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003202 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003203sed 's/^/| /' conftest.$ac_ext >&5
3204
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003205
Skip Montanaro6dead952003-09-25 14:50:04 +00003206fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003207
3208rm -f core conftest.err conftest.$ac_objext
3209 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003210done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003211rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003212CC=$ac_save_CC
3213
3214fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003215# AC_CACHE_VAL
3216case "x$ac_cv_prog_cc_c89" in
3217 x)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003218 { echo "$as_me:$LINENO: result: none needed" >&5
3219echo "${ECHO_T}none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003220 xno)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003221 { echo "$as_me:$LINENO: result: unsupported" >&5
3222echo "${ECHO_T}unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003223 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003224 CC="$CC $ac_cv_prog_cc_c89"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003225 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3226echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003227esac
3228
Skip Montanaro6dead952003-09-25 14:50:04 +00003229
Martin v. Löwis11437992002-04-12 09:54:03 +00003230ac_ext=c
3231ac_cpp='$CPP $CPPFLAGS'
3232ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3233ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3234ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003235
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003236
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003237
3238
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003239{ echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
3240echo $ECHO_N "checking for --with-cxx-main=<compiler>... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003241
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003242# Check whether --with-cxx_main was given.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003243if test "${with_cxx_main+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003244 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003245
3246 case $withval in
3247 no) with_cxx_main=no
3248 MAINCC='$(CC)';;
3249 yes) with_cxx_main=yes
3250 MAINCC='$(CXX)';;
3251 *) with_cxx_main=yes
3252 MAINCC=$withval
3253 if test -z "$CXX"
3254 then
3255 CXX=$withval
3256 fi;;
3257 esac
3258else
3259
3260 with_cxx_main=no
3261 MAINCC='$(CC)'
3262
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003263fi
3264
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003265{ echo "$as_me:$LINENO: result: $with_cxx_main" >&5
3266echo "${ECHO_T}$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003267
3268preset_cxx="$CXX"
3269if test -z "$CXX"
3270then
3271 case "$CC" in
3272 gcc) # Extract the first word of "g++", so it can be a program name with args.
3273set dummy g++; 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="g++"
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 cc) # Extract the first word of "c++", so it can be a program name with args.
3314set dummy c++; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003315{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3316echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003317if test "${ac_cv_path_CXX+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003318 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003319else
3320 case $CXX in
3321 [\\/]* | ?:[\\/]*)
3322 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3323 ;;
3324 *)
3325 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3326for as_dir in notfound
3327do
3328 IFS=$as_save_IFS
3329 test -z "$as_dir" && as_dir=.
3330 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003331 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 +00003332 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003333 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003334 break 2
3335 fi
3336done
3337done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003338IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003339
3340 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
3341 ;;
3342esac
3343fi
3344CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003345if test -n "$CXX"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003346 { echo "$as_me:$LINENO: result: $CXX" >&5
3347echo "${ECHO_T}$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003348else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003349 { echo "$as_me:$LINENO: result: no" >&5
3350echo "${ECHO_T}no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003351fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003352
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003353 ;;
3354 esac
3355 if test "$CXX" = "notfound"
3356 then
3357 CXX=""
3358 fi
3359fi
3360if test -z "$CXX"
3361then
3362 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
3363do
3364 # Extract the first word of "$ac_prog", so it can be a program name with args.
3365set dummy $ac_prog; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003366{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3367echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003368if test "${ac_cv_prog_CXX+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003369 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003370else
3371 if test -n "$CXX"; then
3372 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3373else
3374as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3375for as_dir in $PATH
3376do
3377 IFS=$as_save_IFS
3378 test -z "$as_dir" && as_dir=.
3379 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003380 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 +00003381 ac_cv_prog_CXX="$ac_prog"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003382 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003383 break 2
3384 fi
3385done
3386done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003387IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003388
3389fi
3390fi
3391CXX=$ac_cv_prog_CXX
3392if test -n "$CXX"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003393 { echo "$as_me:$LINENO: result: $CXX" >&5
3394echo "${ECHO_T}$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003395else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003396 { echo "$as_me:$LINENO: result: no" >&5
3397echo "${ECHO_T}no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003398fi
3399
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003400
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003401 test -n "$CXX" && break
3402done
3403test -n "$CXX" || CXX="notfound"
3404
3405 if test "$CXX" = "notfound"
3406 then
3407 CXX=""
3408 fi
3409fi
3410if test "$preset_cxx" != "$CXX"
3411then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003412 { echo "$as_me:$LINENO: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003413
3414 By default, distutils will build C++ extension modules with \"$CXX\".
3415 If this is not intended, then set CXX on the configure command line.
3416 " >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003417echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003418
3419 By default, distutils will build C++ extension modules with \"$CXX\".
3420 If this is not intended, then set CXX on the configure command line.
3421 " >&2;}
3422fi
3423
3424
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003425# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00003426
3427ac_ext=c
3428ac_cpp='$CPP $CPPFLAGS'
3429ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3430ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3431ac_compiler_gnu=$ac_cv_c_compiler_gnu
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003432{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3433echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003434# On Suns, sometimes $CPP names a directory.
3435if test -n "$CPP" && test -d "$CPP"; then
3436 CPP=
3437fi
3438if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003439 if test "${ac_cv_prog_CPP+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003440 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003441else
Martin v. Löwis11437992002-04-12 09:54:03 +00003442 # Double quotes because CPP needs to be expanded
3443 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3444 do
3445 ac_preproc_ok=false
3446for ac_c_preproc_warn_flag in '' yes
3447do
3448 # Use a header file that comes with gcc, so configuring glibc
3449 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003450 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3451 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003452 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00003453 # not just through cpp. "Syntax error" is here to catch this case.
3454 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003455/* confdefs.h. */
3456_ACEOF
3457cat confdefs.h >>conftest.$ac_ext
3458cat >>conftest.$ac_ext <<_ACEOF
3459/* end confdefs.h. */
3460#ifdef __STDC__
3461# include <limits.h>
3462#else
3463# include <assert.h>
3464#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003465 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003466_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003467if { (ac_try="$ac_cpp conftest.$ac_ext"
3468case "(($ac_try" in
3469 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3470 *) ac_try_echo=$ac_try;;
3471esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003472eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003473 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003474 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003475 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003476 rm -f conftest.er1
3477 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003478 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003479 (exit $ac_status); } >/dev/null && {
3480 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3481 test ! -s conftest.err
3482 }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003483 :
3484else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003485 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003486sed 's/^/| /' conftest.$ac_ext >&5
3487
Martin v. Löwis11437992002-04-12 09:54:03 +00003488 # Broken: fails on valid input.
3489continue
Jack Jansendd19cf82001-12-06 22:36:17 +00003490fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003491
Martin v. Löwis11437992002-04-12 09:54:03 +00003492rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00003493
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003494 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003495 # can be detected and how.
3496 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003497/* confdefs.h. */
3498_ACEOF
3499cat confdefs.h >>conftest.$ac_ext
3500cat >>conftest.$ac_ext <<_ACEOF
3501/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003502#include <ac_nonexistent.h>
3503_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003504if { (ac_try="$ac_cpp conftest.$ac_ext"
3505case "(($ac_try" in
3506 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3507 *) ac_try_echo=$ac_try;;
3508esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003509eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003510 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003511 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003512 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003513 rm -f conftest.er1
3514 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003515 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003516 (exit $ac_status); } >/dev/null && {
3517 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3518 test ! -s conftest.err
3519 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003520 # Broken: success on invalid input.
3521continue
3522else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003523 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003524sed 's/^/| /' conftest.$ac_ext >&5
3525
Martin v. Löwis11437992002-04-12 09:54:03 +00003526 # Passes both tests.
3527ac_preproc_ok=:
3528break
3529fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003530
Martin v. Löwis11437992002-04-12 09:54:03 +00003531rm -f conftest.err conftest.$ac_ext
3532
3533done
3534# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3535rm -f conftest.err conftest.$ac_ext
3536if $ac_preproc_ok; then
3537 break
3538fi
3539
3540 done
3541 ac_cv_prog_CPP=$CPP
3542
3543fi
3544 CPP=$ac_cv_prog_CPP
3545else
3546 ac_cv_prog_CPP=$CPP
3547fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003548{ echo "$as_me:$LINENO: result: $CPP" >&5
3549echo "${ECHO_T}$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003550ac_preproc_ok=false
3551for ac_c_preproc_warn_flag in '' yes
3552do
3553 # Use a header file that comes with gcc, so configuring glibc
3554 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003555 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3556 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003557 # On the NeXT, cc -E runs the code through the compiler's parser,
3558 # not just through cpp. "Syntax error" is here to catch this case.
3559 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003560/* confdefs.h. */
3561_ACEOF
3562cat confdefs.h >>conftest.$ac_ext
3563cat >>conftest.$ac_ext <<_ACEOF
3564/* end confdefs.h. */
3565#ifdef __STDC__
3566# include <limits.h>
3567#else
3568# include <assert.h>
3569#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003570 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003571_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003572if { (ac_try="$ac_cpp conftest.$ac_ext"
3573case "(($ac_try" in
3574 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3575 *) ac_try_echo=$ac_try;;
3576esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003577eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003578 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003579 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003580 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003581 rm -f conftest.er1
3582 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003584 (exit $ac_status); } >/dev/null && {
3585 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3586 test ! -s conftest.err
3587 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003588 :
3589else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003590 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003591sed 's/^/| /' conftest.$ac_ext >&5
3592
Martin v. Löwis11437992002-04-12 09:54:03 +00003593 # Broken: fails on valid input.
3594continue
3595fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003596
Martin v. Löwis11437992002-04-12 09:54:03 +00003597rm -f conftest.err conftest.$ac_ext
3598
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003599 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003600 # can be detected and how.
3601 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003602/* confdefs.h. */
3603_ACEOF
3604cat confdefs.h >>conftest.$ac_ext
3605cat >>conftest.$ac_ext <<_ACEOF
3606/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003607#include <ac_nonexistent.h>
3608_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003609if { (ac_try="$ac_cpp conftest.$ac_ext"
3610case "(($ac_try" in
3611 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3612 *) ac_try_echo=$ac_try;;
3613esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003614eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003615 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003616 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003617 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003618 rm -f conftest.er1
3619 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003621 (exit $ac_status); } >/dev/null && {
3622 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3623 test ! -s conftest.err
3624 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003625 # Broken: success on invalid input.
3626continue
3627else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003628 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003629sed 's/^/| /' conftest.$ac_ext >&5
3630
Martin v. Löwis11437992002-04-12 09:54:03 +00003631 # Passes both tests.
3632ac_preproc_ok=:
3633break
3634fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003635
Martin v. Löwis11437992002-04-12 09:54:03 +00003636rm -f conftest.err conftest.$ac_ext
3637
3638done
3639# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3640rm -f conftest.err conftest.$ac_ext
3641if $ac_preproc_ok; then
3642 :
3643else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003644 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003645See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003646echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003647See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003648 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003649fi
3650
3651ac_ext=c
3652ac_cpp='$CPP $CPPFLAGS'
3653ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3654ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3655ac_compiler_gnu=$ac_cv_c_compiler_gnu
3656
3657
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003658{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3659echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003660if test "${ac_cv_path_GREP+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003661 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003662else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003663 # Extract the first word of "grep ggrep" to use in msg output
3664if test -z "$GREP"; then
3665set dummy grep ggrep; ac_prog_name=$2
3666if test "${ac_cv_path_GREP+set}" = set; then
3667 echo $ECHO_N "(cached) $ECHO_C" >&6
3668else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003669 ac_path_GREP_found=false
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003670# Loop through the user's path and test for each of PROGNAME-LIST
3671as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003672for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3673do
3674 IFS=$as_save_IFS
3675 test -z "$as_dir" && as_dir=.
3676 for ac_prog in grep ggrep; do
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003677 for ac_exec_ext in '' $ac_executable_extensions; do
3678 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3679 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3680 # Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003681 # Check for GNU $ac_path_GREP
3682case `"$ac_path_GREP" --version 2>&1` in
3683*GNU*)
3684 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3685*)
3686 ac_count=0
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003687 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003688 while :
3689 do
3690 cat "conftest.in" "conftest.in" >"conftest.tmp"
3691 mv "conftest.tmp" "conftest.in"
3692 cp "conftest.in" "conftest.nl"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003693 echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003694 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3695 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3696 ac_count=`expr $ac_count + 1`
3697 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3698 # Best one so far, save it but keep looking for a better one
3699 ac_cv_path_GREP="$ac_path_GREP"
3700 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00003701 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003702 # 10*(2^10) chars as input seems more than enough
3703 test $ac_count -gt 10 && break
3704 done
3705 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3706esac
3707
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003708
3709 $ac_path_GREP_found && break 3
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003710 done
3711done
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003712
3713done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003714IFS=$as_save_IFS
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003715
3716
3717fi
3718
3719GREP="$ac_cv_path_GREP"
3720if test -z "$GREP"; then
3721 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3722echo "$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 +00003723 { (exit 1); exit 1; }; }
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003724fi
3725
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003726else
3727 ac_cv_path_GREP=$GREP
3728fi
3729
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003730
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003731fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003732{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3733echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003734 GREP="$ac_cv_path_GREP"
3735
3736
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003737{ echo "$as_me:$LINENO: checking for egrep" >&5
3738echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003739if test "${ac_cv_path_EGREP+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003740 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003741else
3742 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3743 then ac_cv_path_EGREP="$GREP -E"
3744 else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003745 # Extract the first word of "egrep" to use in msg output
3746if test -z "$EGREP"; then
3747set dummy egrep; ac_prog_name=$2
3748if test "${ac_cv_path_EGREP+set}" = set; then
3749 echo $ECHO_N "(cached) $ECHO_C" >&6
3750else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003751 ac_path_EGREP_found=false
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003752# Loop through the user's path and test for each of PROGNAME-LIST
3753as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003754for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3755do
3756 IFS=$as_save_IFS
3757 test -z "$as_dir" && as_dir=.
3758 for ac_prog in egrep; do
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003759 for ac_exec_ext in '' $ac_executable_extensions; do
3760 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3761 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3762 # Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003763 # Check for GNU $ac_path_EGREP
3764case `"$ac_path_EGREP" --version 2>&1` in
3765*GNU*)
3766 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3767*)
3768 ac_count=0
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003769 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003770 while :
3771 do
3772 cat "conftest.in" "conftest.in" >"conftest.tmp"
3773 mv "conftest.tmp" "conftest.in"
3774 cp "conftest.in" "conftest.nl"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003775 echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003776 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3777 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3778 ac_count=`expr $ac_count + 1`
3779 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3780 # Best one so far, save it but keep looking for a better one
3781 ac_cv_path_EGREP="$ac_path_EGREP"
3782 ac_path_EGREP_max=$ac_count
3783 fi
3784 # 10*(2^10) chars as input seems more than enough
3785 test $ac_count -gt 10 && break
3786 done
3787 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3788esac
3789
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003790
3791 $ac_path_EGREP_found && break 3
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003792 done
3793done
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003794
3795done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003796IFS=$as_save_IFS
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003797
3798
3799fi
3800
3801EGREP="$ac_cv_path_EGREP"
3802if test -z "$EGREP"; then
3803 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3804echo "$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 +00003805 { (exit 1); exit 1; }; }
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003806fi
3807
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003808else
3809 ac_cv_path_EGREP=$EGREP
3810fi
3811
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003812
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003813 fi
3814fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003815{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3816echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003817 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00003818
3819
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003820
3821{ echo "$as_me:$LINENO: checking for AIX" >&5
3822echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
3823cat >conftest.$ac_ext <<_ACEOF
Benjamin Petersona8332062009-09-11 22:36:27 +00003824/* confdefs.h. */
3825_ACEOF
3826cat confdefs.h >>conftest.$ac_ext
3827cat >>conftest.$ac_ext <<_ACEOF
3828/* end confdefs.h. */
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003829#ifdef _AIX
3830 yes
Benjamin Petersona8332062009-09-11 22:36:27 +00003831#endif
3832
Benjamin Petersona8332062009-09-11 22:36:27 +00003833_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003834if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3835 $EGREP "yes" >/dev/null 2>&1; then
3836 { echo "$as_me:$LINENO: result: yes" >&5
3837echo "${ECHO_T}yes" >&6; }
Benjamin Petersona8332062009-09-11 22:36:27 +00003838cat >>confdefs.h <<\_ACEOF
Antoine Pitrou20327222009-05-24 20:39:11 +00003839#define _ALL_SOURCE 1
3840_ACEOF
3841
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003842else
3843 { echo "$as_me:$LINENO: result: no" >&5
3844echo "${ECHO_T}no" >&6; }
3845fi
Jesus Cea0f752ee2010-04-28 12:03:06 +00003846rm -f conftest*
Antoine Pitrou20327222009-05-24 20:39:11 +00003847
3848
3849
3850# Check for unsupported systems
3851case $ac_sys_system/$ac_sys_release in
3852atheos*|Linux*/1*)
3853 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3854 echo See README for details.
3855 exit 1;;
3856esac
3857
3858
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003859{ echo "$as_me:$LINENO: checking for --with-suffix" >&5
3860echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003861
3862# Check whether --with-suffix was given.
3863if test "${with_suffix+set}" = set; then
3864 withval=$with_suffix;
3865 case $withval in
3866 no) EXEEXT=;;
3867 yes) EXEEXT=.exe;;
3868 *) EXEEXT=$withval;;
3869 esac
3870fi
3871
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003872{ echo "$as_me:$LINENO: result: $EXEEXT" >&5
3873echo "${ECHO_T}$EXEEXT" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003874
3875# Test whether we're running on a non-case-sensitive system, in which
3876# case we give a warning if no ext is given
3877
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003878{ echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3879echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003880if test ! -d CaseSensitiveTestDir; then
3881mkdir CaseSensitiveTestDir
3882fi
3883
3884if test -d casesensitivetestdir
3885then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003886 { echo "$as_me:$LINENO: result: yes" >&5
3887echo "${ECHO_T}yes" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003888 BUILDEXEEXT=.exe
3889else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003890 { echo "$as_me:$LINENO: result: no" >&5
3891echo "${ECHO_T}no" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003892 BUILDEXEEXT=$EXEEXT
3893fi
3894rmdir CaseSensitiveTestDir
3895
3896case $MACHDEP in
3897bsdos*)
3898 case $CC in
3899 gcc) CC="$CC -D_HAVE_BSDI";;
3900 esac;;
3901esac
3902
3903case $ac_sys_system in
3904hp*|HP*)
3905 case $CC in
3906 cc|*/cc) CC="$CC -Ae";;
3907 esac;;
Antoine Pitrou20327222009-05-24 20:39:11 +00003908SunOS*)
3909 # Some functions have a prototype only with that define, e.g. confstr
3910
3911cat >>confdefs.h <<\_ACEOF
3912#define __EXTENSIONS__ 1
3913_ACEOF
3914
3915 ;;
3916esac
3917
3918
3919
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003920{ echo "$as_me:$LINENO: checking LIBRARY" >&5
3921echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003922if test -z "$LIBRARY"
3923then
3924 LIBRARY='libpython$(VERSION).a'
3925fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003926{ echo "$as_me:$LINENO: result: $LIBRARY" >&5
3927echo "${ECHO_T}$LIBRARY" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003928
3929# LDLIBRARY is the name of the library to link against (as opposed to the
3930# name of the library into which to insert object files). BLDLIBRARY is also
3931# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3932# is blank as the main program is not linked directly against LDLIBRARY.
3933# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3934# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3935# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3936# DLLLIBRARY is the shared (i.e., DLL) library.
3937#
3938# RUNSHARED is used to run shared python without installed libraries
3939#
3940# INSTSONAME is the name of the shared library that will be use to install
3941# on the system - some systems like version suffix, others don't
3942
3943
3944
3945
3946
3947
3948LDLIBRARY="$LIBRARY"
3949BLDLIBRARY='$(LDLIBRARY)'
3950INSTSONAME='$(LDLIBRARY)'
3951DLLLIBRARY=''
3952LDLIBRARYDIR=''
3953RUNSHARED=''
3954
3955# LINKCC is the command that links the python executable -- default is $(CC).
3956# If CXX is set, and if it is needed to link a main function that was
3957# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3958# python might then depend on the C++ runtime
3959# This is altered for AIX in order to build the export list before
3960# linking.
3961
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003962{ echo "$as_me:$LINENO: checking LINKCC" >&5
3963echo $ECHO_N "checking LINKCC... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003964if test -z "$LINKCC"
3965then
3966 LINKCC='$(PURIFY) $(MAINCC)'
3967 case $ac_sys_system in
3968 AIX*)
3969 exp_extra="\"\""
3970 if test $ac_sys_release -ge 5 -o \
3971 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3972 exp_extra="."
3973 fi
3974 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Antoine Pitrou20327222009-05-24 20:39:11 +00003975 QNX*)
3976 # qcc must be used because the other compilers do not
3977 # support -N.
3978 LINKCC=qcc;;
3979 esac
3980fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003981{ echo "$as_me:$LINENO: result: $LINKCC" >&5
3982echo "${ECHO_T}$LINKCC" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003983
3984# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
3985# make sure we default having it set to "no": this is used by
3986# distutils.unixccompiler to know if it should add --enable-new-dtags
3987# to linker command lines, and failing to detect GNU ld simply results
3988# in the same bahaviour as before.
3989
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003990{ echo "$as_me:$LINENO: checking for GNU ld" >&5
3991echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003992ac_prog=ld
3993if test "$GCC" = yes; then
3994 ac_prog=`$CC -print-prog-name=ld`
3995fi
3996case `"$ac_prog" -V 2>&1 < /dev/null` in
3997 *GNU*)
3998 GNULD=yes;;
3999 *)
4000 GNULD=no;;
4001esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004002{ echo "$as_me:$LINENO: result: $GNULD" >&5
4003echo "${ECHO_T}$GNULD" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004004
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004005{ echo "$as_me:$LINENO: checking for --enable-shared" >&5
4006echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004007# Check whether --enable-shared was given.
4008if test "${enable_shared+set}" = set; then
4009 enableval=$enable_shared;
4010fi
4011
4012
4013if test -z "$enable_shared"
4014then
4015 case $ac_sys_system in
4016 CYGWIN* | atheos*)
4017 enable_shared="yes";;
4018 *)
4019 enable_shared="no";;
4020 esac
4021fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004022{ echo "$as_me:$LINENO: result: $enable_shared" >&5
4023echo "${ECHO_T}$enable_shared" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004024
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004025{ echo "$as_me:$LINENO: checking for --enable-profiling" >&5
4026echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004027# Check whether --enable-profiling was given.
4028if test "${enable_profiling+set}" = set; then
4029 enableval=$enable_profiling; ac_save_cc="$CC"
4030 CC="$CC -pg"
4031 if test "$cross_compiling" = yes; then
4032 ac_enable_profiling="no"
4033else
4034 cat >conftest.$ac_ext <<_ACEOF
4035/* confdefs.h. */
4036_ACEOF
4037cat confdefs.h >>conftest.$ac_ext
4038cat >>conftest.$ac_ext <<_ACEOF
4039/* end confdefs.h. */
4040int main() { return 0; }
4041_ACEOF
4042rm -f conftest$ac_exeext
4043if { (ac_try="$ac_link"
4044case "(($ac_try" in
4045 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4046 *) ac_try_echo=$ac_try;;
4047esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004048eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004049 (eval "$ac_link") 2>&5
4050 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004052 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4053 { (case "(($ac_try" in
4054 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4055 *) ac_try_echo=$ac_try;;
4056esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004057eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004058 (eval "$ac_try") 2>&5
4059 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004061 (exit $ac_status); }; }; then
4062 ac_enable_profiling="yes"
4063else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004064 echo "$as_me: program exited with status $ac_status" >&5
4065echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004066sed 's/^/| /' conftest.$ac_ext >&5
4067
4068( exit $ac_status )
4069ac_enable_profiling="no"
4070fi
Antoine Pitrou20327222009-05-24 20:39:11 +00004071rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4072fi
4073
4074
4075 CC="$ac_save_cc"
4076fi
4077
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004078{ echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
4079echo "${ECHO_T}$ac_enable_profiling" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004080
4081case "$ac_enable_profiling" in
4082 "yes")
4083 BASECFLAGS="-pg $BASECFLAGS"
4084 LDFLAGS="-pg $LDFLAGS"
4085 ;;
4086esac
4087
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004088{ echo "$as_me:$LINENO: checking LDLIBRARY" >&5
4089echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004090
4091# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4092# library that we build, but we do not want to link against it (we
4093# will find it with a -framework option). For this reason there is an
4094# extra variable BLDLIBRARY against which Python and the extension
4095# modules are linked, BLDLIBRARY. This is normally the same as
4096# LDLIBRARY, but empty for MacOSX framework builds.
4097if test "$enable_framework"
4098then
4099 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4100 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4101 BLDLIBRARY=''
4102else
4103 BLDLIBRARY='$(LDLIBRARY)'
4104fi
4105
4106# Other platforms follow
4107if test $enable_shared = "yes"; then
4108
4109cat >>confdefs.h <<\_ACEOF
4110#define Py_ENABLE_SHARED 1
4111_ACEOF
4112
4113 case $ac_sys_system in
4114 CYGWIN*)
4115 LDLIBRARY='libpython$(VERSION).dll.a'
4116 DLLLIBRARY='libpython$(VERSION).dll'
4117 ;;
4118 SunOS*)
4119 LDLIBRARY='libpython$(VERSION).so'
4120 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
4121 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4122 INSTSONAME="$LDLIBRARY".$SOVERSION
4123 ;;
4124 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
4125 LDLIBRARY='libpython$(VERSION).so'
4126 BLDLIBRARY='-L. -lpython$(VERSION)'
4127 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4128 case $ac_sys_system in
4129 FreeBSD*)
4130 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4131 ;;
4132 esac
4133 INSTSONAME="$LDLIBRARY".$SOVERSION
4134 ;;
4135 hp*|HP*)
4136 case `uname -m` in
4137 ia64)
4138 LDLIBRARY='libpython$(VERSION).so'
4139 ;;
4140 *)
4141 LDLIBRARY='libpython$(VERSION).sl'
4142 ;;
4143 esac
4144 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
4145 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4146 ;;
4147 OSF*)
4148 LDLIBRARY='libpython$(VERSION).so'
4149 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
4150 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4151 ;;
4152 atheos*)
4153 LDLIBRARY='libpython$(VERSION).so'
4154 BLDLIBRARY='-L. -lpython$(VERSION)'
4155 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
4156 ;;
4157 Darwin*)
4158 LDLIBRARY='libpython$(VERSION).dylib'
4159 BLDLIBRARY='-L. -lpython$(VERSION)'
4160 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4161 ;;
4162
4163 esac
4164else # shared is disabled
4165 case $ac_sys_system in
4166 CYGWIN*)
4167 BLDLIBRARY='$(LIBRARY)'
4168 LDLIBRARY='libpython$(VERSION).dll.a'
4169 ;;
4170 esac
4171fi
4172
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004173{ echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
4174echo "${ECHO_T}$LDLIBRARY" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004175
4176if test -n "$ac_tool_prefix"; then
4177 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4178set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004179{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4180echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004181if test "${ac_cv_prog_RANLIB+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004182 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00004183else
4184 if test -n "$RANLIB"; then
4185 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4186else
4187as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4188for as_dir in $PATH
4189do
4190 IFS=$as_save_IFS
4191 test -z "$as_dir" && as_dir=.
4192 for ac_exec_ext in '' $ac_executable_extensions; do
4193 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4194 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004195 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004196 break 2
4197 fi
4198done
4199done
4200IFS=$as_save_IFS
4201
4202fi
4203fi
4204RANLIB=$ac_cv_prog_RANLIB
4205if test -n "$RANLIB"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004206 { echo "$as_me:$LINENO: result: $RANLIB" >&5
4207echo "${ECHO_T}$RANLIB" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004208else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004209 { echo "$as_me:$LINENO: result: no" >&5
4210echo "${ECHO_T}no" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004211fi
4212
4213
4214fi
4215if test -z "$ac_cv_prog_RANLIB"; then
4216 ac_ct_RANLIB=$RANLIB
4217 # Extract the first word of "ranlib", so it can be a program name with args.
4218set dummy ranlib; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004219{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4220echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004221if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004222 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00004223else
4224 if test -n "$ac_ct_RANLIB"; then
4225 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4226else
4227as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4228for as_dir in $PATH
4229do
4230 IFS=$as_save_IFS
4231 test -z "$as_dir" && as_dir=.
4232 for ac_exec_ext in '' $ac_executable_extensions; do
4233 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4234 ac_cv_prog_ac_ct_RANLIB="ranlib"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004235 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004236 break 2
4237 fi
4238done
4239done
4240IFS=$as_save_IFS
4241
4242fi
4243fi
4244ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4245if test -n "$ac_ct_RANLIB"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004246 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4247echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004248else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004249 { echo "$as_me:$LINENO: result: no" >&5
4250echo "${ECHO_T}no" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004251fi
4252
4253 if test "x$ac_ct_RANLIB" = x; then
4254 RANLIB=":"
4255 else
4256 case $cross_compiling:$ac_tool_warned in
4257yes:)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004258{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
4259whose name does not start with the host triplet. If you think this
4260configuration is useful to you, please write to autoconf@gnu.org." >&5
4261echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
4262whose name does not start with the host triplet. If you think this
4263configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Antoine Pitrou20327222009-05-24 20:39:11 +00004264ac_tool_warned=yes ;;
4265esac
4266 RANLIB=$ac_ct_RANLIB
4267 fi
4268else
4269 RANLIB="$ac_cv_prog_RANLIB"
4270fi
4271
4272
4273for ac_prog in ar aal
4274do
4275 # Extract the first word of "$ac_prog", so it can be a program name with args.
4276set dummy $ac_prog; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004277{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4278echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004279if test "${ac_cv_prog_AR+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004280 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00004281else
4282 if test -n "$AR"; then
4283 ac_cv_prog_AR="$AR" # Let the user override the test.
4284else
4285as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4286for as_dir in $PATH
4287do
4288 IFS=$as_save_IFS
4289 test -z "$as_dir" && as_dir=.
4290 for ac_exec_ext in '' $ac_executable_extensions; do
4291 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4292 ac_cv_prog_AR="$ac_prog"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004293 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004294 break 2
4295 fi
4296done
4297done
4298IFS=$as_save_IFS
4299
4300fi
4301fi
4302AR=$ac_cv_prog_AR
4303if test -n "$AR"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004304 { echo "$as_me:$LINENO: result: $AR" >&5
4305echo "${ECHO_T}$AR" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004306else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004307 { echo "$as_me:$LINENO: result: no" >&5
4308echo "${ECHO_T}no" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004309fi
4310
4311
4312 test -n "$AR" && break
4313done
4314test -n "$AR" || AR="ar"
4315
4316
4317# tweak ARFLAGS only if the user didn't set it on the command line
4318
4319if test -z "$ARFLAGS"
4320then
4321 ARFLAGS="rc"
4322fi
4323
4324
4325# Extract the first word of "svnversion", so it can be a program name with args.
4326set dummy svnversion; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004327{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4328echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004329if test "${ac_cv_prog_SVNVERSION+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004330 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00004331else
4332 if test -n "$SVNVERSION"; then
4333 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
4334else
4335as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4336for as_dir in $PATH
4337do
4338 IFS=$as_save_IFS
4339 test -z "$as_dir" && as_dir=.
4340 for ac_exec_ext in '' $ac_executable_extensions; do
4341 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4342 ac_cv_prog_SVNVERSION="found"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004343 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004344 break 2
4345 fi
4346done
4347done
4348IFS=$as_save_IFS
4349
4350 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
4351fi
4352fi
4353SVNVERSION=$ac_cv_prog_SVNVERSION
4354if test -n "$SVNVERSION"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004355 { echo "$as_me:$LINENO: result: $SVNVERSION" >&5
4356echo "${ECHO_T}$SVNVERSION" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004357else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004358 { echo "$as_me:$LINENO: result: no" >&5
4359echo "${ECHO_T}no" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004360fi
4361
4362
4363if test $SVNVERSION = found
4364then
4365 SVNVERSION="svnversion \$(srcdir)"
4366else
4367 SVNVERSION="echo Unversioned directory"
4368fi
4369
4370case $MACHDEP in
4371bsdos*|hp*|HP*)
4372 # install -d does not work on BSDI or HP-UX
4373 if test -z "$INSTALL"
4374 then
4375 INSTALL="${srcdir}/install-sh -c"
4376 fi
4377esac
4378ac_aux_dir=
4379for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4380 if test -f "$ac_dir/install-sh"; then
4381 ac_aux_dir=$ac_dir
4382 ac_install_sh="$ac_aux_dir/install-sh -c"
4383 break
4384 elif test -f "$ac_dir/install.sh"; then
4385 ac_aux_dir=$ac_dir
4386 ac_install_sh="$ac_aux_dir/install.sh -c"
4387 break
4388 elif test -f "$ac_dir/shtool"; then
4389 ac_aux_dir=$ac_dir
4390 ac_install_sh="$ac_aux_dir/shtool install -c"
4391 break
4392 fi
4393done
4394if test -z "$ac_aux_dir"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004395 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
4396echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
Antoine Pitrou20327222009-05-24 20:39:11 +00004397 { (exit 1); exit 1; }; }
4398fi
4399
4400# These three variables are undocumented and unsupported,
4401# and are intended to be withdrawn in a future Autoconf release.
4402# They can cause serious problems if a builder's source tree is in a directory
4403# whose full name contains unusual characters.
4404ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4405ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4406ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4407
4408
4409# Find a good install program. We prefer a C program (faster),
4410# so one script is as good as another. But avoid the broken or
4411# incompatible versions:
4412# SysV /etc/install, /usr/sbin/install
4413# SunOS /usr/etc/install
4414# IRIX /sbin/install
4415# AIX /bin/install
4416# AmigaOS /C/install, which installs bootblocks on floppy discs
4417# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4418# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4419# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4420# OS/2's system install, which has a completely different semantic
4421# ./install, which can be erroneously created by make from ./install.sh.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004422{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4423echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004424if test -z "$INSTALL"; then
4425if test "${ac_cv_path_install+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004426 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00004427else
4428 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4429for as_dir in $PATH
4430do
4431 IFS=$as_save_IFS
4432 test -z "$as_dir" && as_dir=.
4433 # Account for people who put trailing slashes in PATH elements.
4434case $as_dir/ in
4435 ./ | .// | /cC/* | \
4436 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4437 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
4438 /usr/ucb/* ) ;;
4439 *)
4440 # OSF1 and SCO ODT 3.0 have their own names for install.
4441 # Don't use installbsd from OSF since it installs stuff as root
4442 # by default.
4443 for ac_prog in ginstall scoinst install; do
4444 for ac_exec_ext in '' $ac_executable_extensions; do
4445 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
4446 if test $ac_prog = install &&
4447 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4448 # AIX install. It has an incompatible calling convention.
4449 :
4450 elif test $ac_prog = install &&
4451 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4452 # program-specific install script used by HP pwplus--don't use.
4453 :
4454 else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004455 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4456 break 3
Antoine Pitrou20327222009-05-24 20:39:11 +00004457 fi
4458 fi
4459 done
4460 done
4461 ;;
4462esac
Antoine Pitrou20327222009-05-24 20:39:11 +00004463done
4464IFS=$as_save_IFS
4465
Antoine Pitrou20327222009-05-24 20:39:11 +00004466
4467fi
4468 if test "${ac_cv_path_install+set}" = set; then
4469 INSTALL=$ac_cv_path_install
4470 else
4471 # As a last resort, use the slow shell script. Don't cache a
4472 # value for INSTALL within a source directory, because that will
4473 # break other packages using the cache if that directory is
4474 # removed, or if the value is a relative name.
4475 INSTALL=$ac_install_sh
4476 fi
4477fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004478{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4479echo "${ECHO_T}$INSTALL" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004480
4481# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4482# It thinks the first close brace ends the variable substitution.
4483test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4484
4485test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4486
4487test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4488
4489
4490# Not every filesystem supports hard links
4491
4492if test -z "$LN" ; then
4493 case $ac_sys_system in
4494 CYGWIN*) LN="ln -s";;
4495 atheos*) LN="ln -s";;
4496 *) LN=ln;;
4497 esac
4498fi
4499
4500# Check for --with-pydebug
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004501{ echo "$as_me:$LINENO: checking for --with-pydebug" >&5
4502echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004503
4504# Check whether --with-pydebug was given.
4505if test "${with_pydebug+set}" = set; then
4506 withval=$with_pydebug;
4507if test "$withval" != no
4508then
4509
4510cat >>confdefs.h <<\_ACEOF
4511#define Py_DEBUG 1
4512_ACEOF
4513
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004514 { echo "$as_me:$LINENO: result: yes" >&5
4515echo "${ECHO_T}yes" >&6; };
Antoine Pitrou20327222009-05-24 20:39:11 +00004516 Py_DEBUG='true'
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004517else { echo "$as_me:$LINENO: result: no" >&5
4518echo "${ECHO_T}no" >&6; }; Py_DEBUG='false'
Antoine Pitrou20327222009-05-24 20:39:11 +00004519fi
4520else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004521 { echo "$as_me:$LINENO: result: no" >&5
4522echo "${ECHO_T}no" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004523fi
4524
4525
4526# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
4527# merged with this chunk of code?
4528
4529# Optimizer/debugger flags
4530# ------------------------
4531# (The following bit of code is complicated enough - please keep things
4532# indented properly. Just pretend you're editing Python code. ;-)
4533
4534# There are two parallel sets of case statements below, one that checks to
4535# see if OPT was set and one that does BASECFLAGS setting based upon
4536# compiler and platform. BASECFLAGS tweaks need to be made even if the
4537# user set OPT.
4538
4539# tweak OPT based on compiler and platform, only if the user didn't set
4540# it on the command line
4541
Benjamin Petersone7e59c22010-03-23 21:05:56 +00004542if test "${OPT-unset}" = "unset"
Antoine Pitrou20327222009-05-24 20:39:11 +00004543then
4544 case $GCC in
4545 yes)
4546 if test "$CC" != 'g++' ; then
4547 STRICT_PROTO="-Wstrict-prototypes"
4548 fi
4549 # For gcc 4.x we need to use -fwrapv so lets check if its supported
4550 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
4551 WRAP="-fwrapv"
4552 fi
4553 case $ac_cv_prog_cc_g in
4554 yes)
4555 if test "$Py_DEBUG" = 'true' ; then
4556 # Optimization messes up debuggers, so turn it off for
4557 # debug builds.
4558 OPT="-g -Wall $STRICT_PROTO"
4559 else
4560 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
4561 fi
4562 ;;
4563 *)
4564 OPT="-O3 -Wall $STRICT_PROTO"
4565 ;;
4566 esac
4567 case $ac_sys_system in
4568 SCO_SV*) OPT="$OPT -m486 -DSCO5"
4569 ;;
4570 esac
4571 ;;
4572
4573 *)
4574 OPT="-O"
4575 ;;
4576 esac
Antoine Pitrou20327222009-05-24 20:39:11 +00004577fi
4578
4579
4580
4581# The -arch flags for universal builds on OSX
4582UNIVERSAL_ARCH_FLAGS=
4583
4584
4585# tweak BASECFLAGS based on compiler and platform
4586case $GCC in
4587yes)
4588 # Python violates C99 rules, by casting between incompatible
4589 # pointer types. GCC may generate bad code as a result of that,
4590 # so use -fno-strict-aliasing if supported.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004591 { echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
4592echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004593 ac_save_cc="$CC"
4594 CC="$CC -fno-strict-aliasing"
4595 if test "$cross_compiling" = yes; then
4596 ac_cv_no_strict_aliasing_ok=no
4597else
4598 cat >conftest.$ac_ext <<_ACEOF
4599/* confdefs.h. */
4600_ACEOF
4601cat confdefs.h >>conftest.$ac_ext
4602cat >>conftest.$ac_ext <<_ACEOF
4603/* end confdefs.h. */
4604int main() { return 0; }
4605_ACEOF
4606rm -f conftest$ac_exeext
4607if { (ac_try="$ac_link"
4608case "(($ac_try" in
4609 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4610 *) ac_try_echo=$ac_try;;
4611esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004612eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004613 (eval "$ac_link") 2>&5
4614 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004616 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4617 { (case "(($ac_try" in
4618 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4619 *) ac_try_echo=$ac_try;;
4620esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004621eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004622 (eval "$ac_try") 2>&5
4623 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004625 (exit $ac_status); }; }; then
4626 ac_cv_no_strict_aliasing_ok=yes
4627else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004628 echo "$as_me: program exited with status $ac_status" >&5
4629echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004630sed 's/^/| /' conftest.$ac_ext >&5
4631
4632( exit $ac_status )
4633ac_cv_no_strict_aliasing_ok=no
4634fi
Antoine Pitrou20327222009-05-24 20:39:11 +00004635rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4636fi
4637
4638
4639 CC="$ac_save_cc"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004640 { echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
4641echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004642 if test $ac_cv_no_strict_aliasing_ok = yes
4643 then
4644 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
4645 fi
4646
4647 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
4648 # support. Without this, treatment of subnormals doesn't follow
4649 # the standard.
4650 case $ac_sys_machine in
4651 alpha*)
4652 BASECFLAGS="$BASECFLAGS -mieee"
4653 ;;
4654 esac
4655
4656 case $ac_sys_system in
4657 SCO_SV*)
4658 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
4659 ;;
4660 # is there any other compiler on Darwin besides gcc?
4661 Darwin*)
4662 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
4663 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren79a93512010-04-18 19:08:47 +00004664 if test "${CC}" = gcc
4665 then
4666 { echo "$as_me:$LINENO: checking which compiler should be used" >&5
4667echo $ECHO_N "checking which compiler should be used... $ECHO_C" >&6; }
4668 case "${UNIVERSALSDK}" in
4669 */MacOSX10.4u.sdk)
4670 # Build using 10.4 SDK, force usage of gcc when the
4671 # compiler is gcc, otherwise the user will get very
4672 # confusing error messages when building on OSX 10.6
4673 CC=gcc-4.0
4674 CPP=cpp-4.0
4675 ;;
4676 esac
4677 { echo "$as_me:$LINENO: result: $CC" >&5
4678echo "${ECHO_T}$CC" >&6; }
4679 fi
Antoine Pitrou20327222009-05-24 20:39:11 +00004680
4681
4682 if test "${enable_universalsdk}"; then
4683 UNIVERSAL_ARCH_FLAGS=""
4684 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
Antoine Pitrou20327222009-05-24 20:39:11 +00004685 ARCH_RUN_32BIT=""
Benjamin Petersone7e59c22010-03-23 21:05:56 +00004686 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
Antoine Pitrou20327222009-05-24 20:39:11 +00004687
4688 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
Ronald Oussorend45ff2c2009-09-06 11:11:04 +00004689 ARCH_RUN_32BIT="true"
Benjamin Petersone7e59c22010-03-23 21:05:56 +00004690 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Antoine Pitrou20327222009-05-24 20:39:11 +00004691
4692 elif test "$UNIVERSAL_ARCHS" = "all" ; then
Ronald Oussorenc8c89c42010-02-11 13:24:45 +00004693 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Benjamin Petersone7e59c22010-03-23 21:05:56 +00004694 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
4695 LIPO_32BIT_FLAGS="-extract i386 -extract ppc7400"
4696 LIPO_64BIT_FLAGS="-extract x86_64 -extract ppc64"
Antoine Pitrou20327222009-05-24 20:39:11 +00004697
Ronald Oussoren856624d2009-09-08 07:13:53 +00004698 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
Ronald Oussorenc8c89c42010-02-11 13:24:45 +00004699 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Benjamin Petersone7e59c22010-03-23 21:05:56 +00004700 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
4701 LIPO_32BIT_FLAGS="-extract i386"
4702 LIPO_64BIT_FLAGS="-extract x86_64"
Ronald Oussoren856624d2009-09-08 07:13:53 +00004703
4704 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
Ronald Oussorenc8c89c42010-02-11 13:24:45 +00004705 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Benjamin Petersone7e59c22010-03-23 21:05:56 +00004706 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
4707 LIPO_32BIT_FLAGS="-extract i386 -extract ppc7400"
4708 LIPO_64BIT_FLAGS="-extract x86_64"
Ronald Oussoren856624d2009-09-08 07:13:53 +00004709
Antoine Pitrou20327222009-05-24 20:39:11 +00004710 else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004711 { { echo "$as_me:$LINENO: error: proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" >&5
4712echo "$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 +00004713 { (exit 1); exit 1; }; }
4714
4715 fi
4716
4717
Ronald Oussoren79a93512010-04-18 19:08:47 +00004718 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
4719 if test "${UNIVERSALSDK}" != "/"
4720 then
4721 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
4722 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
4723 CPPFLAGSFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Antoine Pitrou20327222009-05-24 20:39:11 +00004724 fi
4725 fi
4726
4727 # Calculate the right deployment target for this build.
4728 #
4729 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4730 if test ${cur_target} '>' 10.2; then
4731 cur_target=10.3
Ronald Oussorend45ff2c2009-09-06 11:11:04 +00004732 if test ${enable_universalsdk}; then
4733 if test "${UNIVERSAL_ARCHS}" = "all"; then
4734 # Ensure that the default platform for a
4735 # 4-way universal build is OSX 10.5,
4736 # that's the first OS release where
4737 # 4-way builds make sense.
4738 cur_target='10.5'
Ronald Oussoren856624d2009-09-08 07:13:53 +00004739
4740 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
4741 cur_target='10.5'
4742
4743 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
4744 cur_target='10.5'
4745
4746 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
4747 cur_target='10.5'
Ronald Oussorend45ff2c2009-09-06 11:11:04 +00004748 fi
4749 else
Ronald Oussoren175a8842010-02-11 13:40:06 +00004750 if test `/usr/bin/arch` = "i386"; then
Ronald Oussorend45ff2c2009-09-06 11:11:04 +00004751 # On Intel macs default to a deployment
4752 # target of 10.4, that's the first OSX
4753 # release with Intel support.
4754 cur_target="10.4"
4755 fi
4756 fi
Antoine Pitrou20327222009-05-24 20:39:11 +00004757 fi
4758 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
4759
4760 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
4761 # environment with a value that is the same as what we'll use
4762 # in the Makefile to ensure that we'll get the same compiler
4763 # environment during configure and build time.
4764 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
4765 export MACOSX_DEPLOYMENT_TARGET
4766 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
4767
4768 ;;
4769 OSF*)
4770 BASECFLAGS="$BASECFLAGS -mieee"
4771 ;;
4772 esac
4773 ;;
4774
4775*)
4776 case $ac_sys_system in
4777 OpenUNIX*|UnixWare*)
4778 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
4779 ;;
4780 OSF*)
4781 BASECFLAGS="$BASECFLAGS -ieee -std"
4782 ;;
4783 SCO_SV*)
4784 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
4785 ;;
4786 esac
4787 ;;
4788esac
4789
4790if test "$Py_DEBUG" = 'true'; then
4791 :
4792else
4793 OPT="-DNDEBUG $OPT"
4794fi
4795
4796if test "$ac_arch_flags"
4797then
4798 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
4799fi
4800
4801# disable check for icc since it seems to pass, but generates a warning
4802if test "$CC" = icc
4803then
4804 ac_cv_opt_olimit_ok=no
4805fi
4806
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004807{ echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
4808echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004809if test "${ac_cv_opt_olimit_ok+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004810 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00004811else
4812 ac_save_cc="$CC"
4813CC="$CC -OPT:Olimit=0"
4814if test "$cross_compiling" = yes; then
4815 ac_cv_opt_olimit_ok=no
4816else
4817 cat >conftest.$ac_ext <<_ACEOF
4818/* confdefs.h. */
4819_ACEOF
4820cat confdefs.h >>conftest.$ac_ext
4821cat >>conftest.$ac_ext <<_ACEOF
4822/* end confdefs.h. */
4823int main() { return 0; }
4824_ACEOF
4825rm -f conftest$ac_exeext
4826if { (ac_try="$ac_link"
4827case "(($ac_try" in
4828 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4829 *) ac_try_echo=$ac_try;;
4830esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004831eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004832 (eval "$ac_link") 2>&5
4833 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004835 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4836 { (case "(($ac_try" in
4837 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4838 *) ac_try_echo=$ac_try;;
4839esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004840eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004841 (eval "$ac_try") 2>&5
4842 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004844 (exit $ac_status); }; }; then
4845 ac_cv_opt_olimit_ok=yes
4846else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004847 echo "$as_me: program exited with status $ac_status" >&5
4848echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004849sed 's/^/| /' conftest.$ac_ext >&5
4850
4851( exit $ac_status )
4852ac_cv_opt_olimit_ok=no
4853fi
Antoine Pitrou20327222009-05-24 20:39:11 +00004854rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4855fi
4856
4857
4858CC="$ac_save_cc"
4859fi
4860
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004861{ echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
4862echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004863if test $ac_cv_opt_olimit_ok = yes; then
4864 case $ac_sys_system in
4865 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
4866 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
4867 # environment?
4868 Darwin*)
4869 ;;
4870 *)
4871 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
4872 ;;
4873 esac
4874else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004875 { echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
4876echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004877 if test "${ac_cv_olimit_ok+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004878 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00004879else
4880 ac_save_cc="$CC"
4881 CC="$CC -Olimit 1500"
4882 if test "$cross_compiling" = yes; then
4883 ac_cv_olimit_ok=no
4884else
4885 cat >conftest.$ac_ext <<_ACEOF
4886/* confdefs.h. */
4887_ACEOF
4888cat confdefs.h >>conftest.$ac_ext
4889cat >>conftest.$ac_ext <<_ACEOF
4890/* end confdefs.h. */
4891int main() { return 0; }
4892_ACEOF
4893rm -f conftest$ac_exeext
4894if { (ac_try="$ac_link"
4895case "(($ac_try" in
4896 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4897 *) ac_try_echo=$ac_try;;
4898esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004899eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004900 (eval "$ac_link") 2>&5
4901 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004903 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4904 { (case "(($ac_try" in
4905 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4906 *) ac_try_echo=$ac_try;;
4907esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004908eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004909 (eval "$ac_try") 2>&5
4910 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004912 (exit $ac_status); }; }; then
4913 ac_cv_olimit_ok=yes
4914else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004915 echo "$as_me: program exited with status $ac_status" >&5
4916echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004917sed 's/^/| /' conftest.$ac_ext >&5
4918
4919( exit $ac_status )
4920ac_cv_olimit_ok=no
4921fi
Antoine Pitrou20327222009-05-24 20:39:11 +00004922rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4923fi
4924
4925
4926 CC="$ac_save_cc"
4927fi
4928
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004929 { echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4930echo "${ECHO_T}$ac_cv_olimit_ok" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004931 if test $ac_cv_olimit_ok = yes; then
4932 BASECFLAGS="$BASECFLAGS -Olimit 1500"
4933 fi
4934fi
4935
4936# Check whether GCC supports PyArg_ParseTuple format
4937if test "$GCC" = "yes"
4938then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004939 { echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
4940echo $ECHO_N "checking whether gcc supports ParseTuple __format__... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004941 save_CFLAGS=$CFLAGS
4942 CFLAGS="$CFLAGS -Werror"
4943 cat >conftest.$ac_ext <<_ACEOF
4944/* confdefs.h. */
4945_ACEOF
4946cat confdefs.h >>conftest.$ac_ext
4947cat >>conftest.$ac_ext <<_ACEOF
4948/* end confdefs.h. */
4949
4950 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
4951
4952int
4953main ()
4954{
4955
4956 ;
4957 return 0;
4958}
4959_ACEOF
4960rm -f conftest.$ac_objext
4961if { (ac_try="$ac_compile"
4962case "(($ac_try" in
4963 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4964 *) ac_try_echo=$ac_try;;
4965esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004966eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004967 (eval "$ac_compile") 2>conftest.er1
4968 ac_status=$?
4969 grep -v '^ *+' conftest.er1 >conftest.err
4970 rm -f conftest.er1
4971 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004973 (exit $ac_status); } && {
4974 test -z "$ac_c_werror_flag" ||
4975 test ! -s conftest.err
4976 } && test -s conftest.$ac_objext; then
4977
4978cat >>confdefs.h <<\_ACEOF
4979#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
4980_ACEOF
4981
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004982 { echo "$as_me:$LINENO: result: yes" >&5
4983echo "${ECHO_T}yes" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004984else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004985 echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004986sed 's/^/| /' conftest.$ac_ext >&5
4987
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004988 { echo "$as_me:$LINENO: result: no" >&5
4989echo "${ECHO_T}no" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004990
4991fi
4992
4993rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4994 CFLAGS=$save_CFLAGS
4995fi
4996
4997# On some compilers, pthreads are available without further options
4998# (e.g. MacOS X). On some of these systems, the compiler will not
4999# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5000# So we have to see first whether pthreads are available without
5001# options before we can check whether -Kpthread improves anything.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005002{ echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
5003echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005004if test "${ac_cv_pthread_is_default+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005005 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00005006else
5007 if test "$cross_compiling" = yes; then
5008 ac_cv_pthread_is_default=no
5009else
5010 cat >conftest.$ac_ext <<_ACEOF
5011/* confdefs.h. */
5012_ACEOF
5013cat confdefs.h >>conftest.$ac_ext
5014cat >>conftest.$ac_ext <<_ACEOF
5015/* end confdefs.h. */
5016
5017#include <pthread.h>
5018
5019void* routine(void* p){return NULL;}
5020
5021int main(){
5022 pthread_t p;
5023 if(pthread_create(&p,NULL,routine,NULL)!=0)
5024 return 1;
5025 (void)pthread_detach(p);
5026 return 0;
5027}
5028
5029_ACEOF
5030rm -f conftest$ac_exeext
5031if { (ac_try="$ac_link"
5032case "(($ac_try" in
5033 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5034 *) ac_try_echo=$ac_try;;
5035esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005036eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005037 (eval "$ac_link") 2>&5
5038 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005040 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5041 { (case "(($ac_try" in
5042 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5043 *) ac_try_echo=$ac_try;;
5044esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005045eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005046 (eval "$ac_try") 2>&5
5047 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005049 (exit $ac_status); }; }; then
5050
5051 ac_cv_pthread_is_default=yes
5052 ac_cv_kthread=no
5053 ac_cv_pthread=no
5054
5055else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005056 echo "$as_me: program exited with status $ac_status" >&5
5057echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005058sed 's/^/| /' conftest.$ac_ext >&5
5059
5060( exit $ac_status )
5061ac_cv_pthread_is_default=no
5062fi
Antoine Pitrou20327222009-05-24 20:39:11 +00005063rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5064fi
5065
5066
5067
5068fi
5069
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005070{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
5071echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005072
5073
5074if test $ac_cv_pthread_is_default = yes
5075then
5076 ac_cv_kpthread=no
5077else
5078# -Kpthread, if available, provides the right #defines
5079# and linker options to make pthread_create available
5080# Some compilers won't report that they do not support -Kpthread,
5081# so we need to run a program to see whether it really made the
5082# function available.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005083{ echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
5084echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005085if test "${ac_cv_kpthread+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005086 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00005087else
5088 ac_save_cc="$CC"
5089CC="$CC -Kpthread"
5090if test "$cross_compiling" = yes; then
5091 ac_cv_kpthread=no
5092else
5093 cat >conftest.$ac_ext <<_ACEOF
5094/* confdefs.h. */
5095_ACEOF
5096cat confdefs.h >>conftest.$ac_ext
5097cat >>conftest.$ac_ext <<_ACEOF
5098/* end confdefs.h. */
5099
5100#include <pthread.h>
5101
5102void* routine(void* p){return NULL;}
5103
5104int main(){
5105 pthread_t p;
5106 if(pthread_create(&p,NULL,routine,NULL)!=0)
5107 return 1;
5108 (void)pthread_detach(p);
5109 return 0;
5110}
5111
5112_ACEOF
5113rm -f conftest$ac_exeext
5114if { (ac_try="$ac_link"
5115case "(($ac_try" in
5116 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5117 *) ac_try_echo=$ac_try;;
5118esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005119eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005120 (eval "$ac_link") 2>&5
5121 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005123 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5124 { (case "(($ac_try" in
5125 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5126 *) ac_try_echo=$ac_try;;
5127esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005128eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005129 (eval "$ac_try") 2>&5
5130 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005132 (exit $ac_status); }; }; then
5133 ac_cv_kpthread=yes
5134else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005135 echo "$as_me: program exited with status $ac_status" >&5
5136echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005137sed 's/^/| /' conftest.$ac_ext >&5
5138
5139( exit $ac_status )
5140ac_cv_kpthread=no
5141fi
Antoine Pitrou20327222009-05-24 20:39:11 +00005142rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5143fi
5144
5145
5146CC="$ac_save_cc"
5147fi
5148
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005149{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
5150echo "${ECHO_T}$ac_cv_kpthread" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005151fi
5152
5153if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5154then
5155# -Kthread, if available, provides the right #defines
5156# and linker options to make pthread_create available
5157# Some compilers won't report that they do not support -Kthread,
5158# so we need to run a program to see whether it really made the
5159# function available.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005160{ echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
5161echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005162if test "${ac_cv_kthread+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005163 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00005164else
5165 ac_save_cc="$CC"
5166CC="$CC -Kthread"
5167if test "$cross_compiling" = yes; then
5168 ac_cv_kthread=no
5169else
5170 cat >conftest.$ac_ext <<_ACEOF
5171/* confdefs.h. */
5172_ACEOF
5173cat confdefs.h >>conftest.$ac_ext
5174cat >>conftest.$ac_ext <<_ACEOF
5175/* end confdefs.h. */
5176
5177#include <pthread.h>
5178
5179void* routine(void* p){return NULL;}
5180
5181int main(){
5182 pthread_t p;
5183 if(pthread_create(&p,NULL,routine,NULL)!=0)
5184 return 1;
5185 (void)pthread_detach(p);
5186 return 0;
5187}
5188
5189_ACEOF
5190rm -f conftest$ac_exeext
5191if { (ac_try="$ac_link"
5192case "(($ac_try" in
5193 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5194 *) ac_try_echo=$ac_try;;
5195esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005196eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005197 (eval "$ac_link") 2>&5
5198 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005200 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5201 { (case "(($ac_try" in
5202 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5203 *) ac_try_echo=$ac_try;;
5204esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005205eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005206 (eval "$ac_try") 2>&5
5207 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005209 (exit $ac_status); }; }; then
5210 ac_cv_kthread=yes
5211else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005212 echo "$as_me: program exited with status $ac_status" >&5
5213echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005214sed 's/^/| /' conftest.$ac_ext >&5
5215
5216( exit $ac_status )
5217ac_cv_kthread=no
5218fi
Antoine Pitrou20327222009-05-24 20:39:11 +00005219rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5220fi
5221
5222
5223CC="$ac_save_cc"
5224fi
5225
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005226{ echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
5227echo "${ECHO_T}$ac_cv_kthread" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005228fi
5229
5230if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5231then
5232# -pthread, if available, provides the right #defines
5233# and linker options to make pthread_create available
5234# Some compilers won't report that they do not support -pthread,
5235# so we need to run a program to see whether it really made the
5236# function available.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005237{ echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
5238echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005239if test "${ac_cv_thread+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005240 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00005241else
5242 ac_save_cc="$CC"
5243CC="$CC -pthread"
5244if test "$cross_compiling" = yes; then
5245 ac_cv_pthread=no
5246else
5247 cat >conftest.$ac_ext <<_ACEOF
5248/* confdefs.h. */
5249_ACEOF
5250cat confdefs.h >>conftest.$ac_ext
5251cat >>conftest.$ac_ext <<_ACEOF
5252/* end confdefs.h. */
5253
5254#include <pthread.h>
5255
5256void* routine(void* p){return NULL;}
5257
5258int main(){
5259 pthread_t p;
5260 if(pthread_create(&p,NULL,routine,NULL)!=0)
5261 return 1;
5262 (void)pthread_detach(p);
5263 return 0;
5264}
5265
5266_ACEOF
5267rm -f conftest$ac_exeext
5268if { (ac_try="$ac_link"
5269case "(($ac_try" in
5270 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5271 *) ac_try_echo=$ac_try;;
5272esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005273eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005274 (eval "$ac_link") 2>&5
5275 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005277 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5278 { (case "(($ac_try" in
5279 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5280 *) ac_try_echo=$ac_try;;
5281esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005282eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005283 (eval "$ac_try") 2>&5
5284 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005286 (exit $ac_status); }; }; then
5287 ac_cv_pthread=yes
5288else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005289 echo "$as_me: program exited with status $ac_status" >&5
5290echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005291sed 's/^/| /' conftest.$ac_ext >&5
5292
5293( exit $ac_status )
5294ac_cv_pthread=no
5295fi
Antoine Pitrou20327222009-05-24 20:39:11 +00005296rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5297fi
5298
5299
5300CC="$ac_save_cc"
5301fi
5302
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005303{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5304echo "${ECHO_T}$ac_cv_pthread" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005305fi
5306
5307# If we have set a CC compiler flag for thread support then
5308# check if it works for CXX, too.
5309ac_cv_cxx_thread=no
5310if test ! -z "$CXX"
5311then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005312{ echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5313echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005314ac_save_cxx="$CXX"
5315
5316if test "$ac_cv_kpthread" = "yes"
5317then
5318 CXX="$CXX -Kpthread"
5319 ac_cv_cxx_thread=yes
5320elif test "$ac_cv_kthread" = "yes"
5321then
5322 CXX="$CXX -Kthread"
5323 ac_cv_cxx_thread=yes
5324elif test "$ac_cv_pthread" = "yes"
5325then
5326 CXX="$CXX -pthread"
5327 ac_cv_cxx_thread=yes
5328fi
5329
5330if test $ac_cv_cxx_thread = yes
5331then
5332 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5333 $CXX -c conftest.$ac_ext 2>&5
5334 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5335 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5336 then
5337 ac_cv_cxx_thread=yes
5338 else
5339 ac_cv_cxx_thread=no
5340 fi
5341 rm -fr conftest*
5342fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005343{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5344echo "${ECHO_T}$ac_cv_cxx_thread" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005345fi
5346CXX="$ac_save_cxx"
5347
5348
5349# checks for header files
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005350{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5351echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005352if test "${ac_cv_header_stdc+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005353 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00005354else
5355 cat >conftest.$ac_ext <<_ACEOF
5356/* confdefs.h. */
5357_ACEOF
5358cat confdefs.h >>conftest.$ac_ext
5359cat >>conftest.$ac_ext <<_ACEOF
5360/* end confdefs.h. */
5361#include <stdlib.h>
5362#include <stdarg.h>
5363#include <string.h>
5364#include <float.h>
5365
5366int
5367main ()
5368{
5369
5370 ;
5371 return 0;
5372}
5373_ACEOF
5374rm -f conftest.$ac_objext
5375if { (ac_try="$ac_compile"
5376case "(($ac_try" in
5377 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5378 *) ac_try_echo=$ac_try;;
5379esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005380eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005381 (eval "$ac_compile") 2>conftest.er1
5382 ac_status=$?
5383 grep -v '^ *+' conftest.er1 >conftest.err
5384 rm -f conftest.er1
5385 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005386 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005387 (exit $ac_status); } && {
5388 test -z "$ac_c_werror_flag" ||
5389 test ! -s conftest.err
5390 } && test -s conftest.$ac_objext; then
5391 ac_cv_header_stdc=yes
5392else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005393 echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005394sed 's/^/| /' conftest.$ac_ext >&5
5395
5396 ac_cv_header_stdc=no
5397fi
5398
5399rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5400
5401if test $ac_cv_header_stdc = yes; then
5402 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5403 cat >conftest.$ac_ext <<_ACEOF
5404/* confdefs.h. */
5405_ACEOF
5406cat confdefs.h >>conftest.$ac_ext
5407cat >>conftest.$ac_ext <<_ACEOF
5408/* end confdefs.h. */
5409#include <string.h>
5410
5411_ACEOF
5412if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5413 $EGREP "memchr" >/dev/null 2>&1; then
5414 :
5415else
5416 ac_cv_header_stdc=no
5417fi
Jesus Cea0f752ee2010-04-28 12:03:06 +00005418rm -f conftest*
Antoine Pitrou20327222009-05-24 20:39:11 +00005419
5420fi
5421
5422if test $ac_cv_header_stdc = yes; then
5423 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5424 cat >conftest.$ac_ext <<_ACEOF
5425/* confdefs.h. */
5426_ACEOF
5427cat confdefs.h >>conftest.$ac_ext
5428cat >>conftest.$ac_ext <<_ACEOF
5429/* end confdefs.h. */
5430#include <stdlib.h>
5431
5432_ACEOF
5433if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5434 $EGREP "free" >/dev/null 2>&1; then
5435 :
5436else
5437 ac_cv_header_stdc=no
5438fi
Jesus Cea0f752ee2010-04-28 12:03:06 +00005439rm -f conftest*
Antoine Pitrou20327222009-05-24 20:39:11 +00005440
5441fi
5442
5443if test $ac_cv_header_stdc = yes; then
5444 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5445 if test "$cross_compiling" = yes; then
5446 :
5447else
5448 cat >conftest.$ac_ext <<_ACEOF
5449/* confdefs.h. */
5450_ACEOF
5451cat confdefs.h >>conftest.$ac_ext
5452cat >>conftest.$ac_ext <<_ACEOF
5453/* end confdefs.h. */
5454#include <ctype.h>
5455#include <stdlib.h>
5456#if ((' ' & 0x0FF) == 0x020)
5457# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5458# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5459#else
5460# define ISLOWER(c) \
5461 (('a' <= (c) && (c) <= 'i') \
5462 || ('j' <= (c) && (c) <= 'r') \
5463 || ('s' <= (c) && (c) <= 'z'))
5464# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5465#endif
5466
5467#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5468int
5469main ()
5470{
5471 int i;
5472 for (i = 0; i < 256; i++)
5473 if (XOR (islower (i), ISLOWER (i))
5474 || toupper (i) != TOUPPER (i))
5475 return 2;
5476 return 0;
5477}
5478_ACEOF
5479rm -f conftest$ac_exeext
5480if { (ac_try="$ac_link"
5481case "(($ac_try" in
5482 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5483 *) ac_try_echo=$ac_try;;
5484esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005485eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005486 (eval "$ac_link") 2>&5
5487 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005489 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5490 { (case "(($ac_try" in
5491 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5492 *) ac_try_echo=$ac_try;;
5493esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005494eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005495 (eval "$ac_try") 2>&5
5496 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005498 (exit $ac_status); }; }; then
5499 :
5500else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005501 echo "$as_me: program exited with status $ac_status" >&5
5502echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005503sed 's/^/| /' conftest.$ac_ext >&5
5504
5505( exit $ac_status )
5506ac_cv_header_stdc=no
5507fi
Antoine Pitrou20327222009-05-24 20:39:11 +00005508rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5509fi
5510
5511
5512fi
5513fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005514{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5515echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005516if test $ac_cv_header_stdc = yes; then
5517
5518cat >>confdefs.h <<\_ACEOF
5519#define STDC_HEADERS 1
5520_ACEOF
5521
5522fi
5523
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005524# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5535 inttypes.h stdint.h unistd.h
5536do
5537as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5538{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5539echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5540if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5541 echo $ECHO_N "(cached) $ECHO_C" >&6
5542else
5543 cat >conftest.$ac_ext <<_ACEOF
5544/* confdefs.h. */
5545_ACEOF
5546cat confdefs.h >>conftest.$ac_ext
5547cat >>conftest.$ac_ext <<_ACEOF
5548/* end confdefs.h. */
5549$ac_includes_default
5550
5551#include <$ac_header>
5552_ACEOF
5553rm -f conftest.$ac_objext
5554if { (ac_try="$ac_compile"
5555case "(($ac_try" in
5556 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5557 *) ac_try_echo=$ac_try;;
5558esac
5559eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5560 (eval "$ac_compile") 2>conftest.er1
5561 ac_status=$?
5562 grep -v '^ *+' conftest.er1 >conftest.err
5563 rm -f conftest.er1
5564 cat conftest.err >&5
5565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5566 (exit $ac_status); } && {
5567 test -z "$ac_c_werror_flag" ||
5568 test ! -s conftest.err
5569 } && test -s conftest.$ac_objext; then
5570 eval "$as_ac_Header=yes"
5571else
5572 echo "$as_me: failed program was:" >&5
5573sed 's/^/| /' conftest.$ac_ext >&5
5574
5575 eval "$as_ac_Header=no"
5576fi
5577
5578rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5579fi
5580ac_res=`eval echo '${'$as_ac_Header'}'`
5581 { echo "$as_me:$LINENO: result: $ac_res" >&5
5582echo "${ECHO_T}$ac_res" >&6; }
5583if test `eval echo '${'$as_ac_Header'}'` = yes; then
5584 cat >>confdefs.h <<_ACEOF
5585#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5586_ACEOF
5587
5588fi
5589
5590done
5591
5592
Antoine Pitrou20327222009-05-24 20:39:11 +00005593
Martin v. Löwis11437992002-04-12 09:54:03 +00005594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
Anthony Baxter8a560de2004-10-13 15:30:56 +00005629
Martin v. Löwisc3001752005-01-23 09:27:24 +00005630
Martin v. Löwis11017b12006-01-14 18:12:57 +00005631
Thomas Wouters477c8d52006-05-27 19:21:47 +00005632
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005633
5634
5635
5636
5637
5638
5639
5640
Thomas Wouters89f507f2006-12-13 04:49:30 +00005641
Christian Heimes043d6f62008-01-07 17:19:16 +00005642
Christian Heimes4fbc72b2008-03-22 00:47:35 +00005643
5644
Christian Heimesbbe741d2008-03-28 10:53:29 +00005645
Benjamin Petersonde9c8692008-07-01 18:23:09 +00005646
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005647for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5648fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00005649ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00005650shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005651unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00005652sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
5653sys/lock.h sys/mkdev.h sys/modem.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005654sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Benjamin Petersonde9c8692008-07-01 18:23:09 +00005655sys/termio.h sys/time.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005656sys/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 +00005657sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimes043d6f62008-01-07 17:19:16 +00005658bluetooth/bluetooth.h linux/tipc.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00005659do
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005660as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005661if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005662 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5663echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005664if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005665 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005666fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005667ac_res=`eval echo '${'$as_ac_Header'}'`
5668 { echo "$as_me:$LINENO: result: $ac_res" >&5
5669echo "${ECHO_T}$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005670else
Martin v. Löwis11437992002-04-12 09:54:03 +00005671 # Is the header compilable?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005672{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5673echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005674cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005675/* confdefs.h. */
5676_ACEOF
5677cat confdefs.h >>conftest.$ac_ext
5678cat >>conftest.$ac_ext <<_ACEOF
5679/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005680$ac_includes_default
5681#include <$ac_header>
5682_ACEOF
5683rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005684if { (ac_try="$ac_compile"
5685case "(($ac_try" in
5686 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5687 *) ac_try_echo=$ac_try;;
5688esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005689eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005690 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005691 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005692 grep -v '^ *+' conftest.er1 >conftest.err
5693 rm -f conftest.er1
5694 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005696 (exit $ac_status); } && {
5697 test -z "$ac_c_werror_flag" ||
5698 test ! -s conftest.err
5699 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005700 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00005701else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005702 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005703sed 's/^/| /' conftest.$ac_ext >&5
5704
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005705 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005706fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005707
5708rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005709{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5710echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005711
5712# Is the header present?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005713{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5714echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005715cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005716/* confdefs.h. */
5717_ACEOF
5718cat confdefs.h >>conftest.$ac_ext
5719cat >>conftest.$ac_ext <<_ACEOF
5720/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005721#include <$ac_header>
5722_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005723if { (ac_try="$ac_cpp conftest.$ac_ext"
5724case "(($ac_try" in
5725 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5726 *) ac_try_echo=$ac_try;;
5727esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005728eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005729 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005730 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005731 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00005732 rm -f conftest.er1
5733 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005735 (exit $ac_status); } >/dev/null && {
5736 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5737 test ! -s conftest.err
5738 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005739 ac_header_preproc=yes
5740else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005741 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005742sed 's/^/| /' conftest.$ac_ext >&5
5743
Martin v. Löwis11437992002-04-12 09:54:03 +00005744 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00005745fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005746
Martin v. Löwis11437992002-04-12 09:54:03 +00005747rm -f conftest.err conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005748{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5749echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005750
5751# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005752case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5753 yes:no: )
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005754 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5755echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
5756 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5757echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005758 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005759 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005760 no:yes:* )
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005761 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5762echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
5763 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5764echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5765 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5766echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5767 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5768echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
5769 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5770echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5771 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5772echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005773 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00005774## -------------------------------------- ##
5775## Report this to http://bugs.python.org/ ##
5776## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005777_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005778 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005779 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00005780esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005781{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5782echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005783if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005784 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005785else
Skip Montanarof0d5f792004-08-15 14:08:23 +00005786 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005787fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005788ac_res=`eval echo '${'$as_ac_Header'}'`
5789 { echo "$as_me:$LINENO: result: $ac_res" >&5
5790echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005791
5792fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005793if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005794 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005795#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005796_ACEOF
5797
5798fi
5799
Guido van Rossum627b2d71993-12-24 10:39:16 +00005800done
5801
Martin v. Löwis11437992002-04-12 09:54:03 +00005802
5803
5804
5805
5806
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005807ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005808for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005809 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
5810{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5811echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005812if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005813 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005814else
Martin v. Löwis11437992002-04-12 09:54:03 +00005815 cat >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. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005821#include <sys/types.h>
5822#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00005823
Martin v. Löwis11437992002-04-12 09:54:03 +00005824int
5825main ()
5826{
5827if ((DIR *) 0)
5828return 0;
5829 ;
5830 return 0;
5831}
5832_ACEOF
5833rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005834if { (ac_try="$ac_compile"
5835case "(($ac_try" in
5836 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5837 *) ac_try_echo=$ac_try;;
5838esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005839eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005840 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005841 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005842 grep -v '^ *+' conftest.er1 >conftest.err
5843 rm -f conftest.er1
5844 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005846 (exit $ac_status); } && {
5847 test -z "$ac_c_werror_flag" ||
5848 test ! -s conftest.err
5849 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005850 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00005851else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005852 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005853sed 's/^/| /' conftest.$ac_ext >&5
5854
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005855 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005856fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005857
5858rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005859fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005860ac_res=`eval echo '${'$as_ac_Header'}'`
5861 { echo "$as_me:$LINENO: result: $ac_res" >&5
5862echo "${ECHO_T}$ac_res" >&6; }
5863if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005864 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005865#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005866_ACEOF
5867
5868ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00005869fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005870
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005871done
5872# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5873if test $ac_header_dirent = dirent.h; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005874 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5875echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005876if test "${ac_cv_search_opendir+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005877 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005878else
Martin v. Löwis11437992002-04-12 09:54:03 +00005879 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005880cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005881/* confdefs.h. */
5882_ACEOF
5883cat confdefs.h >>conftest.$ac_ext
5884cat >>conftest.$ac_ext <<_ACEOF
5885/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005886
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005887/* Override any GCC internal prototype to avoid an error.
5888 Use char because int might match the return type of a GCC
5889 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005890#ifdef __cplusplus
5891extern "C"
5892#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005893char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005894int
5895main ()
5896{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005897return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005898 ;
5899 return 0;
5900}
5901_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005902for ac_lib in '' dir; do
5903 if test -z "$ac_lib"; then
5904 ac_res="none required"
5905 else
5906 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005907 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005908 fi
5909 rm -f conftest.$ac_objext conftest$ac_exeext
5910if { (ac_try="$ac_link"
5911case "(($ac_try" in
5912 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5913 *) ac_try_echo=$ac_try;;
5914esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005915eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005916 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005917 ac_status=$?
5918 grep -v '^ *+' conftest.er1 >conftest.err
5919 rm -f conftest.er1
5920 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005922 (exit $ac_status); } && {
5923 test -z "$ac_c_werror_flag" ||
5924 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005925 } && test -s conftest$ac_exeext &&
5926 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005927 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00005928else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005929 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005930sed 's/^/| /' conftest.$ac_ext >&5
5931
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005932
Thomas Wouters477c8d52006-05-27 19:21:47 +00005933fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005934
5935rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5936 conftest$ac_exeext
5937 if test "${ac_cv_search_opendir+set}" = set; then
5938 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005939fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005940done
5941if test "${ac_cv_search_opendir+set}" = set; then
5942 :
5943else
5944 ac_cv_search_opendir=no
5945fi
5946rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005947LIBS=$ac_func_search_save_LIBS
5948fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005949{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5950echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005951ac_res=$ac_cv_search_opendir
5952if test "$ac_res" != no; then
5953 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005954
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005955fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005956
Michael W. Hudson54241132001-12-07 15:38:26 +00005957else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005958 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5959echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005960if test "${ac_cv_search_opendir+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005961 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005962else
5963 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005964cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005965/* confdefs.h. */
5966_ACEOF
5967cat confdefs.h >>conftest.$ac_ext
5968cat >>conftest.$ac_ext <<_ACEOF
5969/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005970
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005971/* Override any GCC internal prototype to avoid an error.
5972 Use char because int might match the return type of a GCC
5973 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005974#ifdef __cplusplus
5975extern "C"
5976#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005977char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005978int
5979main ()
5980{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005981return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005982 ;
5983 return 0;
5984}
5985_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005986for ac_lib in '' x; do
5987 if test -z "$ac_lib"; then
5988 ac_res="none required"
5989 else
5990 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005991 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005992 fi
5993 rm -f conftest.$ac_objext conftest$ac_exeext
5994if { (ac_try="$ac_link"
5995case "(($ac_try" in
5996 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5997 *) ac_try_echo=$ac_try;;
5998esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005999eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006000 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006001 ac_status=$?
6002 grep -v '^ *+' conftest.er1 >conftest.err
6003 rm -f conftest.er1
6004 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006006 (exit $ac_status); } && {
6007 test -z "$ac_c_werror_flag" ||
6008 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006009 } && test -s conftest$ac_exeext &&
6010 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006011 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006012else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006013 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006014sed 's/^/| /' conftest.$ac_ext >&5
6015
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006016
Thomas Wouters477c8d52006-05-27 19:21:47 +00006017fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006018
6019rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6020 conftest$ac_exeext
6021 if test "${ac_cv_search_opendir+set}" = set; then
6022 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006023fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006024done
6025if test "${ac_cv_search_opendir+set}" = set; then
6026 :
6027else
6028 ac_cv_search_opendir=no
6029fi
6030rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006031LIBS=$ac_func_search_save_LIBS
6032fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006033{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
6034echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006035ac_res=$ac_cv_search_opendir
6036if test "$ac_res" != no; then
6037 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006038
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006039fi
6040
6041fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006042
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006043{ echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
6044echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006045if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006046 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006047else
6048 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006049/* confdefs.h. */
6050_ACEOF
6051cat confdefs.h >>conftest.$ac_ext
6052cat >>conftest.$ac_ext <<_ACEOF
6053/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006054#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006055int
6056main ()
6057{
6058return makedev(0, 0);
6059 ;
6060 return 0;
6061}
6062_ACEOF
6063rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006064if { (ac_try="$ac_link"
6065case "(($ac_try" in
6066 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6067 *) ac_try_echo=$ac_try;;
6068esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006069eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006070 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006071 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006072 grep -v '^ *+' conftest.er1 >conftest.err
6073 rm -f conftest.er1
6074 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006076 (exit $ac_status); } && {
6077 test -z "$ac_c_werror_flag" ||
6078 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006079 } && test -s conftest$ac_exeext &&
6080 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006081 ac_cv_header_sys_types_h_makedev=yes
6082else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006083 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006084sed 's/^/| /' conftest.$ac_ext >&5
6085
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006086 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006087fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006088
6089rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006090 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006091
6092fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006093{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
6094echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006095
6096if test $ac_cv_header_sys_types_h_makedev = no; then
6097if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006098 { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6099echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006100if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006101 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006102fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006103{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6104echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006105else
6106 # Is the header compilable?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006107{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
6108echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006109cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006110/* confdefs.h. */
6111_ACEOF
6112cat confdefs.h >>conftest.$ac_ext
6113cat >>conftest.$ac_ext <<_ACEOF
6114/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006115$ac_includes_default
6116#include <sys/mkdev.h>
6117_ACEOF
6118rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006119if { (ac_try="$ac_compile"
6120case "(($ac_try" in
6121 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6122 *) ac_try_echo=$ac_try;;
6123esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006124eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006125 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006126 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006127 grep -v '^ *+' conftest.er1 >conftest.err
6128 rm -f conftest.er1
6129 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006131 (exit $ac_status); } && {
6132 test -z "$ac_c_werror_flag" ||
6133 test ! -s conftest.err
6134 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006135 ac_header_compiler=yes
6136else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006137 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006138sed 's/^/| /' conftest.$ac_ext >&5
6139
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006140 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006141fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006142
6143rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006144{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6145echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006146
6147# Is the header present?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006148{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
6149echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006150cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006151/* confdefs.h. */
6152_ACEOF
6153cat confdefs.h >>conftest.$ac_ext
6154cat >>conftest.$ac_ext <<_ACEOF
6155/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006156#include <sys/mkdev.h>
6157_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006158if { (ac_try="$ac_cpp conftest.$ac_ext"
6159case "(($ac_try" in
6160 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6161 *) ac_try_echo=$ac_try;;
6162esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006163eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006164 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006165 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006166 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006167 rm -f conftest.er1
6168 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006170 (exit $ac_status); } >/dev/null && {
6171 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6172 test ! -s conftest.err
6173 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006174 ac_header_preproc=yes
6175else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006176 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006177sed 's/^/| /' conftest.$ac_ext >&5
6178
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006179 ac_header_preproc=no
6180fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006181
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006182rm -f conftest.err conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006183{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6184echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006185
6186# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006187case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6188 yes:no: )
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006189 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
6190echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6191 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
6192echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006193 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006194 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006195 no:yes:* )
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006196 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
6197echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
6198 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
6199echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
6200 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
6201echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
6202 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
6203echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
6204 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
6205echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
6206 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
6207echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006208 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00006209## -------------------------------------- ##
6210## Report this to http://bugs.python.org/ ##
6211## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006212_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006213 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006214 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006215esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006216{ echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6217echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006218if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006219 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006220else
6221 ac_cv_header_sys_mkdev_h=$ac_header_preproc
6222fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006223{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6224echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006225
6226fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006227if test $ac_cv_header_sys_mkdev_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006228
6229cat >>confdefs.h <<\_ACEOF
6230#define MAJOR_IN_MKDEV 1
6231_ACEOF
6232
6233fi
6234
6235
6236
6237 if test $ac_cv_header_sys_mkdev_h = no; then
6238 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006239 { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6240echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006241if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006242 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006243fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006244{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6245echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006246else
6247 # Is the header compilable?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006248{ echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6249echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006250cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006251/* confdefs.h. */
6252_ACEOF
6253cat confdefs.h >>conftest.$ac_ext
6254cat >>conftest.$ac_ext <<_ACEOF
6255/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006256$ac_includes_default
6257#include <sys/sysmacros.h>
6258_ACEOF
6259rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006260if { (ac_try="$ac_compile"
6261case "(($ac_try" in
6262 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6263 *) ac_try_echo=$ac_try;;
6264esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006265eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006266 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006267 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006268 grep -v '^ *+' conftest.er1 >conftest.err
6269 rm -f conftest.er1
6270 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006272 (exit $ac_status); } && {
6273 test -z "$ac_c_werror_flag" ||
6274 test ! -s conftest.err
6275 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006276 ac_header_compiler=yes
6277else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006278 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006279sed 's/^/| /' conftest.$ac_ext >&5
6280
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006281 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006282fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006283
6284rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006285{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6286echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006287
6288# Is the header present?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006289{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6290echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006291cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006292/* confdefs.h. */
6293_ACEOF
6294cat confdefs.h >>conftest.$ac_ext
6295cat >>conftest.$ac_ext <<_ACEOF
6296/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006297#include <sys/sysmacros.h>
6298_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006299if { (ac_try="$ac_cpp conftest.$ac_ext"
6300case "(($ac_try" in
6301 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6302 *) ac_try_echo=$ac_try;;
6303esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006304eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006305 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006306 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006307 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006308 rm -f conftest.er1
6309 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006311 (exit $ac_status); } >/dev/null && {
6312 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6313 test ! -s conftest.err
6314 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006315 ac_header_preproc=yes
6316else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006317 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006318sed 's/^/| /' conftest.$ac_ext >&5
6319
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006320 ac_header_preproc=no
6321fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006322
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006323rm -f conftest.err conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006324{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6325echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006326
6327# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006328case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6329 yes:no: )
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006330 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6331echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6332 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6333echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006334 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006335 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006336 no:yes:* )
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006337 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6338echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
6339 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6340echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6341 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6342echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6343 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6344echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
6345 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6346echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
6347 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6348echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006349 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00006350## -------------------------------------- ##
6351## Report this to http://bugs.python.org/ ##
6352## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006353_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006354 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006355 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006356esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006357{ echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6358echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006359if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006360 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006361else
6362 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6363fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006364{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6365echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006366
6367fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006368if test $ac_cv_header_sys_sysmacros_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006369
6370cat >>confdefs.h <<\_ACEOF
6371#define MAJOR_IN_SYSMACROS 1
6372_ACEOF
6373
6374fi
6375
6376
6377 fi
6378fi
6379
Michael W. Hudson54241132001-12-07 15:38:26 +00006380
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006381# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006382
6383for ac_header in term.h
6384do
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006385as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6386{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6387echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006388if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006389 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006390else
6391 cat >conftest.$ac_ext <<_ACEOF
6392/* confdefs.h. */
6393_ACEOF
6394cat confdefs.h >>conftest.$ac_ext
6395cat >>conftest.$ac_ext <<_ACEOF
6396/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006397
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006398#ifdef HAVE_CURSES_H
6399#include <curses.h>
6400#endif
6401
6402
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006403#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006404_ACEOF
6405rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006406if { (ac_try="$ac_compile"
6407case "(($ac_try" in
6408 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6409 *) ac_try_echo=$ac_try;;
6410esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006411eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006412 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006413 ac_status=$?
6414 grep -v '^ *+' conftest.er1 >conftest.err
6415 rm -f conftest.er1
6416 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006418 (exit $ac_status); } && {
6419 test -z "$ac_c_werror_flag" ||
6420 test ! -s conftest.err
6421 } && test -s conftest.$ac_objext; then
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006422 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006423else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006424 echo "$as_me: failed program was:" >&5
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006425sed 's/^/| /' conftest.$ac_ext >&5
6426
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006427 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006428fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006429
6430rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006431fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006432ac_res=`eval echo '${'$as_ac_Header'}'`
6433 { echo "$as_me:$LINENO: result: $ac_res" >&5
6434echo "${ECHO_T}$ac_res" >&6; }
6435if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006436 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006437#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006438_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006439
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006440fi
6441
6442done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006443
6444
Martin v. Löwis11017b12006-01-14 18:12:57 +00006445# On Linux, netlink.h requires asm/types.h
6446
6447for ac_header in linux/netlink.h
6448do
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006449as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6450{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6451echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006452if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006453 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11017b12006-01-14 18:12:57 +00006454else
6455 cat >conftest.$ac_ext <<_ACEOF
6456/* confdefs.h. */
6457_ACEOF
6458cat confdefs.h >>conftest.$ac_ext
6459cat >>conftest.$ac_ext <<_ACEOF
6460/* end confdefs.h. */
6461
6462#ifdef HAVE_ASM_TYPES_H
6463#include <asm/types.h>
6464#endif
6465#ifdef HAVE_SYS_SOCKET_H
6466#include <sys/socket.h>
6467#endif
6468
6469
6470#include <$ac_header>
6471_ACEOF
6472rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006473if { (ac_try="$ac_compile"
6474case "(($ac_try" in
6475 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6476 *) ac_try_echo=$ac_try;;
6477esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006478eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006479 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006480 ac_status=$?
6481 grep -v '^ *+' conftest.er1 >conftest.err
6482 rm -f conftest.er1
6483 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006485 (exit $ac_status); } && {
6486 test -z "$ac_c_werror_flag" ||
6487 test ! -s conftest.err
6488 } && test -s conftest.$ac_objext; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006489 eval "$as_ac_Header=yes"
6490else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006491 echo "$as_me: failed program was:" >&5
Martin v. Löwis11017b12006-01-14 18:12:57 +00006492sed 's/^/| /' conftest.$ac_ext >&5
6493
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006494 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00006495fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006496
6497rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00006498fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006499ac_res=`eval echo '${'$as_ac_Header'}'`
6500 { echo "$as_me:$LINENO: result: $ac_res" >&5
6501echo "${ECHO_T}$ac_res" >&6; }
6502if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006503 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006504#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006505_ACEOF
6506
6507fi
6508
6509done
6510
6511
Guido van Rossum627b2d71993-12-24 10:39:16 +00006512# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006513was_it_defined=no
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006514{ echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
6515echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006516cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006517/* confdefs.h. */
6518_ACEOF
6519cat confdefs.h >>conftest.$ac_ext
6520cat >>conftest.$ac_ext <<_ACEOF
6521/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006522#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006523
6524_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006525if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006526 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006527 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006528else
Martin v. Löwis11437992002-04-12 09:54:03 +00006529
6530
6531cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006532#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00006533_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006534
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006535
Guido van Rossum627b2d71993-12-24 10:39:16 +00006536fi
Jesus Cea0f752ee2010-04-28 12:03:06 +00006537rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006538
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006539{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
6540echo "${ECHO_T}$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006541
Neal Norwitz11690112002-07-30 01:08:28 +00006542# Check whether using makedev requires defining _OSF_SOURCE
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006543{ echo "$as_me:$LINENO: checking for makedev" >&5
6544echo $ECHO_N "checking for makedev... $ECHO_C" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006545cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006546/* confdefs.h. */
6547_ACEOF
6548cat confdefs.h >>conftest.$ac_ext
6549cat >>conftest.$ac_ext <<_ACEOF
6550/* end confdefs.h. */
Jesus Cea0f752ee2010-04-28 12:03:06 +00006551
6552#if defined(MAJOR_IN_MKDEV)
6553#include <sys/mkdev.h>
6554#elif defined(MAJOR_IN_SYSMACROS)
6555#include <sys/sysmacros.h>
6556#else
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006557#include <sys/types.h>
Jesus Cea0f752ee2010-04-28 12:03:06 +00006558#endif
Neal Norwitz11690112002-07-30 01:08:28 +00006559int
6560main ()
6561{
6562 makedev(0, 0)
6563 ;
6564 return 0;
6565}
6566_ACEOF
6567rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006568if { (ac_try="$ac_link"
6569case "(($ac_try" in
6570 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6571 *) ac_try_echo=$ac_try;;
6572esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006573eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006574 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006575 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006576 grep -v '^ *+' conftest.er1 >conftest.err
6577 rm -f conftest.er1
6578 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006580 (exit $ac_status); } && {
6581 test -z "$ac_c_werror_flag" ||
6582 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006583 } && test -s conftest$ac_exeext &&
6584 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006585 ac_cv_has_makedev=yes
6586else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006587 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006588sed 's/^/| /' conftest.$ac_ext >&5
6589
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006590 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006591fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006592
6593rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006594 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006595if test "$ac_cv_has_makedev" = "no"; then
6596 # we didn't link, try if _OSF_SOURCE will allow us to link
6597 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006598/* confdefs.h. */
6599_ACEOF
6600cat confdefs.h >>conftest.$ac_ext
6601cat >>conftest.$ac_ext <<_ACEOF
6602/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006603
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006604#define _OSF_SOURCE 1
6605#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006606
Neal Norwitz11690112002-07-30 01:08:28 +00006607int
6608main ()
6609{
6610 makedev(0, 0)
6611 ;
6612 return 0;
6613}
6614_ACEOF
6615rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006616if { (ac_try="$ac_link"
6617case "(($ac_try" in
6618 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6619 *) ac_try_echo=$ac_try;;
6620esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006621eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006622 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006623 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006624 grep -v '^ *+' conftest.er1 >conftest.err
6625 rm -f conftest.er1
6626 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006628 (exit $ac_status); } && {
6629 test -z "$ac_c_werror_flag" ||
6630 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006631 } && test -s conftest$ac_exeext &&
6632 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006633 ac_cv_has_makedev=yes
6634else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006635 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006636sed 's/^/| /' conftest.$ac_ext >&5
6637
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006638 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006639fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006640
6641rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006642 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006643 if test "$ac_cv_has_makedev" = "yes"; then
6644
6645cat >>confdefs.h <<\_ACEOF
6646#define _OSF_SOURCE 1
6647_ACEOF
6648
6649 fi
6650fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006651{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
6652echo "${ECHO_T}$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006653if test "$ac_cv_has_makedev" = "yes"; then
6654
6655cat >>confdefs.h <<\_ACEOF
6656#define HAVE_MAKEDEV 1
6657_ACEOF
6658
6659fi
6660
Martin v. Löwis399a6892002-10-04 10:22:02 +00006661# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6662# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6663# defined, but the compiler does not support pragma redefine_extname,
6664# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6665# structures (such as rlimit64) without declaring them. As a
6666# work-around, disable LFS on such configurations
6667
6668use_lfs=yes
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006669{ echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
6670echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006671cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006672/* confdefs.h. */
6673_ACEOF
6674cat confdefs.h >>conftest.$ac_ext
6675cat >>conftest.$ac_ext <<_ACEOF
6676/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006677
6678#define _LARGEFILE_SOURCE 1
6679#define _FILE_OFFSET_BITS 64
6680#include <sys/resource.h>
6681
Martin v. Löwis399a6892002-10-04 10:22:02 +00006682int
6683main ()
6684{
6685struct rlimit foo;
6686 ;
6687 return 0;
6688}
6689_ACEOF
6690rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006691if { (ac_try="$ac_compile"
6692case "(($ac_try" in
6693 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6694 *) ac_try_echo=$ac_try;;
6695esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006696eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006697 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00006698 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006699 grep -v '^ *+' conftest.er1 >conftest.err
6700 rm -f conftest.er1
6701 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006703 (exit $ac_status); } && {
6704 test -z "$ac_c_werror_flag" ||
6705 test ! -s conftest.err
6706 } && test -s conftest.$ac_objext; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00006707 sol_lfs_bug=no
6708else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006709 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006710sed 's/^/| /' conftest.$ac_ext >&5
6711
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006712 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006713fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006714
6715rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006716{ echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
6717echo "${ECHO_T}$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006718if test "$sol_lfs_bug" = "yes"; then
6719 use_lfs=no
6720fi
6721
6722if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006723# Two defines needed to enable largefile support on various platforms
6724# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006725
Martin v. Löwis11437992002-04-12 09:54:03 +00006726cat >>confdefs.h <<\_ACEOF
6727#define _LARGEFILE_SOURCE 1
6728_ACEOF
6729
6730
6731cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006732#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00006733_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006734
Martin v. Löwis399a6892002-10-04 10:22:02 +00006735fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006736
Guido van Rossum84e7b241996-08-19 21:59:00 +00006737# Add some code to confdefs.h so that the test for off_t works on SCO
6738cat >> confdefs.h <<\EOF
6739#if defined(SCO_DS)
6740#undef _OFF_T
6741#endif
6742EOF
6743
Guido van Rossumef2255b2000-03-10 22:30:29 +00006744# Type availability checks
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006745{ echo "$as_me:$LINENO: checking for mode_t" >&5
6746echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006747if test "${ac_cv_type_mode_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006748 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006749else
Benjamin Petersona8332062009-09-11 22:36:27 +00006750 cat >conftest.$ac_ext <<_ACEOF
6751/* confdefs.h. */
6752_ACEOF
6753cat confdefs.h >>conftest.$ac_ext
6754cat >>conftest.$ac_ext <<_ACEOF
6755/* end confdefs.h. */
6756$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006757typedef mode_t ac__type_new_;
Benjamin Petersona8332062009-09-11 22:36:27 +00006758int
6759main ()
6760{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006761if ((ac__type_new_ *) 0)
6762 return 0;
6763if (sizeof (ac__type_new_))
6764 return 0;
Benjamin Petersona8332062009-09-11 22:36:27 +00006765 ;
6766 return 0;
6767}
6768_ACEOF
6769rm -f conftest.$ac_objext
6770if { (ac_try="$ac_compile"
6771case "(($ac_try" in
6772 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6773 *) ac_try_echo=$ac_try;;
6774esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006775eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00006776 (eval "$ac_compile") 2>conftest.er1
6777 ac_status=$?
6778 grep -v '^ *+' conftest.er1 >conftest.err
6779 rm -f conftest.er1
6780 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00006782 (exit $ac_status); } && {
6783 test -z "$ac_c_werror_flag" ||
6784 test ! -s conftest.err
6785 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006786 ac_cv_type_mode_t=yes
Jack Jansendd19cf82001-12-06 22:36:17 +00006787else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006788 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006789sed 's/^/| /' conftest.$ac_ext >&5
6790
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006791 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00006792fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006793
6794rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006795fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006796{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
6797echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
6798if test $ac_cv_type_mode_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006799 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006800else
Martin v. Löwis11437992002-04-12 09:54:03 +00006801
6802cat >>confdefs.h <<_ACEOF
6803#define mode_t int
6804_ACEOF
6805
6806fi
6807
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006808{ echo "$as_me:$LINENO: checking for off_t" >&5
6809echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006810if test "${ac_cv_type_off_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006811 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006812else
Benjamin Petersona8332062009-09-11 22:36:27 +00006813 cat >conftest.$ac_ext <<_ACEOF
6814/* confdefs.h. */
6815_ACEOF
6816cat confdefs.h >>conftest.$ac_ext
6817cat >>conftest.$ac_ext <<_ACEOF
6818/* end confdefs.h. */
6819$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006820typedef off_t ac__type_new_;
Benjamin Petersona8332062009-09-11 22:36:27 +00006821int
6822main ()
6823{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006824if ((ac__type_new_ *) 0)
6825 return 0;
6826if (sizeof (ac__type_new_))
6827 return 0;
Benjamin Petersona8332062009-09-11 22:36:27 +00006828 ;
6829 return 0;
6830}
6831_ACEOF
6832rm -f conftest.$ac_objext
6833if { (ac_try="$ac_compile"
6834case "(($ac_try" in
6835 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6836 *) ac_try_echo=$ac_try;;
6837esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006838eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00006839 (eval "$ac_compile") 2>conftest.er1
6840 ac_status=$?
6841 grep -v '^ *+' conftest.er1 >conftest.err
6842 rm -f conftest.er1
6843 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00006845 (exit $ac_status); } && {
6846 test -z "$ac_c_werror_flag" ||
6847 test ! -s conftest.err
6848 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006849 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006850else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006851 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006852sed 's/^/| /' conftest.$ac_ext >&5
6853
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006854 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006855fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006856
6857rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006858fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006859{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6860echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
6861if test $ac_cv_type_off_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006862 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006863else
Martin v. Löwis11437992002-04-12 09:54:03 +00006864
6865cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006866#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006867_ACEOF
6868
6869fi
6870
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006871{ echo "$as_me:$LINENO: checking for pid_t" >&5
6872echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006873if test "${ac_cv_type_pid_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006874 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006875else
Benjamin Petersona8332062009-09-11 22:36:27 +00006876 cat >conftest.$ac_ext <<_ACEOF
6877/* confdefs.h. */
6878_ACEOF
6879cat confdefs.h >>conftest.$ac_ext
6880cat >>conftest.$ac_ext <<_ACEOF
6881/* end confdefs.h. */
6882$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006883typedef pid_t ac__type_new_;
Benjamin Petersona8332062009-09-11 22:36:27 +00006884int
6885main ()
6886{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006887if ((ac__type_new_ *) 0)
6888 return 0;
6889if (sizeof (ac__type_new_))
6890 return 0;
Benjamin Petersona8332062009-09-11 22:36:27 +00006891 ;
6892 return 0;
6893}
6894_ACEOF
6895rm -f conftest.$ac_objext
6896if { (ac_try="$ac_compile"
6897case "(($ac_try" in
6898 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6899 *) ac_try_echo=$ac_try;;
6900esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006901eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00006902 (eval "$ac_compile") 2>conftest.er1
6903 ac_status=$?
6904 grep -v '^ *+' conftest.er1 >conftest.err
6905 rm -f conftest.er1
6906 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00006908 (exit $ac_status); } && {
6909 test -z "$ac_c_werror_flag" ||
6910 test ! -s conftest.err
6911 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006912 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006913else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006914 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006915sed 's/^/| /' conftest.$ac_ext >&5
6916
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006917 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006918fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006919
6920rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006921fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006922{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
6923echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
6924if test $ac_cv_type_pid_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006925 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006926else
Martin v. Löwis11437992002-04-12 09:54:03 +00006927
6928cat >>confdefs.h <<_ACEOF
6929#define pid_t int
6930_ACEOF
6931
6932fi
6933
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006934{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
6935echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006936if test "${ac_cv_type_signal+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006937 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006938else
6939 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006940/* confdefs.h. */
6941_ACEOF
6942cat confdefs.h >>conftest.$ac_ext
6943cat >>conftest.$ac_ext <<_ACEOF
6944/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00006945#include <sys/types.h>
6946#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006947
Martin v. Löwis11437992002-04-12 09:54:03 +00006948int
6949main ()
6950{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006951return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00006952 ;
6953 return 0;
6954}
6955_ACEOF
6956rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006957if { (ac_try="$ac_compile"
6958case "(($ac_try" in
6959 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6960 *) ac_try_echo=$ac_try;;
6961esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006962eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006963 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006964 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006965 grep -v '^ *+' conftest.er1 >conftest.err
6966 rm -f conftest.er1
6967 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006969 (exit $ac_status); } && {
6970 test -z "$ac_c_werror_flag" ||
6971 test ! -s conftest.err
6972 } && test -s conftest.$ac_objext; then
6973 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00006974else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006975 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006976sed 's/^/| /' conftest.$ac_ext >&5
6977
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006978 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00006979fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006980
6981rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006982fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006983{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
6984echo "${ECHO_T}$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006985
Martin v. Löwis11437992002-04-12 09:54:03 +00006986cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006987#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00006988_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006989
Michael W. Hudson54241132001-12-07 15:38:26 +00006990
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006991{ echo "$as_me:$LINENO: checking for size_t" >&5
6992echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006993if test "${ac_cv_type_size_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006994 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006995else
Benjamin Petersona8332062009-09-11 22:36:27 +00006996 cat >conftest.$ac_ext <<_ACEOF
6997/* confdefs.h. */
6998_ACEOF
6999cat confdefs.h >>conftest.$ac_ext
7000cat >>conftest.$ac_ext <<_ACEOF
7001/* end confdefs.h. */
7002$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007003typedef size_t ac__type_new_;
Benjamin Petersona8332062009-09-11 22:36:27 +00007004int
7005main ()
7006{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007007if ((ac__type_new_ *) 0)
7008 return 0;
7009if (sizeof (ac__type_new_))
7010 return 0;
Benjamin Petersona8332062009-09-11 22:36:27 +00007011 ;
7012 return 0;
7013}
7014_ACEOF
7015rm -f conftest.$ac_objext
7016if { (ac_try="$ac_compile"
7017case "(($ac_try" in
7018 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7019 *) ac_try_echo=$ac_try;;
7020esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007021eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00007022 (eval "$ac_compile") 2>conftest.er1
7023 ac_status=$?
7024 grep -v '^ *+' conftest.er1 >conftest.err
7025 rm -f conftest.er1
7026 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00007028 (exit $ac_status); } && {
7029 test -z "$ac_c_werror_flag" ||
7030 test ! -s conftest.err
7031 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007032 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007033else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007034 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007035sed 's/^/| /' conftest.$ac_ext >&5
7036
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007037 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007038fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007039
7040rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007041fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007042{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
7043echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
7044if test $ac_cv_type_size_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007045 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007046else
Martin v. Löwis11437992002-04-12 09:54:03 +00007047
7048cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007049#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007050_ACEOF
7051
7052fi
7053
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007054{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
7055echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007056if test "${ac_cv_type_uid_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007057 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007058else
7059 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007060/* confdefs.h. */
7061_ACEOF
7062cat confdefs.h >>conftest.$ac_ext
7063cat >>conftest.$ac_ext <<_ACEOF
7064/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007065#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007066
7067_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007068if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00007069 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007070 ac_cv_type_uid_t=yes
7071else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007072 ac_cv_type_uid_t=no
7073fi
Jesus Cea0f752ee2010-04-28 12:03:06 +00007074rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007075
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007076fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007077{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
7078echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007079if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007080
Martin v. Löwis11437992002-04-12 09:54:03 +00007081cat >>confdefs.h <<\_ACEOF
7082#define uid_t int
7083_ACEOF
7084
7085
7086cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007087#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00007088_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007089
7090fi
7091
Mark Dickinsonbd792642009-03-18 20:06:12 +00007092
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007093 { echo "$as_me:$LINENO: checking for uint32_t" >&5
7094echo $ECHO_N "checking for uint32_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007095if test "${ac_cv_c_uint32_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007096 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007097else
7098 ac_cv_c_uint32_t=no
7099 for ac_type in 'uint32_t' 'unsigned int' 'unsigned long int' \
7100 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7101 cat >conftest.$ac_ext <<_ACEOF
7102/* confdefs.h. */
7103_ACEOF
7104cat confdefs.h >>conftest.$ac_ext
7105cat >>conftest.$ac_ext <<_ACEOF
7106/* end confdefs.h. */
7107$ac_includes_default
7108int
7109main ()
7110{
7111static int test_array [1 - 2 * !(($ac_type) -1 >> (32 - 1) == 1)];
7112test_array [0] = 0
7113
7114 ;
7115 return 0;
7116}
7117_ACEOF
7118rm -f conftest.$ac_objext
7119if { (ac_try="$ac_compile"
7120case "(($ac_try" in
7121 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7122 *) ac_try_echo=$ac_try;;
7123esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007124eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007125 (eval "$ac_compile") 2>conftest.er1
7126 ac_status=$?
7127 grep -v '^ *+' conftest.er1 >conftest.err
7128 rm -f conftest.er1
7129 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007131 (exit $ac_status); } && {
7132 test -z "$ac_c_werror_flag" ||
7133 test ! -s conftest.err
7134 } && test -s conftest.$ac_objext; then
7135 case $ac_type in
7136 uint32_t) ac_cv_c_uint32_t=yes ;;
7137 *) ac_cv_c_uint32_t=$ac_type ;;
7138esac
7139
7140else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007141 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007142sed 's/^/| /' conftest.$ac_ext >&5
7143
7144
7145fi
7146
7147rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7148 test "$ac_cv_c_uint32_t" != no && break
7149 done
7150fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007151{ echo "$as_me:$LINENO: result: $ac_cv_c_uint32_t" >&5
7152echo "${ECHO_T}$ac_cv_c_uint32_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007153 case $ac_cv_c_uint32_t in #(
7154 no|yes) ;; #(
7155 *)
7156
7157cat >>confdefs.h <<\_ACEOF
7158#define _UINT32_T 1
7159_ACEOF
7160
7161
7162cat >>confdefs.h <<_ACEOF
7163#define uint32_t $ac_cv_c_uint32_t
7164_ACEOF
7165;;
7166 esac
7167
7168
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007169 { echo "$as_me:$LINENO: checking for uint64_t" >&5
7170echo $ECHO_N "checking for uint64_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007171if test "${ac_cv_c_uint64_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007172 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007173else
7174 ac_cv_c_uint64_t=no
7175 for ac_type in 'uint64_t' 'unsigned int' 'unsigned long int' \
7176 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7177 cat >conftest.$ac_ext <<_ACEOF
7178/* confdefs.h. */
7179_ACEOF
7180cat confdefs.h >>conftest.$ac_ext
7181cat >>conftest.$ac_ext <<_ACEOF
7182/* end confdefs.h. */
7183$ac_includes_default
7184int
7185main ()
7186{
7187static int test_array [1 - 2 * !(($ac_type) -1 >> (64 - 1) == 1)];
7188test_array [0] = 0
7189
7190 ;
7191 return 0;
7192}
7193_ACEOF
7194rm -f conftest.$ac_objext
7195if { (ac_try="$ac_compile"
7196case "(($ac_try" in
7197 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7198 *) ac_try_echo=$ac_try;;
7199esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007200eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007201 (eval "$ac_compile") 2>conftest.er1
7202 ac_status=$?
7203 grep -v '^ *+' conftest.er1 >conftest.err
7204 rm -f conftest.er1
7205 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007207 (exit $ac_status); } && {
7208 test -z "$ac_c_werror_flag" ||
7209 test ! -s conftest.err
7210 } && test -s conftest.$ac_objext; then
7211 case $ac_type in
7212 uint64_t) ac_cv_c_uint64_t=yes ;;
7213 *) ac_cv_c_uint64_t=$ac_type ;;
7214esac
7215
7216else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007217 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007218sed 's/^/| /' conftest.$ac_ext >&5
7219
7220
7221fi
7222
7223rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7224 test "$ac_cv_c_uint64_t" != no && break
7225 done
7226fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007227{ echo "$as_me:$LINENO: result: $ac_cv_c_uint64_t" >&5
7228echo "${ECHO_T}$ac_cv_c_uint64_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007229 case $ac_cv_c_uint64_t in #(
7230 no|yes) ;; #(
7231 *)
7232
7233cat >>confdefs.h <<\_ACEOF
7234#define _UINT64_T 1
7235_ACEOF
7236
7237
7238cat >>confdefs.h <<_ACEOF
7239#define uint64_t $ac_cv_c_uint64_t
7240_ACEOF
7241;;
7242 esac
7243
7244
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007245 { echo "$as_me:$LINENO: checking for int32_t" >&5
7246echo $ECHO_N "checking for int32_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007247if test "${ac_cv_c_int32_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007248 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007249else
7250 ac_cv_c_int32_t=no
7251 for ac_type in 'int32_t' 'int' 'long int' \
7252 'long long int' 'short int' 'signed char'; do
7253 cat >conftest.$ac_ext <<_ACEOF
7254/* confdefs.h. */
7255_ACEOF
7256cat confdefs.h >>conftest.$ac_ext
7257cat >>conftest.$ac_ext <<_ACEOF
7258/* end confdefs.h. */
7259$ac_includes_default
7260int
7261main ()
7262{
7263static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1))];
7264test_array [0] = 0
7265
7266 ;
7267 return 0;
7268}
7269_ACEOF
7270rm -f conftest.$ac_objext
7271if { (ac_try="$ac_compile"
7272case "(($ac_try" in
7273 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7274 *) ac_try_echo=$ac_try;;
7275esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007276eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007277 (eval "$ac_compile") 2>conftest.er1
7278 ac_status=$?
7279 grep -v '^ *+' conftest.er1 >conftest.err
7280 rm -f conftest.er1
7281 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007283 (exit $ac_status); } && {
7284 test -z "$ac_c_werror_flag" ||
7285 test ! -s conftest.err
7286 } && test -s conftest.$ac_objext; then
7287 cat >conftest.$ac_ext <<_ACEOF
7288/* confdefs.h. */
7289_ACEOF
7290cat confdefs.h >>conftest.$ac_ext
7291cat >>conftest.$ac_ext <<_ACEOF
7292/* end confdefs.h. */
7293$ac_includes_default
7294int
7295main ()
7296{
7297static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007298 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 2))];
Mark Dickinsonbd792642009-03-18 20:06:12 +00007299test_array [0] = 0
7300
7301 ;
7302 return 0;
7303}
7304_ACEOF
7305rm -f conftest.$ac_objext
7306if { (ac_try="$ac_compile"
7307case "(($ac_try" in
7308 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7309 *) ac_try_echo=$ac_try;;
7310esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007311eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007312 (eval "$ac_compile") 2>conftest.er1
7313 ac_status=$?
7314 grep -v '^ *+' conftest.er1 >conftest.err
7315 rm -f conftest.er1
7316 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007318 (exit $ac_status); } && {
7319 test -z "$ac_c_werror_flag" ||
7320 test ! -s conftest.err
7321 } && test -s conftest.$ac_objext; then
7322 :
7323else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007324 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007325sed 's/^/| /' conftest.$ac_ext >&5
7326
7327 case $ac_type in
7328 int32_t) ac_cv_c_int32_t=yes ;;
7329 *) ac_cv_c_int32_t=$ac_type ;;
7330esac
7331
7332fi
7333
7334rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7335else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007336 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007337sed 's/^/| /' conftest.$ac_ext >&5
7338
7339
7340fi
7341
7342rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7343 test "$ac_cv_c_int32_t" != no && break
7344 done
7345fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007346{ echo "$as_me:$LINENO: result: $ac_cv_c_int32_t" >&5
7347echo "${ECHO_T}$ac_cv_c_int32_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007348 case $ac_cv_c_int32_t in #(
7349 no|yes) ;; #(
7350 *)
7351
7352cat >>confdefs.h <<_ACEOF
7353#define int32_t $ac_cv_c_int32_t
7354_ACEOF
7355;;
7356 esac
7357
7358
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007359 { echo "$as_me:$LINENO: checking for int64_t" >&5
7360echo $ECHO_N "checking for int64_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007361if test "${ac_cv_c_int64_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007362 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007363else
7364 ac_cv_c_int64_t=no
7365 for ac_type in 'int64_t' 'int' 'long int' \
7366 'long long int' 'short int' 'signed char'; do
7367 cat >conftest.$ac_ext <<_ACEOF
7368/* confdefs.h. */
7369_ACEOF
7370cat confdefs.h >>conftest.$ac_ext
7371cat >>conftest.$ac_ext <<_ACEOF
7372/* end confdefs.h. */
7373$ac_includes_default
7374int
7375main ()
7376{
7377static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1))];
7378test_array [0] = 0
7379
7380 ;
7381 return 0;
7382}
7383_ACEOF
7384rm -f conftest.$ac_objext
7385if { (ac_try="$ac_compile"
7386case "(($ac_try" in
7387 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7388 *) ac_try_echo=$ac_try;;
7389esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007390eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007391 (eval "$ac_compile") 2>conftest.er1
7392 ac_status=$?
7393 grep -v '^ *+' conftest.er1 >conftest.err
7394 rm -f conftest.er1
7395 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007397 (exit $ac_status); } && {
7398 test -z "$ac_c_werror_flag" ||
7399 test ! -s conftest.err
7400 } && test -s conftest.$ac_objext; then
7401 cat >conftest.$ac_ext <<_ACEOF
7402/* confdefs.h. */
7403_ACEOF
7404cat confdefs.h >>conftest.$ac_ext
7405cat >>conftest.$ac_ext <<_ACEOF
7406/* end confdefs.h. */
7407$ac_includes_default
7408int
7409main ()
7410{
7411static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007412 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 2))];
Mark Dickinsonbd792642009-03-18 20:06:12 +00007413test_array [0] = 0
7414
7415 ;
7416 return 0;
7417}
7418_ACEOF
7419rm -f conftest.$ac_objext
7420if { (ac_try="$ac_compile"
7421case "(($ac_try" in
7422 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7423 *) ac_try_echo=$ac_try;;
7424esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007425eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007426 (eval "$ac_compile") 2>conftest.er1
7427 ac_status=$?
7428 grep -v '^ *+' conftest.er1 >conftest.err
7429 rm -f conftest.er1
7430 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007432 (exit $ac_status); } && {
7433 test -z "$ac_c_werror_flag" ||
7434 test ! -s conftest.err
7435 } && test -s conftest.$ac_objext; then
7436 :
7437else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007438 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007439sed 's/^/| /' conftest.$ac_ext >&5
7440
7441 case $ac_type in
7442 int64_t) ac_cv_c_int64_t=yes ;;
7443 *) ac_cv_c_int64_t=$ac_type ;;
7444esac
7445
7446fi
7447
7448rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7449else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007450 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007451sed 's/^/| /' conftest.$ac_ext >&5
7452
7453
7454fi
7455
7456rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7457 test "$ac_cv_c_int64_t" != no && break
7458 done
7459fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007460{ echo "$as_me:$LINENO: result: $ac_cv_c_int64_t" >&5
7461echo "${ECHO_T}$ac_cv_c_int64_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007462 case $ac_cv_c_int64_t in #(
7463 no|yes) ;; #(
7464 *)
7465
7466cat >>confdefs.h <<_ACEOF
7467#define int64_t $ac_cv_c_int64_t
7468_ACEOF
7469;;
7470 esac
7471
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007472{ echo "$as_me:$LINENO: checking for ssize_t" >&5
7473echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00007474if test "${ac_cv_type_ssize_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007475 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007476else
Benjamin Petersona8332062009-09-11 22:36:27 +00007477 cat >conftest.$ac_ext <<_ACEOF
7478/* confdefs.h. */
7479_ACEOF
7480cat confdefs.h >>conftest.$ac_ext
7481cat >>conftest.$ac_ext <<_ACEOF
7482/* end confdefs.h. */
7483$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007484typedef ssize_t ac__type_new_;
Benjamin Petersona8332062009-09-11 22:36:27 +00007485int
7486main ()
7487{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007488if ((ac__type_new_ *) 0)
7489 return 0;
7490if (sizeof (ac__type_new_))
7491 return 0;
Benjamin Petersona8332062009-09-11 22:36:27 +00007492 ;
7493 return 0;
7494}
7495_ACEOF
7496rm -f conftest.$ac_objext
7497if { (ac_try="$ac_compile"
7498case "(($ac_try" in
7499 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7500 *) ac_try_echo=$ac_try;;
7501esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007502eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00007503 (eval "$ac_compile") 2>conftest.er1
7504 ac_status=$?
7505 grep -v '^ *+' conftest.er1 >conftest.err
7506 rm -f conftest.er1
7507 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00007509 (exit $ac_status); } && {
7510 test -z "$ac_c_werror_flag" ||
7511 test ! -s conftest.err
7512 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007513 ac_cv_type_ssize_t=yes
Martin v. Löwis18e16552006-02-15 17:27:45 +00007514else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007515 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +00007516sed 's/^/| /' conftest.$ac_ext >&5
7517
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007518 ac_cv_type_ssize_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00007519fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007520
7521rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00007522fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007523{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
7524echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
7525if test $ac_cv_type_ssize_t = yes; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00007526
7527cat >>confdefs.h <<\_ACEOF
7528#define HAVE_SSIZE_T 1
7529_ACEOF
7530
7531fi
7532
Jack Jansendd19cf82001-12-06 22:36:17 +00007533
Michael W. Hudson54241132001-12-07 15:38:26 +00007534# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007535# ANSI C requires sizeof(char) == 1, so no need to check it
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007536{ echo "$as_me:$LINENO: checking for int" >&5
7537echo $ECHO_N "checking for int... $ECHO_C" >&6; }
7538if test "${ac_cv_type_int+set}" = set; then
7539 echo $ECHO_N "(cached) $ECHO_C" >&6
7540else
7541 cat >conftest.$ac_ext <<_ACEOF
7542/* confdefs.h. */
7543_ACEOF
7544cat confdefs.h >>conftest.$ac_ext
7545cat >>conftest.$ac_ext <<_ACEOF
7546/* end confdefs.h. */
7547$ac_includes_default
7548typedef int ac__type_new_;
7549int
7550main ()
7551{
7552if ((ac__type_new_ *) 0)
7553 return 0;
7554if (sizeof (ac__type_new_))
7555 return 0;
7556 ;
7557 return 0;
7558}
7559_ACEOF
7560rm -f conftest.$ac_objext
7561if { (ac_try="$ac_compile"
7562case "(($ac_try" in
7563 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7564 *) ac_try_echo=$ac_try;;
7565esac
7566eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7567 (eval "$ac_compile") 2>conftest.er1
7568 ac_status=$?
7569 grep -v '^ *+' conftest.er1 >conftest.err
7570 rm -f conftest.er1
7571 cat conftest.err >&5
7572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7573 (exit $ac_status); } && {
7574 test -z "$ac_c_werror_flag" ||
7575 test ! -s conftest.err
7576 } && test -s conftest.$ac_objext; then
7577 ac_cv_type_int=yes
7578else
7579 echo "$as_me: failed program was:" >&5
7580sed 's/^/| /' conftest.$ac_ext >&5
7581
7582 ac_cv_type_int=no
7583fi
7584
7585rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7586fi
7587{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
7588echo "${ECHO_T}$ac_cv_type_int" >&6; }
7589
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007590# The cast to long int works around a bug in the HP C Compiler
7591# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7592# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7593# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007594{ echo "$as_me:$LINENO: checking size of int" >&5
7595echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007596if test "${ac_cv_sizeof_int+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007597 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007598else
Martin v. Löwis11437992002-04-12 09:54:03 +00007599 if test "$cross_compiling" = yes; then
7600 # Depending upon the size, compute the lo and hi bounds.
7601cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007602/* confdefs.h. */
7603_ACEOF
7604cat confdefs.h >>conftest.$ac_ext
7605cat >>conftest.$ac_ext <<_ACEOF
7606/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007607$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007608 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007609int
7610main ()
7611{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007612static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007613test_array [0] = 0
7614
7615 ;
7616 return 0;
7617}
7618_ACEOF
7619rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007620if { (ac_try="$ac_compile"
7621case "(($ac_try" in
7622 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7623 *) ac_try_echo=$ac_try;;
7624esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007625eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007626 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007627 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007628 grep -v '^ *+' conftest.er1 >conftest.err
7629 rm -f conftest.er1
7630 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007632 (exit $ac_status); } && {
7633 test -z "$ac_c_werror_flag" ||
7634 test ! -s conftest.err
7635 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007636 ac_lo=0 ac_mid=0
7637 while :; do
7638 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007639/* confdefs.h. */
7640_ACEOF
7641cat confdefs.h >>conftest.$ac_ext
7642cat >>conftest.$ac_ext <<_ACEOF
7643/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007644$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007645 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007646int
7647main ()
7648{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007649static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007650test_array [0] = 0
7651
7652 ;
7653 return 0;
7654}
7655_ACEOF
7656rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007657if { (ac_try="$ac_compile"
7658case "(($ac_try" in
7659 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7660 *) ac_try_echo=$ac_try;;
7661esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007662eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007663 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007664 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007665 grep -v '^ *+' conftest.er1 >conftest.err
7666 rm -f conftest.er1
7667 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007669 (exit $ac_status); } && {
7670 test -z "$ac_c_werror_flag" ||
7671 test ! -s conftest.err
7672 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007673 ac_hi=$ac_mid; break
7674else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007675 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007676sed 's/^/| /' conftest.$ac_ext >&5
7677
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007678 ac_lo=`expr $ac_mid + 1`
7679 if test $ac_lo -le $ac_mid; then
7680 ac_lo= ac_hi=
7681 break
7682 fi
7683 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007684fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007685
7686rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007687 done
7688else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007689 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007690sed 's/^/| /' conftest.$ac_ext >&5
7691
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007692 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007693/* confdefs.h. */
7694_ACEOF
7695cat confdefs.h >>conftest.$ac_ext
7696cat >>conftest.$ac_ext <<_ACEOF
7697/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007698$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007699 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007700int
7701main ()
7702{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007703static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007704test_array [0] = 0
7705
7706 ;
7707 return 0;
7708}
7709_ACEOF
7710rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007711if { (ac_try="$ac_compile"
7712case "(($ac_try" in
7713 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7714 *) ac_try_echo=$ac_try;;
7715esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007716eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007717 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007718 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007719 grep -v '^ *+' conftest.er1 >conftest.err
7720 rm -f conftest.er1
7721 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007723 (exit $ac_status); } && {
7724 test -z "$ac_c_werror_flag" ||
7725 test ! -s conftest.err
7726 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007727 ac_hi=-1 ac_mid=-1
7728 while :; do
7729 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007730/* confdefs.h. */
7731_ACEOF
7732cat confdefs.h >>conftest.$ac_ext
7733cat >>conftest.$ac_ext <<_ACEOF
7734/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007735$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007736 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007737int
7738main ()
7739{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007740static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007741test_array [0] = 0
7742
7743 ;
7744 return 0;
7745}
7746_ACEOF
7747rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007748if { (ac_try="$ac_compile"
7749case "(($ac_try" in
7750 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7751 *) ac_try_echo=$ac_try;;
7752esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007753eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007754 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007755 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007756 grep -v '^ *+' conftest.er1 >conftest.err
7757 rm -f conftest.er1
7758 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007759 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007760 (exit $ac_status); } && {
7761 test -z "$ac_c_werror_flag" ||
7762 test ! -s conftest.err
7763 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007764 ac_lo=$ac_mid; break
7765else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007766 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007767sed 's/^/| /' conftest.$ac_ext >&5
7768
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007769 ac_hi=`expr '(' $ac_mid ')' - 1`
7770 if test $ac_mid -le $ac_hi; then
7771 ac_lo= ac_hi=
7772 break
7773 fi
7774 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007775fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007776
7777rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007778 done
7779else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007780 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007781sed 's/^/| /' conftest.$ac_ext >&5
7782
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007783 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007784fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007785
7786rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007787fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007788
7789rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007790# Binary search between lo and hi bounds.
7791while test "x$ac_lo" != "x$ac_hi"; do
7792 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7793 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007794/* confdefs.h. */
7795_ACEOF
7796cat confdefs.h >>conftest.$ac_ext
7797cat >>conftest.$ac_ext <<_ACEOF
7798/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007799$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007800 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007801int
7802main ()
7803{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007804static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007805test_array [0] = 0
7806
7807 ;
7808 return 0;
7809}
7810_ACEOF
7811rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007812if { (ac_try="$ac_compile"
7813case "(($ac_try" in
7814 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7815 *) ac_try_echo=$ac_try;;
7816esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007817eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007818 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007819 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007820 grep -v '^ *+' conftest.er1 >conftest.err
7821 rm -f conftest.er1
7822 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007824 (exit $ac_status); } && {
7825 test -z "$ac_c_werror_flag" ||
7826 test ! -s conftest.err
7827 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007828 ac_hi=$ac_mid
7829else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007830 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007831sed 's/^/| /' conftest.$ac_ext >&5
7832
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007833 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007834fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007835
7836rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007837done
7838case $ac_lo in
7839?*) ac_cv_sizeof_int=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007840'') if test "$ac_cv_type_int" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007841 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007842See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007843echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007844See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007845 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007846 else
7847 ac_cv_sizeof_int=0
7848 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007849esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007850else
Martin v. Löwis11437992002-04-12 09:54:03 +00007851 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007852/* confdefs.h. */
7853_ACEOF
7854cat confdefs.h >>conftest.$ac_ext
7855cat >>conftest.$ac_ext <<_ACEOF
7856/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007857$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007858 typedef int ac__type_sizeof_;
7859static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7860static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007861#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007862#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007863int
7864main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007865{
Martin v. Löwis11437992002-04-12 09:54:03 +00007866
7867 FILE *f = fopen ("conftest.val", "w");
7868 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007869 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007870 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007871 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007872 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007873 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007874 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007875 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007876 }
7877 else
7878 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007879 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007880 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007881 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007882 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007883 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007884 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007885
7886 ;
7887 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007888}
Martin v. Löwis11437992002-04-12 09:54:03 +00007889_ACEOF
7890rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007891if { (ac_try="$ac_link"
7892case "(($ac_try" in
7893 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7894 *) ac_try_echo=$ac_try;;
7895esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007896eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007897 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007898 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007900 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007901 { (case "(($ac_try" in
7902 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7903 *) ac_try_echo=$ac_try;;
7904esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007905eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007906 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007907 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007909 (exit $ac_status); }; }; then
7910 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007911else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007912 echo "$as_me: program exited with status $ac_status" >&5
7913echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007914sed 's/^/| /' conftest.$ac_ext >&5
7915
Martin v. Löwis11437992002-04-12 09:54:03 +00007916( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007917if test "$ac_cv_type_int" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007918 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007919See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007920echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007921See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007922 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007923 else
7924 ac_cv_sizeof_int=0
7925 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007926fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007927rm -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 +00007928fi
7929rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007930fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007931{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
7932echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007933
7934
7935
Martin v. Löwis11437992002-04-12 09:54:03 +00007936cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007937#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007938_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007939
7940
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007941{ echo "$as_me:$LINENO: checking for long" >&5
7942echo $ECHO_N "checking for long... $ECHO_C" >&6; }
7943if test "${ac_cv_type_long+set}" = set; then
7944 echo $ECHO_N "(cached) $ECHO_C" >&6
7945else
7946 cat >conftest.$ac_ext <<_ACEOF
7947/* confdefs.h. */
7948_ACEOF
7949cat confdefs.h >>conftest.$ac_ext
7950cat >>conftest.$ac_ext <<_ACEOF
7951/* end confdefs.h. */
7952$ac_includes_default
7953typedef long ac__type_new_;
7954int
7955main ()
7956{
7957if ((ac__type_new_ *) 0)
7958 return 0;
7959if (sizeof (ac__type_new_))
7960 return 0;
7961 ;
7962 return 0;
7963}
7964_ACEOF
7965rm -f conftest.$ac_objext
7966if { (ac_try="$ac_compile"
7967case "(($ac_try" in
7968 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7969 *) ac_try_echo=$ac_try;;
7970esac
7971eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7972 (eval "$ac_compile") 2>conftest.er1
7973 ac_status=$?
7974 grep -v '^ *+' conftest.er1 >conftest.err
7975 rm -f conftest.er1
7976 cat conftest.err >&5
7977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7978 (exit $ac_status); } && {
7979 test -z "$ac_c_werror_flag" ||
7980 test ! -s conftest.err
7981 } && test -s conftest.$ac_objext; then
7982 ac_cv_type_long=yes
7983else
7984 echo "$as_me: failed program was:" >&5
7985sed 's/^/| /' conftest.$ac_ext >&5
7986
7987 ac_cv_type_long=no
7988fi
7989
7990rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7991fi
7992{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
7993echo "${ECHO_T}$ac_cv_type_long" >&6; }
7994
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007995# The cast to long int works around a bug in the HP C Compiler
7996# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7997# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7998# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007999{ echo "$as_me:$LINENO: checking size of long" >&5
8000echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008001if test "${ac_cv_sizeof_long+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008002 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008003else
Martin v. Löwis11437992002-04-12 09:54:03 +00008004 if test "$cross_compiling" = yes; then
8005 # Depending upon the size, compute the lo and hi bounds.
8006cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008007/* confdefs.h. */
8008_ACEOF
8009cat confdefs.h >>conftest.$ac_ext
8010cat >>conftest.$ac_ext <<_ACEOF
8011/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008012$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008013 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008014int
8015main ()
8016{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008017static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008018test_array [0] = 0
8019
8020 ;
8021 return 0;
8022}
8023_ACEOF
8024rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008025if { (ac_try="$ac_compile"
8026case "(($ac_try" in
8027 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8028 *) ac_try_echo=$ac_try;;
8029esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008030eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008031 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008032 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008033 grep -v '^ *+' conftest.er1 >conftest.err
8034 rm -f conftest.er1
8035 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008037 (exit $ac_status); } && {
8038 test -z "$ac_c_werror_flag" ||
8039 test ! -s conftest.err
8040 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008041 ac_lo=0 ac_mid=0
8042 while :; do
8043 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008044/* confdefs.h. */
8045_ACEOF
8046cat confdefs.h >>conftest.$ac_ext
8047cat >>conftest.$ac_ext <<_ACEOF
8048/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008049$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008050 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008051int
8052main ()
8053{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008054static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008055test_array [0] = 0
8056
8057 ;
8058 return 0;
8059}
8060_ACEOF
8061rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008062if { (ac_try="$ac_compile"
8063case "(($ac_try" in
8064 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8065 *) ac_try_echo=$ac_try;;
8066esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008067eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008068 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008069 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008070 grep -v '^ *+' conftest.er1 >conftest.err
8071 rm -f conftest.er1
8072 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008074 (exit $ac_status); } && {
8075 test -z "$ac_c_werror_flag" ||
8076 test ! -s conftest.err
8077 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008078 ac_hi=$ac_mid; break
8079else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008080 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008081sed 's/^/| /' conftest.$ac_ext >&5
8082
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008083 ac_lo=`expr $ac_mid + 1`
8084 if test $ac_lo -le $ac_mid; then
8085 ac_lo= ac_hi=
8086 break
8087 fi
8088 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008089fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008090
8091rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008092 done
8093else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008094 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008095sed 's/^/| /' conftest.$ac_ext >&5
8096
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008097 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008098/* confdefs.h. */
8099_ACEOF
8100cat confdefs.h >>conftest.$ac_ext
8101cat >>conftest.$ac_ext <<_ACEOF
8102/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008103$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008104 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008105int
8106main ()
8107{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008108static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008109test_array [0] = 0
8110
8111 ;
8112 return 0;
8113}
8114_ACEOF
8115rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008116if { (ac_try="$ac_compile"
8117case "(($ac_try" in
8118 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8119 *) ac_try_echo=$ac_try;;
8120esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008121eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008122 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008123 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008124 grep -v '^ *+' conftest.er1 >conftest.err
8125 rm -f conftest.er1
8126 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008128 (exit $ac_status); } && {
8129 test -z "$ac_c_werror_flag" ||
8130 test ! -s conftest.err
8131 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008132 ac_hi=-1 ac_mid=-1
8133 while :; do
8134 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008135/* confdefs.h. */
8136_ACEOF
8137cat confdefs.h >>conftest.$ac_ext
8138cat >>conftest.$ac_ext <<_ACEOF
8139/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008140$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008141 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008142int
8143main ()
8144{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008145static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008146test_array [0] = 0
8147
8148 ;
8149 return 0;
8150}
8151_ACEOF
8152rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008153if { (ac_try="$ac_compile"
8154case "(($ac_try" in
8155 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8156 *) ac_try_echo=$ac_try;;
8157esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008158eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008159 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008160 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008161 grep -v '^ *+' conftest.er1 >conftest.err
8162 rm -f conftest.er1
8163 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008165 (exit $ac_status); } && {
8166 test -z "$ac_c_werror_flag" ||
8167 test ! -s conftest.err
8168 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008169 ac_lo=$ac_mid; break
8170else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008171 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008172sed 's/^/| /' conftest.$ac_ext >&5
8173
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008174 ac_hi=`expr '(' $ac_mid ')' - 1`
8175 if test $ac_mid -le $ac_hi; then
8176 ac_lo= ac_hi=
8177 break
8178 fi
8179 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008180fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008181
8182rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008183 done
8184else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008185 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008186sed 's/^/| /' conftest.$ac_ext >&5
8187
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008188 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008189fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008190
8191rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008192fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008193
8194rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008195# Binary search between lo and hi bounds.
8196while test "x$ac_lo" != "x$ac_hi"; do
8197 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8198 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008199/* confdefs.h. */
8200_ACEOF
8201cat confdefs.h >>conftest.$ac_ext
8202cat >>conftest.$ac_ext <<_ACEOF
8203/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008204$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008205 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008206int
8207main ()
8208{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008209static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008210test_array [0] = 0
8211
8212 ;
8213 return 0;
8214}
8215_ACEOF
8216rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008217if { (ac_try="$ac_compile"
8218case "(($ac_try" in
8219 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8220 *) ac_try_echo=$ac_try;;
8221esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008222eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008223 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008224 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008225 grep -v '^ *+' conftest.er1 >conftest.err
8226 rm -f conftest.er1
8227 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008229 (exit $ac_status); } && {
8230 test -z "$ac_c_werror_flag" ||
8231 test ! -s conftest.err
8232 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008233 ac_hi=$ac_mid
8234else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008235 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008236sed 's/^/| /' conftest.$ac_ext >&5
8237
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008238 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008239fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008240
8241rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008242done
8243case $ac_lo in
8244?*) ac_cv_sizeof_long=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008245'') if test "$ac_cv_type_long" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008246 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008247See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008248echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008249See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008250 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008251 else
8252 ac_cv_sizeof_long=0
8253 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008254esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008255else
Martin v. Löwis11437992002-04-12 09:54:03 +00008256 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008257/* confdefs.h. */
8258_ACEOF
8259cat confdefs.h >>conftest.$ac_ext
8260cat >>conftest.$ac_ext <<_ACEOF
8261/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008262$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008263 typedef long ac__type_sizeof_;
8264static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8265static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008266#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008267#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008268int
8269main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008270{
Martin v. Löwis11437992002-04-12 09:54:03 +00008271
8272 FILE *f = fopen ("conftest.val", "w");
8273 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008274 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008275 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008276 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008277 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008278 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008279 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008280 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008281 }
8282 else
8283 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008284 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008285 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008286 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008287 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008288 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008289 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008290
8291 ;
8292 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008293}
Martin v. Löwis11437992002-04-12 09:54:03 +00008294_ACEOF
8295rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008296if { (ac_try="$ac_link"
8297case "(($ac_try" in
8298 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8299 *) ac_try_echo=$ac_try;;
8300esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008301eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008302 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008303 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008305 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008306 { (case "(($ac_try" in
8307 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8308 *) ac_try_echo=$ac_try;;
8309esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008310eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008311 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008312 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008314 (exit $ac_status); }; }; then
8315 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008316else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008317 echo "$as_me: program exited with status $ac_status" >&5
8318echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008319sed 's/^/| /' conftest.$ac_ext >&5
8320
Martin v. Löwis11437992002-04-12 09:54:03 +00008321( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008322if test "$ac_cv_type_long" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008323 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008324See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008325echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008326See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008327 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008328 else
8329 ac_cv_sizeof_long=0
8330 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008331fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008332rm -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 +00008333fi
8334rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008335fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008336{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
8337echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008338
8339
8340
Martin v. Löwis11437992002-04-12 09:54:03 +00008341cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008342#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008343_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008344
8345
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008346{ echo "$as_me:$LINENO: checking for void *" >&5
8347echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
8348if test "${ac_cv_type_void_p+set}" = set; then
8349 echo $ECHO_N "(cached) $ECHO_C" >&6
8350else
8351 cat >conftest.$ac_ext <<_ACEOF
8352/* confdefs.h. */
8353_ACEOF
8354cat confdefs.h >>conftest.$ac_ext
8355cat >>conftest.$ac_ext <<_ACEOF
8356/* end confdefs.h. */
8357$ac_includes_default
8358typedef void * ac__type_new_;
8359int
8360main ()
8361{
8362if ((ac__type_new_ *) 0)
8363 return 0;
8364if (sizeof (ac__type_new_))
8365 return 0;
8366 ;
8367 return 0;
8368}
8369_ACEOF
8370rm -f conftest.$ac_objext
8371if { (ac_try="$ac_compile"
8372case "(($ac_try" in
8373 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8374 *) ac_try_echo=$ac_try;;
8375esac
8376eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8377 (eval "$ac_compile") 2>conftest.er1
8378 ac_status=$?
8379 grep -v '^ *+' conftest.er1 >conftest.err
8380 rm -f conftest.er1
8381 cat conftest.err >&5
8382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8383 (exit $ac_status); } && {
8384 test -z "$ac_c_werror_flag" ||
8385 test ! -s conftest.err
8386 } && test -s conftest.$ac_objext; then
8387 ac_cv_type_void_p=yes
8388else
8389 echo "$as_me: failed program was:" >&5
8390sed 's/^/| /' conftest.$ac_ext >&5
8391
8392 ac_cv_type_void_p=no
8393fi
8394
8395rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8396fi
8397{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
8398echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
8399
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008400# The cast to long int works around a bug in the HP C Compiler
8401# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8402# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8403# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008404{ echo "$as_me:$LINENO: checking size of void *" >&5
8405echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008406if test "${ac_cv_sizeof_void_p+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008407 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008408else
Martin v. Löwis11437992002-04-12 09:54:03 +00008409 if test "$cross_compiling" = yes; then
8410 # Depending upon the size, compute the lo and hi bounds.
8411cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008412/* confdefs.h. */
8413_ACEOF
8414cat confdefs.h >>conftest.$ac_ext
8415cat >>conftest.$ac_ext <<_ACEOF
8416/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008417$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008418 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008419int
8420main ()
8421{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008422static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008423test_array [0] = 0
8424
8425 ;
8426 return 0;
8427}
8428_ACEOF
8429rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008430if { (ac_try="$ac_compile"
8431case "(($ac_try" in
8432 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8433 *) ac_try_echo=$ac_try;;
8434esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008435eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008436 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008437 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008438 grep -v '^ *+' conftest.er1 >conftest.err
8439 rm -f conftest.er1
8440 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008442 (exit $ac_status); } && {
8443 test -z "$ac_c_werror_flag" ||
8444 test ! -s conftest.err
8445 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008446 ac_lo=0 ac_mid=0
8447 while :; do
8448 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008449/* confdefs.h. */
8450_ACEOF
8451cat confdefs.h >>conftest.$ac_ext
8452cat >>conftest.$ac_ext <<_ACEOF
8453/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008454$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008455 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008456int
8457main ()
8458{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008459static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008460test_array [0] = 0
8461
8462 ;
8463 return 0;
8464}
8465_ACEOF
8466rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008467if { (ac_try="$ac_compile"
8468case "(($ac_try" in
8469 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8470 *) ac_try_echo=$ac_try;;
8471esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008472eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008473 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008474 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008475 grep -v '^ *+' conftest.er1 >conftest.err
8476 rm -f conftest.er1
8477 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008478 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008479 (exit $ac_status); } && {
8480 test -z "$ac_c_werror_flag" ||
8481 test ! -s conftest.err
8482 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008483 ac_hi=$ac_mid; break
8484else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008485 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008486sed 's/^/| /' conftest.$ac_ext >&5
8487
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008488 ac_lo=`expr $ac_mid + 1`
8489 if test $ac_lo -le $ac_mid; then
8490 ac_lo= ac_hi=
8491 break
8492 fi
8493 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008494fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008495
8496rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008497 done
8498else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008499 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008500sed 's/^/| /' conftest.$ac_ext >&5
8501
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008502 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008503/* confdefs.h. */
8504_ACEOF
8505cat confdefs.h >>conftest.$ac_ext
8506cat >>conftest.$ac_ext <<_ACEOF
8507/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008508$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008509 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008510int
8511main ()
8512{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008513static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008514test_array [0] = 0
8515
8516 ;
8517 return 0;
8518}
8519_ACEOF
8520rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008521if { (ac_try="$ac_compile"
8522case "(($ac_try" in
8523 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8524 *) ac_try_echo=$ac_try;;
8525esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008526eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008527 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008528 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008529 grep -v '^ *+' conftest.er1 >conftest.err
8530 rm -f conftest.er1
8531 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008533 (exit $ac_status); } && {
8534 test -z "$ac_c_werror_flag" ||
8535 test ! -s conftest.err
8536 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008537 ac_hi=-1 ac_mid=-1
8538 while :; do
8539 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008540/* confdefs.h. */
8541_ACEOF
8542cat confdefs.h >>conftest.$ac_ext
8543cat >>conftest.$ac_ext <<_ACEOF
8544/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008545$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008546 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008547int
8548main ()
8549{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008550static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008551test_array [0] = 0
8552
8553 ;
8554 return 0;
8555}
8556_ACEOF
8557rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008558if { (ac_try="$ac_compile"
8559case "(($ac_try" in
8560 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8561 *) ac_try_echo=$ac_try;;
8562esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008563eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008564 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008565 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008566 grep -v '^ *+' conftest.er1 >conftest.err
8567 rm -f conftest.er1
8568 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008570 (exit $ac_status); } && {
8571 test -z "$ac_c_werror_flag" ||
8572 test ! -s conftest.err
8573 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008574 ac_lo=$ac_mid; break
8575else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008576 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008577sed 's/^/| /' conftest.$ac_ext >&5
8578
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008579 ac_hi=`expr '(' $ac_mid ')' - 1`
8580 if test $ac_mid -le $ac_hi; then
8581 ac_lo= ac_hi=
8582 break
8583 fi
8584 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008585fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008586
8587rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008588 done
8589else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008590 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008591sed 's/^/| /' conftest.$ac_ext >&5
8592
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008593 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008594fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008595
8596rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008597fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008598
8599rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008600# Binary search between lo and hi bounds.
8601while test "x$ac_lo" != "x$ac_hi"; do
8602 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8603 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008604/* confdefs.h. */
8605_ACEOF
8606cat confdefs.h >>conftest.$ac_ext
8607cat >>conftest.$ac_ext <<_ACEOF
8608/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008609$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008610 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008611int
8612main ()
8613{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008614static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008615test_array [0] = 0
8616
8617 ;
8618 return 0;
8619}
8620_ACEOF
8621rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008622if { (ac_try="$ac_compile"
8623case "(($ac_try" in
8624 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8625 *) ac_try_echo=$ac_try;;
8626esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008627eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008628 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008629 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008630 grep -v '^ *+' conftest.er1 >conftest.err
8631 rm -f conftest.er1
8632 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008634 (exit $ac_status); } && {
8635 test -z "$ac_c_werror_flag" ||
8636 test ! -s conftest.err
8637 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008638 ac_hi=$ac_mid
8639else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008640 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008641sed 's/^/| /' conftest.$ac_ext >&5
8642
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008643 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008644fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008645
8646rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008647done
8648case $ac_lo in
8649?*) ac_cv_sizeof_void_p=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008650'') if test "$ac_cv_type_void_p" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008651 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008652See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008653echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008654See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008655 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008656 else
8657 ac_cv_sizeof_void_p=0
8658 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008659esac
Guido van Rossumad678af1998-10-02 14:42:15 +00008660else
Martin v. Löwis11437992002-04-12 09:54:03 +00008661 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008662/* confdefs.h. */
8663_ACEOF
8664cat confdefs.h >>conftest.$ac_ext
8665cat >>conftest.$ac_ext <<_ACEOF
8666/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008667$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008668 typedef void * ac__type_sizeof_;
8669static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8670static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008671#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008672#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008673int
8674main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00008675{
Martin v. Löwis11437992002-04-12 09:54:03 +00008676
8677 FILE *f = fopen ("conftest.val", "w");
8678 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008679 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008680 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008681 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008682 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008683 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008684 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008685 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008686 }
8687 else
8688 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008689 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008690 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008691 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008692 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008693 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008694 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008695
8696 ;
8697 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00008698}
Martin v. Löwis11437992002-04-12 09:54:03 +00008699_ACEOF
8700rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008701if { (ac_try="$ac_link"
8702case "(($ac_try" in
8703 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8704 *) ac_try_echo=$ac_try;;
8705esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008706eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008707 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008708 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008710 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008711 { (case "(($ac_try" in
8712 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8713 *) ac_try_echo=$ac_try;;
8714esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008715eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008716 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008717 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008719 (exit $ac_status); }; }; then
8720 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00008721else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008722 echo "$as_me: program exited with status $ac_status" >&5
8723echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008724sed 's/^/| /' conftest.$ac_ext >&5
8725
Martin v. Löwis11437992002-04-12 09:54:03 +00008726( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008727if test "$ac_cv_type_void_p" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008728 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008729See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008730echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008731See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008732 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008733 else
8734 ac_cv_sizeof_void_p=0
8735 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008736fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008737rm -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 +00008738fi
8739rm -f conftest.val
Guido van Rossumad678af1998-10-02 14:42:15 +00008740fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008741{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
8742echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008743
8744
8745
Martin v. Löwis11437992002-04-12 09:54:03 +00008746cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008747#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008748_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008749
8750
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008751{ echo "$as_me:$LINENO: checking for short" >&5
8752echo $ECHO_N "checking for short... $ECHO_C" >&6; }
8753if test "${ac_cv_type_short+set}" = set; then
8754 echo $ECHO_N "(cached) $ECHO_C" >&6
8755else
8756 cat >conftest.$ac_ext <<_ACEOF
8757/* confdefs.h. */
8758_ACEOF
8759cat confdefs.h >>conftest.$ac_ext
8760cat >>conftest.$ac_ext <<_ACEOF
8761/* end confdefs.h. */
8762$ac_includes_default
8763typedef short ac__type_new_;
8764int
8765main ()
8766{
8767if ((ac__type_new_ *) 0)
8768 return 0;
8769if (sizeof (ac__type_new_))
8770 return 0;
8771 ;
8772 return 0;
8773}
8774_ACEOF
8775rm -f conftest.$ac_objext
8776if { (ac_try="$ac_compile"
8777case "(($ac_try" in
8778 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8779 *) ac_try_echo=$ac_try;;
8780esac
8781eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8782 (eval "$ac_compile") 2>conftest.er1
8783 ac_status=$?
8784 grep -v '^ *+' conftest.er1 >conftest.err
8785 rm -f conftest.er1
8786 cat conftest.err >&5
8787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8788 (exit $ac_status); } && {
8789 test -z "$ac_c_werror_flag" ||
8790 test ! -s conftest.err
8791 } && test -s conftest.$ac_objext; then
8792 ac_cv_type_short=yes
8793else
8794 echo "$as_me: failed program was:" >&5
8795sed 's/^/| /' conftest.$ac_ext >&5
8796
8797 ac_cv_type_short=no
8798fi
8799
8800rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8801fi
8802{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
8803echo "${ECHO_T}$ac_cv_type_short" >&6; }
8804
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008805# The cast to long int works around a bug in the HP C Compiler
8806# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8807# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8808# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008809{ echo "$as_me:$LINENO: checking size of short" >&5
8810echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008811if test "${ac_cv_sizeof_short+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008812 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008813else
Martin v. Löwis11437992002-04-12 09:54:03 +00008814 if test "$cross_compiling" = yes; then
8815 # Depending upon the size, compute the lo and hi bounds.
8816cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008817/* confdefs.h. */
8818_ACEOF
8819cat confdefs.h >>conftest.$ac_ext
8820cat >>conftest.$ac_ext <<_ACEOF
8821/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008822$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008823 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008824int
8825main ()
8826{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008827static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008828test_array [0] = 0
8829
8830 ;
8831 return 0;
8832}
8833_ACEOF
8834rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008835if { (ac_try="$ac_compile"
8836case "(($ac_try" in
8837 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8838 *) ac_try_echo=$ac_try;;
8839esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008840eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008841 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008842 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008843 grep -v '^ *+' conftest.er1 >conftest.err
8844 rm -f conftest.er1
8845 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008847 (exit $ac_status); } && {
8848 test -z "$ac_c_werror_flag" ||
8849 test ! -s conftest.err
8850 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008851 ac_lo=0 ac_mid=0
8852 while :; do
8853 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008854/* confdefs.h. */
8855_ACEOF
8856cat confdefs.h >>conftest.$ac_ext
8857cat >>conftest.$ac_ext <<_ACEOF
8858/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008859$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008860 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008861int
8862main ()
8863{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008864static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008865test_array [0] = 0
8866
8867 ;
8868 return 0;
8869}
8870_ACEOF
8871rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008872if { (ac_try="$ac_compile"
8873case "(($ac_try" in
8874 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8875 *) ac_try_echo=$ac_try;;
8876esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008877eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008878 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008879 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008880 grep -v '^ *+' conftest.er1 >conftest.err
8881 rm -f conftest.er1
8882 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008883 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008884 (exit $ac_status); } && {
8885 test -z "$ac_c_werror_flag" ||
8886 test ! -s conftest.err
8887 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008888 ac_hi=$ac_mid; break
8889else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008890 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008891sed 's/^/| /' conftest.$ac_ext >&5
8892
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008893 ac_lo=`expr $ac_mid + 1`
8894 if test $ac_lo -le $ac_mid; then
8895 ac_lo= ac_hi=
8896 break
8897 fi
8898 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008899fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008900
8901rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008902 done
8903else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008904 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008905sed 's/^/| /' conftest.$ac_ext >&5
8906
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008907 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008908/* confdefs.h. */
8909_ACEOF
8910cat confdefs.h >>conftest.$ac_ext
8911cat >>conftest.$ac_ext <<_ACEOF
8912/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008913$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008914 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008915int
8916main ()
8917{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008918static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008919test_array [0] = 0
8920
8921 ;
8922 return 0;
8923}
8924_ACEOF
8925rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008926if { (ac_try="$ac_compile"
8927case "(($ac_try" in
8928 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8929 *) ac_try_echo=$ac_try;;
8930esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008931eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008932 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008933 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008934 grep -v '^ *+' conftest.er1 >conftest.err
8935 rm -f conftest.er1
8936 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008937 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008938 (exit $ac_status); } && {
8939 test -z "$ac_c_werror_flag" ||
8940 test ! -s conftest.err
8941 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008942 ac_hi=-1 ac_mid=-1
8943 while :; do
8944 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008945/* confdefs.h. */
8946_ACEOF
8947cat confdefs.h >>conftest.$ac_ext
8948cat >>conftest.$ac_ext <<_ACEOF
8949/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008950$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008951 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008952int
8953main ()
8954{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008955static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008956test_array [0] = 0
8957
8958 ;
8959 return 0;
8960}
8961_ACEOF
8962rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008963if { (ac_try="$ac_compile"
8964case "(($ac_try" in
8965 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8966 *) ac_try_echo=$ac_try;;
8967esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008968eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008969 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008970 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008971 grep -v '^ *+' conftest.er1 >conftest.err
8972 rm -f conftest.er1
8973 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008975 (exit $ac_status); } && {
8976 test -z "$ac_c_werror_flag" ||
8977 test ! -s conftest.err
8978 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008979 ac_lo=$ac_mid; break
8980else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008981 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008982sed 's/^/| /' conftest.$ac_ext >&5
8983
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008984 ac_hi=`expr '(' $ac_mid ')' - 1`
8985 if test $ac_mid -le $ac_hi; then
8986 ac_lo= ac_hi=
8987 break
8988 fi
8989 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008990fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008991
8992rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008993 done
8994else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008995 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008996sed 's/^/| /' conftest.$ac_ext >&5
8997
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008998 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008999fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009000
9001rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009002fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009003
9004rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009005# Binary search between lo and hi bounds.
9006while test "x$ac_lo" != "x$ac_hi"; do
9007 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9008 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009009/* confdefs.h. */
9010_ACEOF
9011cat confdefs.h >>conftest.$ac_ext
9012cat >>conftest.$ac_ext <<_ACEOF
9013/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009014$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009015 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009016int
9017main ()
9018{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009019static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009020test_array [0] = 0
9021
9022 ;
9023 return 0;
9024}
9025_ACEOF
9026rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009027if { (ac_try="$ac_compile"
9028case "(($ac_try" in
9029 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9030 *) ac_try_echo=$ac_try;;
9031esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009032eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009033 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009034 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009035 grep -v '^ *+' conftest.er1 >conftest.err
9036 rm -f conftest.er1
9037 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009039 (exit $ac_status); } && {
9040 test -z "$ac_c_werror_flag" ||
9041 test ! -s conftest.err
9042 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009043 ac_hi=$ac_mid
9044else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009045 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009046sed 's/^/| /' conftest.$ac_ext >&5
9047
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009048 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009049fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009050
9051rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009052done
9053case $ac_lo in
9054?*) ac_cv_sizeof_short=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009055'') if test "$ac_cv_type_short" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009056 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009057See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009058echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009059See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009060 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009061 else
9062 ac_cv_sizeof_short=0
9063 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009064esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009065else
Martin v. Löwis11437992002-04-12 09:54:03 +00009066 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009067/* confdefs.h. */
9068_ACEOF
9069cat confdefs.h >>conftest.$ac_ext
9070cat >>conftest.$ac_ext <<_ACEOF
9071/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009072$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009073 typedef short ac__type_sizeof_;
9074static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9075static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009076#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009077#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009078int
9079main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009080{
Martin v. Löwis11437992002-04-12 09:54:03 +00009081
9082 FILE *f = fopen ("conftest.val", "w");
9083 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009084 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009085 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009086 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009087 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009088 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009089 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009090 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009091 }
9092 else
9093 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009094 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009095 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009096 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009097 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009098 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009099 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009100
9101 ;
9102 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009103}
Martin v. Löwis11437992002-04-12 09:54:03 +00009104_ACEOF
9105rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009106if { (ac_try="$ac_link"
9107case "(($ac_try" in
9108 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9109 *) ac_try_echo=$ac_try;;
9110esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009111eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009112 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009113 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009114 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009115 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009116 { (case "(($ac_try" in
9117 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9118 *) ac_try_echo=$ac_try;;
9119esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009120eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009121 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009122 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009124 (exit $ac_status); }; }; then
9125 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009126else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009127 echo "$as_me: program exited with status $ac_status" >&5
9128echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009129sed 's/^/| /' conftest.$ac_ext >&5
9130
Martin v. Löwis11437992002-04-12 09:54:03 +00009131( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009132if test "$ac_cv_type_short" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009133 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009134See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009135echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009136See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009137 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009138 else
9139 ac_cv_sizeof_short=0
9140 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009141fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009142rm -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 +00009143fi
9144rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009145fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009146{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
9147echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009148
9149
9150
Martin v. Löwis11437992002-04-12 09:54:03 +00009151cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009152#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00009153_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009154
9155
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009156{ echo "$as_me:$LINENO: checking for float" >&5
9157echo $ECHO_N "checking for float... $ECHO_C" >&6; }
9158if test "${ac_cv_type_float+set}" = set; then
9159 echo $ECHO_N "(cached) $ECHO_C" >&6
9160else
9161 cat >conftest.$ac_ext <<_ACEOF
9162/* confdefs.h. */
9163_ACEOF
9164cat confdefs.h >>conftest.$ac_ext
9165cat >>conftest.$ac_ext <<_ACEOF
9166/* end confdefs.h. */
9167$ac_includes_default
9168typedef float ac__type_new_;
9169int
9170main ()
9171{
9172if ((ac__type_new_ *) 0)
9173 return 0;
9174if (sizeof (ac__type_new_))
9175 return 0;
9176 ;
9177 return 0;
9178}
9179_ACEOF
9180rm -f conftest.$ac_objext
9181if { (ac_try="$ac_compile"
9182case "(($ac_try" in
9183 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9184 *) ac_try_echo=$ac_try;;
9185esac
9186eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9187 (eval "$ac_compile") 2>conftest.er1
9188 ac_status=$?
9189 grep -v '^ *+' conftest.er1 >conftest.err
9190 rm -f conftest.er1
9191 cat conftest.err >&5
9192 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9193 (exit $ac_status); } && {
9194 test -z "$ac_c_werror_flag" ||
9195 test ! -s conftest.err
9196 } && test -s conftest.$ac_objext; then
9197 ac_cv_type_float=yes
9198else
9199 echo "$as_me: failed program was:" >&5
9200sed 's/^/| /' conftest.$ac_ext >&5
9201
9202 ac_cv_type_float=no
9203fi
9204
9205rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9206fi
9207{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
9208echo "${ECHO_T}$ac_cv_type_float" >&6; }
9209
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009210# The cast to long int works around a bug in the HP C Compiler
9211# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9212# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9213# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009214{ echo "$as_me:$LINENO: checking size of float" >&5
9215echo $ECHO_N "checking size of float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009216if test "${ac_cv_sizeof_float+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009217 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009218else
Martin v. Löwis11437992002-04-12 09:54:03 +00009219 if test "$cross_compiling" = yes; then
9220 # Depending upon the size, compute the lo and hi bounds.
9221cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009222/* confdefs.h. */
9223_ACEOF
9224cat confdefs.h >>conftest.$ac_ext
9225cat >>conftest.$ac_ext <<_ACEOF
9226/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009227$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009228 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009229int
9230main ()
9231{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009232static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009233test_array [0] = 0
9234
9235 ;
9236 return 0;
9237}
9238_ACEOF
9239rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009240if { (ac_try="$ac_compile"
9241case "(($ac_try" in
9242 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9243 *) ac_try_echo=$ac_try;;
9244esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009245eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009246 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009247 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009248 grep -v '^ *+' conftest.er1 >conftest.err
9249 rm -f conftest.er1
9250 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009251 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009252 (exit $ac_status); } && {
9253 test -z "$ac_c_werror_flag" ||
9254 test ! -s conftest.err
9255 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009256 ac_lo=0 ac_mid=0
9257 while :; do
9258 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009259/* confdefs.h. */
9260_ACEOF
9261cat confdefs.h >>conftest.$ac_ext
9262cat >>conftest.$ac_ext <<_ACEOF
9263/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009264$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009265 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009266int
9267main ()
9268{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009269static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009270test_array [0] = 0
9271
9272 ;
9273 return 0;
9274}
9275_ACEOF
9276rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009277if { (ac_try="$ac_compile"
9278case "(($ac_try" in
9279 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9280 *) ac_try_echo=$ac_try;;
9281esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009282eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009283 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009284 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009285 grep -v '^ *+' conftest.er1 >conftest.err
9286 rm -f conftest.er1
9287 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009288 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009289 (exit $ac_status); } && {
9290 test -z "$ac_c_werror_flag" ||
9291 test ! -s conftest.err
9292 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009293 ac_hi=$ac_mid; break
9294else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009295 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009296sed 's/^/| /' conftest.$ac_ext >&5
9297
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009298 ac_lo=`expr $ac_mid + 1`
9299 if test $ac_lo -le $ac_mid; then
9300 ac_lo= ac_hi=
9301 break
9302 fi
9303 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009304fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009305
9306rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009307 done
9308else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009309 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009310sed 's/^/| /' conftest.$ac_ext >&5
9311
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009312 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009313/* confdefs.h. */
9314_ACEOF
9315cat confdefs.h >>conftest.$ac_ext
9316cat >>conftest.$ac_ext <<_ACEOF
9317/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009318$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009319 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009320int
9321main ()
9322{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009323static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009324test_array [0] = 0
9325
9326 ;
9327 return 0;
9328}
9329_ACEOF
9330rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009331if { (ac_try="$ac_compile"
9332case "(($ac_try" in
9333 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9334 *) ac_try_echo=$ac_try;;
9335esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009336eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009337 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009338 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009339 grep -v '^ *+' conftest.er1 >conftest.err
9340 rm -f conftest.er1
9341 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009343 (exit $ac_status); } && {
9344 test -z "$ac_c_werror_flag" ||
9345 test ! -s conftest.err
9346 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009347 ac_hi=-1 ac_mid=-1
9348 while :; do
9349 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009350/* confdefs.h. */
9351_ACEOF
9352cat confdefs.h >>conftest.$ac_ext
9353cat >>conftest.$ac_ext <<_ACEOF
9354/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009355$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009356 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009357int
9358main ()
9359{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009360static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009361test_array [0] = 0
9362
9363 ;
9364 return 0;
9365}
9366_ACEOF
9367rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009368if { (ac_try="$ac_compile"
9369case "(($ac_try" in
9370 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9371 *) ac_try_echo=$ac_try;;
9372esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009373eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009374 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009375 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009376 grep -v '^ *+' conftest.er1 >conftest.err
9377 rm -f conftest.er1
9378 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009379 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009380 (exit $ac_status); } && {
9381 test -z "$ac_c_werror_flag" ||
9382 test ! -s conftest.err
9383 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009384 ac_lo=$ac_mid; break
9385else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009386 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009387sed 's/^/| /' conftest.$ac_ext >&5
9388
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009389 ac_hi=`expr '(' $ac_mid ')' - 1`
9390 if test $ac_mid -le $ac_hi; then
9391 ac_lo= ac_hi=
9392 break
9393 fi
9394 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009395fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009396
9397rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009398 done
9399else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009400 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009401sed 's/^/| /' conftest.$ac_ext >&5
9402
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009403 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009404fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009405
9406rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009407fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009408
9409rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009410# Binary search between lo and hi bounds.
9411while test "x$ac_lo" != "x$ac_hi"; do
9412 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9413 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009414/* confdefs.h. */
9415_ACEOF
9416cat confdefs.h >>conftest.$ac_ext
9417cat >>conftest.$ac_ext <<_ACEOF
9418/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009419$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009420 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009421int
9422main ()
9423{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009424static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009425test_array [0] = 0
9426
9427 ;
9428 return 0;
9429}
9430_ACEOF
9431rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009432if { (ac_try="$ac_compile"
9433case "(($ac_try" in
9434 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9435 *) ac_try_echo=$ac_try;;
9436esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009437eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009438 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009439 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009440 grep -v '^ *+' conftest.er1 >conftest.err
9441 rm -f conftest.er1
9442 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009443 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009444 (exit $ac_status); } && {
9445 test -z "$ac_c_werror_flag" ||
9446 test ! -s conftest.err
9447 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009448 ac_hi=$ac_mid
9449else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009450 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009451sed 's/^/| /' conftest.$ac_ext >&5
9452
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009453 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009454fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009455
9456rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009457done
9458case $ac_lo in
9459?*) ac_cv_sizeof_float=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009460'') if test "$ac_cv_type_float" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009461 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009462See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009463echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009464See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009465 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009466 else
9467 ac_cv_sizeof_float=0
9468 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009469esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009470else
Martin v. Löwis11437992002-04-12 09:54:03 +00009471 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009472/* confdefs.h. */
9473_ACEOF
9474cat confdefs.h >>conftest.$ac_ext
9475cat >>conftest.$ac_ext <<_ACEOF
9476/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009477$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009478 typedef float ac__type_sizeof_;
9479static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9480static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009481#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009482#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009483int
9484main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009485{
Martin v. Löwis11437992002-04-12 09:54:03 +00009486
9487 FILE *f = fopen ("conftest.val", "w");
9488 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009489 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009490 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009491 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009492 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009493 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009494 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009495 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009496 }
9497 else
9498 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009499 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009500 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009501 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009502 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009503 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009504 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009505
9506 ;
9507 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009508}
Martin v. Löwis11437992002-04-12 09:54:03 +00009509_ACEOF
9510rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009511if { (ac_try="$ac_link"
9512case "(($ac_try" in
9513 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9514 *) ac_try_echo=$ac_try;;
9515esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009516eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009517 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009518 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009520 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009521 { (case "(($ac_try" in
9522 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9523 *) ac_try_echo=$ac_try;;
9524esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009525eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009526 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009527 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009529 (exit $ac_status); }; }; then
9530 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009531else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009532 echo "$as_me: program exited with status $ac_status" >&5
9533echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009534sed 's/^/| /' conftest.$ac_ext >&5
9535
Martin v. Löwis11437992002-04-12 09:54:03 +00009536( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009537if test "$ac_cv_type_float" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009538 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009539See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009540echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009541See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009542 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009543 else
9544 ac_cv_sizeof_float=0
9545 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009546fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009547rm -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 +00009548fi
9549rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009550fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009551{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
9552echo "${ECHO_T}$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009553
9554
9555
Martin v. Löwis11437992002-04-12 09:54:03 +00009556cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009557#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00009558_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009559
9560
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009561{ echo "$as_me:$LINENO: checking for double" >&5
9562echo $ECHO_N "checking for double... $ECHO_C" >&6; }
9563if test "${ac_cv_type_double+set}" = set; then
9564 echo $ECHO_N "(cached) $ECHO_C" >&6
9565else
9566 cat >conftest.$ac_ext <<_ACEOF
9567/* confdefs.h. */
9568_ACEOF
9569cat confdefs.h >>conftest.$ac_ext
9570cat >>conftest.$ac_ext <<_ACEOF
9571/* end confdefs.h. */
9572$ac_includes_default
9573typedef double ac__type_new_;
9574int
9575main ()
9576{
9577if ((ac__type_new_ *) 0)
9578 return 0;
9579if (sizeof (ac__type_new_))
9580 return 0;
9581 ;
9582 return 0;
9583}
9584_ACEOF
9585rm -f conftest.$ac_objext
9586if { (ac_try="$ac_compile"
9587case "(($ac_try" in
9588 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9589 *) ac_try_echo=$ac_try;;
9590esac
9591eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9592 (eval "$ac_compile") 2>conftest.er1
9593 ac_status=$?
9594 grep -v '^ *+' conftest.er1 >conftest.err
9595 rm -f conftest.er1
9596 cat conftest.err >&5
9597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9598 (exit $ac_status); } && {
9599 test -z "$ac_c_werror_flag" ||
9600 test ! -s conftest.err
9601 } && test -s conftest.$ac_objext; then
9602 ac_cv_type_double=yes
9603else
9604 echo "$as_me: failed program was:" >&5
9605sed 's/^/| /' conftest.$ac_ext >&5
9606
9607 ac_cv_type_double=no
9608fi
9609
9610rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9611fi
9612{ echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
9613echo "${ECHO_T}$ac_cv_type_double" >&6; }
9614
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009615# The cast to long int works around a bug in the HP C Compiler
9616# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9617# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9618# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009619{ echo "$as_me:$LINENO: checking size of double" >&5
9620echo $ECHO_N "checking size of double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009621if test "${ac_cv_sizeof_double+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009622 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009623else
Martin v. Löwis11437992002-04-12 09:54:03 +00009624 if test "$cross_compiling" = yes; then
9625 # Depending upon the size, compute the lo and hi bounds.
9626cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009627/* confdefs.h. */
9628_ACEOF
9629cat confdefs.h >>conftest.$ac_ext
9630cat >>conftest.$ac_ext <<_ACEOF
9631/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009632$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009633 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009634int
9635main ()
9636{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009637static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009638test_array [0] = 0
9639
9640 ;
9641 return 0;
9642}
9643_ACEOF
9644rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009645if { (ac_try="$ac_compile"
9646case "(($ac_try" in
9647 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9648 *) ac_try_echo=$ac_try;;
9649esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009650eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009651 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009652 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009653 grep -v '^ *+' conftest.er1 >conftest.err
9654 rm -f conftest.er1
9655 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009657 (exit $ac_status); } && {
9658 test -z "$ac_c_werror_flag" ||
9659 test ! -s conftest.err
9660 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009661 ac_lo=0 ac_mid=0
9662 while :; do
9663 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009664/* confdefs.h. */
9665_ACEOF
9666cat confdefs.h >>conftest.$ac_ext
9667cat >>conftest.$ac_ext <<_ACEOF
9668/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009669$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009670 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009671int
9672main ()
9673{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009674static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009675test_array [0] = 0
9676
9677 ;
9678 return 0;
9679}
9680_ACEOF
9681rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009682if { (ac_try="$ac_compile"
9683case "(($ac_try" in
9684 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9685 *) ac_try_echo=$ac_try;;
9686esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009687eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009688 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009689 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009690 grep -v '^ *+' conftest.er1 >conftest.err
9691 rm -f conftest.er1
9692 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009694 (exit $ac_status); } && {
9695 test -z "$ac_c_werror_flag" ||
9696 test ! -s conftest.err
9697 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009698 ac_hi=$ac_mid; break
9699else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009700 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009701sed 's/^/| /' conftest.$ac_ext >&5
9702
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009703 ac_lo=`expr $ac_mid + 1`
9704 if test $ac_lo -le $ac_mid; then
9705 ac_lo= ac_hi=
9706 break
9707 fi
9708 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009709fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009710
9711rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009712 done
9713else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009714 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009715sed 's/^/| /' conftest.$ac_ext >&5
9716
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009717 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009718/* confdefs.h. */
9719_ACEOF
9720cat confdefs.h >>conftest.$ac_ext
9721cat >>conftest.$ac_ext <<_ACEOF
9722/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009723$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009724 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009725int
9726main ()
9727{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009728static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009729test_array [0] = 0
9730
9731 ;
9732 return 0;
9733}
9734_ACEOF
9735rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009736if { (ac_try="$ac_compile"
9737case "(($ac_try" in
9738 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9739 *) ac_try_echo=$ac_try;;
9740esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009741eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009742 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009743 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009744 grep -v '^ *+' conftest.er1 >conftest.err
9745 rm -f conftest.er1
9746 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009747 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009748 (exit $ac_status); } && {
9749 test -z "$ac_c_werror_flag" ||
9750 test ! -s conftest.err
9751 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009752 ac_hi=-1 ac_mid=-1
9753 while :; do
9754 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009755/* confdefs.h. */
9756_ACEOF
9757cat confdefs.h >>conftest.$ac_ext
9758cat >>conftest.$ac_ext <<_ACEOF
9759/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009760$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009761 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009762int
9763main ()
9764{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009765static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009766test_array [0] = 0
9767
9768 ;
9769 return 0;
9770}
9771_ACEOF
9772rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009773if { (ac_try="$ac_compile"
9774case "(($ac_try" in
9775 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9776 *) ac_try_echo=$ac_try;;
9777esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009778eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009779 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009780 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009781 grep -v '^ *+' conftest.er1 >conftest.err
9782 rm -f conftest.er1
9783 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009785 (exit $ac_status); } && {
9786 test -z "$ac_c_werror_flag" ||
9787 test ! -s conftest.err
9788 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009789 ac_lo=$ac_mid; break
9790else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009791 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009792sed 's/^/| /' conftest.$ac_ext >&5
9793
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009794 ac_hi=`expr '(' $ac_mid ')' - 1`
9795 if test $ac_mid -le $ac_hi; then
9796 ac_lo= ac_hi=
9797 break
9798 fi
9799 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009800fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009801
9802rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009803 done
9804else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009805 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009806sed 's/^/| /' conftest.$ac_ext >&5
9807
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009808 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009809fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009810
9811rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009812fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009813
9814rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009815# Binary search between lo and hi bounds.
9816while test "x$ac_lo" != "x$ac_hi"; do
9817 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9818 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009819/* confdefs.h. */
9820_ACEOF
9821cat confdefs.h >>conftest.$ac_ext
9822cat >>conftest.$ac_ext <<_ACEOF
9823/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009824$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009825 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009826int
9827main ()
9828{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009829static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009830test_array [0] = 0
9831
9832 ;
9833 return 0;
9834}
9835_ACEOF
9836rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009837if { (ac_try="$ac_compile"
9838case "(($ac_try" in
9839 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9840 *) ac_try_echo=$ac_try;;
9841esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009842eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009843 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009844 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009845 grep -v '^ *+' conftest.er1 >conftest.err
9846 rm -f conftest.er1
9847 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009849 (exit $ac_status); } && {
9850 test -z "$ac_c_werror_flag" ||
9851 test ! -s conftest.err
9852 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009853 ac_hi=$ac_mid
9854else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009855 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009856sed 's/^/| /' conftest.$ac_ext >&5
9857
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009858 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009859fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009860
9861rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009862done
9863case $ac_lo in
9864?*) ac_cv_sizeof_double=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009865'') if test "$ac_cv_type_double" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009866 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009867See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009868echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009869See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009870 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009871 else
9872 ac_cv_sizeof_double=0
9873 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009874esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009875else
Martin v. Löwis11437992002-04-12 09:54:03 +00009876 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009877/* confdefs.h. */
9878_ACEOF
9879cat confdefs.h >>conftest.$ac_ext
9880cat >>conftest.$ac_ext <<_ACEOF
9881/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009882$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009883 typedef double ac__type_sizeof_;
9884static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9885static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009886#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009887#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009888int
9889main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009890{
Martin v. Löwis11437992002-04-12 09:54:03 +00009891
9892 FILE *f = fopen ("conftest.val", "w");
9893 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009894 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009895 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009896 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009897 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009898 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009899 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009900 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009901 }
9902 else
9903 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009904 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009905 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009906 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009907 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009908 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009909 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009910
9911 ;
9912 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009913}
Martin v. Löwis11437992002-04-12 09:54:03 +00009914_ACEOF
9915rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009916if { (ac_try="$ac_link"
9917case "(($ac_try" in
9918 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9919 *) ac_try_echo=$ac_try;;
9920esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009921eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009922 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009923 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009925 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009926 { (case "(($ac_try" in
9927 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9928 *) ac_try_echo=$ac_try;;
9929esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009930eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009931 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009932 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009934 (exit $ac_status); }; }; then
9935 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009936else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009937 echo "$as_me: program exited with status $ac_status" >&5
9938echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009939sed 's/^/| /' conftest.$ac_ext >&5
9940
Martin v. Löwis11437992002-04-12 09:54:03 +00009941( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009942if test "$ac_cv_type_double" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009943 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009944See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009945echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009946See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009947 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009948 else
9949 ac_cv_sizeof_double=0
9950 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009951fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009952rm -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 +00009953fi
9954rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009955fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009956{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
9957echo "${ECHO_T}$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009958
9959
9960
Martin v. Löwis11437992002-04-12 09:54:03 +00009961cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009962#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00009963_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009964
9965
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009966{ echo "$as_me:$LINENO: checking for fpos_t" >&5
9967echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6; }
9968if test "${ac_cv_type_fpos_t+set}" = set; then
9969 echo $ECHO_N "(cached) $ECHO_C" >&6
9970else
9971 cat >conftest.$ac_ext <<_ACEOF
9972/* confdefs.h. */
9973_ACEOF
9974cat confdefs.h >>conftest.$ac_ext
9975cat >>conftest.$ac_ext <<_ACEOF
9976/* end confdefs.h. */
9977$ac_includes_default
9978typedef fpos_t ac__type_new_;
9979int
9980main ()
9981{
9982if ((ac__type_new_ *) 0)
9983 return 0;
9984if (sizeof (ac__type_new_))
9985 return 0;
9986 ;
9987 return 0;
9988}
9989_ACEOF
9990rm -f conftest.$ac_objext
9991if { (ac_try="$ac_compile"
9992case "(($ac_try" in
9993 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9994 *) ac_try_echo=$ac_try;;
9995esac
9996eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9997 (eval "$ac_compile") 2>conftest.er1
9998 ac_status=$?
9999 grep -v '^ *+' conftest.er1 >conftest.err
10000 rm -f conftest.er1
10001 cat conftest.err >&5
10002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10003 (exit $ac_status); } && {
10004 test -z "$ac_c_werror_flag" ||
10005 test ! -s conftest.err
10006 } && test -s conftest.$ac_objext; then
10007 ac_cv_type_fpos_t=yes
10008else
10009 echo "$as_me: failed program was:" >&5
10010sed 's/^/| /' conftest.$ac_ext >&5
10011
10012 ac_cv_type_fpos_t=no
10013fi
10014
10015rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10016fi
10017{ echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
10018echo "${ECHO_T}$ac_cv_type_fpos_t" >&6; }
10019
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010020# The cast to long int works around a bug in the HP C Compiler
10021# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10022# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10023# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010024{ echo "$as_me:$LINENO: checking size of fpos_t" >&5
10025echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010026if test "${ac_cv_sizeof_fpos_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010027 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000010028else
Martin v. Löwis11437992002-04-12 09:54:03 +000010029 if test "$cross_compiling" = yes; then
10030 # Depending upon the size, compute the lo and hi bounds.
10031cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010032/* confdefs.h. */
10033_ACEOF
10034cat confdefs.h >>conftest.$ac_ext
10035cat >>conftest.$ac_ext <<_ACEOF
10036/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010037$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010038 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010039int
10040main ()
10041{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010042static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010043test_array [0] = 0
10044
10045 ;
10046 return 0;
10047}
10048_ACEOF
10049rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010050if { (ac_try="$ac_compile"
10051case "(($ac_try" in
10052 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10053 *) ac_try_echo=$ac_try;;
10054esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010055eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010056 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010057 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010058 grep -v '^ *+' conftest.er1 >conftest.err
10059 rm -f conftest.er1
10060 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010062 (exit $ac_status); } && {
10063 test -z "$ac_c_werror_flag" ||
10064 test ! -s conftest.err
10065 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010066 ac_lo=0 ac_mid=0
10067 while :; do
10068 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010069/* confdefs.h. */
10070_ACEOF
10071cat confdefs.h >>conftest.$ac_ext
10072cat >>conftest.$ac_ext <<_ACEOF
10073/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010074$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010075 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010076int
10077main ()
10078{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010079static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010080test_array [0] = 0
10081
10082 ;
10083 return 0;
10084}
10085_ACEOF
10086rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010087if { (ac_try="$ac_compile"
10088case "(($ac_try" in
10089 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10090 *) ac_try_echo=$ac_try;;
10091esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010092eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010093 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010094 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010095 grep -v '^ *+' conftest.er1 >conftest.err
10096 rm -f conftest.er1
10097 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010099 (exit $ac_status); } && {
10100 test -z "$ac_c_werror_flag" ||
10101 test ! -s conftest.err
10102 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010103 ac_hi=$ac_mid; break
10104else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010105 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010106sed 's/^/| /' conftest.$ac_ext >&5
10107
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010108 ac_lo=`expr $ac_mid + 1`
10109 if test $ac_lo -le $ac_mid; then
10110 ac_lo= ac_hi=
10111 break
10112 fi
10113 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010114fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010115
10116rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010117 done
10118else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010119 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010120sed 's/^/| /' conftest.$ac_ext >&5
10121
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010122 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010123/* confdefs.h. */
10124_ACEOF
10125cat confdefs.h >>conftest.$ac_ext
10126cat >>conftest.$ac_ext <<_ACEOF
10127/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010128$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010129 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010130int
10131main ()
10132{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010133static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010134test_array [0] = 0
10135
10136 ;
10137 return 0;
10138}
10139_ACEOF
10140rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010141if { (ac_try="$ac_compile"
10142case "(($ac_try" in
10143 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10144 *) ac_try_echo=$ac_try;;
10145esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010146eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010147 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010148 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010149 grep -v '^ *+' conftest.er1 >conftest.err
10150 rm -f conftest.er1
10151 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010153 (exit $ac_status); } && {
10154 test -z "$ac_c_werror_flag" ||
10155 test ! -s conftest.err
10156 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010157 ac_hi=-1 ac_mid=-1
10158 while :; do
10159 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010160/* confdefs.h. */
10161_ACEOF
10162cat confdefs.h >>conftest.$ac_ext
10163cat >>conftest.$ac_ext <<_ACEOF
10164/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010165$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010166 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010167int
10168main ()
10169{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010170static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010171test_array [0] = 0
10172
10173 ;
10174 return 0;
10175}
10176_ACEOF
10177rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010178if { (ac_try="$ac_compile"
10179case "(($ac_try" in
10180 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10181 *) ac_try_echo=$ac_try;;
10182esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010183eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010184 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010185 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010186 grep -v '^ *+' conftest.er1 >conftest.err
10187 rm -f conftest.er1
10188 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010189 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010190 (exit $ac_status); } && {
10191 test -z "$ac_c_werror_flag" ||
10192 test ! -s conftest.err
10193 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010194 ac_lo=$ac_mid; break
10195else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010196 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010197sed 's/^/| /' conftest.$ac_ext >&5
10198
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010199 ac_hi=`expr '(' $ac_mid ')' - 1`
10200 if test $ac_mid -le $ac_hi; then
10201 ac_lo= ac_hi=
10202 break
10203 fi
10204 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010205fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010206
10207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010208 done
10209else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010210 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010211sed 's/^/| /' conftest.$ac_ext >&5
10212
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010213 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010214fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010215
10216rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010217fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010218
10219rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010220# Binary search between lo and hi bounds.
10221while test "x$ac_lo" != "x$ac_hi"; do
10222 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10223 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010224/* confdefs.h. */
10225_ACEOF
10226cat confdefs.h >>conftest.$ac_ext
10227cat >>conftest.$ac_ext <<_ACEOF
10228/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010229$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010230 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010231int
10232main ()
10233{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010234static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010235test_array [0] = 0
10236
10237 ;
10238 return 0;
10239}
10240_ACEOF
10241rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010242if { (ac_try="$ac_compile"
10243case "(($ac_try" in
10244 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10245 *) ac_try_echo=$ac_try;;
10246esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010247eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010248 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010249 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010250 grep -v '^ *+' conftest.er1 >conftest.err
10251 rm -f conftest.er1
10252 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010253 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010254 (exit $ac_status); } && {
10255 test -z "$ac_c_werror_flag" ||
10256 test ! -s conftest.err
10257 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010258 ac_hi=$ac_mid
10259else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010260 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010261sed 's/^/| /' conftest.$ac_ext >&5
10262
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010263 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010264fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010265
10266rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010267done
10268case $ac_lo in
10269?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010270'') if test "$ac_cv_type_fpos_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010271 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010272See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010273echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010274See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010275 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010276 else
10277 ac_cv_sizeof_fpos_t=0
10278 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010279esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010280else
Martin v. Löwis11437992002-04-12 09:54:03 +000010281 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010282/* confdefs.h. */
10283_ACEOF
10284cat confdefs.h >>conftest.$ac_ext
10285cat >>conftest.$ac_ext <<_ACEOF
10286/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010287$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010288 typedef fpos_t ac__type_sizeof_;
10289static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10290static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010291#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010292#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010293int
10294main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010295{
Martin v. Löwis11437992002-04-12 09:54:03 +000010296
10297 FILE *f = fopen ("conftest.val", "w");
10298 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010299 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010300 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010301 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010302 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010303 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010304 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010305 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010306 }
10307 else
10308 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010309 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010310 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010311 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010312 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010313 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010314 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010315
10316 ;
10317 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010318}
Martin v. Löwis11437992002-04-12 09:54:03 +000010319_ACEOF
10320rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010321if { (ac_try="$ac_link"
10322case "(($ac_try" in
10323 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10324 *) ac_try_echo=$ac_try;;
10325esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010326eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010327 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010328 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010330 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010331 { (case "(($ac_try" in
10332 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10333 *) ac_try_echo=$ac_try;;
10334esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010335eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010336 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010337 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010339 (exit $ac_status); }; }; then
10340 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010341else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010342 echo "$as_me: program exited with status $ac_status" >&5
10343echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010344sed 's/^/| /' conftest.$ac_ext >&5
10345
Martin v. Löwis11437992002-04-12 09:54:03 +000010346( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010347if test "$ac_cv_type_fpos_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010348 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010349See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010350echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010351See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010352 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010353 else
10354 ac_cv_sizeof_fpos_t=0
10355 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010356fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010357rm -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 +000010358fi
10359rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010360fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010361{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
10362echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010363
10364
10365
Martin v. Löwis11437992002-04-12 09:54:03 +000010366cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010367#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010368_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010369
Michael W. Hudson54241132001-12-07 15:38:26 +000010370
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010371{ echo "$as_me:$LINENO: checking for size_t" >&5
10372echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
10373if test "${ac_cv_type_size_t+set}" = set; then
10374 echo $ECHO_N "(cached) $ECHO_C" >&6
10375else
10376 cat >conftest.$ac_ext <<_ACEOF
10377/* confdefs.h. */
10378_ACEOF
10379cat confdefs.h >>conftest.$ac_ext
10380cat >>conftest.$ac_ext <<_ACEOF
10381/* end confdefs.h. */
10382$ac_includes_default
10383typedef size_t ac__type_new_;
10384int
10385main ()
10386{
10387if ((ac__type_new_ *) 0)
10388 return 0;
10389if (sizeof (ac__type_new_))
10390 return 0;
10391 ;
10392 return 0;
10393}
10394_ACEOF
10395rm -f conftest.$ac_objext
10396if { (ac_try="$ac_compile"
10397case "(($ac_try" in
10398 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10399 *) ac_try_echo=$ac_try;;
10400esac
10401eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10402 (eval "$ac_compile") 2>conftest.er1
10403 ac_status=$?
10404 grep -v '^ *+' conftest.er1 >conftest.err
10405 rm -f conftest.er1
10406 cat conftest.err >&5
10407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10408 (exit $ac_status); } && {
10409 test -z "$ac_c_werror_flag" ||
10410 test ! -s conftest.err
10411 } && test -s conftest.$ac_objext; then
10412 ac_cv_type_size_t=yes
10413else
10414 echo "$as_me: failed program was:" >&5
10415sed 's/^/| /' conftest.$ac_ext >&5
10416
10417 ac_cv_type_size_t=no
10418fi
10419
10420rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10421fi
10422{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
10423echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
10424
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010425# The cast to long int works around a bug in the HP C Compiler
10426# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10427# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10428# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010429{ echo "$as_me:$LINENO: checking size of size_t" >&5
10430echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010431if test "${ac_cv_sizeof_size_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010432 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +000010433else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010434 if test "$cross_compiling" = yes; then
10435 # Depending upon the size, compute the lo and hi bounds.
10436cat >conftest.$ac_ext <<_ACEOF
10437/* confdefs.h. */
10438_ACEOF
10439cat confdefs.h >>conftest.$ac_ext
10440cat >>conftest.$ac_ext <<_ACEOF
10441/* end confdefs.h. */
10442$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010443 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010444int
10445main ()
10446{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010447static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010448test_array [0] = 0
10449
10450 ;
10451 return 0;
10452}
10453_ACEOF
10454rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010455if { (ac_try="$ac_compile"
10456case "(($ac_try" in
10457 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10458 *) ac_try_echo=$ac_try;;
10459esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010460eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010461 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010462 ac_status=$?
10463 grep -v '^ *+' conftest.er1 >conftest.err
10464 rm -f conftest.er1
10465 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010467 (exit $ac_status); } && {
10468 test -z "$ac_c_werror_flag" ||
10469 test ! -s conftest.err
10470 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010471 ac_lo=0 ac_mid=0
10472 while :; do
10473 cat >conftest.$ac_ext <<_ACEOF
10474/* confdefs.h. */
10475_ACEOF
10476cat confdefs.h >>conftest.$ac_ext
10477cat >>conftest.$ac_ext <<_ACEOF
10478/* end confdefs.h. */
10479$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010480 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010481int
10482main ()
10483{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010484static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010485test_array [0] = 0
10486
10487 ;
10488 return 0;
10489}
10490_ACEOF
10491rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010492if { (ac_try="$ac_compile"
10493case "(($ac_try" in
10494 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10495 *) ac_try_echo=$ac_try;;
10496esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010497eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010498 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010499 ac_status=$?
10500 grep -v '^ *+' conftest.er1 >conftest.err
10501 rm -f conftest.er1
10502 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010504 (exit $ac_status); } && {
10505 test -z "$ac_c_werror_flag" ||
10506 test ! -s conftest.err
10507 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010508 ac_hi=$ac_mid; break
10509else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010510 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010511sed 's/^/| /' conftest.$ac_ext >&5
10512
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010513 ac_lo=`expr $ac_mid + 1`
10514 if test $ac_lo -le $ac_mid; then
10515 ac_lo= ac_hi=
10516 break
10517 fi
10518 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010519fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010520
10521rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010522 done
10523else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010524 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010525sed 's/^/| /' conftest.$ac_ext >&5
10526
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010527 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +000010528/* confdefs.h. */
10529_ACEOF
10530cat confdefs.h >>conftest.$ac_ext
10531cat >>conftest.$ac_ext <<_ACEOF
10532/* end confdefs.h. */
10533$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010534 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010535int
10536main ()
10537{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010538static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010539test_array [0] = 0
10540
10541 ;
10542 return 0;
10543}
10544_ACEOF
10545rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010546if { (ac_try="$ac_compile"
10547case "(($ac_try" in
10548 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10549 *) ac_try_echo=$ac_try;;
10550esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010551eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010552 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010553 ac_status=$?
10554 grep -v '^ *+' conftest.er1 >conftest.err
10555 rm -f conftest.er1
10556 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010558 (exit $ac_status); } && {
10559 test -z "$ac_c_werror_flag" ||
10560 test ! -s conftest.err
10561 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010562 ac_hi=-1 ac_mid=-1
10563 while :; do
10564 cat >conftest.$ac_ext <<_ACEOF
10565/* confdefs.h. */
10566_ACEOF
10567cat confdefs.h >>conftest.$ac_ext
10568cat >>conftest.$ac_ext <<_ACEOF
10569/* end confdefs.h. */
10570$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010571 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010572int
10573main ()
10574{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010575static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010576test_array [0] = 0
10577
10578 ;
10579 return 0;
10580}
10581_ACEOF
10582rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010583if { (ac_try="$ac_compile"
10584case "(($ac_try" in
10585 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10586 *) ac_try_echo=$ac_try;;
10587esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010588eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010589 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010590 ac_status=$?
10591 grep -v '^ *+' conftest.er1 >conftest.err
10592 rm -f conftest.er1
10593 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010595 (exit $ac_status); } && {
10596 test -z "$ac_c_werror_flag" ||
10597 test ! -s conftest.err
10598 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010599 ac_lo=$ac_mid; break
10600else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010601 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010602sed 's/^/| /' conftest.$ac_ext >&5
10603
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010604 ac_hi=`expr '(' $ac_mid ')' - 1`
10605 if test $ac_mid -le $ac_hi; then
10606 ac_lo= ac_hi=
10607 break
10608 fi
10609 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010610fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010611
10612rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010613 done
10614else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010615 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010616sed 's/^/| /' conftest.$ac_ext >&5
10617
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010618 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +000010619fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010620
10621rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010622fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010623
10624rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010625# Binary search between lo and hi bounds.
10626while test "x$ac_lo" != "x$ac_hi"; do
10627 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10628 cat >conftest.$ac_ext <<_ACEOF
10629/* confdefs.h. */
10630_ACEOF
10631cat confdefs.h >>conftest.$ac_ext
10632cat >>conftest.$ac_ext <<_ACEOF
10633/* end confdefs.h. */
10634$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010635 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010636int
10637main ()
10638{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010639static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010640test_array [0] = 0
10641
10642 ;
10643 return 0;
10644}
10645_ACEOF
10646rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010647if { (ac_try="$ac_compile"
10648case "(($ac_try" in
10649 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10650 *) ac_try_echo=$ac_try;;
10651esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010652eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010653 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010654 ac_status=$?
10655 grep -v '^ *+' conftest.er1 >conftest.err
10656 rm -f conftest.er1
10657 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010659 (exit $ac_status); } && {
10660 test -z "$ac_c_werror_flag" ||
10661 test ! -s conftest.err
10662 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010663 ac_hi=$ac_mid
10664else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010665 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010666sed 's/^/| /' conftest.$ac_ext >&5
10667
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010668 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010669fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010670
10671rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010672done
10673case $ac_lo in
10674?*) ac_cv_sizeof_size_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010675'') if test "$ac_cv_type_size_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010676 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010677See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010678echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010679See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010680 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010681 else
10682 ac_cv_sizeof_size_t=0
10683 fi ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010684esac
10685else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010686 cat >conftest.$ac_ext <<_ACEOF
10687/* confdefs.h. */
10688_ACEOF
10689cat confdefs.h >>conftest.$ac_ext
10690cat >>conftest.$ac_ext <<_ACEOF
10691/* end confdefs.h. */
10692$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010693 typedef size_t ac__type_sizeof_;
10694static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10695static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010696#include <stdio.h>
10697#include <stdlib.h>
10698int
10699main ()
10700{
10701
10702 FILE *f = fopen ("conftest.val", "w");
10703 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010704 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010705 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010706 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010707 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010708 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010709 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010710 fprintf (f, "%ld\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010711 }
10712 else
10713 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010714 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010715 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010716 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010717 fprintf (f, "%lu\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010718 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010719 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010720
10721 ;
10722 return 0;
10723}
10724_ACEOF
10725rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010726if { (ac_try="$ac_link"
10727case "(($ac_try" in
10728 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10729 *) ac_try_echo=$ac_try;;
10730esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010731eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010732 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010733 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010735 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010736 { (case "(($ac_try" in
10737 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10738 *) ac_try_echo=$ac_try;;
10739esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010740eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010741 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010742 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010744 (exit $ac_status); }; }; then
10745 ac_cv_sizeof_size_t=`cat conftest.val`
10746else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010747 echo "$as_me: program exited with status $ac_status" >&5
10748echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010749sed 's/^/| /' conftest.$ac_ext >&5
10750
10751( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010752if test "$ac_cv_type_size_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010753 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010754See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010755echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010756See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010757 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010758 else
10759 ac_cv_sizeof_size_t=0
10760 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +000010761fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010762rm -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 +000010763fi
10764rm -f conftest.val
Martin v. Löwis18e16552006-02-15 17:27:45 +000010765fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010766{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
10767echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010768
10769
10770
Martin v. Löwis18e16552006-02-15 17:27:45 +000010771cat >>confdefs.h <<_ACEOF
10772#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
10773_ACEOF
10774
10775
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010776{ echo "$as_me:$LINENO: checking for pid_t" >&5
10777echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
10778if test "${ac_cv_type_pid_t+set}" = set; then
10779 echo $ECHO_N "(cached) $ECHO_C" >&6
10780else
10781 cat >conftest.$ac_ext <<_ACEOF
10782/* confdefs.h. */
10783_ACEOF
10784cat confdefs.h >>conftest.$ac_ext
10785cat >>conftest.$ac_ext <<_ACEOF
10786/* end confdefs.h. */
10787$ac_includes_default
10788typedef pid_t ac__type_new_;
10789int
10790main ()
10791{
10792if ((ac__type_new_ *) 0)
10793 return 0;
10794if (sizeof (ac__type_new_))
10795 return 0;
10796 ;
10797 return 0;
10798}
10799_ACEOF
10800rm -f conftest.$ac_objext
10801if { (ac_try="$ac_compile"
10802case "(($ac_try" in
10803 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10804 *) ac_try_echo=$ac_try;;
10805esac
10806eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10807 (eval "$ac_compile") 2>conftest.er1
10808 ac_status=$?
10809 grep -v '^ *+' conftest.er1 >conftest.err
10810 rm -f conftest.er1
10811 cat conftest.err >&5
10812 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10813 (exit $ac_status); } && {
10814 test -z "$ac_c_werror_flag" ||
10815 test ! -s conftest.err
10816 } && test -s conftest.$ac_objext; then
10817 ac_cv_type_pid_t=yes
10818else
10819 echo "$as_me: failed program was:" >&5
10820sed 's/^/| /' conftest.$ac_ext >&5
10821
10822 ac_cv_type_pid_t=no
10823fi
10824
10825rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10826fi
10827{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10828echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
10829
Christian Heimes400adb02008-02-01 08:12:03 +000010830# The cast to long int works around a bug in the HP C Compiler
10831# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10832# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10833# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010834{ echo "$as_me:$LINENO: checking size of pid_t" >&5
10835echo $ECHO_N "checking size of pid_t... $ECHO_C" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +000010836if test "${ac_cv_sizeof_pid_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010837 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes400adb02008-02-01 08:12:03 +000010838else
10839 if test "$cross_compiling" = yes; then
10840 # Depending upon the size, compute the lo and hi bounds.
10841cat >conftest.$ac_ext <<_ACEOF
10842/* confdefs.h. */
10843_ACEOF
10844cat confdefs.h >>conftest.$ac_ext
10845cat >>conftest.$ac_ext <<_ACEOF
10846/* end confdefs.h. */
10847$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010848 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010849int
10850main ()
10851{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010852static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Christian Heimes400adb02008-02-01 08:12:03 +000010853test_array [0] = 0
10854
10855 ;
10856 return 0;
10857}
10858_ACEOF
10859rm -f conftest.$ac_objext
10860if { (ac_try="$ac_compile"
10861case "(($ac_try" in
10862 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10863 *) ac_try_echo=$ac_try;;
10864esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010865eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010866 (eval "$ac_compile") 2>conftest.er1
10867 ac_status=$?
10868 grep -v '^ *+' conftest.er1 >conftest.err
10869 rm -f conftest.er1
10870 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010872 (exit $ac_status); } && {
10873 test -z "$ac_c_werror_flag" ||
10874 test ! -s conftest.err
10875 } && test -s conftest.$ac_objext; then
10876 ac_lo=0 ac_mid=0
10877 while :; do
10878 cat >conftest.$ac_ext <<_ACEOF
10879/* confdefs.h. */
10880_ACEOF
10881cat confdefs.h >>conftest.$ac_ext
10882cat >>conftest.$ac_ext <<_ACEOF
10883/* end confdefs.h. */
10884$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010885 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010886int
10887main ()
10888{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010889static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000010890test_array [0] = 0
10891
10892 ;
10893 return 0;
10894}
10895_ACEOF
10896rm -f conftest.$ac_objext
10897if { (ac_try="$ac_compile"
10898case "(($ac_try" in
10899 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10900 *) ac_try_echo=$ac_try;;
10901esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010902eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010903 (eval "$ac_compile") 2>conftest.er1
10904 ac_status=$?
10905 grep -v '^ *+' conftest.er1 >conftest.err
10906 rm -f conftest.er1
10907 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010909 (exit $ac_status); } && {
10910 test -z "$ac_c_werror_flag" ||
10911 test ! -s conftest.err
10912 } && test -s conftest.$ac_objext; then
10913 ac_hi=$ac_mid; break
10914else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010915 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010916sed 's/^/| /' conftest.$ac_ext >&5
10917
10918 ac_lo=`expr $ac_mid + 1`
10919 if test $ac_lo -le $ac_mid; then
10920 ac_lo= ac_hi=
10921 break
10922 fi
10923 ac_mid=`expr 2 '*' $ac_mid + 1`
10924fi
10925
10926rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10927 done
10928else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010929 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010930sed 's/^/| /' conftest.$ac_ext >&5
10931
10932 cat >conftest.$ac_ext <<_ACEOF
10933/* confdefs.h. */
10934_ACEOF
10935cat confdefs.h >>conftest.$ac_ext
10936cat >>conftest.$ac_ext <<_ACEOF
10937/* end confdefs.h. */
10938$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010939 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010940int
10941main ()
10942{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010943static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Christian Heimes400adb02008-02-01 08:12:03 +000010944test_array [0] = 0
10945
10946 ;
10947 return 0;
10948}
10949_ACEOF
10950rm -f conftest.$ac_objext
10951if { (ac_try="$ac_compile"
10952case "(($ac_try" in
10953 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10954 *) ac_try_echo=$ac_try;;
10955esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010956eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010957 (eval "$ac_compile") 2>conftest.er1
10958 ac_status=$?
10959 grep -v '^ *+' conftest.er1 >conftest.err
10960 rm -f conftest.er1
10961 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010963 (exit $ac_status); } && {
10964 test -z "$ac_c_werror_flag" ||
10965 test ! -s conftest.err
10966 } && test -s conftest.$ac_objext; then
10967 ac_hi=-1 ac_mid=-1
10968 while :; do
10969 cat >conftest.$ac_ext <<_ACEOF
10970/* confdefs.h. */
10971_ACEOF
10972cat confdefs.h >>conftest.$ac_ext
10973cat >>conftest.$ac_ext <<_ACEOF
10974/* end confdefs.h. */
10975$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010976 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010977int
10978main ()
10979{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010980static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000010981test_array [0] = 0
10982
10983 ;
10984 return 0;
10985}
10986_ACEOF
10987rm -f conftest.$ac_objext
10988if { (ac_try="$ac_compile"
10989case "(($ac_try" in
10990 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10991 *) ac_try_echo=$ac_try;;
10992esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010993eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010994 (eval "$ac_compile") 2>conftest.er1
10995 ac_status=$?
10996 grep -v '^ *+' conftest.er1 >conftest.err
10997 rm -f conftest.er1
10998 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011000 (exit $ac_status); } && {
11001 test -z "$ac_c_werror_flag" ||
11002 test ! -s conftest.err
11003 } && test -s conftest.$ac_objext; then
11004 ac_lo=$ac_mid; break
11005else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011006 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011007sed 's/^/| /' conftest.$ac_ext >&5
11008
11009 ac_hi=`expr '(' $ac_mid ')' - 1`
11010 if test $ac_mid -le $ac_hi; then
11011 ac_lo= ac_hi=
11012 break
11013 fi
11014 ac_mid=`expr 2 '*' $ac_mid`
11015fi
11016
11017rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11018 done
11019else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011020 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011021sed 's/^/| /' conftest.$ac_ext >&5
11022
11023 ac_lo= ac_hi=
11024fi
11025
11026rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11027fi
11028
11029rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11030# Binary search between lo and hi bounds.
11031while test "x$ac_lo" != "x$ac_hi"; do
11032 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11033 cat >conftest.$ac_ext <<_ACEOF
11034/* confdefs.h. */
11035_ACEOF
11036cat confdefs.h >>conftest.$ac_ext
11037cat >>conftest.$ac_ext <<_ACEOF
11038/* end confdefs.h. */
11039$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011040 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000011041int
11042main ()
11043{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011044static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000011045test_array [0] = 0
11046
11047 ;
11048 return 0;
11049}
11050_ACEOF
11051rm -f conftest.$ac_objext
11052if { (ac_try="$ac_compile"
11053case "(($ac_try" in
11054 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11055 *) ac_try_echo=$ac_try;;
11056esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011057eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011058 (eval "$ac_compile") 2>conftest.er1
11059 ac_status=$?
11060 grep -v '^ *+' conftest.er1 >conftest.err
11061 rm -f conftest.er1
11062 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011064 (exit $ac_status); } && {
11065 test -z "$ac_c_werror_flag" ||
11066 test ! -s conftest.err
11067 } && test -s conftest.$ac_objext; then
11068 ac_hi=$ac_mid
11069else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011070 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011071sed 's/^/| /' conftest.$ac_ext >&5
11072
11073 ac_lo=`expr '(' $ac_mid ')' + 1`
11074fi
11075
11076rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11077done
11078case $ac_lo in
11079?*) ac_cv_sizeof_pid_t=$ac_lo;;
11080'') if test "$ac_cv_type_pid_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011081 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011082See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011083echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011084See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011085 { (exit 77); exit 77; }; }
Christian Heimes400adb02008-02-01 08:12:03 +000011086 else
11087 ac_cv_sizeof_pid_t=0
11088 fi ;;
11089esac
11090else
11091 cat >conftest.$ac_ext <<_ACEOF
11092/* confdefs.h. */
11093_ACEOF
11094cat confdefs.h >>conftest.$ac_ext
11095cat >>conftest.$ac_ext <<_ACEOF
11096/* end confdefs.h. */
11097$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011098 typedef pid_t ac__type_sizeof_;
11099static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11100static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Christian Heimes400adb02008-02-01 08:12:03 +000011101#include <stdio.h>
11102#include <stdlib.h>
11103int
11104main ()
11105{
11106
11107 FILE *f = fopen ("conftest.val", "w");
11108 if (! f)
11109 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011110 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Christian Heimes400adb02008-02-01 08:12:03 +000011111 {
11112 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011113 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes400adb02008-02-01 08:12:03 +000011114 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011115 fprintf (f, "%ld\n", i);
Christian Heimes400adb02008-02-01 08:12:03 +000011116 }
11117 else
11118 {
11119 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011120 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes400adb02008-02-01 08:12:03 +000011121 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011122 fprintf (f, "%lu\n", i);
Christian Heimes400adb02008-02-01 08:12:03 +000011123 }
11124 return ferror (f) || fclose (f) != 0;
11125
11126 ;
11127 return 0;
11128}
11129_ACEOF
11130rm -f conftest$ac_exeext
11131if { (ac_try="$ac_link"
11132case "(($ac_try" in
11133 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11134 *) ac_try_echo=$ac_try;;
11135esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011136eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011137 (eval "$ac_link") 2>&5
11138 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011140 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11141 { (case "(($ac_try" in
11142 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11143 *) ac_try_echo=$ac_try;;
11144esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011145eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011146 (eval "$ac_try") 2>&5
11147 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011149 (exit $ac_status); }; }; then
11150 ac_cv_sizeof_pid_t=`cat conftest.val`
11151else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011152 echo "$as_me: program exited with status $ac_status" >&5
11153echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011154sed 's/^/| /' conftest.$ac_ext >&5
11155
11156( exit $ac_status )
11157if test "$ac_cv_type_pid_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011158 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011159See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011160echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011161See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011162 { (exit 77); exit 77; }; }
Christian Heimes400adb02008-02-01 08:12:03 +000011163 else
11164 ac_cv_sizeof_pid_t=0
11165 fi
11166fi
11167rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11168fi
11169rm -f conftest.val
11170fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011171{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5
11172echo "${ECHO_T}$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +000011173
11174
11175
11176cat >>confdefs.h <<_ACEOF
11177#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
11178_ACEOF
11179
11180
Michael W. Hudson54241132001-12-07 15:38:26 +000011181
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011182{ echo "$as_me:$LINENO: checking for long long support" >&5
11183echo $ECHO_N "checking for long long support... $ECHO_C" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011184have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011185cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011186/* confdefs.h. */
11187_ACEOF
11188cat confdefs.h >>conftest.$ac_ext
11189cat >>conftest.$ac_ext <<_ACEOF
11190/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011191
Martin v. Löwis11437992002-04-12 09:54:03 +000011192int
11193main ()
11194{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011195long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011196 ;
11197 return 0;
11198}
11199_ACEOF
11200rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011201if { (ac_try="$ac_compile"
11202case "(($ac_try" in
11203 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11204 *) ac_try_echo=$ac_try;;
11205esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011206eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011207 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011208 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011209 grep -v '^ *+' conftest.er1 >conftest.err
11210 rm -f conftest.er1
11211 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011213 (exit $ac_status); } && {
11214 test -z "$ac_c_werror_flag" ||
11215 test ! -s conftest.err
11216 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011217
11218
11219cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011220#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011221_ACEOF
11222
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011223 have_long_long=yes
11224
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011225else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011226 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011227sed 's/^/| /' conftest.$ac_ext >&5
11228
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011229
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011230fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011231
11232rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011233{ echo "$as_me:$LINENO: result: $have_long_long" >&5
11234echo "${ECHO_T}$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000011235if test "$have_long_long" = yes ; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011236{ echo "$as_me:$LINENO: checking for long long" >&5
11237echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
11238if test "${ac_cv_type_long_long+set}" = set; then
11239 echo $ECHO_N "(cached) $ECHO_C" >&6
11240else
11241 cat >conftest.$ac_ext <<_ACEOF
11242/* confdefs.h. */
11243_ACEOF
11244cat confdefs.h >>conftest.$ac_ext
11245cat >>conftest.$ac_ext <<_ACEOF
11246/* end confdefs.h. */
11247$ac_includes_default
11248typedef long long ac__type_new_;
11249int
11250main ()
11251{
11252if ((ac__type_new_ *) 0)
11253 return 0;
11254if (sizeof (ac__type_new_))
11255 return 0;
11256 ;
11257 return 0;
11258}
11259_ACEOF
11260rm -f conftest.$ac_objext
11261if { (ac_try="$ac_compile"
11262case "(($ac_try" in
11263 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11264 *) ac_try_echo=$ac_try;;
11265esac
11266eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11267 (eval "$ac_compile") 2>conftest.er1
11268 ac_status=$?
11269 grep -v '^ *+' conftest.er1 >conftest.err
11270 rm -f conftest.er1
11271 cat conftest.err >&5
11272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11273 (exit $ac_status); } && {
11274 test -z "$ac_c_werror_flag" ||
11275 test ! -s conftest.err
11276 } && test -s conftest.$ac_objext; then
11277 ac_cv_type_long_long=yes
11278else
11279 echo "$as_me: failed program was:" >&5
11280sed 's/^/| /' conftest.$ac_ext >&5
11281
11282 ac_cv_type_long_long=no
11283fi
11284
11285rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11286fi
11287{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
11288echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
11289
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011290# The cast to long int works around a bug in the HP C Compiler
11291# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11292# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11293# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011294{ echo "$as_me:$LINENO: checking size of long long" >&5
11295echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011296if test "${ac_cv_sizeof_long_long+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011297 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011298else
Martin v. Löwis11437992002-04-12 09:54:03 +000011299 if test "$cross_compiling" = yes; then
11300 # Depending upon the size, compute the lo and hi bounds.
11301cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011302/* confdefs.h. */
11303_ACEOF
11304cat confdefs.h >>conftest.$ac_ext
11305cat >>conftest.$ac_ext <<_ACEOF
11306/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011307$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011308 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011309int
11310main ()
11311{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011312static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011313test_array [0] = 0
11314
11315 ;
11316 return 0;
11317}
11318_ACEOF
11319rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011320if { (ac_try="$ac_compile"
11321case "(($ac_try" in
11322 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11323 *) ac_try_echo=$ac_try;;
11324esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011325eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011326 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011327 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011328 grep -v '^ *+' conftest.er1 >conftest.err
11329 rm -f conftest.er1
11330 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011332 (exit $ac_status); } && {
11333 test -z "$ac_c_werror_flag" ||
11334 test ! -s conftest.err
11335 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011336 ac_lo=0 ac_mid=0
11337 while :; do
11338 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011339/* confdefs.h. */
11340_ACEOF
11341cat confdefs.h >>conftest.$ac_ext
11342cat >>conftest.$ac_ext <<_ACEOF
11343/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011344$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011345 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011346int
11347main ()
11348{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011349static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011350test_array [0] = 0
11351
11352 ;
11353 return 0;
11354}
11355_ACEOF
11356rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011357if { (ac_try="$ac_compile"
11358case "(($ac_try" in
11359 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11360 *) ac_try_echo=$ac_try;;
11361esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011362eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011363 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011364 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011365 grep -v '^ *+' conftest.er1 >conftest.err
11366 rm -f conftest.er1
11367 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011369 (exit $ac_status); } && {
11370 test -z "$ac_c_werror_flag" ||
11371 test ! -s conftest.err
11372 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011373 ac_hi=$ac_mid; break
11374else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011375 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011376sed 's/^/| /' conftest.$ac_ext >&5
11377
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011378 ac_lo=`expr $ac_mid + 1`
11379 if test $ac_lo -le $ac_mid; then
11380 ac_lo= ac_hi=
11381 break
11382 fi
11383 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011384fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011385
11386rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011387 done
11388else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011389 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011390sed 's/^/| /' conftest.$ac_ext >&5
11391
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011392 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011393/* confdefs.h. */
11394_ACEOF
11395cat confdefs.h >>conftest.$ac_ext
11396cat >>conftest.$ac_ext <<_ACEOF
11397/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011398$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011399 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011400int
11401main ()
11402{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011403static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011404test_array [0] = 0
11405
11406 ;
11407 return 0;
11408}
11409_ACEOF
11410rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011411if { (ac_try="$ac_compile"
11412case "(($ac_try" in
11413 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11414 *) ac_try_echo=$ac_try;;
11415esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011416eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011417 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011418 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011419 grep -v '^ *+' conftest.er1 >conftest.err
11420 rm -f conftest.er1
11421 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011423 (exit $ac_status); } && {
11424 test -z "$ac_c_werror_flag" ||
11425 test ! -s conftest.err
11426 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011427 ac_hi=-1 ac_mid=-1
11428 while :; do
11429 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011430/* confdefs.h. */
11431_ACEOF
11432cat confdefs.h >>conftest.$ac_ext
11433cat >>conftest.$ac_ext <<_ACEOF
11434/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011435$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011436 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011437int
11438main ()
11439{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011440static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011441test_array [0] = 0
11442
11443 ;
11444 return 0;
11445}
11446_ACEOF
11447rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011448if { (ac_try="$ac_compile"
11449case "(($ac_try" in
11450 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11451 *) ac_try_echo=$ac_try;;
11452esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011453eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011454 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011455 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011456 grep -v '^ *+' conftest.er1 >conftest.err
11457 rm -f conftest.er1
11458 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011460 (exit $ac_status); } && {
11461 test -z "$ac_c_werror_flag" ||
11462 test ! -s conftest.err
11463 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011464 ac_lo=$ac_mid; break
11465else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011466 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011467sed 's/^/| /' conftest.$ac_ext >&5
11468
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011469 ac_hi=`expr '(' $ac_mid ')' - 1`
11470 if test $ac_mid -le $ac_hi; then
11471 ac_lo= ac_hi=
11472 break
11473 fi
11474 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000011475fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011476
11477rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011478 done
11479else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011480 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011481sed 's/^/| /' conftest.$ac_ext >&5
11482
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011483 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000011484fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011485
11486rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011487fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011488
11489rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011490# Binary search between lo and hi bounds.
11491while test "x$ac_lo" != "x$ac_hi"; do
11492 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11493 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011494/* confdefs.h. */
11495_ACEOF
11496cat confdefs.h >>conftest.$ac_ext
11497cat >>conftest.$ac_ext <<_ACEOF
11498/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011499$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011500 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011501int
11502main ()
11503{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011504static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011505test_array [0] = 0
11506
11507 ;
11508 return 0;
11509}
11510_ACEOF
11511rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011512if { (ac_try="$ac_compile"
11513case "(($ac_try" in
11514 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11515 *) ac_try_echo=$ac_try;;
11516esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011517eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011518 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011519 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011520 grep -v '^ *+' conftest.er1 >conftest.err
11521 rm -f conftest.er1
11522 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011524 (exit $ac_status); } && {
11525 test -z "$ac_c_werror_flag" ||
11526 test ! -s conftest.err
11527 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011528 ac_hi=$ac_mid
11529else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011530 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011531sed 's/^/| /' conftest.$ac_ext >&5
11532
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011533 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011534fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011535
11536rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011537done
11538case $ac_lo in
11539?*) ac_cv_sizeof_long_long=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011540'') if test "$ac_cv_type_long_long" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011541 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011542See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011543echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011544See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011545 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011546 else
11547 ac_cv_sizeof_long_long=0
11548 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011549esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011550else
Martin v. Löwis11437992002-04-12 09:54:03 +000011551 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011552/* confdefs.h. */
11553_ACEOF
11554cat confdefs.h >>conftest.$ac_ext
11555cat >>conftest.$ac_ext <<_ACEOF
11556/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011557$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011558 typedef long long ac__type_sizeof_;
11559static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11560static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011561#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011562#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011563int
11564main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011565{
Martin v. Löwis11437992002-04-12 09:54:03 +000011566
11567 FILE *f = fopen ("conftest.val", "w");
11568 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011569 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011570 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011571 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011572 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011573 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011574 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011575 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011576 }
11577 else
11578 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011579 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011580 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011581 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011582 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011583 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011584 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011585
11586 ;
11587 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011588}
Martin v. Löwis11437992002-04-12 09:54:03 +000011589_ACEOF
11590rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011591if { (ac_try="$ac_link"
11592case "(($ac_try" in
11593 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11594 *) ac_try_echo=$ac_try;;
11595esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011596eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011597 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011598 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011599 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011600 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011601 { (case "(($ac_try" in
11602 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11603 *) ac_try_echo=$ac_try;;
11604esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011605eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011606 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011607 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011609 (exit $ac_status); }; }; then
11610 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011611else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011612 echo "$as_me: program exited with status $ac_status" >&5
11613echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011614sed 's/^/| /' conftest.$ac_ext >&5
11615
Martin v. Löwis11437992002-04-12 09:54:03 +000011616( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011617if test "$ac_cv_type_long_long" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011618 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011619See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011620echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011621See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011622 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011623 else
11624 ac_cv_sizeof_long_long=0
11625 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011626fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011627rm -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 +000011628fi
11629rm -f conftest.val
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011630fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011631{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
11632echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011633
11634
11635
Martin v. Löwis11437992002-04-12 09:54:03 +000011636cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011637#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000011638_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011639
Michael W. Hudson54241132001-12-07 15:38:26 +000011640
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011641fi
11642
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011643{ echo "$as_me:$LINENO: checking for long double support" >&5
11644echo $ECHO_N "checking for long double support... $ECHO_C" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011645have_long_double=no
11646cat >conftest.$ac_ext <<_ACEOF
11647/* confdefs.h. */
11648_ACEOF
11649cat confdefs.h >>conftest.$ac_ext
11650cat >>conftest.$ac_ext <<_ACEOF
11651/* end confdefs.h. */
11652
11653int
11654main ()
11655{
11656long double x; x = (long double)0;
11657 ;
11658 return 0;
11659}
11660_ACEOF
11661rm -f conftest.$ac_objext
11662if { (ac_try="$ac_compile"
11663case "(($ac_try" in
11664 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11665 *) ac_try_echo=$ac_try;;
11666esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011667eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011668 (eval "$ac_compile") 2>conftest.er1
11669 ac_status=$?
11670 grep -v '^ *+' conftest.er1 >conftest.err
11671 rm -f conftest.er1
11672 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011673 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011674 (exit $ac_status); } && {
11675 test -z "$ac_c_werror_flag" ||
11676 test ! -s conftest.err
11677 } && test -s conftest.$ac_objext; then
11678
11679
11680cat >>confdefs.h <<\_ACEOF
11681#define HAVE_LONG_DOUBLE 1
11682_ACEOF
11683
11684 have_long_double=yes
11685
11686else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011687 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011688sed 's/^/| /' conftest.$ac_ext >&5
11689
11690
11691fi
11692
11693rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011694{ echo "$as_me:$LINENO: result: $have_long_double" >&5
11695echo "${ECHO_T}$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011696if test "$have_long_double" = yes ; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011697{ echo "$as_me:$LINENO: checking for long double" >&5
11698echo $ECHO_N "checking for long double... $ECHO_C" >&6; }
11699if test "${ac_cv_type_long_double+set}" = set; then
11700 echo $ECHO_N "(cached) $ECHO_C" >&6
11701else
11702 cat >conftest.$ac_ext <<_ACEOF
11703/* confdefs.h. */
11704_ACEOF
11705cat confdefs.h >>conftest.$ac_ext
11706cat >>conftest.$ac_ext <<_ACEOF
11707/* end confdefs.h. */
11708$ac_includes_default
11709typedef long double ac__type_new_;
11710int
11711main ()
11712{
11713if ((ac__type_new_ *) 0)
11714 return 0;
11715if (sizeof (ac__type_new_))
11716 return 0;
11717 ;
11718 return 0;
11719}
11720_ACEOF
11721rm -f conftest.$ac_objext
11722if { (ac_try="$ac_compile"
11723case "(($ac_try" in
11724 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11725 *) ac_try_echo=$ac_try;;
11726esac
11727eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11728 (eval "$ac_compile") 2>conftest.er1
11729 ac_status=$?
11730 grep -v '^ *+' conftest.er1 >conftest.err
11731 rm -f conftest.er1
11732 cat conftest.err >&5
11733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11734 (exit $ac_status); } && {
11735 test -z "$ac_c_werror_flag" ||
11736 test ! -s conftest.err
11737 } && test -s conftest.$ac_objext; then
11738 ac_cv_type_long_double=yes
11739else
11740 echo "$as_me: failed program was:" >&5
11741sed 's/^/| /' conftest.$ac_ext >&5
11742
11743 ac_cv_type_long_double=no
11744fi
11745
11746rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11747fi
11748{ echo "$as_me:$LINENO: result: $ac_cv_type_long_double" >&5
11749echo "${ECHO_T}$ac_cv_type_long_double" >&6; }
11750
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011751# The cast to long int works around a bug in the HP C Compiler
11752# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11753# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11754# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011755{ echo "$as_me:$LINENO: checking size of long double" >&5
11756echo $ECHO_N "checking size of long double... $ECHO_C" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011757if test "${ac_cv_sizeof_long_double+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011758 echo $ECHO_N "(cached) $ECHO_C" >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011759else
11760 if test "$cross_compiling" = yes; then
11761 # Depending upon the size, compute the lo and hi bounds.
11762cat >conftest.$ac_ext <<_ACEOF
11763/* confdefs.h. */
11764_ACEOF
11765cat confdefs.h >>conftest.$ac_ext
11766cat >>conftest.$ac_ext <<_ACEOF
11767/* end confdefs.h. */
11768$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011769 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011770int
11771main ()
11772{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011773static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011774test_array [0] = 0
11775
11776 ;
11777 return 0;
11778}
11779_ACEOF
11780rm -f conftest.$ac_objext
11781if { (ac_try="$ac_compile"
11782case "(($ac_try" in
11783 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11784 *) ac_try_echo=$ac_try;;
11785esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011786eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011787 (eval "$ac_compile") 2>conftest.er1
11788 ac_status=$?
11789 grep -v '^ *+' conftest.er1 >conftest.err
11790 rm -f conftest.er1
11791 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011793 (exit $ac_status); } && {
11794 test -z "$ac_c_werror_flag" ||
11795 test ! -s conftest.err
11796 } && test -s conftest.$ac_objext; then
11797 ac_lo=0 ac_mid=0
11798 while :; do
11799 cat >conftest.$ac_ext <<_ACEOF
11800/* confdefs.h. */
11801_ACEOF
11802cat confdefs.h >>conftest.$ac_ext
11803cat >>conftest.$ac_ext <<_ACEOF
11804/* end confdefs.h. */
11805$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011806 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011807int
11808main ()
11809{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011810static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011811test_array [0] = 0
11812
11813 ;
11814 return 0;
11815}
11816_ACEOF
11817rm -f conftest.$ac_objext
11818if { (ac_try="$ac_compile"
11819case "(($ac_try" in
11820 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11821 *) ac_try_echo=$ac_try;;
11822esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011823eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011824 (eval "$ac_compile") 2>conftest.er1
11825 ac_status=$?
11826 grep -v '^ *+' conftest.er1 >conftest.err
11827 rm -f conftest.er1
11828 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011829 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011830 (exit $ac_status); } && {
11831 test -z "$ac_c_werror_flag" ||
11832 test ! -s conftest.err
11833 } && test -s conftest.$ac_objext; then
11834 ac_hi=$ac_mid; break
11835else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011836 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011837sed 's/^/| /' conftest.$ac_ext >&5
11838
11839 ac_lo=`expr $ac_mid + 1`
11840 if test $ac_lo -le $ac_mid; then
11841 ac_lo= ac_hi=
11842 break
11843 fi
11844 ac_mid=`expr 2 '*' $ac_mid + 1`
11845fi
11846
11847rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11848 done
11849else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011850 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011851sed 's/^/| /' conftest.$ac_ext >&5
11852
11853 cat >conftest.$ac_ext <<_ACEOF
11854/* confdefs.h. */
11855_ACEOF
11856cat confdefs.h >>conftest.$ac_ext
11857cat >>conftest.$ac_ext <<_ACEOF
11858/* end confdefs.h. */
11859$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011860 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011861int
11862main ()
11863{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011864static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011865test_array [0] = 0
11866
11867 ;
11868 return 0;
11869}
11870_ACEOF
11871rm -f conftest.$ac_objext
11872if { (ac_try="$ac_compile"
11873case "(($ac_try" in
11874 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11875 *) ac_try_echo=$ac_try;;
11876esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011877eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011878 (eval "$ac_compile") 2>conftest.er1
11879 ac_status=$?
11880 grep -v '^ *+' conftest.er1 >conftest.err
11881 rm -f conftest.er1
11882 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011883 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011884 (exit $ac_status); } && {
11885 test -z "$ac_c_werror_flag" ||
11886 test ! -s conftest.err
11887 } && test -s conftest.$ac_objext; then
11888 ac_hi=-1 ac_mid=-1
11889 while :; do
11890 cat >conftest.$ac_ext <<_ACEOF
11891/* confdefs.h. */
11892_ACEOF
11893cat confdefs.h >>conftest.$ac_ext
11894cat >>conftest.$ac_ext <<_ACEOF
11895/* end confdefs.h. */
11896$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011897 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011898int
11899main ()
11900{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011901static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011902test_array [0] = 0
11903
11904 ;
11905 return 0;
11906}
11907_ACEOF
11908rm -f conftest.$ac_objext
11909if { (ac_try="$ac_compile"
11910case "(($ac_try" in
11911 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11912 *) ac_try_echo=$ac_try;;
11913esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011914eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011915 (eval "$ac_compile") 2>conftest.er1
11916 ac_status=$?
11917 grep -v '^ *+' conftest.er1 >conftest.err
11918 rm -f conftest.er1
11919 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011921 (exit $ac_status); } && {
11922 test -z "$ac_c_werror_flag" ||
11923 test ! -s conftest.err
11924 } && test -s conftest.$ac_objext; then
11925 ac_lo=$ac_mid; break
11926else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011927 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011928sed 's/^/| /' conftest.$ac_ext >&5
11929
11930 ac_hi=`expr '(' $ac_mid ')' - 1`
11931 if test $ac_mid -le $ac_hi; then
11932 ac_lo= ac_hi=
11933 break
11934 fi
11935 ac_mid=`expr 2 '*' $ac_mid`
11936fi
11937
11938rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11939 done
11940else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011941 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011942sed 's/^/| /' conftest.$ac_ext >&5
11943
11944 ac_lo= ac_hi=
11945fi
11946
11947rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11948fi
11949
11950rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11951# Binary search between lo and hi bounds.
11952while test "x$ac_lo" != "x$ac_hi"; do
11953 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11954 cat >conftest.$ac_ext <<_ACEOF
11955/* confdefs.h. */
11956_ACEOF
11957cat confdefs.h >>conftest.$ac_ext
11958cat >>conftest.$ac_ext <<_ACEOF
11959/* end confdefs.h. */
11960$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011961 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011962int
11963main ()
11964{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011965static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011966test_array [0] = 0
11967
11968 ;
11969 return 0;
11970}
11971_ACEOF
11972rm -f conftest.$ac_objext
11973if { (ac_try="$ac_compile"
11974case "(($ac_try" in
11975 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11976 *) ac_try_echo=$ac_try;;
11977esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011978eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011979 (eval "$ac_compile") 2>conftest.er1
11980 ac_status=$?
11981 grep -v '^ *+' conftest.er1 >conftest.err
11982 rm -f conftest.er1
11983 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011985 (exit $ac_status); } && {
11986 test -z "$ac_c_werror_flag" ||
11987 test ! -s conftest.err
11988 } && test -s conftest.$ac_objext; then
11989 ac_hi=$ac_mid
11990else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011991 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011992sed 's/^/| /' conftest.$ac_ext >&5
11993
11994 ac_lo=`expr '(' $ac_mid ')' + 1`
11995fi
11996
11997rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11998done
11999case $ac_lo in
12000?*) ac_cv_sizeof_long_double=$ac_lo;;
12001'') if test "$ac_cv_type_long_double" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012002 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012003See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012004echo "$as_me: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012005See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012006 { (exit 77); exit 77; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012007 else
12008 ac_cv_sizeof_long_double=0
12009 fi ;;
12010esac
12011else
12012 cat >conftest.$ac_ext <<_ACEOF
12013/* confdefs.h. */
12014_ACEOF
12015cat confdefs.h >>conftest.$ac_ext
12016cat >>conftest.$ac_ext <<_ACEOF
12017/* end confdefs.h. */
12018$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012019 typedef long double ac__type_sizeof_;
12020static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12021static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012022#include <stdio.h>
12023#include <stdlib.h>
12024int
12025main ()
12026{
12027
12028 FILE *f = fopen ("conftest.val", "w");
12029 if (! f)
12030 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012031 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012032 {
12033 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012034 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012035 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012036 fprintf (f, "%ld\n", i);
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012037 }
12038 else
12039 {
12040 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012041 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012042 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012043 fprintf (f, "%lu\n", i);
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012044 }
12045 return ferror (f) || fclose (f) != 0;
12046
12047 ;
12048 return 0;
12049}
12050_ACEOF
12051rm -f conftest$ac_exeext
12052if { (ac_try="$ac_link"
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
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012058 (eval "$ac_link") 2>&5
12059 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012061 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12062 { (case "(($ac_try" in
12063 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12064 *) ac_try_echo=$ac_try;;
12065esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012066eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012067 (eval "$ac_try") 2>&5
12068 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012070 (exit $ac_status); }; }; then
12071 ac_cv_sizeof_long_double=`cat conftest.val`
12072else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012073 echo "$as_me: program exited with status $ac_status" >&5
12074echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012075sed 's/^/| /' conftest.$ac_ext >&5
12076
12077( exit $ac_status )
12078if test "$ac_cv_type_long_double" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012079 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012080See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012081echo "$as_me: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012082See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012083 { (exit 77); exit 77; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012084 else
12085 ac_cv_sizeof_long_double=0
12086 fi
12087fi
12088rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12089fi
12090rm -f conftest.val
12091fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012092{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5
12093echo "${ECHO_T}$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012094
12095
12096
12097cat >>confdefs.h <<_ACEOF
12098#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
12099_ACEOF
12100
12101
12102fi
12103
12104
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012105{ echo "$as_me:$LINENO: checking for _Bool support" >&5
12106echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012107have_c99_bool=no
12108cat >conftest.$ac_ext <<_ACEOF
12109/* confdefs.h. */
12110_ACEOF
12111cat confdefs.h >>conftest.$ac_ext
12112cat >>conftest.$ac_ext <<_ACEOF
12113/* end confdefs.h. */
12114
12115int
12116main ()
12117{
12118_Bool x; x = (_Bool)0;
12119 ;
12120 return 0;
12121}
12122_ACEOF
12123rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012124if { (ac_try="$ac_compile"
12125case "(($ac_try" in
12126 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12127 *) ac_try_echo=$ac_try;;
12128esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012129eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012130 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012131 ac_status=$?
12132 grep -v '^ *+' conftest.er1 >conftest.err
12133 rm -f conftest.er1
12134 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012136 (exit $ac_status); } && {
12137 test -z "$ac_c_werror_flag" ||
12138 test ! -s conftest.err
12139 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012140
12141
12142cat >>confdefs.h <<\_ACEOF
12143#define HAVE_C99_BOOL 1
12144_ACEOF
12145
12146 have_c99_bool=yes
12147
12148else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012149 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012150sed 's/^/| /' conftest.$ac_ext >&5
12151
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012152
Thomas Woutersb2137042007-02-01 18:02:27 +000012153fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012154
12155rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012156{ echo "$as_me:$LINENO: result: $have_c99_bool" >&5
12157echo "${ECHO_T}$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012158if test "$have_c99_bool" = yes ; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012159{ echo "$as_me:$LINENO: checking for _Bool" >&5
12160echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; }
12161if test "${ac_cv_type__Bool+set}" = set; then
12162 echo $ECHO_N "(cached) $ECHO_C" >&6
12163else
12164 cat >conftest.$ac_ext <<_ACEOF
12165/* confdefs.h. */
12166_ACEOF
12167cat confdefs.h >>conftest.$ac_ext
12168cat >>conftest.$ac_ext <<_ACEOF
12169/* end confdefs.h. */
12170$ac_includes_default
12171typedef _Bool ac__type_new_;
12172int
12173main ()
12174{
12175if ((ac__type_new_ *) 0)
12176 return 0;
12177if (sizeof (ac__type_new_))
12178 return 0;
12179 ;
12180 return 0;
12181}
12182_ACEOF
12183rm -f conftest.$ac_objext
12184if { (ac_try="$ac_compile"
12185case "(($ac_try" in
12186 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12187 *) ac_try_echo=$ac_try;;
12188esac
12189eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12190 (eval "$ac_compile") 2>conftest.er1
12191 ac_status=$?
12192 grep -v '^ *+' conftest.er1 >conftest.err
12193 rm -f conftest.er1
12194 cat conftest.err >&5
12195 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12196 (exit $ac_status); } && {
12197 test -z "$ac_c_werror_flag" ||
12198 test ! -s conftest.err
12199 } && test -s conftest.$ac_objext; then
12200 ac_cv_type__Bool=yes
12201else
12202 echo "$as_me: failed program was:" >&5
12203sed 's/^/| /' conftest.$ac_ext >&5
12204
12205 ac_cv_type__Bool=no
12206fi
12207
12208rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12209fi
12210{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
12211echo "${ECHO_T}$ac_cv_type__Bool" >&6; }
12212
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012213# The cast to long int works around a bug in the HP C Compiler
12214# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12215# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12216# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012217{ echo "$as_me:$LINENO: checking size of _Bool" >&5
12218echo $ECHO_N "checking size of _Bool... $ECHO_C" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012219if test "${ac_cv_sizeof__Bool+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012220 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Woutersb2137042007-02-01 18:02:27 +000012221else
12222 if test "$cross_compiling" = yes; then
12223 # Depending upon the size, compute the lo and hi bounds.
12224cat >conftest.$ac_ext <<_ACEOF
12225/* confdefs.h. */
12226_ACEOF
12227cat confdefs.h >>conftest.$ac_ext
12228cat >>conftest.$ac_ext <<_ACEOF
12229/* end confdefs.h. */
12230$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012231 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012232int
12233main ()
12234{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012235static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012236test_array [0] = 0
12237
12238 ;
12239 return 0;
12240}
12241_ACEOF
12242rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012243if { (ac_try="$ac_compile"
12244case "(($ac_try" in
12245 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12246 *) ac_try_echo=$ac_try;;
12247esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012248eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012249 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012250 ac_status=$?
12251 grep -v '^ *+' conftest.er1 >conftest.err
12252 rm -f conftest.er1
12253 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012255 (exit $ac_status); } && {
12256 test -z "$ac_c_werror_flag" ||
12257 test ! -s conftest.err
12258 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012259 ac_lo=0 ac_mid=0
12260 while :; do
12261 cat >conftest.$ac_ext <<_ACEOF
12262/* confdefs.h. */
12263_ACEOF
12264cat confdefs.h >>conftest.$ac_ext
12265cat >>conftest.$ac_ext <<_ACEOF
12266/* end confdefs.h. */
12267$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012268 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012269int
12270main ()
12271{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012272static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012273test_array [0] = 0
12274
12275 ;
12276 return 0;
12277}
12278_ACEOF
12279rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012280if { (ac_try="$ac_compile"
12281case "(($ac_try" in
12282 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12283 *) ac_try_echo=$ac_try;;
12284esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012285eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012286 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012287 ac_status=$?
12288 grep -v '^ *+' conftest.er1 >conftest.err
12289 rm -f conftest.er1
12290 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012292 (exit $ac_status); } && {
12293 test -z "$ac_c_werror_flag" ||
12294 test ! -s conftest.err
12295 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012296 ac_hi=$ac_mid; break
12297else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012298 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012299sed 's/^/| /' conftest.$ac_ext >&5
12300
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012301 ac_lo=`expr $ac_mid + 1`
12302 if test $ac_lo -le $ac_mid; then
12303 ac_lo= ac_hi=
12304 break
12305 fi
12306 ac_mid=`expr 2 '*' $ac_mid + 1`
Thomas Woutersb2137042007-02-01 18:02:27 +000012307fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012308
12309rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012310 done
12311else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012312 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012313sed 's/^/| /' conftest.$ac_ext >&5
12314
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012315 cat >conftest.$ac_ext <<_ACEOF
Thomas Woutersb2137042007-02-01 18:02:27 +000012316/* confdefs.h. */
12317_ACEOF
12318cat confdefs.h >>conftest.$ac_ext
12319cat >>conftest.$ac_ext <<_ACEOF
12320/* end confdefs.h. */
12321$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012322 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012323int
12324main ()
12325{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012326static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012327test_array [0] = 0
12328
12329 ;
12330 return 0;
12331}
12332_ACEOF
12333rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012334if { (ac_try="$ac_compile"
12335case "(($ac_try" in
12336 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12337 *) ac_try_echo=$ac_try;;
12338esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012339eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012340 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012341 ac_status=$?
12342 grep -v '^ *+' conftest.er1 >conftest.err
12343 rm -f conftest.er1
12344 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012346 (exit $ac_status); } && {
12347 test -z "$ac_c_werror_flag" ||
12348 test ! -s conftest.err
12349 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012350 ac_hi=-1 ac_mid=-1
12351 while :; do
12352 cat >conftest.$ac_ext <<_ACEOF
12353/* confdefs.h. */
12354_ACEOF
12355cat confdefs.h >>conftest.$ac_ext
12356cat >>conftest.$ac_ext <<_ACEOF
12357/* end confdefs.h. */
12358$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012359 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012360int
12361main ()
12362{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012363static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012364test_array [0] = 0
12365
12366 ;
12367 return 0;
12368}
12369_ACEOF
12370rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012371if { (ac_try="$ac_compile"
12372case "(($ac_try" in
12373 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12374 *) ac_try_echo=$ac_try;;
12375esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012376eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012377 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012378 ac_status=$?
12379 grep -v '^ *+' conftest.er1 >conftest.err
12380 rm -f conftest.er1
12381 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012383 (exit $ac_status); } && {
12384 test -z "$ac_c_werror_flag" ||
12385 test ! -s conftest.err
12386 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012387 ac_lo=$ac_mid; break
12388else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012389 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012390sed 's/^/| /' conftest.$ac_ext >&5
12391
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012392 ac_hi=`expr '(' $ac_mid ')' - 1`
12393 if test $ac_mid -le $ac_hi; then
12394 ac_lo= ac_hi=
12395 break
12396 fi
12397 ac_mid=`expr 2 '*' $ac_mid`
Thomas Woutersb2137042007-02-01 18:02:27 +000012398fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012399
12400rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012401 done
12402else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012403 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012404sed 's/^/| /' conftest.$ac_ext >&5
12405
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012406 ac_lo= ac_hi=
Thomas Woutersb2137042007-02-01 18:02:27 +000012407fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012408
12409rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012410fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012411
12412rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012413# Binary search between lo and hi bounds.
12414while test "x$ac_lo" != "x$ac_hi"; do
12415 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12416 cat >conftest.$ac_ext <<_ACEOF
12417/* confdefs.h. */
12418_ACEOF
12419cat confdefs.h >>conftest.$ac_ext
12420cat >>conftest.$ac_ext <<_ACEOF
12421/* end confdefs.h. */
12422$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012423 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012424int
12425main ()
12426{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012427static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012428test_array [0] = 0
12429
12430 ;
12431 return 0;
12432}
12433_ACEOF
12434rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012435if { (ac_try="$ac_compile"
12436case "(($ac_try" in
12437 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12438 *) ac_try_echo=$ac_try;;
12439esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012440eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012441 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012442 ac_status=$?
12443 grep -v '^ *+' conftest.er1 >conftest.err
12444 rm -f conftest.er1
12445 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012446 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012447 (exit $ac_status); } && {
12448 test -z "$ac_c_werror_flag" ||
12449 test ! -s conftest.err
12450 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012451 ac_hi=$ac_mid
12452else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012453 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012454sed 's/^/| /' conftest.$ac_ext >&5
12455
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012456 ac_lo=`expr '(' $ac_mid ')' + 1`
Thomas Woutersb2137042007-02-01 18:02:27 +000012457fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012458
12459rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012460done
12461case $ac_lo in
12462?*) ac_cv_sizeof__Bool=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012463'') if test "$ac_cv_type__Bool" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012464 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012465See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012466echo "$as_me: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012467See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012468 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012469 else
12470 ac_cv_sizeof__Bool=0
12471 fi ;;
Thomas Woutersb2137042007-02-01 18:02:27 +000012472esac
12473else
12474 cat >conftest.$ac_ext <<_ACEOF
12475/* confdefs.h. */
12476_ACEOF
12477cat confdefs.h >>conftest.$ac_ext
12478cat >>conftest.$ac_ext <<_ACEOF
12479/* end confdefs.h. */
12480$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012481 typedef _Bool ac__type_sizeof_;
12482static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12483static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Thomas Woutersb2137042007-02-01 18:02:27 +000012484#include <stdio.h>
12485#include <stdlib.h>
12486int
12487main ()
12488{
12489
12490 FILE *f = fopen ("conftest.val", "w");
12491 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012492 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012493 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Thomas Woutersb2137042007-02-01 18:02:27 +000012494 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012495 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012496 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012497 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012498 fprintf (f, "%ld\n", i);
Thomas Woutersb2137042007-02-01 18:02:27 +000012499 }
12500 else
12501 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012502 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012503 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012504 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012505 fprintf (f, "%lu\n", i);
Thomas Woutersb2137042007-02-01 18:02:27 +000012506 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012507 return ferror (f) || fclose (f) != 0;
Thomas Woutersb2137042007-02-01 18:02:27 +000012508
12509 ;
12510 return 0;
12511}
12512_ACEOF
12513rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012514if { (ac_try="$ac_link"
12515case "(($ac_try" in
12516 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12517 *) ac_try_echo=$ac_try;;
12518esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012519eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012520 (eval "$ac_link") 2>&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012521 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012523 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012524 { (case "(($ac_try" in
12525 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12526 *) ac_try_echo=$ac_try;;
12527esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012528eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012529 (eval "$ac_try") 2>&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012530 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012532 (exit $ac_status); }; }; then
12533 ac_cv_sizeof__Bool=`cat conftest.val`
12534else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012535 echo "$as_me: program exited with status $ac_status" >&5
12536echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012537sed 's/^/| /' conftest.$ac_ext >&5
12538
12539( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012540if test "$ac_cv_type__Bool" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012541 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012542See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012543echo "$as_me: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012544See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012545 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012546 else
12547 ac_cv_sizeof__Bool=0
12548 fi
Thomas Woutersb2137042007-02-01 18:02:27 +000012549fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012550rm -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 +000012551fi
12552rm -f conftest.val
12553fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012554{ echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
12555echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012556
12557
12558
Thomas Woutersb2137042007-02-01 18:02:27 +000012559cat >>confdefs.h <<_ACEOF
12560#define SIZEOF__BOOL $ac_cv_sizeof__Bool
12561_ACEOF
12562
12563
12564fi
12565
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012566{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12567echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000012568if test "${ac_cv_type_uintptr_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012569 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters89f507f2006-12-13 04:49:30 +000012570else
12571 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012572/* confdefs.h. */
12573_ACEOF
12574cat confdefs.h >>conftest.$ac_ext
12575cat >>conftest.$ac_ext <<_ACEOF
12576/* end confdefs.h. */
Thomas Wouters89f507f2006-12-13 04:49:30 +000012577#ifdef HAVE_STDINT_H
12578 #include <stdint.h>
12579 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012580
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012581typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012582int
12583main ()
12584{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012585if ((ac__type_new_ *) 0)
12586 return 0;
12587if (sizeof (ac__type_new_))
12588 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012589 ;
12590 return 0;
12591}
12592_ACEOF
12593rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012594if { (ac_try="$ac_compile"
12595case "(($ac_try" in
12596 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12597 *) ac_try_echo=$ac_try;;
12598esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012599eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012600 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012601 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012602 grep -v '^ *+' conftest.er1 >conftest.err
12603 rm -f conftest.er1
12604 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012606 (exit $ac_status); } && {
12607 test -z "$ac_c_werror_flag" ||
12608 test ! -s conftest.err
12609 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012610 ac_cv_type_uintptr_t=yes
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012611else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012612 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012613sed 's/^/| /' conftest.$ac_ext >&5
12614
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012615 ac_cv_type_uintptr_t=no
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012616fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012617
12618rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters89f507f2006-12-13 04:49:30 +000012619fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012620{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12621echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12622if test $ac_cv_type_uintptr_t = yes; then
Thomas Wouters89f507f2006-12-13 04:49:30 +000012623
12624cat >>confdefs.h <<_ACEOF
12625#define HAVE_UINTPTR_T 1
12626_ACEOF
12627
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012628{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12629echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
12630if test "${ac_cv_type_uintptr_t+set}" = set; then
12631 echo $ECHO_N "(cached) $ECHO_C" >&6
12632else
12633 cat >conftest.$ac_ext <<_ACEOF
12634/* confdefs.h. */
12635_ACEOF
12636cat confdefs.h >>conftest.$ac_ext
12637cat >>conftest.$ac_ext <<_ACEOF
12638/* end confdefs.h. */
12639$ac_includes_default
12640typedef uintptr_t ac__type_new_;
12641int
12642main ()
12643{
12644if ((ac__type_new_ *) 0)
12645 return 0;
12646if (sizeof (ac__type_new_))
12647 return 0;
12648 ;
12649 return 0;
12650}
12651_ACEOF
12652rm -f conftest.$ac_objext
12653if { (ac_try="$ac_compile"
12654case "(($ac_try" in
12655 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12656 *) ac_try_echo=$ac_try;;
12657esac
12658eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12659 (eval "$ac_compile") 2>conftest.er1
12660 ac_status=$?
12661 grep -v '^ *+' conftest.er1 >conftest.err
12662 rm -f conftest.er1
12663 cat conftest.err >&5
12664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12665 (exit $ac_status); } && {
12666 test -z "$ac_c_werror_flag" ||
12667 test ! -s conftest.err
12668 } && test -s conftest.$ac_objext; then
12669 ac_cv_type_uintptr_t=yes
12670else
12671 echo "$as_me: failed program was:" >&5
12672sed 's/^/| /' conftest.$ac_ext >&5
12673
12674 ac_cv_type_uintptr_t=no
12675fi
12676
12677rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12678fi
12679{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12680echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12681
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012682# The cast to long int works around a bug in the HP C Compiler
12683# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12684# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12685# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012686{ echo "$as_me:$LINENO: checking size of uintptr_t" >&5
12687echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012688if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012689 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012690else
Martin v. Löwis11437992002-04-12 09:54:03 +000012691 if test "$cross_compiling" = yes; then
12692 # Depending upon the size, compute the lo and hi bounds.
12693cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012694/* confdefs.h. */
12695_ACEOF
12696cat confdefs.h >>conftest.$ac_ext
12697cat >>conftest.$ac_ext <<_ACEOF
12698/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012699$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012700 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012701int
12702main ()
12703{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012704static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012705test_array [0] = 0
12706
12707 ;
12708 return 0;
12709}
12710_ACEOF
12711rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012712if { (ac_try="$ac_compile"
12713case "(($ac_try" in
12714 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12715 *) ac_try_echo=$ac_try;;
12716esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012717eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012718 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012719 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012720 grep -v '^ *+' conftest.er1 >conftest.err
12721 rm -f conftest.er1
12722 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012724 (exit $ac_status); } && {
12725 test -z "$ac_c_werror_flag" ||
12726 test ! -s conftest.err
12727 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012728 ac_lo=0 ac_mid=0
12729 while :; do
12730 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012731/* confdefs.h. */
12732_ACEOF
12733cat confdefs.h >>conftest.$ac_ext
12734cat >>conftest.$ac_ext <<_ACEOF
12735/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012736$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012737 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012738int
12739main ()
12740{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012741static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012742test_array [0] = 0
12743
12744 ;
12745 return 0;
12746}
12747_ACEOF
12748rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012749if { (ac_try="$ac_compile"
12750case "(($ac_try" in
12751 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12752 *) ac_try_echo=$ac_try;;
12753esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012754eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012755 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012756 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012757 grep -v '^ *+' conftest.er1 >conftest.err
12758 rm -f conftest.er1
12759 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012761 (exit $ac_status); } && {
12762 test -z "$ac_c_werror_flag" ||
12763 test ! -s conftest.err
12764 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012765 ac_hi=$ac_mid; break
12766else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012767 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012768sed 's/^/| /' conftest.$ac_ext >&5
12769
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012770 ac_lo=`expr $ac_mid + 1`
12771 if test $ac_lo -le $ac_mid; then
12772 ac_lo= ac_hi=
12773 break
12774 fi
12775 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012776fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012777
12778rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012779 done
12780else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012781 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012782sed 's/^/| /' conftest.$ac_ext >&5
12783
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012784 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012785/* confdefs.h. */
12786_ACEOF
12787cat confdefs.h >>conftest.$ac_ext
12788cat >>conftest.$ac_ext <<_ACEOF
12789/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012790$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012791 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012792int
12793main ()
12794{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012795static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012796test_array [0] = 0
12797
12798 ;
12799 return 0;
12800}
12801_ACEOF
12802rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012803if { (ac_try="$ac_compile"
12804case "(($ac_try" in
12805 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12806 *) ac_try_echo=$ac_try;;
12807esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012808eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012809 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012810 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012811 grep -v '^ *+' conftest.er1 >conftest.err
12812 rm -f conftest.er1
12813 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012815 (exit $ac_status); } && {
12816 test -z "$ac_c_werror_flag" ||
12817 test ! -s conftest.err
12818 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012819 ac_hi=-1 ac_mid=-1
12820 while :; do
12821 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012822/* confdefs.h. */
12823_ACEOF
12824cat confdefs.h >>conftest.$ac_ext
12825cat >>conftest.$ac_ext <<_ACEOF
12826/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012827$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012828 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012829int
12830main ()
12831{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012832static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012833test_array [0] = 0
12834
12835 ;
12836 return 0;
12837}
12838_ACEOF
12839rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012840if { (ac_try="$ac_compile"
12841case "(($ac_try" in
12842 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12843 *) ac_try_echo=$ac_try;;
12844esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012845eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012846 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012847 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012848 grep -v '^ *+' conftest.er1 >conftest.err
12849 rm -f conftest.er1
12850 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012852 (exit $ac_status); } && {
12853 test -z "$ac_c_werror_flag" ||
12854 test ! -s conftest.err
12855 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012856 ac_lo=$ac_mid; break
12857else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012858 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012859sed 's/^/| /' conftest.$ac_ext >&5
12860
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012861 ac_hi=`expr '(' $ac_mid ')' - 1`
12862 if test $ac_mid -le $ac_hi; then
12863 ac_lo= ac_hi=
12864 break
12865 fi
12866 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000012867fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012868
12869rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012870 done
12871else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012872 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012873sed 's/^/| /' conftest.$ac_ext >&5
12874
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012875 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000012876fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012877
12878rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012879fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012880
12881rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012882# Binary search between lo and hi bounds.
12883while test "x$ac_lo" != "x$ac_hi"; do
12884 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12885 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012886/* confdefs.h. */
12887_ACEOF
12888cat confdefs.h >>conftest.$ac_ext
12889cat >>conftest.$ac_ext <<_ACEOF
12890/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012891$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012892 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012893int
12894main ()
12895{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012896static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012897test_array [0] = 0
12898
12899 ;
12900 return 0;
12901}
12902_ACEOF
12903rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012904if { (ac_try="$ac_compile"
12905case "(($ac_try" in
12906 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12907 *) ac_try_echo=$ac_try;;
12908esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012909eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012910 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012911 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012912 grep -v '^ *+' conftest.er1 >conftest.err
12913 rm -f conftest.er1
12914 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012916 (exit $ac_status); } && {
12917 test -z "$ac_c_werror_flag" ||
12918 test ! -s conftest.err
12919 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012920 ac_hi=$ac_mid
12921else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012922 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012923sed 's/^/| /' conftest.$ac_ext >&5
12924
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012925 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012926fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012927
12928rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012929done
12930case $ac_lo in
12931?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012932'') if test "$ac_cv_type_uintptr_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012933 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012934See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012935echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012936See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012937 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012938 else
12939 ac_cv_sizeof_uintptr_t=0
12940 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012941esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012942else
Martin v. Löwis11437992002-04-12 09:54:03 +000012943 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012944/* confdefs.h. */
12945_ACEOF
12946cat confdefs.h >>conftest.$ac_ext
12947cat >>conftest.$ac_ext <<_ACEOF
12948/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012949$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012950 typedef uintptr_t ac__type_sizeof_;
12951static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12952static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000012953#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012954#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012955int
12956main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012957{
Martin v. Löwis11437992002-04-12 09:54:03 +000012958
12959 FILE *f = fopen ("conftest.val", "w");
12960 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012961 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012962 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000012963 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012964 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012965 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012966 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012967 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012968 }
12969 else
12970 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012971 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012972 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012973 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012974 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012975 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012976 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012977
12978 ;
12979 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012980}
Martin v. Löwis11437992002-04-12 09:54:03 +000012981_ACEOF
12982rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012983if { (ac_try="$ac_link"
12984case "(($ac_try" in
12985 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12986 *) ac_try_echo=$ac_try;;
12987esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012988eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012989 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012990 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012992 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012993 { (case "(($ac_try" in
12994 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12995 *) ac_try_echo=$ac_try;;
12996esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012997eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012998 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012999 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013000 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013001 (exit $ac_status); }; }; then
13002 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013003else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013004 echo "$as_me: program exited with status $ac_status" >&5
13005echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013006sed 's/^/| /' conftest.$ac_ext >&5
13007
Martin v. Löwis11437992002-04-12 09:54:03 +000013008( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013009if test "$ac_cv_type_uintptr_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013010 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000013011See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013012echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000013013See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013014 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013015 else
13016 ac_cv_sizeof_uintptr_t=0
13017 fi
Martin v. Löwis11437992002-04-12 09:54:03 +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
Martin v. Löwis11437992002-04-12 09:54:03 +000013020fi
13021rm -f conftest.val
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013022fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013023{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
13024echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013025
13026
13027
Martin v. Löwis11437992002-04-12 09:54:03 +000013028cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013029#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013030_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013031
Michael W. Hudson54241132001-12-07 15:38:26 +000013032
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013033fi
13034
Thomas Wouters89f507f2006-12-13 04:49:30 +000013035
13036
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013037# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013038{ echo "$as_me:$LINENO: checking size of off_t" >&5
13039echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013040if test "${ac_cv_sizeof_off_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013041 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013042else
13043 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000013044 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013045else
Martin v. Löwis11437992002-04-12 09:54:03 +000013046 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013047/* confdefs.h. */
13048_ACEOF
13049cat confdefs.h >>conftest.$ac_ext
13050cat >>conftest.$ac_ext <<_ACEOF
13051/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013052#include <stdio.h>
13053#include <sys/types.h>
13054main()
13055{
13056 FILE *f=fopen("conftestval", "w");
13057 if (!f) exit(1);
13058 fprintf(f, "%d\n", sizeof(off_t));
13059 exit(0);
13060}
Martin v. Löwis11437992002-04-12 09:54:03 +000013061_ACEOF
13062rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013063if { (ac_try="$ac_link"
13064case "(($ac_try" in
13065 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13066 *) ac_try_echo=$ac_try;;
13067esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013068eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013069 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013070 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013072 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013073 { (case "(($ac_try" in
13074 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13075 *) ac_try_echo=$ac_try;;
13076esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013077eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013078 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013079 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013081 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013082 ac_cv_sizeof_off_t=`cat conftestval`
13083else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013084 echo "$as_me: program exited with status $ac_status" >&5
13085echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013086sed 's/^/| /' conftest.$ac_ext >&5
13087
Martin v. Löwis11437992002-04-12 09:54:03 +000013088( exit $ac_status )
13089ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013090fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013091rm -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 +000013092fi
13093
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013094
13095
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013096fi
13097
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013098{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
13099echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013100
13101cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013102#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013103_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013104
Michael W. Hudson54241132001-12-07 15:38:26 +000013105
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013106{ echo "$as_me:$LINENO: checking whether to enable large file support" >&5
13107echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6; }
Mark Dickinsonb87f0d02009-12-31 21:25:02 +000013108if test "$have_long_long" = yes
13109then
13110if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +000013111 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013112
Martin v. Löwis11437992002-04-12 09:54:03 +000013113cat >>confdefs.h <<\_ACEOF
13114#define HAVE_LARGEFILE_SUPPORT 1
13115_ACEOF
13116
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013117 { echo "$as_me:$LINENO: result: yes" >&5
13118echo "${ECHO_T}yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013119else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013120 { echo "$as_me:$LINENO: result: no" >&5
13121echo "${ECHO_T}no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013122fi
Mark Dickinsonb87f0d02009-12-31 21:25:02 +000013123else
13124 { echo "$as_me:$LINENO: result: no" >&5
13125echo "${ECHO_T}no" >&6; }
13126fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013127
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013128# AC_CHECK_SIZEOF() doesn't include <time.h>.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013129{ echo "$as_me:$LINENO: checking size of time_t" >&5
13130echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013131if test "${ac_cv_sizeof_time_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013132 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013133else
13134 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000013135 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013136else
Martin v. Löwis11437992002-04-12 09:54:03 +000013137 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013138/* confdefs.h. */
13139_ACEOF
13140cat confdefs.h >>conftest.$ac_ext
13141cat >>conftest.$ac_ext <<_ACEOF
13142/* end confdefs.h. */
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013143#include <stdio.h>
13144#include <time.h>
13145main()
13146{
13147 FILE *f=fopen("conftestval", "w");
13148 if (!f) exit(1);
13149 fprintf(f, "%d\n", sizeof(time_t));
13150 exit(0);
13151}
Martin v. Löwis11437992002-04-12 09:54:03 +000013152_ACEOF
13153rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013154if { (ac_try="$ac_link"
13155case "(($ac_try" in
13156 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13157 *) ac_try_echo=$ac_try;;
13158esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013159eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013160 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013161 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013162 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013163 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013164 { (case "(($ac_try" in
13165 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13166 *) ac_try_echo=$ac_try;;
13167esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013168eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013169 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013170 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013172 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013173 ac_cv_sizeof_time_t=`cat conftestval`
13174else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013175 echo "$as_me: program exited with status $ac_status" >&5
13176echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013177sed 's/^/| /' conftest.$ac_ext >&5
13178
Martin v. Löwis11437992002-04-12 09:54:03 +000013179( exit $ac_status )
13180ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013181fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013182rm -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 +000013183fi
13184
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013185
13186
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013187fi
13188
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013189{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
13190echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013191
13192cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013193#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013194_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013195
Michael W. Hudson54241132001-12-07 15:38:26 +000013196
13197
Trent Mick635f6fb2000-08-23 21:33:05 +000013198# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013199ac_save_cc="$CC"
13200if test "$ac_cv_kpthread" = "yes"
13201then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013202elif test "$ac_cv_kthread" = "yes"
13203then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013204elif test "$ac_cv_pthread" = "yes"
13205then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013206fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013207{ echo "$as_me:$LINENO: checking for pthread_t" >&5
13208echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013209have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013210cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013211/* confdefs.h. */
13212_ACEOF
13213cat confdefs.h >>conftest.$ac_ext
13214cat >>conftest.$ac_ext <<_ACEOF
13215/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000013216#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013217int
13218main ()
13219{
Guido van Rossum12580492000-09-24 16:47:19 +000013220pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013221 ;
13222 return 0;
13223}
13224_ACEOF
13225rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013226if { (ac_try="$ac_compile"
13227case "(($ac_try" in
13228 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13229 *) ac_try_echo=$ac_try;;
13230esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013231eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013232 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013233 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013234 grep -v '^ *+' conftest.er1 >conftest.err
13235 rm -f conftest.er1
13236 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013238 (exit $ac_status); } && {
13239 test -z "$ac_c_werror_flag" ||
13240 test ! -s conftest.err
13241 } && test -s conftest.$ac_objext; then
Trent Mick635f6fb2000-08-23 21:33:05 +000013242 have_pthread_t=yes
13243else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013244 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013245sed 's/^/| /' conftest.$ac_ext >&5
13246
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013247
Trent Mick635f6fb2000-08-23 21:33:05 +000013248fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013249
13250rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013251{ echo "$as_me:$LINENO: result: $have_pthread_t" >&5
13252echo "${ECHO_T}$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013253if test "$have_pthread_t" = yes ; then
13254 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013255 { echo "$as_me:$LINENO: checking size of pthread_t" >&5
13256echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013257 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013258 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000013259else
13260 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000013261 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +000013262else
Martin v. Löwis11437992002-04-12 09:54:03 +000013263 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013264/* confdefs.h. */
13265_ACEOF
13266cat confdefs.h >>conftest.$ac_ext
13267cat >>conftest.$ac_ext <<_ACEOF
13268/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000013269#include <stdio.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013270#include <pthread.h>
Trent Mick635f6fb2000-08-23 21:33:05 +000013271 main()
13272 {
13273 FILE *f=fopen("conftestval", "w");
13274 if (!f) exit(1);
13275 fprintf(f, "%d\n", sizeof(pthread_t));
13276 exit(0);
13277 }
Martin v. Löwis11437992002-04-12 09:54:03 +000013278_ACEOF
13279rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013280if { (ac_try="$ac_link"
13281case "(($ac_try" in
13282 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13283 *) ac_try_echo=$ac_try;;
13284esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013285eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013286 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013287 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013288 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013289 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013290 { (case "(($ac_try" in
13291 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13292 *) ac_try_echo=$ac_try;;
13293esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013294eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013295 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013296 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013298 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +000013299 ac_cv_sizeof_pthread_t=`cat conftestval`
13300else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013301 echo "$as_me: program exited with status $ac_status" >&5
13302echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013303sed 's/^/| /' conftest.$ac_ext >&5
13304
Martin v. Löwis11437992002-04-12 09:54:03 +000013305( exit $ac_status )
13306ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +000013307fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013308rm -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 +000013309fi
13310
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013311
13312
Trent Mick635f6fb2000-08-23 21:33:05 +000013313fi
13314
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013315 { echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
13316echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013317
13318cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000013319#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013320_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000013321
13322fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013323CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000013324
Michael W. Hudson54241132001-12-07 15:38:26 +000013325
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013326
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000013327
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013328case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013329 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000013330 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
13331 ;;
13332 Darwin/*)
13333 OTHER_LIBTOOL_OPT=""
13334 ;;
13335esac
13336
13337
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013338ARCH_RUN_32BIT=""
13339
Bob Ippolito7026a0a2005-03-28 23:23:47 +000013340case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013341 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +000013342 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
13343 if test "${enable_universalsdk}"; then
13344 :
13345 else
Ronald Oussoren175a8842010-02-11 13:40:06 +000013346 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +000013347 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000013348 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000013349 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000013350 Darwin/*)
Ronald Oussoren652f4de2010-02-07 11:54:03 +000013351 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +000013352 if test ${gcc_version} '<' 4.0
13353 then
13354 LIBTOOL_CRUFT="-lcc_dynamic"
13355 else
13356 LIBTOOL_CRUFT=""
13357 fi
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013358 if test "$cross_compiling" = yes; then
Ronald Oussoren856624d2009-09-08 07:13:53 +000013359 ac_osx_32bit=yes
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013360else
13361 cat >conftest.$ac_ext <<_ACEOF
13362/* confdefs.h. */
13363_ACEOF
13364cat confdefs.h >>conftest.$ac_ext
13365cat >>conftest.$ac_ext <<_ACEOF
13366/* end confdefs.h. */
Ronald Oussoren856624d2009-09-08 07:13:53 +000013367
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013368 #include <unistd.h>
13369 int main(int argc, char*argv[])
13370 {
13371 if (sizeof(long) == 4) {
13372 return 0;
13373 } else {
13374 return 1;
13375 }
Ronald Oussoren856624d2009-09-08 07:13:53 +000013376 }
13377
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013378_ACEOF
13379rm -f conftest$ac_exeext
13380if { (ac_try="$ac_link"
13381case "(($ac_try" in
13382 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13383 *) ac_try_echo=$ac_try;;
13384esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013385eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013386 (eval "$ac_link") 2>&5
13387 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013389 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13390 { (case "(($ac_try" in
13391 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13392 *) ac_try_echo=$ac_try;;
13393esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013394eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013395 (eval "$ac_try") 2>&5
13396 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013398 (exit $ac_status); }; }; then
13399 ac_osx_32bit=yes
13400else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013401 echo "$as_me: program exited with status $ac_status" >&5
13402echo "$as_me: failed program was:" >&5
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013403sed 's/^/| /' conftest.$ac_ext >&5
13404
13405( exit $ac_status )
13406ac_osx_32bit=no
13407fi
13408rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13409fi
13410
13411
13412
13413 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussoren175a8842010-02-11 13:40:06 +000013414 case `/usr/bin/arch` in
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013415 i386)
13416 MACOSX_DEFAULT_ARCH="i386"
13417 ;;
13418 ppc)
13419 MACOSX_DEFAULT_ARCH="ppc"
13420 ;;
13421 *)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013422 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
13423echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013424 { (exit 1); exit 1; }; }
13425 ;;
13426 esac
13427 else
Ronald Oussoren175a8842010-02-11 13:40:06 +000013428 case `/usr/bin/arch` in
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013429 i386)
13430 MACOSX_DEFAULT_ARCH="x86_64"
13431 ;;
13432 ppc)
13433 MACOSX_DEFAULT_ARCH="ppc64"
13434 ;;
13435 *)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013436 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
13437echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013438 { (exit 1); exit 1; }; }
13439 ;;
13440 esac
13441
13442 #ARCH_RUN_32BIT="true"
13443 fi
13444
13445 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +000013446 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000013447 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013448esac
13449
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013450{ echo "$as_me:$LINENO: checking for --enable-framework" >&5
13451echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000013452if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013453then
Skip Montanarodecc6a42003-01-01 20:07:49 +000013454 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000013455 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000013456 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013457
Martin v. Löwis11437992002-04-12 09:54:03 +000013458cat >>confdefs.h <<\_ACEOF
13459#define WITH_NEXT_FRAMEWORK 1
13460_ACEOF
13461
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013462 { echo "$as_me:$LINENO: result: yes" >&5
13463echo "${ECHO_T}yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +000013464 if test $enable_shared = "yes"
13465 then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013466 { { echo "$as_me:$LINENO: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" >&5
13467echo "$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 +000013468 { (exit 1); exit 1; }; }
13469 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013470else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013471 { echo "$as_me:$LINENO: result: no" >&5
13472echo "${ECHO_T}no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013473fi
13474
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013475{ echo "$as_me:$LINENO: checking for dyld" >&5
13476echo $ECHO_N "checking for dyld... $ECHO_C" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013477case $ac_sys_system/$ac_sys_release in
13478 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013479
Martin v. Löwis11437992002-04-12 09:54:03 +000013480cat >>confdefs.h <<\_ACEOF
13481#define WITH_DYLD 1
13482_ACEOF
13483
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013484 { echo "$as_me:$LINENO: result: always on for Darwin" >&5
13485echo "${ECHO_T}always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013486 ;;
13487 *)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013488 { echo "$as_me:$LINENO: result: no" >&5
13489echo "${ECHO_T}no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000013490 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013491esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013492
Guido van Rossum0a516c91994-09-12 10:58:40 +000013493# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000013494
Michael W. Hudson54241132001-12-07 15:38:26 +000013495
13496
13497
13498
Guido van Rossum0a516c91994-09-12 10:58:40 +000013499# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000013500# -- usually .so, .sl on HP-UX, .dll on Cygwin
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013501{ echo "$as_me:$LINENO: checking SO" >&5
13502echo $ECHO_N "checking SO... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013503if test -z "$SO"
13504then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013505 case $ac_sys_system in
Thomas Wouters477c8d52006-05-27 19:21:47 +000013506 hp*|HP*)
13507 case `uname -m` in
13508 ia64) SO=.so;;
13509 *) SO=.sl;;
13510 esac
13511 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000013512 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013513 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013514 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000013515else
13516 # this might also be a termcap variable, see #610332
13517 echo
13518 echo '====================================================================='
13519 echo '+ +'
13520 echo '+ WARNING: You have set SO in your environment. +'
13521 echo '+ Do you really mean to change the extension for shared libraries? +'
13522 echo '+ Continuing in 10 seconds to let you to ponder. +'
13523 echo '+ +'
13524 echo '====================================================================='
13525 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000013526fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013527{ echo "$as_me:$LINENO: result: $SO" >&5
13528echo "${ECHO_T}$SO" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000013529
Georg Brandlb1441c72009-01-03 22:33:39 +000013530
Thomas Wouters477c8d52006-05-27 19:21:47 +000013531cat >>confdefs.h <<_ACEOF
13532#define SHLIB_EXT "$SO"
13533_ACEOF
13534
Guido van Rossum0a516c91994-09-12 10:58:40 +000013535# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000013536# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013537# (Shared libraries in this instance are shared modules to be loaded into
13538# Python, as opposed to building Python itself as a shared library.)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013539{ echo "$as_me:$LINENO: checking LDSHARED" >&5
13540echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013541if test -z "$LDSHARED"
13542then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013543 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013544 AIX*)
13545 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000013546 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013547 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000013548 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000013549 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000013550 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +000013551 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000013552 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000013553 else LDSHARED='$(CC) -G';
Greg Ward57c9a6632000-05-26 12:22:54 +000013554 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +000013555 hp*|HP*)
13556 if test "$GCC" = "yes"
13557 then LDSHARED='$(CC) -shared'
13558 else LDSHARED='ld -b';
13559 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +000013560 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000013561 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000013562 LDSHARED='$(CC) $(LDFLAGS) -bundle'
13563 if test "$enable_framework" ; then
13564 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000013565 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
13566 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000013567 else
13568 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000013569 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000013570 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000013571 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000013572 LDSHARED='$(CC) $(LDFLAGS) -bundle'
13573 if test "$enable_framework" ; then
13574 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000013575 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
13576 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000013577 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000013578 # No framework, use the Python app as bundle-loader
13579 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000013580 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013581 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000013582 Darwin/*)
13583 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
13584 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +000013585
Benjamin Peterson14ae9592008-07-16 02:20:15 +000013586 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000013587 then
Thomas Wouters477c8d52006-05-27 19:21:47 +000013588 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +000013589 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +000013590 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000013591 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
13592 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000013593 else
13594 LDSHARED='$(CC) $(LDFLAGS) -bundle'
13595 if test "$enable_framework" ; then
13596 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000013597 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
13598 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000013599 else
13600 # No framework, use the Python app as bundle-loader
13601 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
13602 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
13603 fi
13604 fi
13605 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +000013606 Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000013607 BSD/OS*/4*) LDSHARED="gcc -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013608 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000013609 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000013610 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000013611 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000013612 else
13613 LDSHARED="ld -Bshareable ${LDFLAGS}"
13614 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013615 OpenBSD*)
13616 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
13617 then
13618 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
13619 else
13620 case `uname -r` in
13621 [01].* | 2.[0-7] | 2.[0-7].*)
13622 LDSHARED="ld -Bshareable ${LDFLAGS}"
13623 ;;
13624 *)
13625 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
13626 ;;
13627 esac
13628 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013629 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013630 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000013631 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000013632 then LDSHARED='$(CC) -shared'
13633 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000013634 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000013635 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Guido van Rossumaef734b2001-01-10 21:09:12 +000013636 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013637 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013638 *) LDSHARED="ld";;
13639 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013640fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013641{ echo "$as_me:$LINENO: result: $LDSHARED" >&5
13642echo "${ECHO_T}$LDSHARED" >&6; }
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013643BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000013644# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013645# library (module) -- this is only needed for a few systems
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013646{ echo "$as_me:$LINENO: checking CCSHARED" >&5
13647echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013648if test -z "$CCSHARED"
13649then
Guido van Rossum07397971997-04-29 21:49:50 +000013650 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000013651 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013652 then CCSHARED="-fPIC";
13653 elif test `uname -p` = sparc;
13654 then CCSHARED="-xcode=pic32";
13655 else CCSHARED="-Kpic";
13656 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000013657 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000013658 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000013659 else CCSHARED="+z";
13660 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013661 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000013662 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013663 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013664 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000013665 if test "$GCC" = "yes"
13666 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000013667 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000013668 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000013669 SCO_SV*)
13670 if test "$GCC" = "yes"
13671 then CCSHARED="-fPIC"
13672 else CCSHARED="-Kpic -belf"
13673 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013674 IRIX*/6*) case $CC in
13675 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000013676 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013677 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013678 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013679 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013680fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013681{ echo "$as_me:$LINENO: result: $CCSHARED" >&5
13682echo "${ECHO_T}$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013683# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013684# the python executable -- this is only needed for a few systems
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013685{ echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
13686echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013687if test -z "$LINKFORSHARED"
13688then
Guido van Rossum07397971997-04-29 21:49:50 +000013689 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013690 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000013691 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000013692 LINKFORSHARED="-Wl,-E -Wl,+s";;
13693# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000013694 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013695 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013696 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000013697 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +000013698 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +000013699 if test "$enable_framework"
13700 then
Jack Jansenda49e192005-01-07 13:08:22 +000013701 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000013702 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000013703 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013704 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000013705 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000013706 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013707 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000013708 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
13709 then
13710 LINKFORSHARED="-Wl,--export-dynamic"
13711 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013712 SunOS/5*) case $CC in
13713 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000013714 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000013715 then
13716 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013717 fi;;
13718 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000013719 CYGWIN*)
13720 if test $enable_shared = "no"
13721 then
13722 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
13723 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +000013724 QNX*)
13725 # -Wl,-E causes the symbols to be added to the dynamic
13726 # symbol table so that they can be found when a module
13727 # is loaded. -N 2048K causes the stack size to be set
13728 # to 2048 kilobytes so that the stack doesn't overflow
13729 # when running test_compile.py.
13730 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013731 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013732fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013733{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
13734echo "${ECHO_T}$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013735
Michael W. Hudson54241132001-12-07 15:38:26 +000013736
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000013737
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013738{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
13739echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013740if test ! "$LIBRARY" = "$LDLIBRARY"
13741then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000013742 case $ac_sys_system in
13743 CYGWIN*)
13744 # Cygwin needs CCSHARED when building extension DLLs
13745 # but not when building the interpreter DLL.
13746 CFLAGSFORSHARED='';;
13747 *)
13748 CFLAGSFORSHARED='$(CCSHARED)'
13749 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013750fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013751{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
13752echo "${ECHO_T}$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013753
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013754# SHLIBS are libraries (except -lc and -lm) to link to the python shared
13755# library (with --enable-shared).
13756# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000013757# symbols, this must be set to $(LIBS) (expanded by make). We do this even
13758# if it is not required, since it creates a dependency of the shared library
13759# to LIBS. This, in turn, means that applications linking the shared libpython
13760# don't need to link LIBS explicitly. The default should be only changed
13761# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013762
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013763{ echo "$as_me:$LINENO: checking SHLIBS" >&5
13764echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013765case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013766 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000013767 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013768esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013769{ echo "$as_me:$LINENO: result: $SHLIBS" >&5
13770echo "${ECHO_T}$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013771
13772
Guido van Rossum627b2d71993-12-24 10:39:16 +000013773# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000013774
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013775{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
13776echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013777if test "${ac_cv_lib_dl_dlopen+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013778 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013779else
Martin v. Löwis11437992002-04-12 09:54:03 +000013780 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013781LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013782cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013783/* confdefs.h. */
13784_ACEOF
13785cat confdefs.h >>conftest.$ac_ext
13786cat >>conftest.$ac_ext <<_ACEOF
13787/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013788
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013789/* Override any GCC internal prototype to avoid an error.
13790 Use char because int might match the return type of a GCC
13791 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013792#ifdef __cplusplus
13793extern "C"
13794#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013795char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013796int
13797main ()
13798{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013799return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013800 ;
13801 return 0;
13802}
13803_ACEOF
13804rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013805if { (ac_try="$ac_link"
13806case "(($ac_try" in
13807 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13808 *) ac_try_echo=$ac_try;;
13809esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013810eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013811 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013812 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013813 grep -v '^ *+' conftest.er1 >conftest.err
13814 rm -f conftest.er1
13815 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013817 (exit $ac_status); } && {
13818 test -z "$ac_c_werror_flag" ||
13819 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013820 } && test -s conftest$ac_exeext &&
13821 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013822 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013823else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013824 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013825sed 's/^/| /' conftest.$ac_ext >&5
13826
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013827 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013828fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013829
13830rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013831 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013832LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000013833fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013834{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
13835echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
13836if test $ac_cv_lib_dl_dlopen = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013837 cat >>confdefs.h <<_ACEOF
13838#define HAVE_LIBDL 1
13839_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013840
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013841 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013842
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013843fi
13844 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000013845
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013846{ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
13847echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013848if test "${ac_cv_lib_dld_shl_load+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013849 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013850else
Martin v. Löwis11437992002-04-12 09:54:03 +000013851 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013852LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013853cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013854/* confdefs.h. */
13855_ACEOF
13856cat confdefs.h >>conftest.$ac_ext
13857cat >>conftest.$ac_ext <<_ACEOF
13858/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013859
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013860/* Override any GCC internal prototype to avoid an error.
13861 Use char because int might match the return type of a GCC
13862 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013863#ifdef __cplusplus
13864extern "C"
13865#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013866char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013867int
13868main ()
13869{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013870return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013871 ;
13872 return 0;
13873}
13874_ACEOF
13875rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013876if { (ac_try="$ac_link"
13877case "(($ac_try" in
13878 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13879 *) ac_try_echo=$ac_try;;
13880esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013881eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013882 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013883 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013884 grep -v '^ *+' conftest.er1 >conftest.err
13885 rm -f conftest.er1
13886 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013888 (exit $ac_status); } && {
13889 test -z "$ac_c_werror_flag" ||
13890 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013891 } && test -s conftest$ac_exeext &&
13892 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013893 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013894else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013895 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013896sed 's/^/| /' conftest.$ac_ext >&5
13897
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013898 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013899fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013900
13901rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013902 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013903LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000013904fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013905{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
13906echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
13907if test $ac_cv_lib_dld_shl_load = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013908 cat >>confdefs.h <<_ACEOF
13909#define HAVE_LIBDLD 1
13910_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013911
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013912 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013913
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013914fi
13915 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000013916
Georg Brandlb1441c72009-01-03 22:33:39 +000013917# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +000013918if test "$with_threads" = "yes" -o -z "$with_threads"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013919 { echo "$as_me:$LINENO: checking for library containing sem_init" >&5
13920echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013921if test "${ac_cv_search_sem_init+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013922 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000013923else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013924 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000013925cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013926/* confdefs.h. */
13927_ACEOF
13928cat confdefs.h >>conftest.$ac_ext
13929cat >>conftest.$ac_ext <<_ACEOF
13930/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013931
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013932/* Override any GCC internal prototype to avoid an error.
13933 Use char because int might match the return type of a GCC
13934 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013935#ifdef __cplusplus
13936extern "C"
13937#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013938char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013939int
13940main ()
13941{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013942return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013943 ;
13944 return 0;
13945}
13946_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013947for ac_lib in '' pthread rt posix4; do
13948 if test -z "$ac_lib"; then
13949 ac_res="none required"
13950 else
13951 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013952 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013953 fi
13954 rm -f conftest.$ac_objext conftest$ac_exeext
13955if { (ac_try="$ac_link"
13956case "(($ac_try" in
13957 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13958 *) ac_try_echo=$ac_try;;
13959esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013960eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013961 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013962 ac_status=$?
13963 grep -v '^ *+' conftest.er1 >conftest.err
13964 rm -f conftest.er1
13965 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013966 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013967 (exit $ac_status); } && {
13968 test -z "$ac_c_werror_flag" ||
13969 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013970 } && test -s conftest$ac_exeext &&
13971 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013972 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +000013973else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013974 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013975sed 's/^/| /' conftest.$ac_ext >&5
13976
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013977
Thomas Wouters477c8d52006-05-27 19:21:47 +000013978fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013979
13980rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13981 conftest$ac_exeext
13982 if test "${ac_cv_search_sem_init+set}" = set; then
13983 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013984fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013985done
13986if test "${ac_cv_search_sem_init+set}" = set; then
13987 :
13988else
13989 ac_cv_search_sem_init=no
13990fi
13991rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013992LIBS=$ac_func_search_save_LIBS
13993fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013994{ echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
13995echo "${ECHO_T}$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013996ac_res=$ac_cv_search_sem_init
13997if test "$ac_res" != no; then
13998 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000013999
Martin v. Löwis41933dd2002-03-21 15:10:58 +000014000fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000014001 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000014002 # posix4 on Solaris 2.6
14003 # pthread (first!) on Linux
14004fi
14005
Martin v. Löwis19d17342003-06-14 21:03:05 +000014006# check if we need libintl for locale functions
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014007{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
14008echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000014009if test "${ac_cv_lib_intl_textdomain+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014010 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +000014011else
14012 ac_check_lib_save_LIBS=$LIBS
14013LIBS="-lintl $LIBS"
14014cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014015/* confdefs.h. */
14016_ACEOF
14017cat confdefs.h >>conftest.$ac_ext
14018cat >>conftest.$ac_ext <<_ACEOF
14019/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000014020
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014021/* Override any GCC internal prototype to avoid an error.
14022 Use char because int might match the return type of a GCC
14023 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000014024#ifdef __cplusplus
14025extern "C"
14026#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000014027char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000014028int
14029main ()
14030{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014031return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000014032 ;
14033 return 0;
14034}
14035_ACEOF
14036rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014037if { (ac_try="$ac_link"
14038case "(($ac_try" in
14039 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14040 *) ac_try_echo=$ac_try;;
14041esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014042eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014043 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000014044 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014045 grep -v '^ *+' conftest.er1 >conftest.err
14046 rm -f conftest.er1
14047 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014049 (exit $ac_status); } && {
14050 test -z "$ac_c_werror_flag" ||
14051 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014052 } && test -s conftest$ac_exeext &&
14053 $as_test_x conftest$ac_exeext; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000014054 ac_cv_lib_intl_textdomain=yes
14055else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014056 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014057sed 's/^/| /' conftest.$ac_ext >&5
14058
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014059 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000014060fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014061
14062rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014063 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000014064LIBS=$ac_check_lib_save_LIBS
14065fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014066{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
14067echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; }
14068if test $ac_cv_lib_intl_textdomain = yes; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000014069
14070cat >>confdefs.h <<\_ACEOF
14071#define WITH_LIBINTL 1
14072_ACEOF
14073
Brett Cannonc6d936e2009-06-07 20:09:53 +000014074 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +000014075fi
14076
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014077
14078# checks for system dependent C++ extensions support
14079case "$ac_sys_system" in
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014080 AIX*) { echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
14081echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014082 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014083/* confdefs.h. */
14084_ACEOF
14085cat confdefs.h >>conftest.$ac_ext
14086cat >>conftest.$ac_ext <<_ACEOF
14087/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014088#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014089int
14090main ()
14091{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014092loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000014093 ;
14094 return 0;
14095}
14096_ACEOF
14097rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014098if { (ac_try="$ac_link"
14099case "(($ac_try" in
14100 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14101 *) ac_try_echo=$ac_try;;
14102esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014103eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014104 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014105 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014106 grep -v '^ *+' conftest.er1 >conftest.err
14107 rm -f conftest.er1
14108 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014110 (exit $ac_status); } && {
14111 test -z "$ac_c_werror_flag" ||
14112 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014113 } && test -s conftest$ac_exeext &&
14114 $as_test_x conftest$ac_exeext; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014115
Martin v. Löwis11437992002-04-12 09:54:03 +000014116cat >>confdefs.h <<\_ACEOF
14117#define AIX_GENUINE_CPLUSPLUS 1
14118_ACEOF
14119
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014120 { echo "$as_me:$LINENO: result: yes" >&5
14121echo "${ECHO_T}yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014122else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014123 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014124sed 's/^/| /' conftest.$ac_ext >&5
14125
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014126 { echo "$as_me:$LINENO: result: no" >&5
14127echo "${ECHO_T}no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014128fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014129
14130rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014131 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014132 *) ;;
14133esac
14134
Guido van Rossum70c7f481998-03-26 18:44:10 +000014135# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014136{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
14137echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014138if test "${ac_cv_lib_nsl_t_open+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014139 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014140else
Martin v. Löwis11437992002-04-12 09:54:03 +000014141 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014142LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014143cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014144/* confdefs.h. */
14145_ACEOF
14146cat confdefs.h >>conftest.$ac_ext
14147cat >>conftest.$ac_ext <<_ACEOF
14148/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014149
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014150/* Override any GCC internal prototype to avoid an error.
14151 Use char because int might match the return type of a GCC
14152 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014153#ifdef __cplusplus
14154extern "C"
14155#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014156char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014157int
14158main ()
14159{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014160return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014161 ;
14162 return 0;
14163}
14164_ACEOF
14165rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014166if { (ac_try="$ac_link"
14167case "(($ac_try" in
14168 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14169 *) ac_try_echo=$ac_try;;
14170esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014171eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014172 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014173 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014174 grep -v '^ *+' conftest.er1 >conftest.err
14175 rm -f conftest.er1
14176 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014178 (exit $ac_status); } && {
14179 test -z "$ac_c_werror_flag" ||
14180 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014181 } && test -s conftest$ac_exeext &&
14182 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014183 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014184else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014185 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014186sed 's/^/| /' conftest.$ac_ext >&5
14187
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014188 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014189fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014190
14191rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014192 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014193LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014194fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014195{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
14196echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6; }
14197if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014198 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014199fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000014200 # SVR4
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014201{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
14202echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014203if test "${ac_cv_lib_socket_socket+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014204 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014205else
Martin v. Löwis11437992002-04-12 09:54:03 +000014206 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014207LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014208cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014209/* confdefs.h. */
14210_ACEOF
14211cat confdefs.h >>conftest.$ac_ext
14212cat >>conftest.$ac_ext <<_ACEOF
14213/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014214
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014215/* Override any GCC internal prototype to avoid an error.
14216 Use char because int might match the return type of a GCC
14217 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014218#ifdef __cplusplus
14219extern "C"
14220#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014221char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014222int
14223main ()
14224{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014225return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014226 ;
14227 return 0;
14228}
14229_ACEOF
14230rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014231if { (ac_try="$ac_link"
14232case "(($ac_try" in
14233 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14234 *) ac_try_echo=$ac_try;;
14235esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014236eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014237 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014238 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014239 grep -v '^ *+' conftest.er1 >conftest.err
14240 rm -f conftest.er1
14241 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014242 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014243 (exit $ac_status); } && {
14244 test -z "$ac_c_werror_flag" ||
14245 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014246 } && test -s conftest$ac_exeext &&
14247 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014248 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014249else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014250 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014251sed 's/^/| /' conftest.$ac_ext >&5
14252
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014253 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014254fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014255
14256rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014257 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014258LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014259fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014260{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
14261echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
14262if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000014263 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000014264fi
14265 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000014266
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014267{ echo "$as_me:$LINENO: checking for --with-libs" >&5
14268echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014269
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014270# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000014271if test "${with_libs+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014272 withval=$with_libs;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014273{ echo "$as_me:$LINENO: result: $withval" >&5
14274echo "${ECHO_T}$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000014275LIBS="$withval $LIBS"
14276
14277else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014278 { echo "$as_me:$LINENO: result: no" >&5
14279echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014280fi
14281
Guido van Rossum7f43da71994-08-01 12:15:30 +000014282
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014283# Check for use of the system libffi library
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014284{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
14285echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014286
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014287# Check whether --with-system_ffi was given.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014288if test "${with_system_ffi+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014289 withval=$with_system_ffi;
14290fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014291
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014292
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014293{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5
14294echo "${ECHO_T}$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014295
Matthias Klose55708cc2009-04-30 08:06:49 +000014296# Check for --with-dbmliborder
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014297{ echo "$as_me:$LINENO: checking for --with-dbmliborder" >&5
14298echo $ECHO_N "checking for --with-dbmliborder... $ECHO_C" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000014299
14300# Check whether --with-dbmliborder was given.
14301if test "${with_dbmliborder+set}" = set; then
14302 withval=$with_dbmliborder;
14303if test x$with_dbmliborder = xyes
14304then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014305{ { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
14306echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Matthias Klose55708cc2009-04-30 08:06:49 +000014307 { (exit 1); exit 1; }; }
14308else
14309 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
14310 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
14311 then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014312 { { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
14313echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Matthias Klose55708cc2009-04-30 08:06:49 +000014314 { (exit 1); exit 1; }; }
14315 fi
14316 done
14317fi
14318fi
14319
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014320{ echo "$as_me:$LINENO: result: $with_dbmliborder" >&5
14321echo "${ECHO_T}$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000014322
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000014323# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014324
14325
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014326{ echo "$as_me:$LINENO: checking for --with-signal-module" >&5
14327echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014328
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014329# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014330if test "${with_signal_module+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014331 withval=$with_signal_module;
14332fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014333
14334
14335if test -z "$with_signal_module"
14336then with_signal_module="yes"
14337fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014338{ echo "$as_me:$LINENO: result: $with_signal_module" >&5
14339echo "${ECHO_T}$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014340
14341if test "${with_signal_module}" = "yes"; then
14342 USE_SIGNAL_MODULE=""
14343 SIGNAL_OBJS=""
14344else
14345 USE_SIGNAL_MODULE="#"
14346 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
14347fi
14348
Guido van Rossum3d15bd82001-01-10 18:53:48 +000014349# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000014350
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000014351USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000014352
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014353{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
14354echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014355
Guido van Rossumec2f0731997-01-22 20:54:01 +000014356
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014357# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000014358if test "${with_dec_threads+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014359 withval=$with_dec_threads;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014360{ echo "$as_me:$LINENO: result: $withval" >&5
14361echo "${ECHO_T}$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000014362LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000014363if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000014364 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000014365fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000014366else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014367 { echo "$as_me:$LINENO: result: no" >&5
14368echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014369fi
14370
Martin v. Löwis11437992002-04-12 09:54:03 +000014371
14372# Templates for things AC_DEFINEd more than once.
14373# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000014374
14375
Martin v. Löwis11437992002-04-12 09:54:03 +000014376
14377
14378
14379
14380
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014381{ echo "$as_me:$LINENO: checking for --with-threads" >&5
14382echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014383
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014384# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000014385if test "${with_threads+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014386 withval=$with_threads;
14387fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000014388
14389
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000014390# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000014391
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014392# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014393if test "${with_thread+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014394 withval=$with_thread; with_threads=$with_thread
14395fi
14396
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000014397
14398if test -z "$with_threads"
14399then with_threads="yes"
14400fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014401{ echo "$as_me:$LINENO: result: $with_threads" >&5
14402echo "${ECHO_T}$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000014403
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014404
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000014405if test "$with_threads" = "no"
14406then
14407 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014408elif test "$ac_cv_pthread_is_default" = yes
14409then
Martin v. Löwis11437992002-04-12 09:54:03 +000014410 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014411#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014412_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014413
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014414 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000014415 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014416#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014417_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014418
14419 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000014420 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014421elif test "$ac_cv_kpthread" = "yes"
14422then
14423 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000014424 if test "$ac_cv_cxx_thread" = "yes"; then
14425 CXX="$CXX -Kpthread"
14426 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014427 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000014428#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014429_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000014430
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014431 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014432 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000014433elif test "$ac_cv_kthread" = "yes"
14434then
14435 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000014436 if test "$ac_cv_cxx_thread" = "yes"; then
14437 CXX="$CXX -Kthread"
14438 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000014439 cat >>confdefs.h <<\_ACEOF
14440#define WITH_THREAD 1
14441_ACEOF
14442
14443 posix_threads=yes
14444 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014445elif test "$ac_cv_pthread" = "yes"
14446then
14447 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000014448 if test "$ac_cv_cxx_thread" = "yes"; then
14449 CXX="$CXX -pthread"
14450 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014451 cat >>confdefs.h <<\_ACEOF
14452#define WITH_THREAD 1
14453_ACEOF
14454
14455 posix_threads=yes
14456 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014457else
14458 if test ! -z "$with_threads" -a -d "$with_threads"
14459 then LDFLAGS="$LDFLAGS -L$with_threads"
14460 fi
14461 if test ! -z "$withval" -a -d "$withval"
14462 then LDFLAGS="$LDFLAGS -L$withval"
14463 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014464
14465 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000014466 # define _POSIX_THREADS in unistd.h. Some apparently don't
14467 # (e.g. gnu pth with pthread emulation)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014468 { echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
14469echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014470 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014471/* confdefs.h. */
14472_ACEOF
14473cat confdefs.h >>conftest.$ac_ext
14474cat >>conftest.$ac_ext <<_ACEOF
14475/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000014476
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014477#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000014478#ifdef _POSIX_THREADS
14479yes
14480#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014481
14482_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014483if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000014484 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014485 unistd_defines_pthreads=yes
14486else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014487 unistd_defines_pthreads=no
14488fi
Jesus Cea0f752ee2010-04-28 12:03:06 +000014489rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014490
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014491 { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
14492echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014493
Martin v. Löwis11437992002-04-12 09:54:03 +000014494 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000014495#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014496_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000014497
Martin v. Löwis11437992002-04-12 09:54:03 +000014498 if test "${ac_cv_header_cthreads_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014499 { echo "$as_me:$LINENO: checking for cthreads.h" >&5
14500echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014501if test "${ac_cv_header_cthreads_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014502 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014503fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014504{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
14505echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014506else
Martin v. Löwis11437992002-04-12 09:54:03 +000014507 # Is the header compilable?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014508{ echo "$as_me:$LINENO: checking cthreads.h usability" >&5
14509echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014510cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014511/* confdefs.h. */
14512_ACEOF
14513cat confdefs.h >>conftest.$ac_ext
14514cat >>conftest.$ac_ext <<_ACEOF
14515/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014516$ac_includes_default
14517#include <cthreads.h>
14518_ACEOF
14519rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014520if { (ac_try="$ac_compile"
14521case "(($ac_try" in
14522 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14523 *) ac_try_echo=$ac_try;;
14524esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014525eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014526 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014527 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014528 grep -v '^ *+' conftest.er1 >conftest.err
14529 rm -f conftest.er1
14530 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014532 (exit $ac_status); } && {
14533 test -z "$ac_c_werror_flag" ||
14534 test ! -s conftest.err
14535 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014536 ac_header_compiler=yes
14537else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014538 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014539sed 's/^/| /' conftest.$ac_ext >&5
14540
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014541 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014542fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014543
14544rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014545{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14546echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014547
14548# Is the header present?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014549{ echo "$as_me:$LINENO: checking cthreads.h presence" >&5
14550echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014551cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014552/* confdefs.h. */
14553_ACEOF
14554cat confdefs.h >>conftest.$ac_ext
14555cat >>conftest.$ac_ext <<_ACEOF
14556/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014557#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014558_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014559if { (ac_try="$ac_cpp conftest.$ac_ext"
14560case "(($ac_try" in
14561 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14562 *) ac_try_echo=$ac_try;;
14563esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014564eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014565 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014566 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014567 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000014568 rm -f conftest.er1
14569 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014571 (exit $ac_status); } >/dev/null && {
14572 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14573 test ! -s conftest.err
14574 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014575 ac_header_preproc=yes
14576else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014577 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014578sed 's/^/| /' conftest.$ac_ext >&5
14579
Martin v. Löwis11437992002-04-12 09:54:03 +000014580 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014581fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014582
Martin v. Löwis11437992002-04-12 09:54:03 +000014583rm -f conftest.err conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014584{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14585echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014586
14587# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014588case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14589 yes:no: )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014590 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
14591echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
14592 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
14593echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014594 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014595 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014596 no:yes:* )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014597 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
14598echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
14599 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
14600echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
14601 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
14602echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
14603 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
14604echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
14605 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
14606echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
14607 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
14608echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014609 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000014610## -------------------------------------- ##
14611## Report this to http://bugs.python.org/ ##
14612## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014613_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014614 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014615 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014616esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014617{ echo "$as_me:$LINENO: checking for cthreads.h" >&5
14618echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014619if test "${ac_cv_header_cthreads_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014620 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014621else
14622 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014623fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014624{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
14625echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014626
14627fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014628if test $ac_cv_header_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014629 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014630#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014631_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014632
Martin v. Löwis11437992002-04-12 09:54:03 +000014633 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014634#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014635_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014636
Martin v. Löwis11437992002-04-12 09:54:03 +000014637
14638cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014639#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014640_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014641
14642 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014643 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014644else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014645
Martin v. Löwis11437992002-04-12 09:54:03 +000014646 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014647 { echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
14648echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014649if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014650 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014651fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014652{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
14653echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014654else
Martin v. Löwis11437992002-04-12 09:54:03 +000014655 # Is the header compilable?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014656{ echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
14657echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014658cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014659/* confdefs.h. */
14660_ACEOF
14661cat confdefs.h >>conftest.$ac_ext
14662cat >>conftest.$ac_ext <<_ACEOF
14663/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014664$ac_includes_default
14665#include <mach/cthreads.h>
14666_ACEOF
14667rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014668if { (ac_try="$ac_compile"
14669case "(($ac_try" in
14670 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14671 *) ac_try_echo=$ac_try;;
14672esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014673eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014674 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014675 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014676 grep -v '^ *+' conftest.er1 >conftest.err
14677 rm -f conftest.er1
14678 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014680 (exit $ac_status); } && {
14681 test -z "$ac_c_werror_flag" ||
14682 test ! -s conftest.err
14683 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014684 ac_header_compiler=yes
14685else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014686 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014687sed 's/^/| /' conftest.$ac_ext >&5
14688
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014689 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014690fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014691
14692rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014693{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14694echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014695
14696# Is the header present?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014697{ echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
14698echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014699cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014700/* confdefs.h. */
14701_ACEOF
14702cat confdefs.h >>conftest.$ac_ext
14703cat >>conftest.$ac_ext <<_ACEOF
14704/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014705#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014706_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014707if { (ac_try="$ac_cpp conftest.$ac_ext"
14708case "(($ac_try" in
14709 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14710 *) ac_try_echo=$ac_try;;
14711esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014712eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014713 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014714 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014715 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000014716 rm -f conftest.er1
14717 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014719 (exit $ac_status); } >/dev/null && {
14720 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14721 test ! -s conftest.err
14722 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014723 ac_header_preproc=yes
14724else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014725 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014726sed 's/^/| /' conftest.$ac_ext >&5
14727
Martin v. Löwis11437992002-04-12 09:54:03 +000014728 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014729fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014730
Martin v. Löwis11437992002-04-12 09:54:03 +000014731rm -f conftest.err conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014732{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14733echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014734
14735# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014736case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14737 yes:no: )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014738 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
14739echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
14740 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
14741echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014742 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014743 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014744 no:yes:* )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014745 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
14746echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
14747 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
14748echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
14749 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
14750echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
14751 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
14752echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
14753 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
14754echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
14755 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
14756echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014757 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000014758## -------------------------------------- ##
14759## Report this to http://bugs.python.org/ ##
14760## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014761_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014762 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014763 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014764esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014765{ echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
14766echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014767if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014768 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014769else
14770 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014771fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014772{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
14773echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014774
14775fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014776if test $ac_cv_header_mach_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014777 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014778#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014779_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014780
Martin v. Löwis11437992002-04-12 09:54:03 +000014781 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014782#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014783_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014784
Martin v. Löwis11437992002-04-12 09:54:03 +000014785
14786cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014787#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014788_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014789
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014790 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014791else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014792
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014793 { echo "$as_me:$LINENO: checking for --with-pth" >&5
14794echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014795
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014796# Check whether --with-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014797if test "${with_pth+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014798 withval=$with_pth; { echo "$as_me:$LINENO: result: $withval" >&5
14799echo "${ECHO_T}$withval" >&6; }
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000014800 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014801#define WITH_THREAD 1
14802_ACEOF
14803
14804
14805cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014806#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014807_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014808
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000014809 LIBS="-lpth $LIBS"
14810 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014811else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014812 { echo "$as_me:$LINENO: result: no" >&5
14813echo "${ECHO_T}no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014814
14815 # Just looking for pthread_create in libpthread is not enough:
14816 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
14817 # So we really have to include pthread.h, and then link.
14818 _libs=$LIBS
14819 LIBS="$LIBS -lpthread"
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014820 { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
14821echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014822 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014823/* confdefs.h. */
14824_ACEOF
14825cat confdefs.h >>conftest.$ac_ext
14826cat >>conftest.$ac_ext <<_ACEOF
14827/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014828#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000014829
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014830void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000014831int
14832main ()
14833{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014834
14835pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000014836 ;
14837 return 0;
14838}
14839_ACEOF
14840rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014841if { (ac_try="$ac_link"
14842case "(($ac_try" in
14843 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14844 *) ac_try_echo=$ac_try;;
14845esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014846eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014847 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014848 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014849 grep -v '^ *+' conftest.er1 >conftest.err
14850 rm -f conftest.er1
14851 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014853 (exit $ac_status); } && {
14854 test -z "$ac_c_werror_flag" ||
14855 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014856 } && test -s conftest$ac_exeext &&
14857 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014858
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014859 { echo "$as_me:$LINENO: result: yes" >&5
14860echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014861 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000014862#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014863_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000014864
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014865 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014866 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000014867else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014868 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014869sed 's/^/| /' conftest.$ac_ext >&5
14870
Martin v. Löwis11437992002-04-12 09:54:03 +000014871
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014872 LIBS=$_libs
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014873 { echo "$as_me:$LINENO: checking for pthread_detach" >&5
14874echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014875if test "${ac_cv_func_pthread_detach+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014876 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000014877else
Martin v. Löwis11437992002-04-12 09:54:03 +000014878 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014879/* confdefs.h. */
14880_ACEOF
14881cat confdefs.h >>conftest.$ac_ext
14882cat >>conftest.$ac_ext <<_ACEOF
14883/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014884/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
14885 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14886#define pthread_detach innocuous_pthread_detach
14887
Guido van Rossumad678af1998-10-02 14:42:15 +000014888/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014889 which can conflict with char pthread_detach (); below.
14890 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014891 <limits.h> exists even on freestanding compilers. */
14892
14893#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000014894# include <limits.h>
14895#else
14896# include <assert.h>
14897#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014898
14899#undef pthread_detach
14900
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014901/* Override any GCC internal prototype to avoid an error.
14902 Use char because int might match the return type of a GCC
14903 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014904#ifdef __cplusplus
14905extern "C"
14906#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014907char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000014908/* The GNU C library defines this for functions which it implements
14909 to always fail with ENOSYS. Some functions are actually named
14910 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014911#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000014912choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000014913#endif
14914
Skip Montanaro6dead952003-09-25 14:50:04 +000014915int
14916main ()
14917{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014918return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014919 ;
14920 return 0;
14921}
14922_ACEOF
14923rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014924if { (ac_try="$ac_link"
14925case "(($ac_try" in
14926 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14927 *) ac_try_echo=$ac_try;;
14928esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014929eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014930 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014931 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014932 grep -v '^ *+' conftest.er1 >conftest.err
14933 rm -f conftest.er1
14934 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014936 (exit $ac_status); } && {
14937 test -z "$ac_c_werror_flag" ||
14938 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014939 } && test -s conftest$ac_exeext &&
14940 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014941 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000014942else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014943 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014944sed 's/^/| /' conftest.$ac_ext >&5
14945
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014946 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000014947fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014948
14949rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014950 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000014951fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014952{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
14953echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; }
14954if test $ac_cv_func_pthread_detach = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014955 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000014956#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014957_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000014958
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014959 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014960 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000014961else
Guido van Rossumad678af1998-10-02 14:42:15 +000014962
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014963 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014964 { echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
14965echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014966if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014967 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014968fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014969{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
14970echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014971else
14972 # Is the header compilable?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014973{ echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
14974echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014975cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014976/* confdefs.h. */
14977_ACEOF
14978cat confdefs.h >>conftest.$ac_ext
14979cat >>conftest.$ac_ext <<_ACEOF
14980/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014981$ac_includes_default
14982#include <atheos/threads.h>
14983_ACEOF
14984rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014985if { (ac_try="$ac_compile"
14986case "(($ac_try" in
14987 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14988 *) ac_try_echo=$ac_try;;
14989esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014990eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014991 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014992 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014993 grep -v '^ *+' conftest.er1 >conftest.err
14994 rm -f conftest.er1
14995 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014997 (exit $ac_status); } && {
14998 test -z "$ac_c_werror_flag" ||
14999 test ! -s conftest.err
15000 } && test -s conftest.$ac_objext; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015001 ac_header_compiler=yes
15002else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015003 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015004sed 's/^/| /' conftest.$ac_ext >&5
15005
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015006 ac_header_compiler=no
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015007fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015008
15009rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015010{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15011echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015012
15013# Is the header present?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015014{ echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
15015echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015016cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015017/* confdefs.h. */
15018_ACEOF
15019cat confdefs.h >>conftest.$ac_ext
15020cat >>conftest.$ac_ext <<_ACEOF
15021/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015022#include <atheos/threads.h>
15023_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015024if { (ac_try="$ac_cpp conftest.$ac_ext"
15025case "(($ac_try" in
15026 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15027 *) ac_try_echo=$ac_try;;
15028esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015029eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015030 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015031 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000015032 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015033 rm -f conftest.er1
15034 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015036 (exit $ac_status); } >/dev/null && {
15037 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15038 test ! -s conftest.err
15039 }; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015040 ac_header_preproc=yes
15041else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015042 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015043sed 's/^/| /' conftest.$ac_ext >&5
15044
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015045 ac_header_preproc=no
15046fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015047
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015048rm -f conftest.err conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015049{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15050echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015051
15052# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015053case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15054 yes:no: )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015055 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
15056echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15057 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
15058echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015059 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015060 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015061 no:yes:* )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015062 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
15063echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
15064 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
15065echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
15066 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
15067echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
15068 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5
15069echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;}
15070 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
15071echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
15072 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
15073echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015074 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000015075## -------------------------------------- ##
15076## Report this to http://bugs.python.org/ ##
15077## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015078_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015079 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000015080 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015081esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015082{ echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
15083echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015084if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015085 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015086else
15087 ac_cv_header_atheos_threads_h=$ac_header_preproc
15088fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015089{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
15090echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015091
15092fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015093if test $ac_cv_header_atheos_threads_h = yes; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015094 cat >>confdefs.h <<\_ACEOF
15095#define WITH_THREAD 1
15096_ACEOF
15097
15098
15099cat >>confdefs.h <<\_ACEOF
15100#define ATHEOS_THREADS 1
15101_ACEOF
15102
15103 THREADOBJ="Python/thread.o"
15104else
15105
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015106 { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
15107echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015108if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015109 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015110else
Martin v. Löwis11437992002-04-12 09:54:03 +000015111 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015112LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015113cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015114/* confdefs.h. */
15115_ACEOF
15116cat confdefs.h >>conftest.$ac_ext
15117cat >>conftest.$ac_ext <<_ACEOF
15118/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015119
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015120/* Override any GCC internal prototype to avoid an error.
15121 Use char because int might match the return type of a GCC
15122 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015123#ifdef __cplusplus
15124extern "C"
15125#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015126char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015127int
15128main ()
15129{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015130return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015131 ;
15132 return 0;
15133}
15134_ACEOF
15135rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015136if { (ac_try="$ac_link"
15137case "(($ac_try" in
15138 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15139 *) ac_try_echo=$ac_try;;
15140esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015141eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015142 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015143 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015144 grep -v '^ *+' conftest.er1 >conftest.err
15145 rm -f conftest.er1
15146 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015147 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015148 (exit $ac_status); } && {
15149 test -z "$ac_c_werror_flag" ||
15150 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015151 } && test -s conftest$ac_exeext &&
15152 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015153 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000015154else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015155 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015156sed 's/^/| /' conftest.$ac_ext >&5
15157
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015158 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000015159fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015160
15161rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015162 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015163LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000015164fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015165{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
15166echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
15167if test $ac_cv_lib_pthreads_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015168 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000015169#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015170_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000015171
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015172 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015173 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015174 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000015175else
Greg Steinadf63d62000-07-05 10:38:09 +000015176
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015177 { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
15178echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015179if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015180 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000015181else
Martin v. Löwis11437992002-04-12 09:54:03 +000015182 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000015183LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015184cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015185/* confdefs.h. */
15186_ACEOF
15187cat confdefs.h >>conftest.$ac_ext
15188cat >>conftest.$ac_ext <<_ACEOF
15189/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015190
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015191/* Override any GCC internal prototype to avoid an error.
15192 Use char because int might match the return type of a GCC
15193 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015194#ifdef __cplusplus
15195extern "C"
15196#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015197char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015198int
15199main ()
15200{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015201return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015202 ;
15203 return 0;
15204}
15205_ACEOF
15206rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015207if { (ac_try="$ac_link"
15208case "(($ac_try" in
15209 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15210 *) ac_try_echo=$ac_try;;
15211esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015212eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015213 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015214 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015215 grep -v '^ *+' conftest.er1 >conftest.err
15216 rm -f conftest.er1
15217 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015218 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015219 (exit $ac_status); } && {
15220 test -z "$ac_c_werror_flag" ||
15221 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015222 } && test -s conftest$ac_exeext &&
15223 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015224 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000015225else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015226 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015227sed 's/^/| /' conftest.$ac_ext >&5
15228
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015229 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000015230fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015231
15232rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015233 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015234LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000015235fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015236{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
15237echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
15238if test $ac_cv_lib_c_r_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015239 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000015240#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015241_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000015242
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015243 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015244 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015245 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000015246else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000015247
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015248 { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
15249echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015250if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015251 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015252else
Martin v. Löwis11437992002-04-12 09:54:03 +000015253 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015254LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015255cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015256/* confdefs.h. */
15257_ACEOF
15258cat confdefs.h >>conftest.$ac_ext
15259cat >>conftest.$ac_ext <<_ACEOF
15260/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015261
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015262/* Override any GCC internal prototype to avoid an error.
15263 Use char because int might match the return type of a GCC
15264 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015265#ifdef __cplusplus
15266extern "C"
15267#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015268char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015269int
15270main ()
15271{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015272return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015273 ;
15274 return 0;
15275}
15276_ACEOF
15277rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015278if { (ac_try="$ac_link"
15279case "(($ac_try" in
15280 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15281 *) ac_try_echo=$ac_try;;
15282esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015283eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015284 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015285 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015286 grep -v '^ *+' conftest.er1 >conftest.err
15287 rm -f conftest.er1
15288 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015290 (exit $ac_status); } && {
15291 test -z "$ac_c_werror_flag" ||
15292 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015293 } && test -s conftest$ac_exeext &&
15294 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015295 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015296else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015297 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015298sed 's/^/| /' conftest.$ac_ext >&5
15299
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015300 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015301fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015302
15303rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015304 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015305LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015306fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015307{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
15308echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; }
15309if test $ac_cv_lib_pthread___pthread_create_system = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015310 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015311#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015312_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015313
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015314 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015315 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015316 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015317else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015318
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015319 { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
15320echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015321if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015322 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000015323else
Martin v. Löwis11437992002-04-12 09:54:03 +000015324 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000015325LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015326cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015327/* confdefs.h. */
15328_ACEOF
15329cat confdefs.h >>conftest.$ac_ext
15330cat >>conftest.$ac_ext <<_ACEOF
15331/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015332
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015333/* Override any GCC internal prototype to avoid an error.
15334 Use char because int might match the return type of a GCC
15335 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015336#ifdef __cplusplus
15337extern "C"
15338#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015339char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015340int
15341main ()
15342{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015343return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015344 ;
15345 return 0;
15346}
15347_ACEOF
15348rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015349if { (ac_try="$ac_link"
15350case "(($ac_try" in
15351 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15352 *) ac_try_echo=$ac_try;;
15353esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015354eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015355 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015356 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015357 grep -v '^ *+' conftest.er1 >conftest.err
15358 rm -f conftest.er1
15359 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015361 (exit $ac_status); } && {
15362 test -z "$ac_c_werror_flag" ||
15363 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015364 } && test -s conftest$ac_exeext &&
15365 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015366 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000015367else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015368 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015369sed 's/^/| /' conftest.$ac_ext >&5
15370
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015371 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000015372fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015373
15374rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015375 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015376LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000015377fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015378{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
15379echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; }
15380if test $ac_cv_lib_cma_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015381 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000015382#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015383_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000015384
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015385 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015386 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015387 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000015388else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000015389
Martin v. Löwis130fb172001-07-19 11:00:41 +000015390 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000015391fi
15392
Guido van Rossum627b2d71993-12-24 10:39:16 +000015393
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015394fi
15395
Guido van Rossum0be3e491997-05-22 20:33:33 +000015396fi
15397
Guido van Rossum49545951997-12-02 19:28:29 +000015398fi
15399
Guido van Rossumb93a8621998-05-07 13:27:32 +000015400fi
15401
Guido van Rossum07bd90e2000-05-08 13:41:38 +000015402
Michael W. Hudson54241132001-12-07 15:38:26 +000015403fi
15404
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015405fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015406
15407rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015408 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015409fi
15410
Martin v. Löwis11437992002-04-12 09:54:03 +000015411fi
15412
15413
15414fi
15415
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015416
Michael W. Hudson54241132001-12-07 15:38:26 +000015417
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015418 { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
15419echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015420if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015421 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015422else
Martin v. Löwis11437992002-04-12 09:54:03 +000015423 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015424LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015425cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015426/* confdefs.h. */
15427_ACEOF
15428cat confdefs.h >>conftest.$ac_ext
15429cat >>conftest.$ac_ext <<_ACEOF
15430/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015431
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015432/* Override any GCC internal prototype to avoid an error.
15433 Use char because int might match the return type of a GCC
15434 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015435#ifdef __cplusplus
15436extern "C"
15437#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015438char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015439int
15440main ()
15441{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015442return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015443 ;
15444 return 0;
15445}
15446_ACEOF
15447rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015448if { (ac_try="$ac_link"
15449case "(($ac_try" in
15450 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15451 *) ac_try_echo=$ac_try;;
15452esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015453eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015454 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015455 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015456 grep -v '^ *+' conftest.er1 >conftest.err
15457 rm -f conftest.er1
15458 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015460 (exit $ac_status); } && {
15461 test -z "$ac_c_werror_flag" ||
15462 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015463 } && test -s conftest$ac_exeext &&
15464 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015465 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015466else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015467 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015468sed 's/^/| /' conftest.$ac_ext >&5
15469
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015470 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015471fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015472
15473rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015474 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015475LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015476fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015477{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
15478echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; }
15479if test $ac_cv_lib_mpc_usconfig = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015480 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015481#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015482_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015483
Martin v. Löwis130fb172001-07-19 11:00:41 +000015484 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015485 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015486 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000015487fi
15488
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015489
Neal Norwitza978ab02002-11-02 16:58:05 +000015490 if test "$posix_threads" != "yes"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015491 { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
15492echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015493if test "${ac_cv_lib_thread_thr_create+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015494 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015495else
Martin v. Löwis11437992002-04-12 09:54:03 +000015496 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015497LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015498cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015499/* confdefs.h. */
15500_ACEOF
15501cat confdefs.h >>conftest.$ac_ext
15502cat >>conftest.$ac_ext <<_ACEOF
15503/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015504
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015505/* Override any GCC internal prototype to avoid an error.
15506 Use char because int might match the return type of a GCC
15507 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015508#ifdef __cplusplus
15509extern "C"
15510#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015511char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015512int
15513main ()
15514{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015515return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015516 ;
15517 return 0;
15518}
15519_ACEOF
15520rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015521if { (ac_try="$ac_link"
15522case "(($ac_try" in
15523 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15524 *) ac_try_echo=$ac_try;;
15525esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015526eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015527 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015528 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015529 grep -v '^ *+' conftest.er1 >conftest.err
15530 rm -f conftest.er1
15531 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015533 (exit $ac_status); } && {
15534 test -z "$ac_c_werror_flag" ||
15535 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015536 } && test -s conftest$ac_exeext &&
15537 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015538 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015539else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015540 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015541sed 's/^/| /' conftest.$ac_ext >&5
15542
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015543 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015544fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015545
15546rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015547 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015548LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015549fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015550{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
15551echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
15552if test $ac_cv_lib_thread_thr_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015553 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015554#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015555_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015556
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015557 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015558 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015559 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000015560fi
15561
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015562 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015563
Martin v. Löwis130fb172001-07-19 11:00:41 +000015564 if test "$USE_THREAD_MODULE" != "#"
15565 then
15566 # If the above checks didn't disable threads, (at least) OSF1
15567 # needs this '-threads' argument during linking.
15568 case $ac_sys_system in
15569 OSF1) LDLAST=-threads;;
15570 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000015571 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015572fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015573
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015574if test "$posix_threads" = "yes"; then
15575 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015576
15577cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015578#define _POSIX_THREADS 1
15579_ACEOF
15580
15581 fi
15582
15583 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
15584 case $ac_sys_system/$ac_sys_release in
15585 SunOS/5.6)
15586cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015587#define HAVE_PTHREAD_DESTRUCTOR 1
15588_ACEOF
15589
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015590 ;;
15591 SunOS/5.8)
15592cat >>confdefs.h <<\_ACEOF
15593#define HAVE_BROKEN_POSIX_SEMAPHORES 1
15594_ACEOF
15595
15596 ;;
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000015597 AIX/5)
15598cat >>confdefs.h <<\_ACEOF
15599#define HAVE_BROKEN_POSIX_SEMAPHORES 1
15600_ACEOF
15601
15602 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015603 esac
15604
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015605 { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
15606echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015607 if test "${ac_cv_pthread_system_supported+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015608 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015609else
15610 if test "$cross_compiling" = yes; then
15611 ac_cv_pthread_system_supported=no
15612else
15613 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015614/* confdefs.h. */
15615_ACEOF
15616cat confdefs.h >>conftest.$ac_ext
15617cat >>conftest.$ac_ext <<_ACEOF
15618/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015619#include <pthread.h>
15620 void *foo(void *parm) {
15621 return NULL;
15622 }
15623 main() {
15624 pthread_attr_t attr;
15625 pthread_t id;
15626 if (pthread_attr_init(&attr)) exit(-1);
15627 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
15628 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
15629 exit(0);
15630 }
15631_ACEOF
15632rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015633if { (ac_try="$ac_link"
15634case "(($ac_try" in
15635 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15636 *) ac_try_echo=$ac_try;;
15637esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015638eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015639 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015640 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015642 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015643 { (case "(($ac_try" in
15644 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15645 *) ac_try_echo=$ac_try;;
15646esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015647eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015648 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015649 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015651 (exit $ac_status); }; }; then
15652 ac_cv_pthread_system_supported=yes
15653else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015654 echo "$as_me: program exited with status $ac_status" >&5
15655echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015656sed 's/^/| /' conftest.$ac_ext >&5
15657
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015658( exit $ac_status )
15659ac_cv_pthread_system_supported=no
15660fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015661rm -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 +000015662fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015663
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015664
15665
Guido van Rossum627b2d71993-12-24 10:39:16 +000015666fi
15667
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015668 { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
15669echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015670 if test "$ac_cv_pthread_system_supported" = "yes"; then
15671
15672cat >>confdefs.h <<\_ACEOF
15673#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
15674_ACEOF
15675
15676 fi
15677
15678for ac_func in pthread_sigmask
15679do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015680as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15681{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15682echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015683if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015684 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015685else
15686 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015687/* confdefs.h. */
15688_ACEOF
15689cat confdefs.h >>conftest.$ac_ext
15690cat >>conftest.$ac_ext <<_ACEOF
15691/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015692/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15693 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15694#define $ac_func innocuous_$ac_func
15695
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015696/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015697 which can conflict with char $ac_func (); below.
15698 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015699 <limits.h> exists even on freestanding compilers. */
15700
15701#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015702# include <limits.h>
15703#else
15704# include <assert.h>
15705#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015706
15707#undef $ac_func
15708
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015709/* Override any GCC internal prototype to avoid an error.
15710 Use char because int might match the return type of a GCC
15711 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015712#ifdef __cplusplus
15713extern "C"
15714#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015715char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015716/* The GNU C library defines this for functions which it implements
15717 to always fail with ENOSYS. Some functions are actually named
15718 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015719#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015720choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015721#endif
15722
Skip Montanaro6dead952003-09-25 14:50:04 +000015723int
15724main ()
15725{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015726return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015727 ;
15728 return 0;
15729}
15730_ACEOF
15731rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015732if { (ac_try="$ac_link"
15733case "(($ac_try" in
15734 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15735 *) ac_try_echo=$ac_try;;
15736esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015737eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015738 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015739 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015740 grep -v '^ *+' conftest.er1 >conftest.err
15741 rm -f conftest.er1
15742 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015744 (exit $ac_status); } && {
15745 test -z "$ac_c_werror_flag" ||
15746 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015747 } && test -s conftest$ac_exeext &&
15748 $as_test_x conftest$ac_exeext; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015749 eval "$as_ac_var=yes"
15750else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015751 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015752sed 's/^/| /' conftest.$ac_ext >&5
15753
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015754 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015755fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015756
15757rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015758 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015759fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015760ac_res=`eval echo '${'$as_ac_var'}'`
15761 { echo "$as_me:$LINENO: result: $ac_res" >&5
15762echo "${ECHO_T}$ac_res" >&6; }
15763if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015764 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015765#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015766_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000015767 case $ac_sys_system in
15768 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015769
Jason Tishlerfac083d2003-07-22 15:20:49 +000015770cat >>confdefs.h <<\_ACEOF
15771#define HAVE_BROKEN_PTHREAD_SIGMASK 1
15772_ACEOF
15773
15774 ;;
15775 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015776fi
15777done
15778
15779fi
15780
15781
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015782# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000015783
15784
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015785{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
15786echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015787# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015788if test "${enable_ipv6+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015789 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015790 no)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015791 { echo "$as_me:$LINENO: result: no" >&5
15792echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015793 ipv6=no
15794 ;;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015795 *) { echo "$as_me:$LINENO: result: yes" >&5
15796echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015797 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015798#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015799_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015800
15801 ipv6=yes
15802 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015803 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015804else
Martin v. Löwis11437992002-04-12 09:54:03 +000015805
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015806 if test "$cross_compiling" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015807 { echo "$as_me:$LINENO: result: no" >&5
15808echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015809 ipv6=no
15810
15811else
Martin v. Löwis11437992002-04-12 09:54:03 +000015812 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015813/* confdefs.h. */
15814_ACEOF
15815cat confdefs.h >>conftest.$ac_ext
15816cat >>conftest.$ac_ext <<_ACEOF
15817/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015818 /* AF_INET6 available check */
15819#include <sys/types.h>
15820#include <sys/socket.h>
15821main()
15822{
15823 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
15824 exit(1);
15825 else
15826 exit(0);
15827}
15828
Martin v. Löwis11437992002-04-12 09:54:03 +000015829_ACEOF
15830rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015831if { (ac_try="$ac_link"
15832case "(($ac_try" in
15833 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15834 *) ac_try_echo=$ac_try;;
15835esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015836eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015837 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015838 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015840 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015841 { (case "(($ac_try" in
15842 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15843 *) ac_try_echo=$ac_try;;
15844esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015845eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015846 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015847 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015849 (exit $ac_status); }; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015850 { echo "$as_me:$LINENO: result: yes" >&5
15851echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015852 ipv6=yes
15853else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015854 echo "$as_me: program exited with status $ac_status" >&5
15855echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015856sed 's/^/| /' conftest.$ac_ext >&5
15857
Martin v. Löwis11437992002-04-12 09:54:03 +000015858( exit $ac_status )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015859{ echo "$as_me:$LINENO: result: no" >&5
15860echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015861 ipv6=no
15862fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015863rm -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 +000015864fi
15865
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015866
15867
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015868if test "$ipv6" = "yes"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015869 { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
15870echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015871 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015872/* confdefs.h. */
15873_ACEOF
15874cat confdefs.h >>conftest.$ac_ext
15875cat >>conftest.$ac_ext <<_ACEOF
15876/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015877#include <sys/types.h>
15878#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015879int
15880main ()
15881{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015882struct sockaddr_in6 x;
15883x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000015884 ;
15885 return 0;
15886}
15887_ACEOF
15888rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015889if { (ac_try="$ac_compile"
15890case "(($ac_try" in
15891 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15892 *) ac_try_echo=$ac_try;;
15893esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015894eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015895 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015896 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015897 grep -v '^ *+' conftest.er1 >conftest.err
15898 rm -f conftest.er1
15899 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015901 (exit $ac_status); } && {
15902 test -z "$ac_c_werror_flag" ||
15903 test ! -s conftest.err
15904 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015905 { echo "$as_me:$LINENO: result: yes" >&5
15906echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015907 ipv6=yes
15908else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015909 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015910sed 's/^/| /' conftest.$ac_ext >&5
15911
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015912 { echo "$as_me:$LINENO: result: no" >&5
15913echo "${ECHO_T}no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015914 ipv6=no
15915fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015916
15917rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015918fi
15919
15920if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015921 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015922#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015923_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015924
15925fi
15926
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015927fi
15928
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015929
15930ipv6type=unknown
15931ipv6lib=none
15932ipv6trylibc=no
15933
15934if test "$ipv6" = "yes"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015935 { echo "$as_me:$LINENO: checking ipv6 stack type" >&5
15936echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000015937 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
15938 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015939 case $i in
15940 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000015941 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015942/* confdefs.h. */
15943_ACEOF
15944cat confdefs.h >>conftest.$ac_ext
15945cat >>conftest.$ac_ext <<_ACEOF
15946/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015947
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015948#include <netinet/in.h>
15949#ifdef IPV6_INRIA_VERSION
15950yes
15951#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015952_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015953if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015954 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000015955 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015956fi
Jesus Cea0f752ee2010-04-28 12:03:06 +000015957rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015958
15959 ;;
15960 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000015961 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015962/* confdefs.h. */
15963_ACEOF
15964cat confdefs.h >>conftest.$ac_ext
15965cat >>conftest.$ac_ext <<_ACEOF
15966/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015967
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015968#include <netinet/in.h>
15969#ifdef __KAME__
15970yes
15971#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015972_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015973if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015974 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015975 ipv6type=$i;
15976 ipv6lib=inet6
15977 ipv6libdir=/usr/local/v6/lib
15978 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015979fi
Jesus Cea0f752ee2010-04-28 12:03:06 +000015980rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015981
15982 ;;
15983 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000015984 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015985/* confdefs.h. */
15986_ACEOF
15987cat confdefs.h >>conftest.$ac_ext
15988cat >>conftest.$ac_ext <<_ACEOF
15989/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015990
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015991#include <features.h>
15992#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
15993yes
15994#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015995_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015996if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015997 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015998 ipv6type=$i;
15999 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016000fi
Jesus Cea0f752ee2010-04-28 12:03:06 +000016001rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016002
16003 ;;
16004 linux-inet6)
16005 if test -d /usr/inet6; then
16006 ipv6type=$i
16007 ipv6lib=inet6
16008 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000016009 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016010 fi
16011 ;;
16012 solaris)
16013 if test -f /etc/netconfig; then
16014 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
16015 ipv6type=$i
16016 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016017 fi
16018 fi
16019 ;;
16020 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000016021 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016022/* confdefs.h. */
16023_ACEOF
16024cat confdefs.h >>conftest.$ac_ext
16025cat >>conftest.$ac_ext <<_ACEOF
16026/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016027
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016028#include <sys/param.h>
16029#ifdef _TOSHIBA_INET6
16030yes
16031#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016032_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016033if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016034 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016035 ipv6type=$i;
16036 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000016037 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016038fi
Jesus Cea0f752ee2010-04-28 12:03:06 +000016039rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016040
16041 ;;
16042 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000016043 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016044/* confdefs.h. */
16045_ACEOF
16046cat confdefs.h >>conftest.$ac_ext
16047cat >>conftest.$ac_ext <<_ACEOF
16048/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016049
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016050#include </usr/local/v6/include/sys/v6config.h>
16051#ifdef __V6D__
16052yes
16053#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016054_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016055if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016056 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016057 ipv6type=$i;
16058 ipv6lib=v6;
16059 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000016060 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016061fi
Jesus Cea0f752ee2010-04-28 12:03:06 +000016062rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016063
16064 ;;
16065 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000016066 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016067/* confdefs.h. */
16068_ACEOF
16069cat confdefs.h >>conftest.$ac_ext
16070cat >>conftest.$ac_ext <<_ACEOF
16071/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016072
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016073#include <sys/param.h>
16074#ifdef _ZETA_MINAMI_INET6
16075yes
16076#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016077_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016078if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016079 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016080 ipv6type=$i;
16081 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000016082 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016083fi
Jesus Cea0f752ee2010-04-28 12:03:06 +000016084rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016085
16086 ;;
16087 esac
16088 if test "$ipv6type" != "unknown"; then
16089 break
16090 fi
16091 done
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016092 { echo "$as_me:$LINENO: result: $ipv6type" >&5
16093echo "${ECHO_T}$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016094fi
16095
16096if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
16097 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
16098 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
16099 echo "using lib$ipv6lib"
16100 else
16101 if test $ipv6trylibc = "yes"; then
16102 echo "using libc"
16103 else
16104 echo 'Fatal: no $ipv6lib library found. cannot continue.'
16105 echo "You need to fetch lib$ipv6lib.a from appropriate"
16106 echo 'ipv6 kit and compile beforehand.'
16107 exit 1
16108 fi
16109 fi
16110fi
16111
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016112{ echo "$as_me:$LINENO: checking for OSX 10.5 SDK or later" >&5
16113echo $ECHO_N "checking for OSX 10.5 SDK or later... $ECHO_C" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000016114cat >conftest.$ac_ext <<_ACEOF
16115/* confdefs.h. */
16116_ACEOF
16117cat confdefs.h >>conftest.$ac_ext
16118cat >>conftest.$ac_ext <<_ACEOF
16119/* end confdefs.h. */
16120#include <Carbon/Carbon.h>
16121int
16122main ()
16123{
16124FSIORefNum fRef = 0
16125 ;
16126 return 0;
16127}
16128_ACEOF
16129rm -f conftest.$ac_objext
16130if { (ac_try="$ac_compile"
16131case "(($ac_try" in
16132 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16133 *) ac_try_echo=$ac_try;;
16134esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016135eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000016136 (eval "$ac_compile") 2>conftest.er1
16137 ac_status=$?
16138 grep -v '^ *+' conftest.er1 >conftest.err
16139 rm -f conftest.er1
16140 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000016142 (exit $ac_status); } && {
16143 test -z "$ac_c_werror_flag" ||
16144 test ! -s conftest.err
16145 } && test -s conftest.$ac_objext; then
16146
16147cat >>confdefs.h <<\_ACEOF
16148#define HAVE_OSX105_SDK 1
16149_ACEOF
16150
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016151 { echo "$as_me:$LINENO: result: yes" >&5
16152echo "${ECHO_T}yes" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000016153else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016154 echo "$as_me: failed program was:" >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000016155sed 's/^/| /' conftest.$ac_ext >&5
16156
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016157 { echo "$as_me:$LINENO: result: no" >&5
16158echo "${ECHO_T}no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000016159
16160fi
16161
16162rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16163
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016164# Check for --with-doc-strings
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016165{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
16166echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016167
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016168# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016169if test "${with_doc_strings+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016170 withval=$with_doc_strings;
16171fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016172
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016173
16174if test -z "$with_doc_strings"
16175then with_doc_strings="yes"
16176fi
16177if test "$with_doc_strings" != "no"
16178then
16179
16180cat >>confdefs.h <<\_ACEOF
16181#define WITH_DOC_STRINGS 1
16182_ACEOF
16183
16184fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016185{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
16186echo "${ECHO_T}$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016187
Neil Schemenauera35c6882001-02-27 04:45:05 +000016188# Check for Python-specific malloc support
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016189{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
16190echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016191
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016192# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016193if test "${with_tsc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016194 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016195if test "$withval" != no
16196then
16197
16198cat >>confdefs.h <<\_ACEOF
16199#define WITH_TSC 1
16200_ACEOF
16201
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016202 { echo "$as_me:$LINENO: result: yes" >&5
16203echo "${ECHO_T}yes" >&6; }
16204else { echo "$as_me:$LINENO: result: no" >&5
16205echo "${ECHO_T}no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016206fi
16207else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016208 { echo "$as_me:$LINENO: result: no" >&5
16209echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016210fi
16211
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016212
16213# Check for Python-specific malloc support
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016214{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
16215echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016216
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016217# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000016218if test "${with_pymalloc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016219 withval=$with_pymalloc;
16220fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016221
Neil Schemenauera35c6882001-02-27 04:45:05 +000016222
Neil Schemenauer16c22972002-03-22 15:34:49 +000016223if test -z "$with_pymalloc"
16224then with_pymalloc="yes"
16225fi
16226if test "$with_pymalloc" != "no"
16227then
Martin v. Löwis11437992002-04-12 09:54:03 +000016228
16229cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000016230#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016231_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000016232
16233fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016234{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
16235echo "${ECHO_T}$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000016236
Barry Warsawef82cd72000-06-30 16:21:01 +000016237# Check for --with-wctype-functions
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016238{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
16239echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016240
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016241# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000016242if test "${with_wctype_functions+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016243 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000016244if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000016245then
16246
16247cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000016248#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016249_ACEOF
16250
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016251 { echo "$as_me:$LINENO: result: yes" >&5
16252echo "${ECHO_T}yes" >&6; }
16253else { echo "$as_me:$LINENO: result: no" >&5
16254echo "${ECHO_T}no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000016255fi
16256else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016257 { echo "$as_me:$LINENO: result: no" >&5
16258echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016259fi
16260
Barry Warsawef82cd72000-06-30 16:21:01 +000016261
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016262# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000016263
Guido van Rossum98935bf2001-09-05 19:13:16 +000016264DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000016265
Guido van Rossume97ee181999-12-20 21:27:22 +000016266# the dlopen() function means we might want to use dynload_shlib.o. some
16267# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000016268
Thomas Wouters3a584202000-08-05 23:28:51 +000016269for ac_func in dlopen
16270do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016271as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16272{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16273echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016274if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016275 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000016276else
Martin v. Löwis11437992002-04-12 09:54:03 +000016277 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016278/* confdefs.h. */
16279_ACEOF
16280cat confdefs.h >>conftest.$ac_ext
16281cat >>conftest.$ac_ext <<_ACEOF
16282/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016283/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16284 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16285#define $ac_func innocuous_$ac_func
16286
Guido van Rossume97ee181999-12-20 21:27:22 +000016287/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016288 which can conflict with char $ac_func (); below.
16289 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016290 <limits.h> exists even on freestanding compilers. */
16291
16292#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016293# include <limits.h>
16294#else
16295# include <assert.h>
16296#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016297
16298#undef $ac_func
16299
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016300/* Override any GCC internal prototype to avoid an error.
16301 Use char because int might match the return type of a GCC
16302 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016303#ifdef __cplusplus
16304extern "C"
16305#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016306char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000016307/* The GNU C library defines this for functions which it implements
16308 to always fail with ENOSYS. Some functions are actually named
16309 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016310#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000016311choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000016312#endif
16313
Skip Montanaro6dead952003-09-25 14:50:04 +000016314int
16315main ()
16316{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016317return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016318 ;
16319 return 0;
16320}
16321_ACEOF
16322rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016323if { (ac_try="$ac_link"
16324case "(($ac_try" in
16325 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16326 *) ac_try_echo=$ac_try;;
16327esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016328eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016329 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016330 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016331 grep -v '^ *+' conftest.er1 >conftest.err
16332 rm -f conftest.er1
16333 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016335 (exit $ac_status); } && {
16336 test -z "$ac_c_werror_flag" ||
16337 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016338 } && test -s conftest$ac_exeext &&
16339 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016340 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016341else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016342 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016343sed 's/^/| /' conftest.$ac_ext >&5
16344
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016345 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016346fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016347
16348rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016349 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016350fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016351ac_res=`eval echo '${'$as_ac_var'}'`
16352 { echo "$as_me:$LINENO: result: $ac_res" >&5
16353echo "${ECHO_T}$ac_res" >&6; }
16354if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016355 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016356#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016357_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016358
Guido van Rossume97ee181999-12-20 21:27:22 +000016359fi
Thomas Wouters3a584202000-08-05 23:28:51 +000016360done
Guido van Rossume97ee181999-12-20 21:27:22 +000016361
Michael W. Hudson54241132001-12-07 15:38:26 +000016362
Guido van Rossume97ee181999-12-20 21:27:22 +000016363# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
16364# loading of modules.
16365
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016366{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
16367echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000016368if test -z "$DYNLOADFILE"
16369then
16370 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000016371 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
16372 if test "$ac_cv_func_dlopen" = yes
16373 then DYNLOADFILE="dynload_shlib.o"
16374 else DYNLOADFILE="dynload_aix.o"
16375 fi
16376 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000016377 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016378 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
16379 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016380 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000016381 *)
16382 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
16383 # out any dynamic loading
16384 if test "$ac_cv_func_dlopen" = yes
16385 then DYNLOADFILE="dynload_shlib.o"
16386 else DYNLOADFILE="dynload_stub.o"
16387 fi
16388 ;;
16389 esac
16390fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016391{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
16392echo "${ECHO_T}$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000016393if test "$DYNLOADFILE" != "dynload_stub.o"
16394then
Martin v. Löwis11437992002-04-12 09:54:03 +000016395
16396cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016397#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016398_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016399
16400fi
16401
Neil Schemenauer4e425612001-06-19 15:44:15 +000016402# MACHDEP_OBJS can be set to platform-specific object files needed by Python
16403
Michael W. Hudson54241132001-12-07 15:38:26 +000016404
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016405{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
16406echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000016407if test -z "$MACHDEP_OBJS"
16408then
Jack Jansene578a632001-08-15 01:27:14 +000016409 MACHDEP_OBJS=$extra_machdep_objs
16410else
16411 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000016412fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016413{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
16414echo "${ECHO_T}MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000016415
Guido van Rossum627b2d71993-12-24 10:39:16 +000016416# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000016417
16418
16419
16420
16421
16422
16423
16424
16425
16426
16427
16428
16429
16430
16431
16432
16433
16434
16435
16436
16437
16438
16439
16440
16441
16442
16443
16444
16445
16446
16447
16448
16449
16450
16451
16452
16453
16454
16455
16456
16457
16458
16459
16460
16461
16462
16463
16464
16465
16466
16467
16468
16469
16470
16471
16472
16473
16474
16475
16476
16477
16478
16479
16480
16481
16482
16483
16484
16485
16486
16487
Martin v. Löwisd6320502004-08-12 13:45:08 +000016488
Martin v. Löwisc3001752005-01-23 09:27:24 +000016489
16490
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016491
16492
Thomas Wouterscf297e42007-02-23 15:07:44 +000016493
16494
Gregory P. Smith25523d22007-09-03 16:44:55 +000016495
Christian Heimes4e30a842007-11-30 22:12:06 +000016496
Martin v. Löwis92fab752008-03-08 10:40:41 +000016497
Martin v. Löwis823725e2008-03-24 13:39:54 +000016498
16499
Benjamin Peterson965ce872009-04-05 21:24:58 +000016500
16501
16502
16503
Martin v. Löwis011e8422009-05-05 04:43:17 +000016504
Martin v. Löwis113a0852009-05-29 17:25:39 +000016505
Martin v. Löwis823725e2008-03-24 13:39:54 +000016506for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
16507 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000016508 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwisc3001752005-01-23 09:27:24 +000016509 getpriority getpwent getspnam getspent getsid getwd \
Martin v. Löwis011e8422009-05-05 04:43:17 +000016510 kill killpg lchmod lchown lstat mbrtowc mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000016511 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000016512 putenv readlink realpath \
Benjamin Peterson965ce872009-04-05 21:24:58 +000016513 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
16514 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000016515 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Gregory P. Smith25523d22007-09-03 16:44:55 +000016516 sigaction siginterrupt sigrelse strftime strlcpy \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000016517 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis113a0852009-05-29 17:25:39 +000016518 truncate uname unsetenv utimes waitpid wait3 wait4 \
16519 wcscoll wcsftime wcsxfrm _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000016520do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016521as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16522{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16523echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016524if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016525 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016526else
Martin v. Löwis11437992002-04-12 09:54:03 +000016527 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016528/* confdefs.h. */
16529_ACEOF
16530cat confdefs.h >>conftest.$ac_ext
16531cat >>conftest.$ac_ext <<_ACEOF
16532/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016533/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16534 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16535#define $ac_func innocuous_$ac_func
16536
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016537/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016538 which can conflict with char $ac_func (); below.
16539 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016540 <limits.h> exists even on freestanding compilers. */
16541
16542#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016543# include <limits.h>
16544#else
16545# include <assert.h>
16546#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016547
16548#undef $ac_func
16549
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016550/* Override any GCC internal prototype to avoid an error.
16551 Use char because int might match the return type of a GCC
16552 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016553#ifdef __cplusplus
16554extern "C"
16555#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016556char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000016557/* The GNU C library defines this for functions which it implements
16558 to always fail with ENOSYS. Some functions are actually named
16559 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016560#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000016561choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000016562#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016563
Skip Montanaro6dead952003-09-25 14:50:04 +000016564int
16565main ()
16566{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016567return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016568 ;
16569 return 0;
16570}
16571_ACEOF
16572rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016573if { (ac_try="$ac_link"
16574case "(($ac_try" in
16575 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16576 *) ac_try_echo=$ac_try;;
16577esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016578eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016579 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016580 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016581 grep -v '^ *+' conftest.er1 >conftest.err
16582 rm -f conftest.er1
16583 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016585 (exit $ac_status); } && {
16586 test -z "$ac_c_werror_flag" ||
16587 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016588 } && test -s conftest$ac_exeext &&
16589 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016590 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016591else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016592 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016593sed 's/^/| /' conftest.$ac_ext >&5
16594
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016595 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016596fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016597
16598rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016599 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016600fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016601ac_res=`eval echo '${'$as_ac_var'}'`
16602 { echo "$as_me:$LINENO: result: $ac_res" >&5
16603echo "${ECHO_T}$ac_res" >&6; }
16604if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016605 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016606#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016607_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000016608
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016609fi
16610done
16611
Michael W. Hudson54241132001-12-07 15:38:26 +000016612
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016613# For some functions, having a definition is not sufficient, since
16614# we want to take their address.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016615{ echo "$as_me:$LINENO: checking for chroot" >&5
16616echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016617cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016618/* confdefs.h. */
16619_ACEOF
16620cat confdefs.h >>conftest.$ac_ext
16621cat >>conftest.$ac_ext <<_ACEOF
16622/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016623#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016624int
16625main ()
16626{
16627void *x=chroot
16628 ;
16629 return 0;
16630}
16631_ACEOF
16632rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016633if { (ac_try="$ac_compile"
16634case "(($ac_try" in
16635 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16636 *) ac_try_echo=$ac_try;;
16637esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016638eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016639 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016640 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016641 grep -v '^ *+' conftest.er1 >conftest.err
16642 rm -f conftest.er1
16643 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016645 (exit $ac_status); } && {
16646 test -z "$ac_c_werror_flag" ||
16647 test ! -s conftest.err
16648 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016649
16650cat >>confdefs.h <<\_ACEOF
16651#define HAVE_CHROOT 1
16652_ACEOF
16653
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016654 { echo "$as_me:$LINENO: result: yes" >&5
16655echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016656else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016657 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016658sed 's/^/| /' conftest.$ac_ext >&5
16659
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016660 { echo "$as_me:$LINENO: result: no" >&5
16661echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016662
16663fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016664
16665rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016666{ echo "$as_me:$LINENO: checking for link" >&5
16667echo $ECHO_N "checking for link... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016668cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016669/* confdefs.h. */
16670_ACEOF
16671cat confdefs.h >>conftest.$ac_ext
16672cat >>conftest.$ac_ext <<_ACEOF
16673/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016674#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016675int
16676main ()
16677{
16678void *x=link
16679 ;
16680 return 0;
16681}
16682_ACEOF
16683rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016684if { (ac_try="$ac_compile"
16685case "(($ac_try" in
16686 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16687 *) ac_try_echo=$ac_try;;
16688esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016689eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016690 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016691 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016692 grep -v '^ *+' conftest.er1 >conftest.err
16693 rm -f conftest.er1
16694 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016696 (exit $ac_status); } && {
16697 test -z "$ac_c_werror_flag" ||
16698 test ! -s conftest.err
16699 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016700
16701cat >>confdefs.h <<\_ACEOF
16702#define HAVE_LINK 1
16703_ACEOF
16704
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016705 { echo "$as_me:$LINENO: result: yes" >&5
16706echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016707else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016708 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016709sed 's/^/| /' conftest.$ac_ext >&5
16710
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016711 { echo "$as_me:$LINENO: result: no" >&5
16712echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016713
16714fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016715
16716rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016717{ echo "$as_me:$LINENO: checking for symlink" >&5
16718echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016719cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016720/* confdefs.h. */
16721_ACEOF
16722cat confdefs.h >>conftest.$ac_ext
16723cat >>conftest.$ac_ext <<_ACEOF
16724/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016725#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016726int
16727main ()
16728{
16729void *x=symlink
16730 ;
16731 return 0;
16732}
16733_ACEOF
16734rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016735if { (ac_try="$ac_compile"
16736case "(($ac_try" in
16737 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16738 *) ac_try_echo=$ac_try;;
16739esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016740eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016741 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016742 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016743 grep -v '^ *+' conftest.er1 >conftest.err
16744 rm -f conftest.er1
16745 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016747 (exit $ac_status); } && {
16748 test -z "$ac_c_werror_flag" ||
16749 test ! -s conftest.err
16750 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016751
16752cat >>confdefs.h <<\_ACEOF
16753#define HAVE_SYMLINK 1
16754_ACEOF
16755
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016756 { echo "$as_me:$LINENO: result: yes" >&5
16757echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016758else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016759 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016760sed 's/^/| /' conftest.$ac_ext >&5
16761
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016762 { echo "$as_me:$LINENO: result: no" >&5
16763echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016764
16765fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016766
16767rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016768{ echo "$as_me:$LINENO: checking for fchdir" >&5
16769echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016770cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016771/* confdefs.h. */
16772_ACEOF
16773cat confdefs.h >>conftest.$ac_ext
16774cat >>conftest.$ac_ext <<_ACEOF
16775/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016776#include <unistd.h>
16777int
16778main ()
16779{
16780void *x=fchdir
16781 ;
16782 return 0;
16783}
16784_ACEOF
16785rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016786if { (ac_try="$ac_compile"
16787case "(($ac_try" in
16788 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16789 *) ac_try_echo=$ac_try;;
16790esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016791eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016792 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016793 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016794 grep -v '^ *+' conftest.er1 >conftest.err
16795 rm -f conftest.er1
16796 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016798 (exit $ac_status); } && {
16799 test -z "$ac_c_werror_flag" ||
16800 test ! -s conftest.err
16801 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016802
16803cat >>confdefs.h <<\_ACEOF
16804#define HAVE_FCHDIR 1
16805_ACEOF
16806
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016807 { echo "$as_me:$LINENO: result: yes" >&5
16808echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016809else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016810 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016811sed 's/^/| /' conftest.$ac_ext >&5
16812
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016813 { echo "$as_me:$LINENO: result: no" >&5
16814echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016815
16816fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016817
16818rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016819{ echo "$as_me:$LINENO: checking for fsync" >&5
16820echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016821cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016822/* confdefs.h. */
16823_ACEOF
16824cat confdefs.h >>conftest.$ac_ext
16825cat >>conftest.$ac_ext <<_ACEOF
16826/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016827#include <unistd.h>
16828int
16829main ()
16830{
16831void *x=fsync
16832 ;
16833 return 0;
16834}
16835_ACEOF
16836rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016837if { (ac_try="$ac_compile"
16838case "(($ac_try" in
16839 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16840 *) ac_try_echo=$ac_try;;
16841esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016842eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016843 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016844 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016845 grep -v '^ *+' conftest.er1 >conftest.err
16846 rm -f conftest.er1
16847 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016849 (exit $ac_status); } && {
16850 test -z "$ac_c_werror_flag" ||
16851 test ! -s conftest.err
16852 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016853
16854cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016855#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016856_ACEOF
16857
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016858 { echo "$as_me:$LINENO: result: yes" >&5
16859echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016860else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016861 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016862sed 's/^/| /' conftest.$ac_ext >&5
16863
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016864 { echo "$as_me:$LINENO: result: no" >&5
16865echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016866
16867fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016868
16869rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016870{ echo "$as_me:$LINENO: checking for fdatasync" >&5
16871echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016872cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016873/* confdefs.h. */
16874_ACEOF
16875cat confdefs.h >>conftest.$ac_ext
16876cat >>conftest.$ac_ext <<_ACEOF
16877/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016878#include <unistd.h>
16879int
16880main ()
16881{
16882void *x=fdatasync
16883 ;
16884 return 0;
16885}
16886_ACEOF
16887rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016888if { (ac_try="$ac_compile"
16889case "(($ac_try" in
16890 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16891 *) ac_try_echo=$ac_try;;
16892esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016893eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016894 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016895 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016896 grep -v '^ *+' conftest.er1 >conftest.err
16897 rm -f conftest.er1
16898 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016900 (exit $ac_status); } && {
16901 test -z "$ac_c_werror_flag" ||
16902 test ! -s conftest.err
16903 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016904
16905cat >>confdefs.h <<\_ACEOF
16906#define HAVE_FDATASYNC 1
16907_ACEOF
16908
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016909 { echo "$as_me:$LINENO: result: yes" >&5
16910echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016911else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016912 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016913sed 's/^/| /' conftest.$ac_ext >&5
16914
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016915 { echo "$as_me:$LINENO: result: no" >&5
16916echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016917
16918fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016919
16920rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016921{ echo "$as_me:$LINENO: checking for epoll" >&5
16922echo $ECHO_N "checking for epoll... $ECHO_C" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016923cat >conftest.$ac_ext <<_ACEOF
16924/* confdefs.h. */
16925_ACEOF
16926cat confdefs.h >>conftest.$ac_ext
16927cat >>conftest.$ac_ext <<_ACEOF
16928/* end confdefs.h. */
16929#include <sys/epoll.h>
16930int
16931main ()
16932{
16933void *x=epoll_create
16934 ;
16935 return 0;
16936}
16937_ACEOF
16938rm -f conftest.$ac_objext
16939if { (ac_try="$ac_compile"
16940case "(($ac_try" in
16941 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16942 *) ac_try_echo=$ac_try;;
16943esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016944eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016945 (eval "$ac_compile") 2>conftest.er1
16946 ac_status=$?
16947 grep -v '^ *+' conftest.er1 >conftest.err
16948 rm -f conftest.er1
16949 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016951 (exit $ac_status); } && {
16952 test -z "$ac_c_werror_flag" ||
16953 test ! -s conftest.err
16954 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016955
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016956cat >>confdefs.h <<\_ACEOF
16957#define HAVE_EPOLL 1
16958_ACEOF
16959
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016960 { echo "$as_me:$LINENO: result: yes" >&5
16961echo "${ECHO_T}yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016962else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016963 echo "$as_me: failed program was:" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016964sed 's/^/| /' conftest.$ac_ext >&5
16965
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016966 { echo "$as_me:$LINENO: result: no" >&5
16967echo "${ECHO_T}no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016968
16969fi
16970
16971rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016972{ echo "$as_me:$LINENO: checking for kqueue" >&5
16973echo $ECHO_N "checking for kqueue... $ECHO_C" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016974cat >conftest.$ac_ext <<_ACEOF
16975/* confdefs.h. */
16976_ACEOF
16977cat confdefs.h >>conftest.$ac_ext
16978cat >>conftest.$ac_ext <<_ACEOF
16979/* end confdefs.h. */
16980
16981#include <sys/types.h>
16982#include <sys/event.h>
16983
16984int
16985main ()
16986{
16987int x=kqueue()
16988 ;
16989 return 0;
16990}
16991_ACEOF
16992rm -f conftest.$ac_objext
16993if { (ac_try="$ac_compile"
16994case "(($ac_try" in
16995 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16996 *) ac_try_echo=$ac_try;;
16997esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016998eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016999 (eval "$ac_compile") 2>conftest.er1
17000 ac_status=$?
17001 grep -v '^ *+' conftest.er1 >conftest.err
17002 rm -f conftest.er1
17003 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017004 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017005 (exit $ac_status); } && {
17006 test -z "$ac_c_werror_flag" ||
17007 test ! -s conftest.err
17008 } && test -s conftest.$ac_objext; then
17009
17010cat >>confdefs.h <<\_ACEOF
17011#define HAVE_KQUEUE 1
17012_ACEOF
17013
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017014 { echo "$as_me:$LINENO: result: yes" >&5
17015echo "${ECHO_T}yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017016else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017017 echo "$as_me: failed program was:" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017018sed 's/^/| /' conftest.$ac_ext >&5
17019
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017020 { echo "$as_me:$LINENO: result: no" >&5
17021echo "${ECHO_T}no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017022
17023fi
17024
17025rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000017026# On some systems (eg. FreeBSD 5), we would find a definition of the
17027# functions ctermid_r, setgroups in the library, but no prototype
17028# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
17029# address to avoid compiler warnings and potential miscompilations
17030# because of the missing prototypes.
17031
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017032{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
17033echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017034cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017035/* confdefs.h. */
17036_ACEOF
17037cat confdefs.h >>conftest.$ac_ext
17038cat >>conftest.$ac_ext <<_ACEOF
17039/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000017040
17041#include "confdefs.h"
17042#include <stdio.h>
17043
Martin v. Löwisd5843682002-11-21 20:41:28 +000017044int
17045main ()
17046{
17047void* p = ctermid_r
17048 ;
17049 return 0;
17050}
17051_ACEOF
17052rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017053if { (ac_try="$ac_compile"
17054case "(($ac_try" in
17055 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17056 *) ac_try_echo=$ac_try;;
17057esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017058eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017059 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000017060 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017061 grep -v '^ *+' conftest.er1 >conftest.err
17062 rm -f conftest.er1
17063 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017065 (exit $ac_status); } && {
17066 test -z "$ac_c_werror_flag" ||
17067 test ! -s conftest.err
17068 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000017069
17070cat >>confdefs.h <<\_ACEOF
17071#define HAVE_CTERMID_R 1
17072_ACEOF
17073
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017074 { echo "$as_me:$LINENO: result: yes" >&5
17075echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017076else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017077 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017078sed 's/^/| /' conftest.$ac_ext >&5
17079
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017080 { echo "$as_me:$LINENO: result: no" >&5
17081echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017082
17083fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017084
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17086
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017087{ echo "$as_me:$LINENO: checking for flock" >&5
17088echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017089cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017090/* confdefs.h. */
17091_ACEOF
17092cat confdefs.h >>conftest.$ac_ext
17093cat >>conftest.$ac_ext <<_ACEOF
17094/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017095
17096#include "confdefs.h"
17097#include <sys/file.h>
17098
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017099int
17100main ()
17101{
17102void* p = flock
17103 ;
17104 return 0;
17105}
17106_ACEOF
17107rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017108if { (ac_try="$ac_compile"
17109case "(($ac_try" in
17110 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17111 *) ac_try_echo=$ac_try;;
17112esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017113eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017114 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017115 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017116 grep -v '^ *+' conftest.er1 >conftest.err
17117 rm -f conftest.er1
17118 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017120 (exit $ac_status); } && {
17121 test -z "$ac_c_werror_flag" ||
17122 test ! -s conftest.err
17123 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017124
17125cat >>confdefs.h <<\_ACEOF
17126#define HAVE_FLOCK 1
17127_ACEOF
17128
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017129 { echo "$as_me:$LINENO: result: yes" >&5
17130echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017131else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017132 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017133sed 's/^/| /' conftest.$ac_ext >&5
17134
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017135 { echo "$as_me:$LINENO: result: no" >&5
17136echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017137
17138fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017139
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017140rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17141
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017142{ echo "$as_me:$LINENO: checking for getpagesize" >&5
17143echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017144cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017145/* confdefs.h. */
17146_ACEOF
17147cat confdefs.h >>conftest.$ac_ext
17148cat >>conftest.$ac_ext <<_ACEOF
17149/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017150
17151#include "confdefs.h"
17152#include <unistd.h>
17153
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017154int
17155main ()
17156{
17157void* p = getpagesize
17158 ;
17159 return 0;
17160}
17161_ACEOF
17162rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017163if { (ac_try="$ac_compile"
17164case "(($ac_try" in
17165 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17166 *) ac_try_echo=$ac_try;;
17167esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017168eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017169 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017170 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017171 grep -v '^ *+' conftest.er1 >conftest.err
17172 rm -f conftest.er1
17173 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017175 (exit $ac_status); } && {
17176 test -z "$ac_c_werror_flag" ||
17177 test ! -s conftest.err
17178 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017179
17180cat >>confdefs.h <<\_ACEOF
17181#define HAVE_GETPAGESIZE 1
17182_ACEOF
17183
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017184 { echo "$as_me:$LINENO: result: yes" >&5
17185echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017186else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017187 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017188sed 's/^/| /' conftest.$ac_ext >&5
17189
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017190 { echo "$as_me:$LINENO: result: no" >&5
17191echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017192
17193fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017194
17195rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017196
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017197for ac_prog in true
17198do
17199 # Extract the first word of "$ac_prog", so it can be a program name with args.
17200set dummy $ac_prog; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017201{ echo "$as_me:$LINENO: checking for $ac_word" >&5
17202echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017203if test "${ac_cv_prog_TRUE+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017204 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017205else
17206 if test -n "$TRUE"; then
17207 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
17208else
17209as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17210for as_dir in $PATH
17211do
17212 IFS=$as_save_IFS
17213 test -z "$as_dir" && as_dir=.
17214 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017215 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 +000017216 ac_cv_prog_TRUE="$ac_prog"
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017217 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017218 break 2
17219 fi
17220done
17221done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017222IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017223
17224fi
17225fi
17226TRUE=$ac_cv_prog_TRUE
17227if test -n "$TRUE"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017228 { echo "$as_me:$LINENO: result: $TRUE" >&5
17229echo "${ECHO_T}$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017230else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017231 { echo "$as_me:$LINENO: result: no" >&5
17232echo "${ECHO_T}no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017233fi
17234
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017235
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017236 test -n "$TRUE" && break
17237done
17238test -n "$TRUE" || TRUE="/bin/true"
17239
17240
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017241{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
17242echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017243if test "${ac_cv_lib_c_inet_aton+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017244 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017245else
17246 ac_check_lib_save_LIBS=$LIBS
17247LIBS="-lc $LIBS"
17248cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017249/* confdefs.h. */
17250_ACEOF
17251cat confdefs.h >>conftest.$ac_ext
17252cat >>conftest.$ac_ext <<_ACEOF
17253/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017254
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017255/* Override any GCC internal prototype to avoid an error.
17256 Use char because int might match the return type of a GCC
17257 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017258#ifdef __cplusplus
17259extern "C"
17260#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017261char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017262int
17263main ()
17264{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017265return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017266 ;
17267 return 0;
17268}
17269_ACEOF
17270rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017271if { (ac_try="$ac_link"
17272case "(($ac_try" in
17273 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17274 *) ac_try_echo=$ac_try;;
17275esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017276eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017277 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017278 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017279 grep -v '^ *+' conftest.er1 >conftest.err
17280 rm -f conftest.er1
17281 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017283 (exit $ac_status); } && {
17284 test -z "$ac_c_werror_flag" ||
17285 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017286 } && test -s conftest$ac_exeext &&
17287 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017288 ac_cv_lib_c_inet_aton=yes
17289else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017290 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017291sed 's/^/| /' conftest.$ac_ext >&5
17292
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017293 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017294fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017295
17296rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017297 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017298LIBS=$ac_check_lib_save_LIBS
17299fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017300{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
17301echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
17302if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017303 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017304else
17305
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017306{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
17307echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017308if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017309 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017310else
17311 ac_check_lib_save_LIBS=$LIBS
17312LIBS="-lresolv $LIBS"
17313cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017314/* confdefs.h. */
17315_ACEOF
17316cat confdefs.h >>conftest.$ac_ext
17317cat >>conftest.$ac_ext <<_ACEOF
17318/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017319
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017320/* Override any GCC internal prototype to avoid an error.
17321 Use char because int might match the return type of a GCC
17322 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017323#ifdef __cplusplus
17324extern "C"
17325#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017326char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017327int
17328main ()
17329{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017330return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017331 ;
17332 return 0;
17333}
17334_ACEOF
17335rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017336if { (ac_try="$ac_link"
17337case "(($ac_try" in
17338 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17339 *) ac_try_echo=$ac_try;;
17340esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017341eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017342 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017343 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017344 grep -v '^ *+' conftest.er1 >conftest.err
17345 rm -f conftest.er1
17346 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017348 (exit $ac_status); } && {
17349 test -z "$ac_c_werror_flag" ||
17350 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017351 } && test -s conftest$ac_exeext &&
17352 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017353 ac_cv_lib_resolv_inet_aton=yes
17354else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017355 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017356sed 's/^/| /' conftest.$ac_ext >&5
17357
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017358 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017359fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017360
17361rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017362 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017363LIBS=$ac_check_lib_save_LIBS
17364fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017365{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
17366echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
17367if test $ac_cv_lib_resolv_inet_aton = yes; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017368 cat >>confdefs.h <<_ACEOF
17369#define HAVE_LIBRESOLV 1
17370_ACEOF
17371
17372 LIBS="-lresolv $LIBS"
17373
17374fi
17375
17376
17377fi
17378
17379
Christian Heimesd0764e22007-12-04 15:00:33 +000017380# On Tru64, chflags seems to be present, but calling it will
17381# exit Python
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017382{ echo "$as_me:$LINENO: checking for chflags" >&5
17383echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017384if test "${ac_cv_have_chflags+set}" = set; then
17385 echo $ECHO_N "(cached) $ECHO_C" >&6
17386else
17387 if test "$cross_compiling" = yes; then
17388 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000017389else
17390 cat >conftest.$ac_ext <<_ACEOF
17391/* confdefs.h. */
17392_ACEOF
17393cat confdefs.h >>conftest.$ac_ext
17394cat >>conftest.$ac_ext <<_ACEOF
17395/* end confdefs.h. */
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017396[
Christian Heimesd0764e22007-12-04 15:00:33 +000017397#include <sys/stat.h>
17398#include <unistd.h>
17399int main(int argc, char*argv[])
17400{
17401 if(chflags(argv[0], 0) != 0)
17402 return 1;
17403 return 0;
17404}
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017405]
Christian Heimesd0764e22007-12-04 15:00:33 +000017406_ACEOF
17407rm -f conftest$ac_exeext
17408if { (ac_try="$ac_link"
17409case "(($ac_try" in
17410 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17411 *) ac_try_echo=$ac_try;;
17412esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017413eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017414 (eval "$ac_link") 2>&5
17415 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017417 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17418 { (case "(($ac_try" in
17419 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17420 *) ac_try_echo=$ac_try;;
17421esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017422eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017423 (eval "$ac_try") 2>&5
17424 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017426 (exit $ac_status); }; }; then
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017427 ac_cv_have_chflags=yes
Christian Heimesd0764e22007-12-04 15:00:33 +000017428else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017429 echo "$as_me: program exited with status $ac_status" >&5
17430echo "$as_me: failed program was:" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017431sed 's/^/| /' conftest.$ac_ext >&5
17432
17433( exit $ac_status )
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017434ac_cv_have_chflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000017435fi
17436rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17437fi
17438
17439
17440
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017441fi
17442{ echo "$as_me:$LINENO: result: $ac_cv_have_chflags" >&5
17443echo "${ECHO_T}$ac_cv_have_chflags" >&6; }
17444if test "$ac_cv_have_chflags" = cross ; then
17445 { echo "$as_me:$LINENO: checking for chflags" >&5
17446echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
17447if test "${ac_cv_func_chflags+set}" = set; then
17448 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimesd0764e22007-12-04 15:00:33 +000017449else
17450 cat >conftest.$ac_ext <<_ACEOF
17451/* confdefs.h. */
17452_ACEOF
17453cat confdefs.h >>conftest.$ac_ext
17454cat >>conftest.$ac_ext <<_ACEOF
17455/* end confdefs.h. */
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017456/* Define chflags to an innocuous variant, in case <limits.h> declares chflags.
17457 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17458#define chflags innocuous_chflags
Christian Heimesd0764e22007-12-04 15:00:33 +000017459
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017460/* System header to define __stub macros and hopefully few prototypes,
17461 which can conflict with char chflags (); below.
17462 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17463 <limits.h> exists even on freestanding compilers. */
17464
17465#ifdef __STDC__
17466# include <limits.h>
17467#else
17468# include <assert.h>
17469#endif
17470
17471#undef chflags
17472
17473/* Override any GCC internal prototype to avoid an error.
17474 Use char because int might match the return type of a GCC
17475 builtin and then its argument prototype would still apply. */
17476#ifdef __cplusplus
17477extern "C"
17478#endif
17479char chflags ();
17480/* The GNU C library defines this for functions which it implements
17481 to always fail with ENOSYS. Some functions are actually named
17482 something starting with __ and the normal name is an alias. */
17483#if defined __stub_chflags || defined __stub___chflags
17484choke me
17485#endif
17486
17487int
17488main ()
17489{
17490return chflags ();
17491 ;
17492 return 0;
17493}
17494_ACEOF
17495rm -f conftest.$ac_objext conftest$ac_exeext
17496if { (ac_try="$ac_link"
17497case "(($ac_try" in
17498 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17499 *) ac_try_echo=$ac_try;;
17500esac
17501eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17502 (eval "$ac_link") 2>conftest.er1
17503 ac_status=$?
17504 grep -v '^ *+' conftest.er1 >conftest.err
17505 rm -f conftest.er1
17506 cat conftest.err >&5
17507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17508 (exit $ac_status); } && {
17509 test -z "$ac_c_werror_flag" ||
17510 test ! -s conftest.err
17511 } && test -s conftest$ac_exeext &&
17512 $as_test_x conftest$ac_exeext; then
17513 ac_cv_func_chflags=yes
17514else
17515 echo "$as_me: failed program was:" >&5
17516sed 's/^/| /' conftest.$ac_ext >&5
17517
17518 ac_cv_func_chflags=no
17519fi
17520
17521rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17522 conftest$ac_exeext conftest.$ac_ext
17523fi
17524{ echo "$as_me:$LINENO: result: $ac_cv_func_chflags" >&5
17525echo "${ECHO_T}$ac_cv_func_chflags" >&6; }
17526if test $ac_cv_func_chflags = yes; then
17527 ac_cv_have_chflags="yes"
17528else
17529 ac_cv_have_chflags="no"
17530fi
17531
17532fi
17533if test "$ac_cv_have_chflags" = yes ; then
17534
17535cat >>confdefs.h <<\_ACEOF
17536#define HAVE_CHFLAGS 1
17537_ACEOF
17538
17539fi
17540
17541{ echo "$as_me:$LINENO: checking for lchflags" >&5
17542echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
17543if test "${ac_cv_have_lchflags+set}" = set; then
17544 echo $ECHO_N "(cached) $ECHO_C" >&6
17545else
17546 if test "$cross_compiling" = yes; then
17547 ac_cv_have_lchflags=cross
17548else
17549 cat >conftest.$ac_ext <<_ACEOF
17550/* confdefs.h. */
17551_ACEOF
17552cat confdefs.h >>conftest.$ac_ext
17553cat >>conftest.$ac_ext <<_ACEOF
17554/* end confdefs.h. */
17555[
Christian Heimesd0764e22007-12-04 15:00:33 +000017556#include <sys/stat.h>
17557#include <unistd.h>
17558int main(int argc, char*argv[])
17559{
17560 if(lchflags(argv[0], 0) != 0)
17561 return 1;
17562 return 0;
17563}
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017564]
Christian Heimesd0764e22007-12-04 15:00:33 +000017565_ACEOF
17566rm -f conftest$ac_exeext
17567if { (ac_try="$ac_link"
17568case "(($ac_try" in
17569 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17570 *) ac_try_echo=$ac_try;;
17571esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017572eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017573 (eval "$ac_link") 2>&5
17574 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017576 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17577 { (case "(($ac_try" in
17578 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17579 *) ac_try_echo=$ac_try;;
17580esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017581eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017582 (eval "$ac_try") 2>&5
17583 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017585 (exit $ac_status); }; }; then
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017586 ac_cv_have_lchflags=yes
Christian Heimesd0764e22007-12-04 15:00:33 +000017587else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017588 echo "$as_me: program exited with status $ac_status" >&5
17589echo "$as_me: failed program was:" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017590sed 's/^/| /' conftest.$ac_ext >&5
17591
17592( exit $ac_status )
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017593ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000017594fi
17595rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17596fi
17597
17598
17599
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017600fi
17601{ echo "$as_me:$LINENO: result: $ac_cv_have_lchflags" >&5
17602echo "${ECHO_T}$ac_cv_have_lchflags" >&6; }
17603if test "$ac_cv_have_lchflags" = cross ; then
17604 { echo "$as_me:$LINENO: checking for lchflags" >&5
17605echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
17606if test "${ac_cv_func_lchflags+set}" = set; then
17607 echo $ECHO_N "(cached) $ECHO_C" >&6
17608else
17609 cat >conftest.$ac_ext <<_ACEOF
17610/* confdefs.h. */
17611_ACEOF
17612cat confdefs.h >>conftest.$ac_ext
17613cat >>conftest.$ac_ext <<_ACEOF
17614/* end confdefs.h. */
17615/* Define lchflags to an innocuous variant, in case <limits.h> declares lchflags.
17616 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17617#define lchflags innocuous_lchflags
17618
17619/* System header to define __stub macros and hopefully few prototypes,
17620 which can conflict with char lchflags (); below.
17621 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17622 <limits.h> exists even on freestanding compilers. */
17623
17624#ifdef __STDC__
17625# include <limits.h>
17626#else
17627# include <assert.h>
17628#endif
17629
17630#undef lchflags
17631
17632/* Override any GCC internal prototype to avoid an error.
17633 Use char because int might match the return type of a GCC
17634 builtin and then its argument prototype would still apply. */
17635#ifdef __cplusplus
17636extern "C"
17637#endif
17638char lchflags ();
17639/* The GNU C library defines this for functions which it implements
17640 to always fail with ENOSYS. Some functions are actually named
17641 something starting with __ and the normal name is an alias. */
17642#if defined __stub_lchflags || defined __stub___lchflags
17643choke me
17644#endif
17645
17646int
17647main ()
17648{
17649return lchflags ();
17650 ;
17651 return 0;
17652}
17653_ACEOF
17654rm -f conftest.$ac_objext conftest$ac_exeext
17655if { (ac_try="$ac_link"
17656case "(($ac_try" in
17657 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17658 *) ac_try_echo=$ac_try;;
17659esac
17660eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17661 (eval "$ac_link") 2>conftest.er1
17662 ac_status=$?
17663 grep -v '^ *+' conftest.er1 >conftest.err
17664 rm -f conftest.er1
17665 cat conftest.err >&5
17666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17667 (exit $ac_status); } && {
17668 test -z "$ac_c_werror_flag" ||
17669 test ! -s conftest.err
17670 } && test -s conftest$ac_exeext &&
17671 $as_test_x conftest$ac_exeext; then
17672 ac_cv_func_lchflags=yes
17673else
17674 echo "$as_me: failed program was:" >&5
17675sed 's/^/| /' conftest.$ac_ext >&5
17676
17677 ac_cv_func_lchflags=no
17678fi
17679
17680rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17681 conftest$ac_exeext conftest.$ac_ext
17682fi
17683{ echo "$as_me:$LINENO: result: $ac_cv_func_lchflags" >&5
17684echo "${ECHO_T}$ac_cv_func_lchflags" >&6; }
17685if test $ac_cv_func_lchflags = yes; then
17686 ac_cv_have_lchflags="yes"
17687else
17688 ac_cv_have_lchflags="no"
17689fi
17690
17691fi
17692if test "$ac_cv_have_lchflags" = yes ; then
17693
17694cat >>confdefs.h <<\_ACEOF
17695#define HAVE_LCHFLAGS 1
17696_ACEOF
17697
17698fi
17699
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017700case $ac_sys_system/$ac_sys_release in
17701Darwin/*)
17702 _CUR_CFLAGS="${CFLAGS}"
17703 _CUR_LDFLAGS="${LDFLAGS}"
17704 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
17705 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
17706 ;;
17707esac
17708
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017709{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
17710echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017711if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017712 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017713else
17714 ac_check_lib_save_LIBS=$LIBS
17715LIBS="-lz $LIBS"
17716cat >conftest.$ac_ext <<_ACEOF
17717/* confdefs.h. */
17718_ACEOF
17719cat confdefs.h >>conftest.$ac_ext
17720cat >>conftest.$ac_ext <<_ACEOF
17721/* end confdefs.h. */
17722
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017723/* Override any GCC internal prototype to avoid an error.
17724 Use char because int might match the return type of a GCC
17725 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017726#ifdef __cplusplus
17727extern "C"
17728#endif
17729char inflateCopy ();
17730int
17731main ()
17732{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017733return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017734 ;
17735 return 0;
17736}
17737_ACEOF
17738rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017739if { (ac_try="$ac_link"
17740case "(($ac_try" in
17741 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17742 *) ac_try_echo=$ac_try;;
17743esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017744eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017745 (eval "$ac_link") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017746 ac_status=$?
17747 grep -v '^ *+' conftest.er1 >conftest.err
17748 rm -f conftest.er1
17749 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017751 (exit $ac_status); } && {
17752 test -z "$ac_c_werror_flag" ||
17753 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017754 } && test -s conftest$ac_exeext &&
17755 $as_test_x conftest$ac_exeext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017756 ac_cv_lib_z_inflateCopy=yes
17757else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017758 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017759sed 's/^/| /' conftest.$ac_ext >&5
17760
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017761 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017762fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017763
17764rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017765 conftest$ac_exeext conftest.$ac_ext
17766LIBS=$ac_check_lib_save_LIBS
17767fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017768{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
17769echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6; }
17770if test $ac_cv_lib_z_inflateCopy = yes; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017771
17772cat >>confdefs.h <<\_ACEOF
17773#define HAVE_ZLIB_COPY 1
17774_ACEOF
17775
17776fi
17777
17778
17779case $ac_sys_system/$ac_sys_release in
17780Darwin/*)
17781 CFLAGS="${_CUR_CFLAGS}"
17782 LDFLAGS="${_CUR_LDFLAGS}"
17783 ;;
17784esac
17785
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017786{ echo "$as_me:$LINENO: checking for hstrerror" >&5
17787echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017788cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017789/* confdefs.h. */
17790_ACEOF
17791cat confdefs.h >>conftest.$ac_ext
17792cat >>conftest.$ac_ext <<_ACEOF
17793/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000017794
17795#include "confdefs.h"
17796#include <netdb.h>
17797
Martin v. Löwise9416172003-05-03 10:12:45 +000017798int
17799main ()
17800{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017801void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000017802 ;
17803 return 0;
17804}
17805_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017806rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017807if { (ac_try="$ac_link"
17808case "(($ac_try" in
17809 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17810 *) ac_try_echo=$ac_try;;
17811esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017812eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017813 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000017814 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017815 grep -v '^ *+' conftest.er1 >conftest.err
17816 rm -f conftest.er1
17817 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017819 (exit $ac_status); } && {
17820 test -z "$ac_c_werror_flag" ||
17821 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017822 } && test -s conftest$ac_exeext &&
17823 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000017824
17825cat >>confdefs.h <<\_ACEOF
17826#define HAVE_HSTRERROR 1
17827_ACEOF
17828
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017829 { echo "$as_me:$LINENO: result: yes" >&5
17830echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017831else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017832 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017833sed 's/^/| /' conftest.$ac_ext >&5
17834
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017835 { echo "$as_me:$LINENO: result: no" >&5
17836echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017837
17838fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017839
17840rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017841 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000017842
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017843{ echo "$as_me:$LINENO: checking for inet_aton" >&5
17844echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017845cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017846/* confdefs.h. */
17847_ACEOF
17848cat confdefs.h >>conftest.$ac_ext
17849cat >>conftest.$ac_ext <<_ACEOF
17850/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000017851
17852#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000017853#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000017854#include <sys/socket.h>
17855#include <netinet/in.h>
17856#include <arpa/inet.h>
17857
Martin v. Löwise9416172003-05-03 10:12:45 +000017858int
17859main ()
17860{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017861void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000017862 ;
17863 return 0;
17864}
17865_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017866rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017867if { (ac_try="$ac_link"
17868case "(($ac_try" in
17869 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17870 *) ac_try_echo=$ac_try;;
17871esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017872eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017873 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000017874 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017875 grep -v '^ *+' conftest.er1 >conftest.err
17876 rm -f conftest.er1
17877 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017878 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017879 (exit $ac_status); } && {
17880 test -z "$ac_c_werror_flag" ||
17881 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017882 } && test -s conftest$ac_exeext &&
17883 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000017884
17885cat >>confdefs.h <<\_ACEOF
17886#define HAVE_INET_ATON 1
17887_ACEOF
17888
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017889 { echo "$as_me:$LINENO: result: yes" >&5
17890echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017891else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017892 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017893sed 's/^/| /' conftest.$ac_ext >&5
17894
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017895 { echo "$as_me:$LINENO: result: no" >&5
17896echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017897
17898fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017899
17900rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017901 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000017902
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017903{ echo "$as_me:$LINENO: checking for inet_pton" >&5
17904echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017905cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017906/* confdefs.h. */
17907_ACEOF
17908cat confdefs.h >>conftest.$ac_ext
17909cat >>conftest.$ac_ext <<_ACEOF
17910/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000017911
17912#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000017913#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000017914#include <sys/socket.h>
17915#include <netinet/in.h>
17916#include <arpa/inet.h>
17917
Martin v. Löwise9416172003-05-03 10:12:45 +000017918int
17919main ()
17920{
17921void* p = inet_pton
17922 ;
17923 return 0;
17924}
17925_ACEOF
17926rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017927if { (ac_try="$ac_compile"
17928case "(($ac_try" in
17929 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17930 *) ac_try_echo=$ac_try;;
17931esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017932eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017933 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000017934 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017935 grep -v '^ *+' conftest.er1 >conftest.err
17936 rm -f conftest.er1
17937 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017938 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017939 (exit $ac_status); } && {
17940 test -z "$ac_c_werror_flag" ||
17941 test ! -s conftest.err
17942 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000017943
17944cat >>confdefs.h <<\_ACEOF
17945#define HAVE_INET_PTON 1
17946_ACEOF
17947
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017948 { echo "$as_me:$LINENO: result: yes" >&5
17949echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017950else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017951 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017952sed 's/^/| /' conftest.$ac_ext >&5
17953
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017954 { echo "$as_me:$LINENO: result: no" >&5
17955echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017956
17957fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017958
17959rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000017960
Martin v. Löwisd6640d42003-07-06 09:29:52 +000017961# On some systems, setgroups is in unistd.h, on others, in grp.h
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017962{ echo "$as_me:$LINENO: checking for setgroups" >&5
17963echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017964cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017965/* confdefs.h. */
17966_ACEOF
17967cat confdefs.h >>conftest.$ac_ext
17968cat >>conftest.$ac_ext <<_ACEOF
17969/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000017970
17971#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000017972#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000017973#ifdef HAVE_GRP_H
17974#include <grp.h>
17975#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000017976
Martin v. Löwisd5843682002-11-21 20:41:28 +000017977int
17978main ()
17979{
17980void* p = setgroups
17981 ;
17982 return 0;
17983}
17984_ACEOF
17985rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017986if { (ac_try="$ac_compile"
17987case "(($ac_try" in
17988 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17989 *) ac_try_echo=$ac_try;;
17990esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017991eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017992 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000017993 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017994 grep -v '^ *+' conftest.er1 >conftest.err
17995 rm -f conftest.er1
17996 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017998 (exit $ac_status); } && {
17999 test -z "$ac_c_werror_flag" ||
18000 test ! -s conftest.err
18001 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000018002
18003cat >>confdefs.h <<\_ACEOF
18004#define HAVE_SETGROUPS 1
18005_ACEOF
18006
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018007 { echo "$as_me:$LINENO: result: yes" >&5
18008echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018009else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018010 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018011sed 's/^/| /' conftest.$ac_ext >&5
18012
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018013 { echo "$as_me:$LINENO: result: no" >&5
18014echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018015
18016fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018017
18018rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000018019
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018020# check for openpty and forkpty
18021
Martin v. Löwis11437992002-04-12 09:54:03 +000018022
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018023for ac_func in openpty
18024do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018025as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18026{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18027echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018028if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018029 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018030else
Martin v. Löwis11437992002-04-12 09:54:03 +000018031 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018032/* confdefs.h. */
18033_ACEOF
18034cat confdefs.h >>conftest.$ac_ext
18035cat >>conftest.$ac_ext <<_ACEOF
18036/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018037/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18038 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18039#define $ac_func innocuous_$ac_func
18040
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018041/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018042 which can conflict with char $ac_func (); below.
18043 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018044 <limits.h> exists even on freestanding compilers. */
18045
18046#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018047# include <limits.h>
18048#else
18049# include <assert.h>
18050#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018051
18052#undef $ac_func
18053
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018054/* Override any GCC internal prototype to avoid an error.
18055 Use char because int might match the return type of a GCC
18056 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018057#ifdef __cplusplus
18058extern "C"
18059#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018060char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018061/* The GNU C library defines this for functions which it implements
18062 to always fail with ENOSYS. Some functions are actually named
18063 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018064#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018065choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018066#endif
18067
Skip Montanaro6dead952003-09-25 14:50:04 +000018068int
18069main ()
18070{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018071return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018072 ;
18073 return 0;
18074}
18075_ACEOF
18076rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018077if { (ac_try="$ac_link"
18078case "(($ac_try" in
18079 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18080 *) ac_try_echo=$ac_try;;
18081esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018082eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018083 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018084 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018085 grep -v '^ *+' conftest.er1 >conftest.err
18086 rm -f conftest.er1
18087 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018089 (exit $ac_status); } && {
18090 test -z "$ac_c_werror_flag" ||
18091 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018092 } && test -s conftest$ac_exeext &&
18093 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018094 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018095else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018096 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018097sed 's/^/| /' conftest.$ac_ext >&5
18098
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018099 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018100fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018101
18102rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018103 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018104fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018105ac_res=`eval echo '${'$as_ac_var'}'`
18106 { echo "$as_me:$LINENO: result: $ac_res" >&5
18107echo "${ECHO_T}$ac_res" >&6; }
18108if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018109 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018110#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018111_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018112
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018113else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018114 { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
18115echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018116if test "${ac_cv_lib_util_openpty+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018117 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000018118else
Martin v. Löwis11437992002-04-12 09:54:03 +000018119 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018120LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000018121cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018122/* confdefs.h. */
18123_ACEOF
18124cat confdefs.h >>conftest.$ac_ext
18125cat >>conftest.$ac_ext <<_ACEOF
18126/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018127
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018128/* Override any GCC internal prototype to avoid an error.
18129 Use char because int might match the return type of a GCC
18130 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018131#ifdef __cplusplus
18132extern "C"
18133#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018134char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018135int
18136main ()
18137{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018138return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018139 ;
18140 return 0;
18141}
18142_ACEOF
18143rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018144if { (ac_try="$ac_link"
18145case "(($ac_try" in
18146 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18147 *) ac_try_echo=$ac_try;;
18148esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018149eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018150 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018151 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018152 grep -v '^ *+' conftest.er1 >conftest.err
18153 rm -f conftest.er1
18154 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018155 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018156 (exit $ac_status); } && {
18157 test -z "$ac_c_werror_flag" ||
18158 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018159 } && test -s conftest$ac_exeext &&
18160 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018161 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000018162else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018163 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018164sed 's/^/| /' conftest.$ac_ext >&5
18165
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018166 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018167fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018168
18169rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018170 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018171LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018172fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018173{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
18174echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
18175if test $ac_cv_lib_util_openpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018176 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018177#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018178_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018179 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018180else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018181 { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
18182echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018183if test "${ac_cv_lib_bsd_openpty+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018184 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018185else
18186 ac_check_lib_save_LIBS=$LIBS
18187LIBS="-lbsd $LIBS"
18188cat >conftest.$ac_ext <<_ACEOF
18189/* confdefs.h. */
18190_ACEOF
18191cat confdefs.h >>conftest.$ac_ext
18192cat >>conftest.$ac_ext <<_ACEOF
18193/* end confdefs.h. */
18194
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018195/* Override any GCC internal prototype to avoid an error.
18196 Use char because int might match the return type of a GCC
18197 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018198#ifdef __cplusplus
18199extern "C"
18200#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018201char openpty ();
18202int
18203main ()
18204{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018205return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018206 ;
18207 return 0;
18208}
18209_ACEOF
18210rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018211if { (ac_try="$ac_link"
18212case "(($ac_try" in
18213 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18214 *) ac_try_echo=$ac_try;;
18215esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018216eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018217 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018218 ac_status=$?
18219 grep -v '^ *+' conftest.er1 >conftest.err
18220 rm -f conftest.er1
18221 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018223 (exit $ac_status); } && {
18224 test -z "$ac_c_werror_flag" ||
18225 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018226 } && test -s conftest$ac_exeext &&
18227 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018228 ac_cv_lib_bsd_openpty=yes
18229else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018230 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018231sed 's/^/| /' conftest.$ac_ext >&5
18232
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018233 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018234fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018235
18236rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018237 conftest$ac_exeext conftest.$ac_ext
18238LIBS=$ac_check_lib_save_LIBS
18239fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018240{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
18241echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
18242if test $ac_cv_lib_bsd_openpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018243 cat >>confdefs.h <<\_ACEOF
18244#define HAVE_OPENPTY 1
18245_ACEOF
18246 LIBS="$LIBS -lbsd"
18247fi
18248
18249
18250fi
18251
Fred Drake8cef4cf2000-06-28 16:40:38 +000018252
18253fi
18254done
18255
Martin v. Löwis11437992002-04-12 09:54:03 +000018256
Fred Drake8cef4cf2000-06-28 16:40:38 +000018257for ac_func in forkpty
18258do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018259as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18260{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18261echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018262if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018263 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000018264else
Martin v. Löwis11437992002-04-12 09:54:03 +000018265 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018266/* confdefs.h. */
18267_ACEOF
18268cat confdefs.h >>conftest.$ac_ext
18269cat >>conftest.$ac_ext <<_ACEOF
18270/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018271/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18272 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18273#define $ac_func innocuous_$ac_func
18274
Fred Drake8cef4cf2000-06-28 16:40:38 +000018275/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018276 which can conflict with char $ac_func (); below.
18277 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018278 <limits.h> exists even on freestanding compilers. */
18279
18280#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018281# include <limits.h>
18282#else
18283# include <assert.h>
18284#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018285
18286#undef $ac_func
18287
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018288/* Override any GCC internal prototype to avoid an error.
18289 Use char because int might match the return type of a GCC
18290 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018291#ifdef __cplusplus
18292extern "C"
18293#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018294char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000018295/* The GNU C library defines this for functions which it implements
18296 to always fail with ENOSYS. Some functions are actually named
18297 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018298#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000018299choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000018300#endif
18301
Skip Montanaro6dead952003-09-25 14:50:04 +000018302int
18303main ()
18304{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018305return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018306 ;
18307 return 0;
18308}
18309_ACEOF
18310rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018311if { (ac_try="$ac_link"
18312case "(($ac_try" in
18313 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18314 *) ac_try_echo=$ac_try;;
18315esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018316eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018317 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018318 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018319 grep -v '^ *+' conftest.er1 >conftest.err
18320 rm -f conftest.er1
18321 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018323 (exit $ac_status); } && {
18324 test -z "$ac_c_werror_flag" ||
18325 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018326 } && test -s conftest$ac_exeext &&
18327 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018328 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018329else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018330 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018331sed 's/^/| /' conftest.$ac_ext >&5
18332
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018333 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018334fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018335
18336rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018337 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018338fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018339ac_res=`eval echo '${'$as_ac_var'}'`
18340 { echo "$as_me:$LINENO: result: $ac_res" >&5
18341echo "${ECHO_T}$ac_res" >&6; }
18342if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018343 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018344#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018345_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018346
Fred Drake8cef4cf2000-06-28 16:40:38 +000018347else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018348 { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
18349echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018350if test "${ac_cv_lib_util_forkpty+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018351 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000018352else
Martin v. Löwis11437992002-04-12 09:54:03 +000018353 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018354LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000018355cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018356/* confdefs.h. */
18357_ACEOF
18358cat confdefs.h >>conftest.$ac_ext
18359cat >>conftest.$ac_ext <<_ACEOF
18360/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018361
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018362/* Override any GCC internal prototype to avoid an error.
18363 Use char because int might match the return type of a GCC
18364 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018365#ifdef __cplusplus
18366extern "C"
18367#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018368char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018369int
18370main ()
18371{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018372return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018373 ;
18374 return 0;
18375}
18376_ACEOF
18377rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018378if { (ac_try="$ac_link"
18379case "(($ac_try" in
18380 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18381 *) ac_try_echo=$ac_try;;
18382esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018383eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018384 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018385 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018386 grep -v '^ *+' conftest.er1 >conftest.err
18387 rm -f conftest.er1
18388 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018389 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018390 (exit $ac_status); } && {
18391 test -z "$ac_c_werror_flag" ||
18392 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018393 } && test -s conftest$ac_exeext &&
18394 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018395 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000018396else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018397 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018398sed 's/^/| /' conftest.$ac_ext >&5
18399
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018400 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018401fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018402
18403rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018404 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018405LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018406fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018407{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
18408echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
18409if test $ac_cv_lib_util_forkpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018410 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018411#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018412_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018413 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018414else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018415 { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
18416echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018417if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018418 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018419else
18420 ac_check_lib_save_LIBS=$LIBS
18421LIBS="-lbsd $LIBS"
18422cat >conftest.$ac_ext <<_ACEOF
18423/* confdefs.h. */
18424_ACEOF
18425cat confdefs.h >>conftest.$ac_ext
18426cat >>conftest.$ac_ext <<_ACEOF
18427/* end confdefs.h. */
18428
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018429/* Override any GCC internal prototype to avoid an error.
18430 Use char because int might match the return type of a GCC
18431 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018432#ifdef __cplusplus
18433extern "C"
18434#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018435char forkpty ();
18436int
18437main ()
18438{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018439return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018440 ;
18441 return 0;
18442}
18443_ACEOF
18444rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018445if { (ac_try="$ac_link"
18446case "(($ac_try" in
18447 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18448 *) ac_try_echo=$ac_try;;
18449esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018450eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018451 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018452 ac_status=$?
18453 grep -v '^ *+' conftest.er1 >conftest.err
18454 rm -f conftest.er1
18455 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018457 (exit $ac_status); } && {
18458 test -z "$ac_c_werror_flag" ||
18459 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018460 } && test -s conftest$ac_exeext &&
18461 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018462 ac_cv_lib_bsd_forkpty=yes
18463else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018464 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018465sed 's/^/| /' conftest.$ac_ext >&5
18466
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018467 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018468fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018469
18470rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018471 conftest$ac_exeext conftest.$ac_ext
18472LIBS=$ac_check_lib_save_LIBS
18473fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018474{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
18475echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
18476if test $ac_cv_lib_bsd_forkpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018477 cat >>confdefs.h <<\_ACEOF
18478#define HAVE_FORKPTY 1
18479_ACEOF
18480 LIBS="$LIBS -lbsd"
18481fi
18482
18483
18484fi
18485
Fred Drake8cef4cf2000-06-28 16:40:38 +000018486
18487fi
18488done
18489
Jack Jansendd19cf82001-12-06 22:36:17 +000018490
Christian Heimesb186d002008-03-18 15:15:01 +000018491# Stuff for expat.
18492
18493for ac_func in memmove
18494do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018495as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18496{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18497echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Christian Heimesb186d002008-03-18 15:15:01 +000018498if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018499 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimesb186d002008-03-18 15:15:01 +000018500else
18501 cat >conftest.$ac_ext <<_ACEOF
18502/* confdefs.h. */
18503_ACEOF
18504cat confdefs.h >>conftest.$ac_ext
18505cat >>conftest.$ac_ext <<_ACEOF
18506/* end confdefs.h. */
18507/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18508 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18509#define $ac_func innocuous_$ac_func
18510
18511/* System header to define __stub macros and hopefully few prototypes,
18512 which can conflict with char $ac_func (); below.
18513 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18514 <limits.h> exists even on freestanding compilers. */
18515
18516#ifdef __STDC__
18517# include <limits.h>
18518#else
18519# include <assert.h>
18520#endif
18521
18522#undef $ac_func
18523
18524/* Override any GCC internal prototype to avoid an error.
18525 Use char because int might match the return type of a GCC
18526 builtin and then its argument prototype would still apply. */
18527#ifdef __cplusplus
18528extern "C"
18529#endif
18530char $ac_func ();
18531/* The GNU C library defines this for functions which it implements
18532 to always fail with ENOSYS. Some functions are actually named
18533 something starting with __ and the normal name is an alias. */
18534#if defined __stub_$ac_func || defined __stub___$ac_func
18535choke me
18536#endif
18537
18538int
18539main ()
18540{
18541return $ac_func ();
18542 ;
18543 return 0;
18544}
18545_ACEOF
18546rm -f conftest.$ac_objext conftest$ac_exeext
18547if { (ac_try="$ac_link"
18548case "(($ac_try" in
18549 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18550 *) ac_try_echo=$ac_try;;
18551esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018552eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesb186d002008-03-18 15:15:01 +000018553 (eval "$ac_link") 2>conftest.er1
18554 ac_status=$?
18555 grep -v '^ *+' conftest.er1 >conftest.err
18556 rm -f conftest.er1
18557 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesb186d002008-03-18 15:15:01 +000018559 (exit $ac_status); } && {
18560 test -z "$ac_c_werror_flag" ||
18561 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018562 } && test -s conftest$ac_exeext &&
18563 $as_test_x conftest$ac_exeext; then
Christian Heimesb186d002008-03-18 15:15:01 +000018564 eval "$as_ac_var=yes"
18565else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018566 echo "$as_me: failed program was:" >&5
Christian Heimesb186d002008-03-18 15:15:01 +000018567sed 's/^/| /' conftest.$ac_ext >&5
18568
18569 eval "$as_ac_var=no"
18570fi
18571
18572rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18573 conftest$ac_exeext conftest.$ac_ext
18574fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018575ac_res=`eval echo '${'$as_ac_var'}'`
18576 { echo "$as_me:$LINENO: result: $ac_res" >&5
18577echo "${ECHO_T}$ac_res" >&6; }
18578if test `eval echo '${'$as_ac_var'}'` = yes; then
Christian Heimesb186d002008-03-18 15:15:01 +000018579 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018580#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimesb186d002008-03-18 15:15:01 +000018581_ACEOF
18582
18583fi
18584done
18585
18586
Michael W. Hudson54241132001-12-07 15:38:26 +000018587# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000018588
18589
18590
18591
18592
18593
Fred Drake8cef4cf2000-06-28 16:40:38 +000018594for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
18595do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018596as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18597{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18598echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018599if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018600 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018601else
Martin v. Löwis11437992002-04-12 09:54:03 +000018602 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018603/* confdefs.h. */
18604_ACEOF
18605cat confdefs.h >>conftest.$ac_ext
18606cat >>conftest.$ac_ext <<_ACEOF
18607/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018608/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18609 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18610#define $ac_func innocuous_$ac_func
18611
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018612/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018613 which can conflict with char $ac_func (); below.
18614 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018615 <limits.h> exists even on freestanding compilers. */
18616
18617#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018618# include <limits.h>
18619#else
18620# include <assert.h>
18621#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018622
18623#undef $ac_func
18624
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018625/* Override any GCC internal prototype to avoid an error.
18626 Use char because int might match the return type of a GCC
18627 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018628#ifdef __cplusplus
18629extern "C"
18630#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018631char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018632/* The GNU C library defines this for functions which it implements
18633 to always fail with ENOSYS. Some functions are actually named
18634 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018635#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018636choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018637#endif
18638
Skip Montanaro6dead952003-09-25 14:50:04 +000018639int
18640main ()
18641{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018642return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018643 ;
18644 return 0;
18645}
18646_ACEOF
18647rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018648if { (ac_try="$ac_link"
18649case "(($ac_try" in
18650 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18651 *) ac_try_echo=$ac_try;;
18652esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018653eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018654 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018655 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018656 grep -v '^ *+' conftest.er1 >conftest.err
18657 rm -f conftest.er1
18658 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018660 (exit $ac_status); } && {
18661 test -z "$ac_c_werror_flag" ||
18662 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018663 } && test -s conftest$ac_exeext &&
18664 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018665 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018666else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018667 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018668sed 's/^/| /' conftest.$ac_ext >&5
18669
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018670 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018671fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018672
18673rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018674 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018675fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018676ac_res=`eval echo '${'$as_ac_var'}'`
18677 { echo "$as_me:$LINENO: result: $ac_res" >&5
18678echo "${ECHO_T}$ac_res" >&6; }
18679if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018680 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018681#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018682_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000018683
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018684fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018685done
18686
Michael W. Hudson54241132001-12-07 15:38:26 +000018687
Martin v. Löwis11437992002-04-12 09:54:03 +000018688
18689
18690
Christian Heimesb186d002008-03-18 15:15:01 +000018691for ac_func in dup2 getcwd strdup
Thomas Wouters3a584202000-08-05 23:28:51 +000018692do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018693as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18694{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18695echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018696if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018697 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018698else
Martin v. Löwis11437992002-04-12 09:54:03 +000018699 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018700/* confdefs.h. */
18701_ACEOF
18702cat confdefs.h >>conftest.$ac_ext
18703cat >>conftest.$ac_ext <<_ACEOF
18704/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018705/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18706 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18707#define $ac_func innocuous_$ac_func
18708
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018709/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018710 which can conflict with char $ac_func (); below.
18711 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018712 <limits.h> exists even on freestanding compilers. */
18713
18714#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018715# include <limits.h>
18716#else
18717# include <assert.h>
18718#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018719
18720#undef $ac_func
18721
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018722/* Override any GCC internal prototype to avoid an error.
18723 Use char because int might match the return type of a GCC
18724 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018725#ifdef __cplusplus
18726extern "C"
18727#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018728char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000018729/* The GNU C library defines this for functions which it implements
18730 to always fail with ENOSYS. Some functions are actually named
18731 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018732#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000018733choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000018734#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018735
Skip Montanaro6dead952003-09-25 14:50:04 +000018736int
18737main ()
18738{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018739return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018740 ;
18741 return 0;
18742}
18743_ACEOF
18744rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018745if { (ac_try="$ac_link"
18746case "(($ac_try" in
18747 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18748 *) ac_try_echo=$ac_try;;
18749esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018750eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018751 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018752 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018753 grep -v '^ *+' conftest.er1 >conftest.err
18754 rm -f conftest.er1
18755 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018756 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018757 (exit $ac_status); } && {
18758 test -z "$ac_c_werror_flag" ||
18759 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018760 } && test -s conftest$ac_exeext &&
18761 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018762 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000018763else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018764 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018765sed 's/^/| /' conftest.$ac_ext >&5
18766
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018767 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000018768fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018769
18770rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018771 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000018772fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018773ac_res=`eval echo '${'$as_ac_var'}'`
18774 { echo "$as_me:$LINENO: result: $ac_res" >&5
18775echo "${ECHO_T}$ac_res" >&6; }
18776if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018777 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018778#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018779_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000018780
Martin v. Löwis1142de32002-03-29 16:28:31 +000018781else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018782 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000018783 *" $ac_func.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018784 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
18785 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000018786esac
18787
Martin v. Löwis1142de32002-03-29 16:28:31 +000018788fi
18789done
18790
18791
Martin v. Löwis11437992002-04-12 09:54:03 +000018792
Martin v. Löwis1142de32002-03-29 16:28:31 +000018793for ac_func in getpgrp
18794do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018795as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18796{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18797echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018798if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018799 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000018800else
Martin v. Löwis11437992002-04-12 09:54:03 +000018801 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018802/* confdefs.h. */
18803_ACEOF
18804cat confdefs.h >>conftest.$ac_ext
18805cat >>conftest.$ac_ext <<_ACEOF
18806/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018807/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18808 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18809#define $ac_func innocuous_$ac_func
18810
Martin v. Löwis1142de32002-03-29 16:28:31 +000018811/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018812 which can conflict with char $ac_func (); below.
18813 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018814 <limits.h> exists even on freestanding compilers. */
18815
18816#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018817# include <limits.h>
18818#else
18819# include <assert.h>
18820#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018821
18822#undef $ac_func
18823
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018824/* Override any GCC internal prototype to avoid an error.
18825 Use char because int might match the return type of a GCC
18826 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018827#ifdef __cplusplus
18828extern "C"
18829#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018830char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000018831/* The GNU C library defines this for functions which it implements
18832 to always fail with ENOSYS. Some functions are actually named
18833 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018834#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000018835choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000018836#endif
18837
Skip Montanaro6dead952003-09-25 14:50:04 +000018838int
18839main ()
18840{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018841return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018842 ;
18843 return 0;
18844}
18845_ACEOF
18846rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018847if { (ac_try="$ac_link"
18848case "(($ac_try" in
18849 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18850 *) ac_try_echo=$ac_try;;
18851esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018852eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018853 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018854 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018855 grep -v '^ *+' conftest.er1 >conftest.err
18856 rm -f conftest.er1
18857 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018859 (exit $ac_status); } && {
18860 test -z "$ac_c_werror_flag" ||
18861 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018862 } && test -s conftest$ac_exeext &&
18863 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018864 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018865else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018866 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018867sed 's/^/| /' conftest.$ac_ext >&5
18868
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018869 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018870fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018871
18872rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018873 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018874fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018875ac_res=`eval echo '${'$as_ac_var'}'`
18876 { echo "$as_me:$LINENO: result: $ac_res" >&5
18877echo "${ECHO_T}$ac_res" >&6; }
18878if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018879 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018880#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018881_ACEOF
18882 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018883/* confdefs.h. */
18884_ACEOF
18885cat confdefs.h >>conftest.$ac_ext
18886cat >>conftest.$ac_ext <<_ACEOF
18887/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018888#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018889int
18890main ()
18891{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018892getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000018893 ;
18894 return 0;
18895}
18896_ACEOF
18897rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018898if { (ac_try="$ac_compile"
18899case "(($ac_try" in
18900 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18901 *) ac_try_echo=$ac_try;;
18902esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018903eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018904 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018905 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018906 grep -v '^ *+' conftest.er1 >conftest.err
18907 rm -f conftest.er1
18908 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018910 (exit $ac_status); } && {
18911 test -z "$ac_c_werror_flag" ||
18912 test ! -s conftest.err
18913 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018914
18915cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018916#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018917_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000018918
Martin v. Löwis11437992002-04-12 09:54:03 +000018919
Guido van Rossumf78abae1997-01-21 22:02:36 +000018920else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018921 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018922sed 's/^/| /' conftest.$ac_ext >&5
18923
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018924
Guido van Rossum627b2d71993-12-24 10:39:16 +000018925fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018926
18927rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000018928
Guido van Rossum627b2d71993-12-24 10:39:16 +000018929fi
Thomas Wouters3a584202000-08-05 23:28:51 +000018930done
Guido van Rossum627b2d71993-12-24 10:39:16 +000018931
Jack Jansen150753c2003-03-29 22:07:47 +000018932
18933for ac_func in setpgrp
18934do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018935as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18936{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18937echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018938if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018939 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018940else
Martin v. Löwis11437992002-04-12 09:54:03 +000018941 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018942/* confdefs.h. */
18943_ACEOF
18944cat confdefs.h >>conftest.$ac_ext
18945cat >>conftest.$ac_ext <<_ACEOF
18946/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018947/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18948 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18949#define $ac_func innocuous_$ac_func
18950
Jack Jansen150753c2003-03-29 22:07:47 +000018951/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018952 which can conflict with char $ac_func (); below.
18953 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018954 <limits.h> exists even on freestanding compilers. */
18955
18956#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018957# include <limits.h>
18958#else
18959# include <assert.h>
18960#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018961
18962#undef $ac_func
18963
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018964/* Override any GCC internal prototype to avoid an error.
18965 Use char because int might match the return type of a GCC
18966 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000018967#ifdef __cplusplus
18968extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000018969#endif
Jack Jansen150753c2003-03-29 22:07:47 +000018970char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000018971/* The GNU C library defines this for functions which it implements
18972 to always fail with ENOSYS. Some functions are actually named
18973 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018974#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000018975choke me
Jack Jansen150753c2003-03-29 22:07:47 +000018976#endif
18977
Skip Montanaro6dead952003-09-25 14:50:04 +000018978int
18979main ()
18980{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018981return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018982 ;
18983 return 0;
18984}
18985_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000018986rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018987if { (ac_try="$ac_link"
18988case "(($ac_try" in
18989 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18990 *) ac_try_echo=$ac_try;;
18991esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018992eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018993 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018994 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018995 grep -v '^ *+' conftest.er1 >conftest.err
18996 rm -f conftest.er1
18997 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018999 (exit $ac_status); } && {
19000 test -z "$ac_c_werror_flag" ||
19001 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019002 } && test -s conftest$ac_exeext &&
19003 $as_test_x conftest$ac_exeext; then
Jack Jansen150753c2003-03-29 22:07:47 +000019004 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019005else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019006 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019007sed 's/^/| /' conftest.$ac_ext >&5
19008
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019009 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019010fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019011
19012rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019013 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019014fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019015ac_res=`eval echo '${'$as_ac_var'}'`
19016 { echo "$as_me:$LINENO: result: $ac_res" >&5
19017echo "${ECHO_T}$ac_res" >&6; }
19018if test `eval echo '${'$as_ac_var'}'` = yes; then
Jack Jansen150753c2003-03-29 22:07:47 +000019019 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019020#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Jack Jansen150753c2003-03-29 22:07:47 +000019021_ACEOF
19022 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019023/* confdefs.h. */
19024_ACEOF
19025cat confdefs.h >>conftest.$ac_ext
19026cat >>conftest.$ac_ext <<_ACEOF
19027/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000019028#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000019029int
19030main ()
19031{
19032setpgrp(0,0);
19033 ;
19034 return 0;
19035}
19036_ACEOF
19037rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019038if { (ac_try="$ac_compile"
19039case "(($ac_try" in
19040 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19041 *) ac_try_echo=$ac_try;;
19042esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019043eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019044 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000019045 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019046 grep -v '^ *+' conftest.er1 >conftest.err
19047 rm -f conftest.er1
19048 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019050 (exit $ac_status); } && {
19051 test -z "$ac_c_werror_flag" ||
19052 test ! -s conftest.err
19053 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019054
19055cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000019056#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019057_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000019058
Jack Jansen150753c2003-03-29 22:07:47 +000019059
19060else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019061 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019062sed 's/^/| /' conftest.$ac_ext >&5
19063
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019064
Guido van Rossum8eee56f1994-10-20 22:18:37 +000019065fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019066
19067rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000019068
19069fi
19070done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000019071
Martin v. Löwis11437992002-04-12 09:54:03 +000019072
Thomas Wouters3a584202000-08-05 23:28:51 +000019073for ac_func in gettimeofday
19074do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019075as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19076{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19077echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019078if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019079 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019080else
Martin v. Löwis11437992002-04-12 09:54:03 +000019081 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019082/* confdefs.h. */
19083_ACEOF
19084cat confdefs.h >>conftest.$ac_ext
19085cat >>conftest.$ac_ext <<_ACEOF
19086/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019087/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19088 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19089#define $ac_func innocuous_$ac_func
19090
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000019091/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019092 which can conflict with char $ac_func (); below.
19093 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019094 <limits.h> exists even on freestanding compilers. */
19095
19096#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019097# include <limits.h>
19098#else
19099# include <assert.h>
19100#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019101
19102#undef $ac_func
19103
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019104/* Override any GCC internal prototype to avoid an error.
19105 Use char because int might match the return type of a GCC
19106 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019107#ifdef __cplusplus
19108extern "C"
19109#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019110char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019111/* The GNU C library defines this for functions which it implements
19112 to always fail with ENOSYS. Some functions are actually named
19113 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019114#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019115choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019116#endif
19117
Skip Montanaro6dead952003-09-25 14:50:04 +000019118int
19119main ()
19120{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019121return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019122 ;
19123 return 0;
19124}
19125_ACEOF
19126rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019127if { (ac_try="$ac_link"
19128case "(($ac_try" in
19129 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19130 *) ac_try_echo=$ac_try;;
19131esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019132eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019133 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019134 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019135 grep -v '^ *+' conftest.er1 >conftest.err
19136 rm -f conftest.er1
19137 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019139 (exit $ac_status); } && {
19140 test -z "$ac_c_werror_flag" ||
19141 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019142 } && test -s conftest$ac_exeext &&
19143 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019144 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019145else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019146 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019147sed 's/^/| /' conftest.$ac_ext >&5
19148
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019149 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019150fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019151
19152rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019153 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019154fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019155ac_res=`eval echo '${'$as_ac_var'}'`
19156 { echo "$as_me:$LINENO: result: $ac_res" >&5
19157echo "${ECHO_T}$ac_res" >&6; }
19158if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019159 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019160#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019161_ACEOF
19162 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019163/* confdefs.h. */
19164_ACEOF
19165cat confdefs.h >>conftest.$ac_ext
19166cat >>conftest.$ac_ext <<_ACEOF
19167/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000019168#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019169int
19170main ()
19171{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019172gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000019173 ;
19174 return 0;
19175}
19176_ACEOF
19177rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019178if { (ac_try="$ac_compile"
19179case "(($ac_try" in
19180 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19181 *) ac_try_echo=$ac_try;;
19182esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019183eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019184 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019185 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019186 grep -v '^ *+' conftest.er1 >conftest.err
19187 rm -f conftest.er1
19188 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019189 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019190 (exit $ac_status); } && {
19191 test -z "$ac_c_werror_flag" ||
19192 test ! -s conftest.err
19193 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000019194 :
19195else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019196 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019197sed 's/^/| /' conftest.$ac_ext >&5
19198
Martin v. Löwis11437992002-04-12 09:54:03 +000019199
19200cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019201#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019202_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019203
Martin v. Löwis11437992002-04-12 09:54:03 +000019204
Guido van Rossum627b2d71993-12-24 10:39:16 +000019205fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019206
19207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019208
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019209fi
Thomas Wouters3a584202000-08-05 23:28:51 +000019210done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019211
Michael W. Hudson54241132001-12-07 15:38:26 +000019212
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019213{ echo "$as_me:$LINENO: checking for major" >&5
19214echo $ECHO_N "checking for major... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019215cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019216/* confdefs.h. */
19217_ACEOF
19218cat confdefs.h >>conftest.$ac_ext
19219cat >>conftest.$ac_ext <<_ACEOF
19220/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019221
Neal Norwitz6eb37f02003-02-23 23:28:15 +000019222#if defined(MAJOR_IN_MKDEV)
19223#include <sys/mkdev.h>
19224#elif defined(MAJOR_IN_SYSMACROS)
19225#include <sys/sysmacros.h>
19226#else
19227#include <sys/types.h>
19228#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019229
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019230int
19231main ()
19232{
19233
19234 makedev(major(0),minor(0));
19235
19236 ;
19237 return 0;
19238}
19239_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000019240rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019241if { (ac_try="$ac_link"
19242case "(($ac_try" in
19243 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19244 *) ac_try_echo=$ac_try;;
19245esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019246eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019247 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019248 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019249 grep -v '^ *+' conftest.er1 >conftest.err
19250 rm -f conftest.er1
19251 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019253 (exit $ac_status); } && {
19254 test -z "$ac_c_werror_flag" ||
19255 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019256 } && test -s conftest$ac_exeext &&
19257 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019258
19259
19260cat >>confdefs.h <<\_ACEOF
19261#define HAVE_DEVICE_MACROS 1
19262_ACEOF
19263
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019264 { echo "$as_me:$LINENO: result: yes" >&5
19265echo "${ECHO_T}yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019266
19267else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019268 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019269sed 's/^/| /' conftest.$ac_ext >&5
19270
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019271
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019272 { echo "$as_me:$LINENO: result: no" >&5
19273echo "${ECHO_T}no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019274
19275fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019276
19277rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019278 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019279
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019280# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000019281# for [no]getaddrinfo in netdb.h.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019282{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
19283echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019284cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019285/* confdefs.h. */
19286_ACEOF
19287cat confdefs.h >>conftest.$ac_ext
19288cat >>conftest.$ac_ext <<_ACEOF
19289/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019290
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000019291#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019292#include <sys/socket.h>
19293#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000019294#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019295
Martin v. Löwis11437992002-04-12 09:54:03 +000019296int
19297main ()
19298{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019299
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019300getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019301
Martin v. Löwis11437992002-04-12 09:54:03 +000019302 ;
19303 return 0;
19304}
19305_ACEOF
19306rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019307if { (ac_try="$ac_link"
19308case "(($ac_try" in
19309 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19310 *) ac_try_echo=$ac_try;;
19311esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019312eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019313 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019314 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019315 grep -v '^ *+' conftest.er1 >conftest.err
19316 rm -f conftest.er1
19317 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019318 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019319 (exit $ac_status); } && {
19320 test -z "$ac_c_werror_flag" ||
19321 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019322 } && test -s conftest$ac_exeext &&
19323 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019324
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019325{ echo "$as_me:$LINENO: result: yes" >&5
19326echo "${ECHO_T}yes" >&6; }
19327{ echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
19328echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019329if test "$cross_compiling" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019330 { echo "$as_me:$LINENO: result: buggy" >&5
19331echo "${ECHO_T}buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019332buggygetaddrinfo=yes
19333else
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. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019340
19341#include <sys/types.h>
19342#include <netdb.h>
19343#include <string.h>
19344#include <sys/socket.h>
19345#include <netinet/in.h>
19346
19347main()
19348{
19349 int passive, gaierr, inet4 = 0, inet6 = 0;
19350 struct addrinfo hints, *ai, *aitop;
19351 char straddr[INET6_ADDRSTRLEN], strport[16];
19352
19353 for (passive = 0; passive <= 1; passive++) {
19354 memset(&hints, 0, sizeof(hints));
19355 hints.ai_family = AF_UNSPEC;
19356 hints.ai_flags = passive ? AI_PASSIVE : 0;
19357 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000019358 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019359 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
19360 (void)gai_strerror(gaierr);
19361 goto bad;
19362 }
19363 for (ai = aitop; ai; ai = ai->ai_next) {
19364 if (ai->ai_addr == NULL ||
19365 ai->ai_addrlen == 0 ||
19366 getnameinfo(ai->ai_addr, ai->ai_addrlen,
19367 straddr, sizeof(straddr), strport, sizeof(strport),
19368 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
19369 goto bad;
19370 }
19371 switch (ai->ai_family) {
19372 case AF_INET:
19373 if (strcmp(strport, "54321") != 0) {
19374 goto bad;
19375 }
19376 if (passive) {
19377 if (strcmp(straddr, "0.0.0.0") != 0) {
19378 goto bad;
19379 }
19380 } else {
19381 if (strcmp(straddr, "127.0.0.1") != 0) {
19382 goto bad;
19383 }
19384 }
19385 inet4++;
19386 break;
19387 case AF_INET6:
19388 if (strcmp(strport, "54321") != 0) {
19389 goto bad;
19390 }
19391 if (passive) {
19392 if (strcmp(straddr, "::") != 0) {
19393 goto bad;
19394 }
19395 } else {
19396 if (strcmp(straddr, "::1") != 0) {
19397 goto bad;
19398 }
19399 }
19400 inet6++;
19401 break;
19402 case AF_UNSPEC:
19403 goto bad;
19404 break;
19405 default:
19406 /* another family support? */
19407 break;
19408 }
19409 }
19410 }
19411
19412 if (!(inet4 == 0 || inet4 == 2))
19413 goto bad;
19414 if (!(inet6 == 0 || inet6 == 2))
19415 goto bad;
19416
19417 if (aitop)
19418 freeaddrinfo(aitop);
19419 exit(0);
19420
19421 bad:
19422 if (aitop)
19423 freeaddrinfo(aitop);
19424 exit(1);
19425}
19426
Martin v. Löwis11437992002-04-12 09:54:03 +000019427_ACEOF
19428rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019429if { (ac_try="$ac_link"
19430case "(($ac_try" in
19431 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19432 *) ac_try_echo=$ac_try;;
19433esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019434eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019435 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019436 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019437 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019438 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019439 { (case "(($ac_try" in
19440 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19441 *) ac_try_echo=$ac_try;;
19442esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019443eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019444 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019445 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019446 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019447 (exit $ac_status); }; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019448 { echo "$as_me:$LINENO: result: good" >&5
19449echo "${ECHO_T}good" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019450buggygetaddrinfo=no
19451else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019452 echo "$as_me: program exited with status $ac_status" >&5
19453echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019454sed 's/^/| /' conftest.$ac_ext >&5
19455
Martin v. Löwis11437992002-04-12 09:54:03 +000019456( exit $ac_status )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019457{ echo "$as_me:$LINENO: result: buggy" >&5
19458echo "${ECHO_T}buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019459buggygetaddrinfo=yes
19460fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019461rm -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 +000019462fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019463
19464
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019465else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019466 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019467sed 's/^/| /' conftest.$ac_ext >&5
19468
Martin v. Löwis11437992002-04-12 09:54:03 +000019469
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019470{ echo "$as_me:$LINENO: result: no" >&5
19471echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019472buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019473
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019474fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019475
19476rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019477 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019478
19479if test "$buggygetaddrinfo" = "yes"; then
19480 if test "$ipv6" = "yes"; then
19481 echo 'Fatal: You must get working getaddrinfo() function.'
19482 echo ' or you can specify "--disable-ipv6"'.
19483 exit 1
19484 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019485else
Martin v. Löwis11437992002-04-12 09:54:03 +000019486
19487cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019488#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019489_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019490
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019491fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019492
Jack Jansen9a66b6d2001-08-08 13:56:14 +000019493for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019494do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019495as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19496{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19497echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019498if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019499 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019500else
Martin v. Löwis11437992002-04-12 09:54:03 +000019501 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019502/* confdefs.h. */
19503_ACEOF
19504cat confdefs.h >>conftest.$ac_ext
19505cat >>conftest.$ac_ext <<_ACEOF
19506/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019507/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19508 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19509#define $ac_func innocuous_$ac_func
19510
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019511/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019512 which can conflict with char $ac_func (); below.
19513 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019514 <limits.h> exists even on freestanding compilers. */
19515
19516#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019517# include <limits.h>
19518#else
19519# include <assert.h>
19520#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019521
19522#undef $ac_func
19523
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019524/* Override any GCC internal prototype to avoid an error.
19525 Use char because int might match the return type of a GCC
19526 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019527#ifdef __cplusplus
19528extern "C"
19529#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019530char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019531/* The GNU C library defines this for functions which it implements
19532 to always fail with ENOSYS. Some functions are actually named
19533 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019534#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019535choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019536#endif
19537
Skip Montanaro6dead952003-09-25 14:50:04 +000019538int
19539main ()
19540{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019541return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019542 ;
19543 return 0;
19544}
19545_ACEOF
19546rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019547if { (ac_try="$ac_link"
19548case "(($ac_try" in
19549 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19550 *) ac_try_echo=$ac_try;;
19551esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019552eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019553 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019554 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019555 grep -v '^ *+' conftest.er1 >conftest.err
19556 rm -f conftest.er1
19557 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019559 (exit $ac_status); } && {
19560 test -z "$ac_c_werror_flag" ||
19561 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019562 } && test -s conftest$ac_exeext &&
19563 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019564 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019565else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019566 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019567sed 's/^/| /' conftest.$ac_ext >&5
19568
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019569 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019570fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019571
19572rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019573 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019574fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019575ac_res=`eval echo '${'$as_ac_var'}'`
19576 { echo "$as_me:$LINENO: result: $ac_res" >&5
19577echo "${ECHO_T}$ac_res" >&6; }
19578if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019579 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019580#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019581_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019582
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019583fi
19584done
19585
Michael W. Hudson54241132001-12-07 15:38:26 +000019586
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019587# checks for structures
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019588{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
19589echo $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 +000019590if test "${ac_cv_header_time+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019591 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019592else
Martin v. Löwis11437992002-04-12 09:54:03 +000019593 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019594/* confdefs.h. */
19595_ACEOF
19596cat confdefs.h >>conftest.$ac_ext
19597cat >>conftest.$ac_ext <<_ACEOF
19598/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019599#include <sys/types.h>
19600#include <sys/time.h>
19601#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019602
Martin v. Löwis11437992002-04-12 09:54:03 +000019603int
19604main ()
19605{
19606if ((struct tm *) 0)
19607return 0;
19608 ;
19609 return 0;
19610}
19611_ACEOF
19612rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019613if { (ac_try="$ac_compile"
19614case "(($ac_try" in
19615 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19616 *) ac_try_echo=$ac_try;;
19617esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019618eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019619 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019620 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019621 grep -v '^ *+' conftest.er1 >conftest.err
19622 rm -f conftest.er1
19623 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019625 (exit $ac_status); } && {
19626 test -z "$ac_c_werror_flag" ||
19627 test ! -s conftest.err
19628 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019629 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000019630else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019631 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019632sed 's/^/| /' conftest.$ac_ext >&5
19633
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019634 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000019635fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019636
19637rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019638fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019639{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
19640echo "${ECHO_T}$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019641if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019642
19643cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019644#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019645_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019646
19647fi
19648
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019649{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
19650echo $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 +000019651if test "${ac_cv_struct_tm+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019652 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019653else
Martin v. Löwis11437992002-04-12 09:54:03 +000019654 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019655/* confdefs.h. */
19656_ACEOF
19657cat confdefs.h >>conftest.$ac_ext
19658cat >>conftest.$ac_ext <<_ACEOF
19659/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019660#include <sys/types.h>
19661#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019662
Martin v. Löwis11437992002-04-12 09:54:03 +000019663int
19664main ()
19665{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019666struct tm tm;
19667 int *p = &tm.tm_sec;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019668 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000019669 ;
19670 return 0;
19671}
19672_ACEOF
19673rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019674if { (ac_try="$ac_compile"
19675case "(($ac_try" in
19676 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19677 *) ac_try_echo=$ac_try;;
19678esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019679eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019680 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019681 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019682 grep -v '^ *+' conftest.er1 >conftest.err
19683 rm -f conftest.er1
19684 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019686 (exit $ac_status); } && {
19687 test -z "$ac_c_werror_flag" ||
19688 test ! -s conftest.err
19689 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019690 ac_cv_struct_tm=time.h
19691else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019692 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019693sed 's/^/| /' conftest.$ac_ext >&5
19694
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019695 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019696fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019697
19698rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019699fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019700{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
19701echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019702if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019703
19704cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019705#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019706_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019707
19708fi
19709
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019710{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
19711echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019712if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019713 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019714else
Martin v. Löwis11437992002-04-12 09:54:03 +000019715 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019716/* confdefs.h. */
19717_ACEOF
19718cat confdefs.h >>conftest.$ac_ext
19719cat >>conftest.$ac_ext <<_ACEOF
19720/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019721#include <sys/types.h>
19722#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000019723
19724
Martin v. Löwis11437992002-04-12 09:54:03 +000019725int
19726main ()
19727{
19728static struct tm ac_aggr;
19729if (ac_aggr.tm_zone)
19730return 0;
19731 ;
19732 return 0;
19733}
19734_ACEOF
19735rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019736if { (ac_try="$ac_compile"
19737case "(($ac_try" in
19738 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19739 *) ac_try_echo=$ac_try;;
19740esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019741eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019742 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019743 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019744 grep -v '^ *+' conftest.er1 >conftest.err
19745 rm -f conftest.er1
19746 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019747 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019748 (exit $ac_status); } && {
19749 test -z "$ac_c_werror_flag" ||
19750 test ! -s conftest.err
19751 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019752 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000019753else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019754 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019755sed 's/^/| /' conftest.$ac_ext >&5
19756
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019757 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019758/* confdefs.h. */
19759_ACEOF
19760cat confdefs.h >>conftest.$ac_ext
19761cat >>conftest.$ac_ext <<_ACEOF
19762/* end confdefs.h. */
19763#include <sys/types.h>
19764#include <$ac_cv_struct_tm>
19765
19766
19767int
19768main ()
19769{
19770static struct tm ac_aggr;
19771if (sizeof ac_aggr.tm_zone)
19772return 0;
19773 ;
19774 return 0;
19775}
19776_ACEOF
19777rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019778if { (ac_try="$ac_compile"
19779case "(($ac_try" in
19780 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19781 *) ac_try_echo=$ac_try;;
19782esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019783eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019784 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000019785 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019786 grep -v '^ *+' conftest.er1 >conftest.err
19787 rm -f conftest.er1
19788 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019790 (exit $ac_status); } && {
19791 test -z "$ac_c_werror_flag" ||
19792 test ! -s conftest.err
19793 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019794 ac_cv_member_struct_tm_tm_zone=yes
19795else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019796 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019797sed 's/^/| /' conftest.$ac_ext >&5
19798
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019799 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000019800fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019801
19802rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019803fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019804
19805rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000019806fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019807{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
19808echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
19809if test $ac_cv_member_struct_tm_tm_zone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019810
19811cat >>confdefs.h <<_ACEOF
19812#define HAVE_STRUCT_TM_TM_ZONE 1
19813_ACEOF
19814
19815
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019816fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000019817
Martin v. Löwis11437992002-04-12 09:54:03 +000019818if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
19819
19820cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019821#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019822_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019823
19824else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019825 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
19826echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019827if test "${ac_cv_have_decl_tzname+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019828 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019829else
19830 cat >conftest.$ac_ext <<_ACEOF
19831/* confdefs.h. */
19832_ACEOF
19833cat confdefs.h >>conftest.$ac_ext
19834cat >>conftest.$ac_ext <<_ACEOF
19835/* end confdefs.h. */
19836#include <time.h>
19837
19838int
19839main ()
19840{
19841#ifndef tzname
19842 (void) tzname;
19843#endif
19844
19845 ;
19846 return 0;
19847}
19848_ACEOF
19849rm -f conftest.$ac_objext
19850if { (ac_try="$ac_compile"
19851case "(($ac_try" in
19852 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19853 *) ac_try_echo=$ac_try;;
19854esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019855eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019856 (eval "$ac_compile") 2>conftest.er1
19857 ac_status=$?
19858 grep -v '^ *+' conftest.er1 >conftest.err
19859 rm -f conftest.er1
19860 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019862 (exit $ac_status); } && {
19863 test -z "$ac_c_werror_flag" ||
19864 test ! -s conftest.err
19865 } && test -s conftest.$ac_objext; then
19866 ac_cv_have_decl_tzname=yes
19867else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019868 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019869sed 's/^/| /' conftest.$ac_ext >&5
19870
19871 ac_cv_have_decl_tzname=no
19872fi
19873
19874rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19875fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019876{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
19877echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
19878if test $ac_cv_have_decl_tzname = yes; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019879
19880cat >>confdefs.h <<_ACEOF
19881#define HAVE_DECL_TZNAME 1
19882_ACEOF
19883
19884
19885else
19886 cat >>confdefs.h <<_ACEOF
19887#define HAVE_DECL_TZNAME 0
19888_ACEOF
19889
19890
19891fi
19892
19893
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019894 { echo "$as_me:$LINENO: checking for tzname" >&5
19895echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019896if test "${ac_cv_var_tzname+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019897 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019898else
Martin v. Löwis11437992002-04-12 09:54:03 +000019899 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019900/* confdefs.h. */
19901_ACEOF
19902cat confdefs.h >>conftest.$ac_ext
19903cat >>conftest.$ac_ext <<_ACEOF
19904/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000019905#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019906#if !HAVE_DECL_TZNAME
19907extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000019908#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019909
Martin v. Löwis11437992002-04-12 09:54:03 +000019910int
19911main ()
19912{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019913return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000019914 ;
19915 return 0;
19916}
19917_ACEOF
19918rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019919if { (ac_try="$ac_link"
19920case "(($ac_try" in
19921 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19922 *) ac_try_echo=$ac_try;;
19923esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019924eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019925 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019926 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019927 grep -v '^ *+' conftest.er1 >conftest.err
19928 rm -f conftest.er1
19929 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019931 (exit $ac_status); } && {
19932 test -z "$ac_c_werror_flag" ||
19933 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019934 } && test -s conftest$ac_exeext &&
19935 $as_test_x conftest$ac_exeext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019936 ac_cv_var_tzname=yes
19937else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019938 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019939sed 's/^/| /' conftest.$ac_ext >&5
19940
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019941 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000019942fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019943
19944rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019945 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000019946fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019947{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
19948echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019949 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019950
19951cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019952#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019953_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019954
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019955 fi
19956fi
19957
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019958{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
19959echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019960if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019961 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000019962else
19963 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019964/* confdefs.h. */
19965_ACEOF
19966cat confdefs.h >>conftest.$ac_ext
19967cat >>conftest.$ac_ext <<_ACEOF
19968/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019969$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000019970int
19971main ()
19972{
19973static struct stat ac_aggr;
19974if (ac_aggr.st_rdev)
19975return 0;
19976 ;
19977 return 0;
19978}
19979_ACEOF
19980rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019981if { (ac_try="$ac_compile"
19982case "(($ac_try" in
19983 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19984 *) ac_try_echo=$ac_try;;
19985esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019986eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019987 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019988 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019989 grep -v '^ *+' conftest.er1 >conftest.err
19990 rm -f conftest.er1
19991 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019993 (exit $ac_status); } && {
19994 test -z "$ac_c_werror_flag" ||
19995 test ! -s conftest.err
19996 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019997 ac_cv_member_struct_stat_st_rdev=yes
19998else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019999 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020000sed 's/^/| /' conftest.$ac_ext >&5
20001
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020002 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020003/* confdefs.h. */
20004_ACEOF
20005cat confdefs.h >>conftest.$ac_ext
20006cat >>conftest.$ac_ext <<_ACEOF
20007/* end confdefs.h. */
20008$ac_includes_default
20009int
20010main ()
20011{
20012static struct stat ac_aggr;
20013if (sizeof ac_aggr.st_rdev)
20014return 0;
20015 ;
20016 return 0;
20017}
20018_ACEOF
20019rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020020if { (ac_try="$ac_compile"
20021case "(($ac_try" in
20022 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20023 *) ac_try_echo=$ac_try;;
20024esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020025eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020026 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020027 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020028 grep -v '^ *+' conftest.er1 >conftest.err
20029 rm -f conftest.er1
20030 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020032 (exit $ac_status); } && {
20033 test -z "$ac_c_werror_flag" ||
20034 test ! -s conftest.err
20035 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020036 ac_cv_member_struct_stat_st_rdev=yes
20037else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020038 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020039sed 's/^/| /' conftest.$ac_ext >&5
20040
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020041 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000020042fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020043
20044rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020045fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020046
20047rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020048fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020049{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
20050echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
20051if test $ac_cv_member_struct_stat_st_rdev = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020052
20053cat >>confdefs.h <<_ACEOF
20054#define HAVE_STRUCT_STAT_ST_RDEV 1
20055_ACEOF
20056
20057
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020058fi
20059
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020060{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
20061echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020062if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020063 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020064else
Martin v. Löwis11437992002-04-12 09:54:03 +000020065 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020066/* confdefs.h. */
20067_ACEOF
20068cat confdefs.h >>conftest.$ac_ext
20069cat >>conftest.$ac_ext <<_ACEOF
20070/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020071$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020072int
20073main ()
20074{
20075static struct stat ac_aggr;
20076if (ac_aggr.st_blksize)
20077return 0;
20078 ;
20079 return 0;
20080}
20081_ACEOF
20082rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020083if { (ac_try="$ac_compile"
20084case "(($ac_try" in
20085 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20086 *) ac_try_echo=$ac_try;;
20087esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020088eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020089 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020090 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020091 grep -v '^ *+' conftest.er1 >conftest.err
20092 rm -f conftest.er1
20093 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020095 (exit $ac_status); } && {
20096 test -z "$ac_c_werror_flag" ||
20097 test ! -s conftest.err
20098 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020099 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000020100else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020101 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020102sed 's/^/| /' conftest.$ac_ext >&5
20103
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020104 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020105/* confdefs.h. */
20106_ACEOF
20107cat confdefs.h >>conftest.$ac_ext
20108cat >>conftest.$ac_ext <<_ACEOF
20109/* end confdefs.h. */
20110$ac_includes_default
20111int
20112main ()
20113{
20114static struct stat ac_aggr;
20115if (sizeof ac_aggr.st_blksize)
20116return 0;
20117 ;
20118 return 0;
20119}
20120_ACEOF
20121rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020122if { (ac_try="$ac_compile"
20123case "(($ac_try" in
20124 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20125 *) ac_try_echo=$ac_try;;
20126esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020127eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020128 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020129 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020130 grep -v '^ *+' conftest.er1 >conftest.err
20131 rm -f conftest.er1
20132 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020134 (exit $ac_status); } && {
20135 test -z "$ac_c_werror_flag" ||
20136 test ! -s conftest.err
20137 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020138 ac_cv_member_struct_stat_st_blksize=yes
20139else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020140 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020141sed 's/^/| /' conftest.$ac_ext >&5
20142
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020143 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000020144fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020145
20146rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020147fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020148
20149rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020150fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020151{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
20152echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
20153if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000020154
Martin v. Löwis11437992002-04-12 09:54:03 +000020155cat >>confdefs.h <<_ACEOF
20156#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
20157_ACEOF
20158
20159
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020160fi
20161
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020162{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
20163echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020164if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020165 echo $ECHO_N "(cached) $ECHO_C" >&6
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020166else
20167 cat >conftest.$ac_ext <<_ACEOF
20168/* confdefs.h. */
20169_ACEOF
20170cat confdefs.h >>conftest.$ac_ext
20171cat >>conftest.$ac_ext <<_ACEOF
20172/* end confdefs.h. */
20173$ac_includes_default
20174int
20175main ()
20176{
20177static struct stat ac_aggr;
20178if (ac_aggr.st_flags)
20179return 0;
20180 ;
20181 return 0;
20182}
20183_ACEOF
20184rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020185if { (ac_try="$ac_compile"
20186case "(($ac_try" in
20187 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20188 *) ac_try_echo=$ac_try;;
20189esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020190eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020191 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020192 ac_status=$?
20193 grep -v '^ *+' conftest.er1 >conftest.err
20194 rm -f conftest.er1
20195 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020197 (exit $ac_status); } && {
20198 test -z "$ac_c_werror_flag" ||
20199 test ! -s conftest.err
20200 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020201 ac_cv_member_struct_stat_st_flags=yes
20202else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020203 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020204sed 's/^/| /' conftest.$ac_ext >&5
20205
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020206 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020207/* confdefs.h. */
20208_ACEOF
20209cat confdefs.h >>conftest.$ac_ext
20210cat >>conftest.$ac_ext <<_ACEOF
20211/* end confdefs.h. */
20212$ac_includes_default
20213int
20214main ()
20215{
20216static struct stat ac_aggr;
20217if (sizeof ac_aggr.st_flags)
20218return 0;
20219 ;
20220 return 0;
20221}
20222_ACEOF
20223rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020224if { (ac_try="$ac_compile"
20225case "(($ac_try" in
20226 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20227 *) ac_try_echo=$ac_try;;
20228esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020229eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020230 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020231 ac_status=$?
20232 grep -v '^ *+' conftest.er1 >conftest.err
20233 rm -f conftest.er1
20234 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020235 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020236 (exit $ac_status); } && {
20237 test -z "$ac_c_werror_flag" ||
20238 test ! -s conftest.err
20239 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020240 ac_cv_member_struct_stat_st_flags=yes
20241else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020242 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020243sed 's/^/| /' conftest.$ac_ext >&5
20244
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020245 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020246fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020247
20248rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020249fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020250
20251rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020252fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020253{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
20254echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
20255if test $ac_cv_member_struct_stat_st_flags = yes; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020256
20257cat >>confdefs.h <<_ACEOF
20258#define HAVE_STRUCT_STAT_ST_FLAGS 1
20259_ACEOF
20260
20261
20262fi
20263
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020264{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
20265echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020266if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020267 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020268else
20269 cat >conftest.$ac_ext <<_ACEOF
20270/* confdefs.h. */
20271_ACEOF
20272cat confdefs.h >>conftest.$ac_ext
20273cat >>conftest.$ac_ext <<_ACEOF
20274/* end confdefs.h. */
20275$ac_includes_default
20276int
20277main ()
20278{
20279static struct stat ac_aggr;
20280if (ac_aggr.st_gen)
20281return 0;
20282 ;
20283 return 0;
20284}
20285_ACEOF
20286rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020287if { (ac_try="$ac_compile"
20288case "(($ac_try" in
20289 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20290 *) ac_try_echo=$ac_try;;
20291esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020292eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020293 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020294 ac_status=$?
20295 grep -v '^ *+' conftest.er1 >conftest.err
20296 rm -f conftest.er1
20297 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020298 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020299 (exit $ac_status); } && {
20300 test -z "$ac_c_werror_flag" ||
20301 test ! -s conftest.err
20302 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020303 ac_cv_member_struct_stat_st_gen=yes
20304else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020305 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020306sed 's/^/| /' conftest.$ac_ext >&5
20307
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020308 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020309/* confdefs.h. */
20310_ACEOF
20311cat confdefs.h >>conftest.$ac_ext
20312cat >>conftest.$ac_ext <<_ACEOF
20313/* end confdefs.h. */
20314$ac_includes_default
20315int
20316main ()
20317{
20318static struct stat ac_aggr;
20319if (sizeof ac_aggr.st_gen)
20320return 0;
20321 ;
20322 return 0;
20323}
20324_ACEOF
20325rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020326if { (ac_try="$ac_compile"
20327case "(($ac_try" in
20328 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20329 *) ac_try_echo=$ac_try;;
20330esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020331eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020332 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020333 ac_status=$?
20334 grep -v '^ *+' conftest.er1 >conftest.err
20335 rm -f conftest.er1
20336 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020338 (exit $ac_status); } && {
20339 test -z "$ac_c_werror_flag" ||
20340 test ! -s conftest.err
20341 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020342 ac_cv_member_struct_stat_st_gen=yes
20343else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020344 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020345sed 's/^/| /' conftest.$ac_ext >&5
20346
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020347 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020348fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020349
20350rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020351fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020352
20353rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020354fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020355{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
20356echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
20357if test $ac_cv_member_struct_stat_st_gen = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020358
20359cat >>confdefs.h <<_ACEOF
20360#define HAVE_STRUCT_STAT_ST_GEN 1
20361_ACEOF
20362
20363
20364fi
20365
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020366{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
20367echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020368if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020369 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020370else
20371 cat >conftest.$ac_ext <<_ACEOF
20372/* confdefs.h. */
20373_ACEOF
20374cat confdefs.h >>conftest.$ac_ext
20375cat >>conftest.$ac_ext <<_ACEOF
20376/* end confdefs.h. */
20377$ac_includes_default
20378int
20379main ()
20380{
20381static struct stat ac_aggr;
20382if (ac_aggr.st_birthtime)
20383return 0;
20384 ;
20385 return 0;
20386}
20387_ACEOF
20388rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020389if { (ac_try="$ac_compile"
20390case "(($ac_try" in
20391 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20392 *) ac_try_echo=$ac_try;;
20393esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020394eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020395 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020396 ac_status=$?
20397 grep -v '^ *+' conftest.er1 >conftest.err
20398 rm -f conftest.er1
20399 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020401 (exit $ac_status); } && {
20402 test -z "$ac_c_werror_flag" ||
20403 test ! -s conftest.err
20404 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020405 ac_cv_member_struct_stat_st_birthtime=yes
20406else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020407 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020408sed 's/^/| /' conftest.$ac_ext >&5
20409
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020410 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020411/* confdefs.h. */
20412_ACEOF
20413cat confdefs.h >>conftest.$ac_ext
20414cat >>conftest.$ac_ext <<_ACEOF
20415/* end confdefs.h. */
20416$ac_includes_default
20417int
20418main ()
20419{
20420static struct stat ac_aggr;
20421if (sizeof ac_aggr.st_birthtime)
20422return 0;
20423 ;
20424 return 0;
20425}
20426_ACEOF
20427rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020428if { (ac_try="$ac_compile"
20429case "(($ac_try" in
20430 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20431 *) ac_try_echo=$ac_try;;
20432esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020433eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020434 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020435 ac_status=$?
20436 grep -v '^ *+' conftest.er1 >conftest.err
20437 rm -f conftest.er1
20438 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020439 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020440 (exit $ac_status); } && {
20441 test -z "$ac_c_werror_flag" ||
20442 test ! -s conftest.err
20443 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020444 ac_cv_member_struct_stat_st_birthtime=yes
20445else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020446 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020447sed 's/^/| /' conftest.$ac_ext >&5
20448
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020449 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020450fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020451
20452rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020453fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020454
20455rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020456fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020457{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
20458echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
20459if test $ac_cv_member_struct_stat_st_birthtime = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020460
20461cat >>confdefs.h <<_ACEOF
20462#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
20463_ACEOF
20464
20465
20466fi
20467
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020468{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
20469echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020470if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020471 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020472else
Martin v. Löwis11437992002-04-12 09:54:03 +000020473 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020474/* confdefs.h. */
20475_ACEOF
20476cat confdefs.h >>conftest.$ac_ext
20477cat >>conftest.$ac_ext <<_ACEOF
20478/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020479$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020480int
20481main ()
20482{
20483static struct stat ac_aggr;
20484if (ac_aggr.st_blocks)
20485return 0;
20486 ;
20487 return 0;
20488}
20489_ACEOF
20490rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020491if { (ac_try="$ac_compile"
20492case "(($ac_try" in
20493 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20494 *) ac_try_echo=$ac_try;;
20495esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020496eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020497 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020498 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020499 grep -v '^ *+' conftest.er1 >conftest.err
20500 rm -f conftest.er1
20501 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020503 (exit $ac_status); } && {
20504 test -z "$ac_c_werror_flag" ||
20505 test ! -s conftest.err
20506 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020507 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000020508else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020509 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020510sed 's/^/| /' conftest.$ac_ext >&5
20511
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020512 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020513/* confdefs.h. */
20514_ACEOF
20515cat confdefs.h >>conftest.$ac_ext
20516cat >>conftest.$ac_ext <<_ACEOF
20517/* end confdefs.h. */
20518$ac_includes_default
20519int
20520main ()
20521{
20522static struct stat ac_aggr;
20523if (sizeof ac_aggr.st_blocks)
20524return 0;
20525 ;
20526 return 0;
20527}
20528_ACEOF
20529rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020530if { (ac_try="$ac_compile"
20531case "(($ac_try" in
20532 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20533 *) ac_try_echo=$ac_try;;
20534esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020535eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020536 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020537 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020538 grep -v '^ *+' conftest.er1 >conftest.err
20539 rm -f conftest.er1
20540 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020542 (exit $ac_status); } && {
20543 test -z "$ac_c_werror_flag" ||
20544 test ! -s conftest.err
20545 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020546 ac_cv_member_struct_stat_st_blocks=yes
20547else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020548 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020549sed 's/^/| /' conftest.$ac_ext >&5
20550
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020551 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000020552fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020553
20554rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020555fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020556
20557rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020558fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020559{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
20560echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
20561if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000020562
Martin v. Löwis11437992002-04-12 09:54:03 +000020563cat >>confdefs.h <<_ACEOF
20564#define HAVE_STRUCT_STAT_ST_BLOCKS 1
20565_ACEOF
20566
20567
20568cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020569#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020570_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020571
20572else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020573 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000020574 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020575 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
20576 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000020577esac
20578
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020579fi
20580
Michael W. Hudson54241132001-12-07 15:38:26 +000020581
Martin v. Löwis11437992002-04-12 09:54:03 +000020582
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020583{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
20584echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020585if test "${ac_cv_header_time_altzone+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020586 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020587else
Martin v. Löwis11437992002-04-12 09:54:03 +000020588 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020589/* confdefs.h. */
20590_ACEOF
20591cat confdefs.h >>conftest.$ac_ext
20592cat >>conftest.$ac_ext <<_ACEOF
20593/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020594#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020595int
20596main ()
20597{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020598return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000020599 ;
20600 return 0;
20601}
20602_ACEOF
20603rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020604if { (ac_try="$ac_compile"
20605case "(($ac_try" in
20606 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20607 *) ac_try_echo=$ac_try;;
20608esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020609eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020610 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020611 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020612 grep -v '^ *+' conftest.er1 >conftest.err
20613 rm -f conftest.er1
20614 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020616 (exit $ac_status); } && {
20617 test -z "$ac_c_werror_flag" ||
20618 test ! -s conftest.err
20619 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020620 ac_cv_header_time_altzone=yes
20621else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020622 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020623sed 's/^/| /' conftest.$ac_ext >&5
20624
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020625 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000020626fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020627
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020628rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20629fi
20630
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020631{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
20632echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020633if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020634
20635cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020636#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020637_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020638
20639fi
20640
Guido van Rossumda88dad1995-01-26 00:46:29 +000020641was_it_defined=no
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020642{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
20643echo $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 +000020644cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020645/* confdefs.h. */
20646_ACEOF
20647cat confdefs.h >>conftest.$ac_ext
20648cat >>conftest.$ac_ext <<_ACEOF
20649/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020650
20651#include <sys/types.h>
20652#include <sys/select.h>
20653#include <sys/time.h>
20654
Martin v. Löwis11437992002-04-12 09:54:03 +000020655int
20656main ()
20657{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020658;
Martin v. Löwis11437992002-04-12 09:54:03 +000020659 ;
20660 return 0;
20661}
20662_ACEOF
20663rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020664if { (ac_try="$ac_compile"
20665case "(($ac_try" in
20666 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20667 *) ac_try_echo=$ac_try;;
20668esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020669eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020670 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020671 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020672 grep -v '^ *+' conftest.er1 >conftest.err
20673 rm -f conftest.er1
20674 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020676 (exit $ac_status); } && {
20677 test -z "$ac_c_werror_flag" ||
20678 test ! -s conftest.err
20679 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020680
20681
20682cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020683#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020684_ACEOF
20685
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020686 was_it_defined=yes
20687
Guido van Rossumf78abae1997-01-21 22:02:36 +000020688else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020689 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020690sed 's/^/| /' conftest.$ac_ext >&5
20691
Thomas Wouters477c8d52006-05-27 19:21:47 +000020692
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020693fi
20694
20695rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020696{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
20697echo "${ECHO_T}$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020698
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020699{ echo "$as_me:$LINENO: checking for addrinfo" >&5
20700echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020701if test "${ac_cv_struct_addrinfo+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020702 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020703else
Martin v. Löwis11437992002-04-12 09:54:03 +000020704 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020705/* confdefs.h. */
20706_ACEOF
20707cat confdefs.h >>conftest.$ac_ext
20708cat >>conftest.$ac_ext <<_ACEOF
20709/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020710
20711# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020712int
20713main ()
20714{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020715struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000020716 ;
20717 return 0;
20718}
20719_ACEOF
20720rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020721if { (ac_try="$ac_compile"
20722case "(($ac_try" in
20723 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20724 *) ac_try_echo=$ac_try;;
20725esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020726eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020727 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020728 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020729 grep -v '^ *+' conftest.er1 >conftest.err
20730 rm -f conftest.er1
20731 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020733 (exit $ac_status); } && {
20734 test -z "$ac_c_werror_flag" ||
20735 test ! -s conftest.err
20736 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020737 ac_cv_struct_addrinfo=yes
20738else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020739 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020740sed 's/^/| /' conftest.$ac_ext >&5
20741
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020742 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020743fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020744
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020745rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20746fi
20747
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020748{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
20749echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020750if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020751
20752cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020753#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020754_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020755
20756fi
20757
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020758{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
20759echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020760if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020761 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020762else
Martin v. Löwis11437992002-04-12 09:54:03 +000020763 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020764/* confdefs.h. */
20765_ACEOF
20766cat confdefs.h >>conftest.$ac_ext
20767cat >>conftest.$ac_ext <<_ACEOF
20768/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020769
20770# include <sys/types.h>
20771# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020772int
20773main ()
20774{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020775struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000020776 ;
20777 return 0;
20778}
20779_ACEOF
20780rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020781if { (ac_try="$ac_compile"
20782case "(($ac_try" in
20783 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20784 *) ac_try_echo=$ac_try;;
20785esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020786eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020787 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020788 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020789 grep -v '^ *+' conftest.er1 >conftest.err
20790 rm -f conftest.er1
20791 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020793 (exit $ac_status); } && {
20794 test -z "$ac_c_werror_flag" ||
20795 test ! -s conftest.err
20796 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020797 ac_cv_struct_sockaddr_storage=yes
20798else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020799 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020800sed 's/^/| /' conftest.$ac_ext >&5
20801
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020802 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020803fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020804
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020805rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20806fi
20807
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020808{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
20809echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020810if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020811
20812cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020813#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020814_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020815
20816fi
20817
Guido van Rossum627b2d71993-12-24 10:39:16 +000020818# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000020819
Michael W. Hudson54241132001-12-07 15:38:26 +000020820
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020821{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
20822echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020823if test "${ac_cv_c_char_unsigned+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020824 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000020825else
Martin v. Löwis11437992002-04-12 09:54:03 +000020826 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020827/* confdefs.h. */
20828_ACEOF
20829cat confdefs.h >>conftest.$ac_ext
20830cat >>conftest.$ac_ext <<_ACEOF
20831/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020832$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020833int
20834main ()
20835{
20836static int test_array [1 - 2 * !(((char) -1) < 0)];
20837test_array [0] = 0
20838
20839 ;
20840 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000020841}
Martin v. Löwis11437992002-04-12 09:54:03 +000020842_ACEOF
20843rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020844if { (ac_try="$ac_compile"
20845case "(($ac_try" in
20846 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20847 *) ac_try_echo=$ac_try;;
20848esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020849eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020850 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020851 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020852 grep -v '^ *+' conftest.er1 >conftest.err
20853 rm -f conftest.er1
20854 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020856 (exit $ac_status); } && {
20857 test -z "$ac_c_werror_flag" ||
20858 test ! -s conftest.err
20859 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000020860 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000020861else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020862 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020863sed 's/^/| /' conftest.$ac_ext >&5
20864
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020865 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020866fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020867
20868rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020869fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020870{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
20871echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020872if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020873 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020874#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020875_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020876
20877fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000020878
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020879{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
20880echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020881if test "${ac_cv_c_const+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020882 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000020883else
20884 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020885/* confdefs.h. */
20886_ACEOF
20887cat confdefs.h >>conftest.$ac_ext
20888cat >>conftest.$ac_ext <<_ACEOF
20889/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020890
Martin v. Löwis11437992002-04-12 09:54:03 +000020891int
20892main ()
20893{
20894/* FIXME: Include the comments suggested by Paul. */
20895#ifndef __cplusplus
20896 /* Ultrix mips cc rejects this. */
20897 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020898 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000020899 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020900 char const *const *pcpcc;
20901 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000020902 /* NEC SVR4.0.2 mips cc rejects this. */
20903 struct point {int x, y;};
20904 static struct point const zero = {0,0};
20905 /* AIX XL C 1.02.0.0 rejects this.
20906 It does not let you subtract one const X* pointer from another in
20907 an arm of an if-expression whose if-part is not a constant
20908 expression */
20909 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020910 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020911 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020912 ++pcpcc;
20913 ppc = (char**) pcpcc;
20914 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000020915 { /* SCO 3.2v4 cc rejects this. */
20916 char *t;
20917 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020918
Martin v. Löwis11437992002-04-12 09:54:03 +000020919 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020920 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020921 }
20922 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
20923 int x[] = {25, 17};
20924 const int *foo = &x[0];
20925 ++foo;
20926 }
20927 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
20928 typedef const int *iptr;
20929 iptr p = 0;
20930 ++p;
20931 }
20932 { /* AIX XL C 1.02.0.0 rejects this saying
20933 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
20934 struct s { int j; const int *ap[3]; };
20935 struct s *b; b->j = 5;
20936 }
20937 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
20938 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020939 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020940 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020941 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000020942#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000020943
Martin v. Löwis11437992002-04-12 09:54:03 +000020944 ;
20945 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000020946}
Martin v. Löwis11437992002-04-12 09:54:03 +000020947_ACEOF
20948rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020949if { (ac_try="$ac_compile"
20950case "(($ac_try" in
20951 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20952 *) ac_try_echo=$ac_try;;
20953esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020954eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020955 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020956 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020957 grep -v '^ *+' conftest.er1 >conftest.err
20958 rm -f conftest.er1
20959 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020961 (exit $ac_status); } && {
20962 test -z "$ac_c_werror_flag" ||
20963 test ! -s conftest.err
20964 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020965 ac_cv_c_const=yes
20966else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020967 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020968sed 's/^/| /' conftest.$ac_ext >&5
20969
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020970 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020971fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020972
20973rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020974fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020975{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
20976echo "${ECHO_T}$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020977if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020978
20979cat >>confdefs.h <<\_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020980#define const
Martin v. Löwis11437992002-04-12 09:54:03 +000020981_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020982
20983fi
20984
Michael W. Hudson54241132001-12-07 15:38:26 +000020985
Guido van Rossumda88dad1995-01-26 00:46:29 +000020986works=no
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020987{ echo "$as_me:$LINENO: checking for working volatile" >&5
20988echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020989cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020990/* confdefs.h. */
20991_ACEOF
20992cat confdefs.h >>conftest.$ac_ext
20993cat >>conftest.$ac_ext <<_ACEOF
20994/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000020995
Martin v. Löwis11437992002-04-12 09:54:03 +000020996int
20997main ()
20998{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020999volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021000 ;
21001 return 0;
21002}
21003_ACEOF
21004rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021005if { (ac_try="$ac_compile"
21006case "(($ac_try" in
21007 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21008 *) ac_try_echo=$ac_try;;
21009esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021010eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021011 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021012 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021013 grep -v '^ *+' conftest.er1 >conftest.err
21014 rm -f conftest.er1
21015 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021016 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021017 (exit $ac_status); } && {
21018 test -z "$ac_c_werror_flag" ||
21019 test ! -s conftest.err
21020 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000021021 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000021022else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021023 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021024sed 's/^/| /' conftest.$ac_ext >&5
21025
Martin v. Löwis11437992002-04-12 09:54:03 +000021026
21027cat >>confdefs.h <<\_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021028#define volatile
Martin v. Löwis11437992002-04-12 09:54:03 +000021029_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000021030
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021031
Guido van Rossum627b2d71993-12-24 10:39:16 +000021032fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021033
21034rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021035{ echo "$as_me:$LINENO: result: $works" >&5
21036echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021037
Guido van Rossumda88dad1995-01-26 00:46:29 +000021038works=no
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021039{ echo "$as_me:$LINENO: checking for working signed char" >&5
21040echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021041cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021042/* confdefs.h. */
21043_ACEOF
21044cat confdefs.h >>conftest.$ac_ext
21045cat >>conftest.$ac_ext <<_ACEOF
21046/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000021047
Martin v. Löwis11437992002-04-12 09:54:03 +000021048int
21049main ()
21050{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021051signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000021052 ;
21053 return 0;
21054}
21055_ACEOF
21056rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021057if { (ac_try="$ac_compile"
21058case "(($ac_try" in
21059 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21060 *) ac_try_echo=$ac_try;;
21061esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021062eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021063 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021064 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021065 grep -v '^ *+' conftest.er1 >conftest.err
21066 rm -f conftest.er1
21067 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021069 (exit $ac_status); } && {
21070 test -z "$ac_c_werror_flag" ||
21071 test ! -s conftest.err
21072 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000021073 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000021074else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021075 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021076sed 's/^/| /' conftest.$ac_ext >&5
21077
Martin v. Löwis11437992002-04-12 09:54:03 +000021078
21079cat >>confdefs.h <<\_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021080#define signed
Martin v. Löwis11437992002-04-12 09:54:03 +000021081_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000021082
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021083
Guido van Rossum7f43da71994-08-01 12:15:30 +000021084fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021085
21086rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021087{ echo "$as_me:$LINENO: result: $works" >&5
21088echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021089
Guido van Rossumda88dad1995-01-26 00:46:29 +000021090have_prototypes=no
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021091{ echo "$as_me:$LINENO: checking for prototypes" >&5
21092echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021093cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021094/* confdefs.h. */
21095_ACEOF
21096cat confdefs.h >>conftest.$ac_ext
21097cat >>conftest.$ac_ext <<_ACEOF
21098/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021099int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021100int
21101main ()
21102{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021103return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000021104 ;
21105 return 0;
21106}
21107_ACEOF
21108rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021109if { (ac_try="$ac_compile"
21110case "(($ac_try" in
21111 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21112 *) ac_try_echo=$ac_try;;
21113esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021114eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021115 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021116 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021117 grep -v '^ *+' conftest.er1 >conftest.err
21118 rm -f conftest.er1
21119 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021121 (exit $ac_status); } && {
21122 test -z "$ac_c_werror_flag" ||
21123 test ! -s conftest.err
21124 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021125
21126
21127cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021128#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021129_ACEOF
21130
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021131 have_prototypes=yes
21132
Guido van Rossumf78abae1997-01-21 22:02:36 +000021133else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021134 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021135sed 's/^/| /' conftest.$ac_ext >&5
21136
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021137
Guido van Rossum7f43da71994-08-01 12:15:30 +000021138fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021139
21140rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021141{ echo "$as_me:$LINENO: result: $have_prototypes" >&5
21142echo "${ECHO_T}$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021143
Guido van Rossumda88dad1995-01-26 00:46:29 +000021144works=no
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021145{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
21146echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021147cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021148/* confdefs.h. */
21149_ACEOF
21150cat confdefs.h >>conftest.$ac_ext
21151cat >>conftest.$ac_ext <<_ACEOF
21152/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021153
21154#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000021155int foo(int x, ...) {
21156 va_list va;
21157 va_start(va, x);
21158 va_arg(va, int);
21159 va_arg(va, char *);
21160 va_arg(va, double);
21161 return 0;
21162}
Guido van Rossum7f43da71994-08-01 12:15:30 +000021163
Martin v. Löwis11437992002-04-12 09:54:03 +000021164int
21165main ()
21166{
Guido van Rossum90eea071996-08-30 20:58:57 +000021167return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000021168 ;
21169 return 0;
21170}
21171_ACEOF
21172rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021173if { (ac_try="$ac_compile"
21174case "(($ac_try" in
21175 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21176 *) ac_try_echo=$ac_try;;
21177esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021178eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021179 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021180 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021181 grep -v '^ *+' conftest.er1 >conftest.err
21182 rm -f conftest.er1
21183 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021185 (exit $ac_status); } && {
21186 test -z "$ac_c_werror_flag" ||
21187 test ! -s conftest.err
21188 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021189
21190
21191cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021192#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021193_ACEOF
21194
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021195 works=yes
21196
Guido van Rossumf78abae1997-01-21 22:02:36 +000021197else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021198 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021199sed 's/^/| /' conftest.$ac_ext >&5
21200
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021201
Guido van Rossum627b2d71993-12-24 10:39:16 +000021202fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021203
21204rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021205{ echo "$as_me:$LINENO: result: $works" >&5
21206echo "${ECHO_T}$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021207
Martin v. Löwisd6320502004-08-12 13:45:08 +000021208# check for socketpair
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021209{ echo "$as_me:$LINENO: checking for socketpair" >&5
21210echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000021211cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000021212/* confdefs.h. */
21213_ACEOF
21214cat confdefs.h >>conftest.$ac_ext
21215cat >>conftest.$ac_ext <<_ACEOF
21216/* end confdefs.h. */
21217
21218#include <sys/types.h>
21219#include <sys/socket.h>
21220
21221int
21222main ()
21223{
21224void *x=socketpair
21225 ;
21226 return 0;
21227}
21228_ACEOF
21229rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021230if { (ac_try="$ac_compile"
21231case "(($ac_try" in
21232 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21233 *) ac_try_echo=$ac_try;;
21234esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021235eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021236 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000021237 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021238 grep -v '^ *+' conftest.er1 >conftest.err
21239 rm -f conftest.er1
21240 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021242 (exit $ac_status); } && {
21243 test -z "$ac_c_werror_flag" ||
21244 test ! -s conftest.err
21245 } && test -s conftest.$ac_objext; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000021246
21247cat >>confdefs.h <<\_ACEOF
21248#define HAVE_SOCKETPAIR 1
21249_ACEOF
21250
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021251 { echo "$as_me:$LINENO: result: yes" >&5
21252echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000021253else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021254 echo "$as_me: failed program was:" >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000021255sed 's/^/| /' conftest.$ac_ext >&5
21256
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021257 { echo "$as_me:$LINENO: result: no" >&5
21258echo "${ECHO_T}no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000021259
21260fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021261
21262rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000021263
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021264# check if sockaddr has sa_len member
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021265{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
21266echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021267cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021268/* confdefs.h. */
21269_ACEOF
21270cat confdefs.h >>conftest.$ac_ext
21271cat >>conftest.$ac_ext <<_ACEOF
21272/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021273#include <sys/types.h>
21274#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021275int
21276main ()
21277{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021278struct sockaddr x;
21279x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021280 ;
21281 return 0;
21282}
21283_ACEOF
21284rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021285if { (ac_try="$ac_compile"
21286case "(($ac_try" in
21287 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21288 *) ac_try_echo=$ac_try;;
21289esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021290eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021291 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021292 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021293 grep -v '^ *+' conftest.er1 >conftest.err
21294 rm -f conftest.er1
21295 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021297 (exit $ac_status); } && {
21298 test -z "$ac_c_werror_flag" ||
21299 test ! -s conftest.err
21300 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021301 { echo "$as_me:$LINENO: result: yes" >&5
21302echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021303
21304cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021305#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021306_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021307
21308else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021309 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021310sed 's/^/| /' conftest.$ac_ext >&5
21311
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021312 { echo "$as_me:$LINENO: result: no" >&5
21313echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021314fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021315
21316rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021317
Guido van Rossumda88dad1995-01-26 00:46:29 +000021318va_list_is_array=no
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021319{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
21320echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021321cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021322/* confdefs.h. */
21323_ACEOF
21324cat confdefs.h >>conftest.$ac_ext
21325cat >>conftest.$ac_ext <<_ACEOF
21326/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021327
21328#ifdef HAVE_STDARG_PROTOTYPES
21329#include <stdarg.h>
21330#else
21331#include <varargs.h>
21332#endif
21333
Martin v. Löwis11437992002-04-12 09:54:03 +000021334int
21335main ()
21336{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021337va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000021338 ;
21339 return 0;
21340}
21341_ACEOF
21342rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021343if { (ac_try="$ac_compile"
21344case "(($ac_try" in
21345 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21346 *) ac_try_echo=$ac_try;;
21347esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021348eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021349 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021350 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021351 grep -v '^ *+' conftest.er1 >conftest.err
21352 rm -f conftest.er1
21353 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021355 (exit $ac_status); } && {
21356 test -z "$ac_c_werror_flag" ||
21357 test ! -s conftest.err
21358 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021359 :
21360else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021361 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021362sed 's/^/| /' conftest.$ac_ext >&5
21363
Martin v. Löwis11437992002-04-12 09:54:03 +000021364
21365
21366cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021367#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021368_ACEOF
21369
Guido van Rossumda88dad1995-01-26 00:46:29 +000021370 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021371
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021372fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021373
21374rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021375{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
21376echo "${ECHO_T}$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021377
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021378# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000021379
21380
21381
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021382{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
21383echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021384if test "${ac_cv_func_gethostbyname_r+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021385 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021386else
Martin v. Löwis11437992002-04-12 09:54:03 +000021387 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021388/* confdefs.h. */
21389_ACEOF
21390cat confdefs.h >>conftest.$ac_ext
21391cat >>conftest.$ac_ext <<_ACEOF
21392/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021393/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
21394 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21395#define gethostbyname_r innocuous_gethostbyname_r
21396
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021397/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021398 which can conflict with char gethostbyname_r (); below.
21399 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021400 <limits.h> exists even on freestanding compilers. */
21401
21402#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021403# include <limits.h>
21404#else
21405# include <assert.h>
21406#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021407
21408#undef gethostbyname_r
21409
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021410/* Override any GCC internal prototype to avoid an error.
21411 Use char because int might match the return type of a GCC
21412 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021413#ifdef __cplusplus
21414extern "C"
21415#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021416char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021417/* The GNU C library defines this for functions which it implements
21418 to always fail with ENOSYS. Some functions are actually named
21419 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021420#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021421choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021422#endif
21423
Skip Montanaro6dead952003-09-25 14:50:04 +000021424int
21425main ()
21426{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021427return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021428 ;
21429 return 0;
21430}
21431_ACEOF
21432rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021433if { (ac_try="$ac_link"
21434case "(($ac_try" in
21435 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21436 *) ac_try_echo=$ac_try;;
21437esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021438eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021439 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021440 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021441 grep -v '^ *+' conftest.er1 >conftest.err
21442 rm -f conftest.er1
21443 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021445 (exit $ac_status); } && {
21446 test -z "$ac_c_werror_flag" ||
21447 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021448 } && test -s conftest$ac_exeext &&
21449 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021450 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021451else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021452 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021453sed 's/^/| /' conftest.$ac_ext >&5
21454
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021455 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021456fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021457
21458rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021459 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021460fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021461{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
21462echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
21463if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021464
Martin v. Löwis11437992002-04-12 09:54:03 +000021465 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021466#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021467_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021468
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021469 { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
21470echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021471 OLD_CFLAGS=$CFLAGS
21472 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000021473 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021474/* confdefs.h. */
21475_ACEOF
21476cat confdefs.h >>conftest.$ac_ext
21477cat >>conftest.$ac_ext <<_ACEOF
21478/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021479
21480# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021481
Martin v. Löwis11437992002-04-12 09:54:03 +000021482int
21483main ()
21484{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021485
21486 char *name;
21487 struct hostent *he, *res;
21488 char buffer[2048];
21489 int buflen = 2048;
21490 int h_errnop;
21491
21492 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000021493
21494 ;
21495 return 0;
21496}
21497_ACEOF
21498rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021499if { (ac_try="$ac_compile"
21500case "(($ac_try" in
21501 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21502 *) ac_try_echo=$ac_try;;
21503esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021504eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021505 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021506 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021507 grep -v '^ *+' conftest.er1 >conftest.err
21508 rm -f conftest.er1
21509 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021511 (exit $ac_status); } && {
21512 test -z "$ac_c_werror_flag" ||
21513 test ! -s conftest.err
21514 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021515
21516 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021517#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021518_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021519
Martin v. Löwis11437992002-04-12 09:54:03 +000021520
21521cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021522#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021523_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021524
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021525 { echo "$as_me:$LINENO: result: yes" >&5
21526echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021527
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021528else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021529 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021530sed 's/^/| /' conftest.$ac_ext >&5
21531
Martin v. Löwis11437992002-04-12 09:54:03 +000021532
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021533 { echo "$as_me:$LINENO: result: no" >&5
21534echo "${ECHO_T}no" >&6; }
21535 { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
21536echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021537 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021538/* confdefs.h. */
21539_ACEOF
21540cat confdefs.h >>conftest.$ac_ext
21541cat >>conftest.$ac_ext <<_ACEOF
21542/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021543
21544# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021545
Martin v. Löwis11437992002-04-12 09:54:03 +000021546int
21547main ()
21548{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021549
21550 char *name;
21551 struct hostent *he;
21552 char buffer[2048];
21553 int buflen = 2048;
21554 int h_errnop;
21555
21556 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000021557
21558 ;
21559 return 0;
21560}
21561_ACEOF
21562rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021563if { (ac_try="$ac_compile"
21564case "(($ac_try" in
21565 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21566 *) ac_try_echo=$ac_try;;
21567esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021568eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021569 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021570 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021571 grep -v '^ *+' conftest.er1 >conftest.err
21572 rm -f conftest.er1
21573 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021575 (exit $ac_status); } && {
21576 test -z "$ac_c_werror_flag" ||
21577 test ! -s conftest.err
21578 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021579
21580 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021581#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021582_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021583
Martin v. Löwis11437992002-04-12 09:54:03 +000021584
21585cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021586#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021587_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021588
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021589 { echo "$as_me:$LINENO: result: yes" >&5
21590echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021591
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021592else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021593 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021594sed 's/^/| /' conftest.$ac_ext >&5
21595
Martin v. Löwis11437992002-04-12 09:54:03 +000021596
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021597 { echo "$as_me:$LINENO: result: no" >&5
21598echo "${ECHO_T}no" >&6; }
21599 { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
21600echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021601 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021602/* confdefs.h. */
21603_ACEOF
21604cat confdefs.h >>conftest.$ac_ext
21605cat >>conftest.$ac_ext <<_ACEOF
21606/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021607
21608# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021609
Martin v. Löwis11437992002-04-12 09:54:03 +000021610int
21611main ()
21612{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021613
21614 char *name;
21615 struct hostent *he;
21616 struct hostent_data data;
21617
21618 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000021619
21620 ;
21621 return 0;
21622}
21623_ACEOF
21624rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021625if { (ac_try="$ac_compile"
21626case "(($ac_try" in
21627 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21628 *) ac_try_echo=$ac_try;;
21629esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021630eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021631 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021632 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021633 grep -v '^ *+' conftest.er1 >conftest.err
21634 rm -f conftest.er1
21635 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021637 (exit $ac_status); } && {
21638 test -z "$ac_c_werror_flag" ||
21639 test ! -s conftest.err
21640 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021641
21642 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021643#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021644_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021645
Martin v. Löwis11437992002-04-12 09:54:03 +000021646
21647cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021648#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021649_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021650
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021651 { echo "$as_me:$LINENO: result: yes" >&5
21652echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021653
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021654else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021655 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021656sed 's/^/| /' conftest.$ac_ext >&5
21657
Martin v. Löwis11437992002-04-12 09:54:03 +000021658
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021659 { echo "$as_me:$LINENO: result: no" >&5
21660echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021661
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021662fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021663
21664rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021665
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021666fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021667
21668rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021669
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021670fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021671
21672rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021673 CFLAGS=$OLD_CFLAGS
21674
21675else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021676
Martin v. Löwis11437992002-04-12 09:54:03 +000021677
21678for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000021679do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021680as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21681{ echo "$as_me:$LINENO: checking for $ac_func" >&5
21682echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021683if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021684 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021685else
Martin v. Löwis11437992002-04-12 09:54:03 +000021686 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021687/* confdefs.h. */
21688_ACEOF
21689cat confdefs.h >>conftest.$ac_ext
21690cat >>conftest.$ac_ext <<_ACEOF
21691/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021692/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21693 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21694#define $ac_func innocuous_$ac_func
21695
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021696/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021697 which can conflict with char $ac_func (); below.
21698 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021699 <limits.h> exists even on freestanding compilers. */
21700
21701#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021702# include <limits.h>
21703#else
21704# include <assert.h>
21705#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021706
21707#undef $ac_func
21708
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021709/* Override any GCC internal prototype to avoid an error.
21710 Use char because int might match the return type of a GCC
21711 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021712#ifdef __cplusplus
21713extern "C"
21714#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021715char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021716/* The GNU C library defines this for functions which it implements
21717 to always fail with ENOSYS. Some functions are actually named
21718 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021719#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021720choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021721#endif
21722
Skip Montanaro6dead952003-09-25 14:50:04 +000021723int
21724main ()
21725{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021726return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021727 ;
21728 return 0;
21729}
21730_ACEOF
21731rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021732if { (ac_try="$ac_link"
21733case "(($ac_try" in
21734 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21735 *) ac_try_echo=$ac_try;;
21736esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021737eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021738 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021739 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021740 grep -v '^ *+' conftest.er1 >conftest.err
21741 rm -f conftest.er1
21742 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021744 (exit $ac_status); } && {
21745 test -z "$ac_c_werror_flag" ||
21746 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021747 } && test -s conftest$ac_exeext &&
21748 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021749 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000021750else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021751 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021752sed 's/^/| /' conftest.$ac_ext >&5
21753
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021754 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000021755fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021756
21757rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021758 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021759fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021760ac_res=`eval echo '${'$as_ac_var'}'`
21761 { echo "$as_me:$LINENO: result: $ac_res" >&5
21762echo "${ECHO_T}$ac_res" >&6; }
21763if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021764 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021765#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021766_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021767
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021768fi
Thomas Wouters3a584202000-08-05 23:28:51 +000021769done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021770
Michael W. Hudson54241132001-12-07 15:38:26 +000021771
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021772fi
21773
Michael W. Hudson54241132001-12-07 15:38:26 +000021774
21775
21776
21777
21778
21779
Guido van Rossum627b2d71993-12-24 10:39:16 +000021780# checks for system services
21781# (none yet)
21782
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021783# Linux requires this for correct f.p. operations
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021784{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
21785echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021786if test "${ac_cv_func___fpu_control+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021787 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021788else
Martin v. Löwis11437992002-04-12 09:54:03 +000021789 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021790/* confdefs.h. */
21791_ACEOF
21792cat confdefs.h >>conftest.$ac_ext
21793cat >>conftest.$ac_ext <<_ACEOF
21794/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021795/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
21796 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21797#define __fpu_control innocuous___fpu_control
21798
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021799/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021800 which can conflict with char __fpu_control (); below.
21801 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021802 <limits.h> exists even on freestanding compilers. */
21803
21804#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021805# include <limits.h>
21806#else
21807# include <assert.h>
21808#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021809
21810#undef __fpu_control
21811
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021812/* Override any GCC internal prototype to avoid an error.
21813 Use char because int might match the return type of a GCC
21814 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021815#ifdef __cplusplus
21816extern "C"
21817#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021818char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021819/* The GNU C library defines this for functions which it implements
21820 to always fail with ENOSYS. Some functions are actually named
21821 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021822#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021823choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021824#endif
21825
Skip Montanaro6dead952003-09-25 14:50:04 +000021826int
21827main ()
21828{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021829return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021830 ;
21831 return 0;
21832}
21833_ACEOF
21834rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021835if { (ac_try="$ac_link"
21836case "(($ac_try" in
21837 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21838 *) ac_try_echo=$ac_try;;
21839esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021840eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021841 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021842 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021843 grep -v '^ *+' conftest.er1 >conftest.err
21844 rm -f conftest.er1
21845 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021847 (exit $ac_status); } && {
21848 test -z "$ac_c_werror_flag" ||
21849 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021850 } && test -s conftest$ac_exeext &&
21851 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021852 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021853else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021854 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021855sed 's/^/| /' conftest.$ac_ext >&5
21856
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021857 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021858fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021859
21860rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021861 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021862fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021863{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
21864echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
21865if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021866 :
21867else
Martin v. Löwis11437992002-04-12 09:54:03 +000021868
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021869{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
21870echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021871if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021872 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021873else
Martin v. Löwis11437992002-04-12 09:54:03 +000021874 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000021875LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000021876cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021877/* confdefs.h. */
21878_ACEOF
21879cat confdefs.h >>conftest.$ac_ext
21880cat >>conftest.$ac_ext <<_ACEOF
21881/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021882
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021883/* Override any GCC internal prototype to avoid an error.
21884 Use char because int might match the return type of a GCC
21885 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021886#ifdef __cplusplus
21887extern "C"
21888#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021889char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021890int
21891main ()
21892{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021893return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021894 ;
21895 return 0;
21896}
21897_ACEOF
21898rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021899if { (ac_try="$ac_link"
21900case "(($ac_try" in
21901 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21902 *) ac_try_echo=$ac_try;;
21903esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021904eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021905 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021906 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021907 grep -v '^ *+' conftest.er1 >conftest.err
21908 rm -f conftest.er1
21909 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021911 (exit $ac_status); } && {
21912 test -z "$ac_c_werror_flag" ||
21913 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021914 } && test -s conftest$ac_exeext &&
21915 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021916 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000021917else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021918 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021919sed 's/^/| /' conftest.$ac_ext >&5
21920
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021921 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000021922fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021923
21924rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021925 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021926LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021927fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021928{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
21929echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
21930if test $ac_cv_lib_ieee___fpu_control = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021931 cat >>confdefs.h <<_ACEOF
21932#define HAVE_LIBIEEE 1
21933_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021934
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000021935 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021936
Guido van Rossum627b2d71993-12-24 10:39:16 +000021937fi
21938
Michael W. Hudson54241132001-12-07 15:38:26 +000021939
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021940fi
21941
Michael W. Hudson54241132001-12-07 15:38:26 +000021942
Guido van Rossum7f253911997-05-09 02:42:48 +000021943# Check for --with-fpectl
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021944{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
21945echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021946
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021947# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000021948if test "${with_fpectl+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021949 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000021950if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000021951then
21952
21953cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000021954#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021955_ACEOF
21956
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021957 { echo "$as_me:$LINENO: result: yes" >&5
21958echo "${ECHO_T}yes" >&6; }
21959else { echo "$as_me:$LINENO: result: no" >&5
21960echo "${ECHO_T}no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000021961fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000021962else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021963 { echo "$as_me:$LINENO: result: no" >&5
21964echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021965fi
21966
Guido van Rossum7f253911997-05-09 02:42:48 +000021967
Guido van Rossum7f43da71994-08-01 12:15:30 +000021968# check for --with-libm=...
21969
Guido van Rossum563e7081996-09-10 18:20:48 +000021970case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000021971Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000021972*) LIBM=-lm
21973esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021974{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
21975echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021976
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021977# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000021978if test "${with_libm+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021979 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000021980if test "$withval" = no
21981then LIBM=
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021982 { echo "$as_me:$LINENO: result: force LIBM empty" >&5
21983echo "${ECHO_T}force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000021984elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000021985then LIBM=$withval
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021986 { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
21987echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
21988else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
21989echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000021990 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021991fi
Guido van Rossum7f253911997-05-09 02:42:48 +000021992else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021993 { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
21994echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021995fi
21996
Guido van Rossum7f43da71994-08-01 12:15:30 +000021997
21998# check for --with-libc=...
21999
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022000{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
22001echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022002
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022003# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000022004if test "${with_libc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022005 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000022006if test "$withval" = no
22007then LIBC=
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022008 { echo "$as_me:$LINENO: result: force LIBC empty" >&5
22009echo "${ECHO_T}force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000022010elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000022011then LIBC=$withval
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022012 { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
22013echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
22014else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
22015echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000022016 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022017fi
Guido van Rossum7f253911997-05-09 02:42:48 +000022018else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022019 { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
22020echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022021fi
22022
Guido van Rossum7f43da71994-08-01 12:15:30 +000022023
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022024# **************************************************
22025# * Check for various properties of floating point *
22026# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022027
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022028{ echo "$as_me:$LINENO: checking whether C doubles are little-endian IEEE 754 binary64" >&5
22029echo $ECHO_N "checking whether C doubles are little-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022030if test "${ac_cv_little_endian_double+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022031 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022032else
22033
22034if test "$cross_compiling" = yes; then
22035 ac_cv_little_endian_double=no
22036else
22037 cat >conftest.$ac_ext <<_ACEOF
22038/* confdefs.h. */
22039_ACEOF
22040cat confdefs.h >>conftest.$ac_ext
22041cat >>conftest.$ac_ext <<_ACEOF
22042/* end confdefs.h. */
22043
22044#include <string.h>
22045int main() {
22046 double x = 9006104071832581.0;
22047 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
22048 return 0;
22049 else
22050 return 1;
22051}
22052
22053_ACEOF
22054rm -f conftest$ac_exeext
22055if { (ac_try="$ac_link"
22056case "(($ac_try" in
22057 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22058 *) ac_try_echo=$ac_try;;
22059esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022060eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022061 (eval "$ac_link") 2>&5
22062 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022064 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22065 { (case "(($ac_try" in
22066 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22067 *) ac_try_echo=$ac_try;;
22068esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022069eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022070 (eval "$ac_try") 2>&5
22071 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022073 (exit $ac_status); }; }; then
22074 ac_cv_little_endian_double=yes
22075else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022076 echo "$as_me: program exited with status $ac_status" >&5
22077echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022078sed 's/^/| /' conftest.$ac_ext >&5
22079
22080( exit $ac_status )
22081ac_cv_little_endian_double=no
22082fi
22083rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22084fi
22085
22086
22087fi
22088
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022089{ echo "$as_me:$LINENO: result: $ac_cv_little_endian_double" >&5
22090echo "${ECHO_T}$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022091if test "$ac_cv_little_endian_double" = yes
22092then
22093
22094cat >>confdefs.h <<\_ACEOF
22095#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1
22096_ACEOF
22097
22098fi
22099
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022100{ echo "$as_me:$LINENO: checking whether C doubles are big-endian IEEE 754 binary64" >&5
22101echo $ECHO_N "checking whether C doubles are big-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022102if test "${ac_cv_big_endian_double+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022103 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022104else
22105
22106if test "$cross_compiling" = yes; then
22107 ac_cv_big_endian_double=no
22108else
22109 cat >conftest.$ac_ext <<_ACEOF
22110/* confdefs.h. */
22111_ACEOF
22112cat confdefs.h >>conftest.$ac_ext
22113cat >>conftest.$ac_ext <<_ACEOF
22114/* end confdefs.h. */
22115
22116#include <string.h>
22117int main() {
22118 double x = 9006104071832581.0;
22119 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
22120 return 0;
22121 else
22122 return 1;
22123}
22124
22125_ACEOF
22126rm -f conftest$ac_exeext
22127if { (ac_try="$ac_link"
22128case "(($ac_try" in
22129 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22130 *) ac_try_echo=$ac_try;;
22131esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022132eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022133 (eval "$ac_link") 2>&5
22134 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022136 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22137 { (case "(($ac_try" in
22138 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22139 *) ac_try_echo=$ac_try;;
22140esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022141eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022142 (eval "$ac_try") 2>&5
22143 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022145 (exit $ac_status); }; }; then
22146 ac_cv_big_endian_double=yes
22147else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022148 echo "$as_me: program exited with status $ac_status" >&5
22149echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022150sed 's/^/| /' conftest.$ac_ext >&5
22151
22152( exit $ac_status )
22153ac_cv_big_endian_double=no
22154fi
22155rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22156fi
22157
22158
22159fi
22160
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022161{ echo "$as_me:$LINENO: result: $ac_cv_big_endian_double" >&5
22162echo "${ECHO_T}$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022163if test "$ac_cv_big_endian_double" = yes
22164then
22165
22166cat >>confdefs.h <<\_ACEOF
22167#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1
22168_ACEOF
22169
22170fi
22171
22172# Some ARM platforms use a mixed-endian representation for doubles.
22173# While Python doesn't currently have full support for these platforms
22174# (see e.g., issue 1762561), we can at least make sure that float <-> string
22175# conversions work.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022176{ echo "$as_me:$LINENO: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
22177echo $ECHO_N "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022178if test "${ac_cv_mixed_endian_double+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022179 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022180else
22181
22182if test "$cross_compiling" = yes; then
22183 ac_cv_mixed_endian_double=no
22184else
22185 cat >conftest.$ac_ext <<_ACEOF
22186/* confdefs.h. */
22187_ACEOF
22188cat confdefs.h >>conftest.$ac_ext
22189cat >>conftest.$ac_ext <<_ACEOF
22190/* end confdefs.h. */
22191
22192#include <string.h>
22193int main() {
22194 double x = 9006104071832581.0;
22195 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
22196 return 0;
22197 else
22198 return 1;
22199}
22200
22201_ACEOF
22202rm -f conftest$ac_exeext
22203if { (ac_try="$ac_link"
22204case "(($ac_try" in
22205 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22206 *) ac_try_echo=$ac_try;;
22207esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022208eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022209 (eval "$ac_link") 2>&5
22210 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022212 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22213 { (case "(($ac_try" in
22214 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22215 *) ac_try_echo=$ac_try;;
22216esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022217eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022218 (eval "$ac_try") 2>&5
22219 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022221 (exit $ac_status); }; }; then
22222 ac_cv_mixed_endian_double=yes
22223else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022224 echo "$as_me: program exited with status $ac_status" >&5
22225echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022226sed 's/^/| /' conftest.$ac_ext >&5
22227
22228( exit $ac_status )
22229ac_cv_mixed_endian_double=no
22230fi
22231rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22232fi
22233
22234
22235fi
22236
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022237{ echo "$as_me:$LINENO: result: $ac_cv_mixed_endian_double" >&5
22238echo "${ECHO_T}$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022239if test "$ac_cv_mixed_endian_double" = yes
22240then
22241
22242cat >>confdefs.h <<\_ACEOF
22243#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1
22244_ACEOF
22245
22246fi
22247
Mark Dickinson7abf8d42009-04-18 20:17:52 +000022248# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000022249# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000022250# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000022251# rounding; this is a problem on x86, where the x87 FPU has a default
22252# rounding precision of 64 bits. For gcc/x86, we try to fix this by
22253# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022254if test "$GCC" = yes && test -n "`$CC -dM -E - </dev/null | grep i386`"
22255then
Mark Dickinson7abf8d42009-04-18 20:17:52 +000022256 # Check that it's okay to use gcc inline assembler to get and set
Mark Dickinson10683072009-04-18 21:18:19 +000022257 # x87 control word. It should be, but you never know...
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022258 { echo "$as_me:$LINENO: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
22259echo $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 +000022260 cat >conftest.$ac_ext <<_ACEOF
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022261/* confdefs.h. */
22262_ACEOF
22263cat confdefs.h >>conftest.$ac_ext
22264cat >>conftest.$ac_ext <<_ACEOF
22265/* end confdefs.h. */
22266
22267int
22268main ()
22269{
22270
Mark Dickinson7abf8d42009-04-18 20:17:52 +000022271 unsigned short cw;
22272 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
22273 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022274
22275 ;
22276 return 0;
22277}
22278_ACEOF
22279rm -f conftest.$ac_objext
22280if { (ac_try="$ac_compile"
22281case "(($ac_try" in
22282 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22283 *) ac_try_echo=$ac_try;;
22284esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022285eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022286 (eval "$ac_compile") 2>conftest.er1
22287 ac_status=$?
22288 grep -v '^ *+' conftest.er1 >conftest.err
22289 rm -f conftest.er1
22290 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022292 (exit $ac_status); } && {
22293 test -z "$ac_c_werror_flag" ||
22294 test ! -s conftest.err
22295 } && test -s conftest.$ac_objext; then
22296 have_gcc_asm_for_x87=yes
22297else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022298 echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022299sed 's/^/| /' conftest.$ac_ext >&5
22300
22301 have_gcc_asm_for_x87=no
22302fi
22303
22304rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022305 { echo "$as_me:$LINENO: result: $have_gcc_asm_for_x87" >&5
22306echo "${ECHO_T}$have_gcc_asm_for_x87" >&6; }
Mark Dickinson7abf8d42009-04-18 20:17:52 +000022307 if test "$have_gcc_asm_for_x87" = yes
22308 then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022309
22310cat >>confdefs.h <<\_ACEOF
22311#define HAVE_GCC_ASM_FOR_X87 1
22312_ACEOF
22313
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022314 fi
22315fi
Martin v. Löwis11437992002-04-12 09:54:03 +000022316
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022317# Detect whether system arithmetic is subject to x87-style double
22318# rounding issues. The result of this test has little meaning on non
22319# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
22320# mode is round-to-nearest and double rounding issues are present, and
22321# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022322{ echo "$as_me:$LINENO: checking for x87-style double rounding" >&5
22323echo $ECHO_N "checking for x87-style double rounding... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022324# $BASECFLAGS may affect the result
22325ac_save_cc="$CC"
22326CC="$CC $BASECFLAGS"
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022327if test "$cross_compiling" = yes; then
22328 ac_cv_x87_double_rounding=no
22329else
22330 cat >conftest.$ac_ext <<_ACEOF
22331/* confdefs.h. */
22332_ACEOF
22333cat confdefs.h >>conftest.$ac_ext
22334cat >>conftest.$ac_ext <<_ACEOF
22335/* end confdefs.h. */
22336
22337#include <stdlib.h>
22338#include <math.h>
22339int main() {
22340 volatile double x, y, z;
22341 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
22342 x = 0.99999999999999989; /* 1-2**-53 */
22343 y = 1./x;
22344 if (y != 1.)
22345 exit(0);
22346 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
22347 x = 1e16;
22348 y = 2.99999;
22349 z = x + y;
22350 if (z != 1e16+4.)
22351 exit(0);
22352 /* both tests show evidence of double rounding */
22353 exit(1);
22354}
22355
22356_ACEOF
22357rm -f conftest$ac_exeext
22358if { (ac_try="$ac_link"
22359case "(($ac_try" in
22360 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22361 *) ac_try_echo=$ac_try;;
22362esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022363eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022364 (eval "$ac_link") 2>&5
22365 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022366 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022367 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22368 { (case "(($ac_try" in
22369 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22370 *) ac_try_echo=$ac_try;;
22371esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022372eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022373 (eval "$ac_try") 2>&5
22374 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022376 (exit $ac_status); }; }; then
22377 ac_cv_x87_double_rounding=no
22378else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022379 echo "$as_me: program exited with status $ac_status" >&5
22380echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022381sed 's/^/| /' conftest.$ac_ext >&5
22382
22383( exit $ac_status )
22384ac_cv_x87_double_rounding=yes
22385fi
22386rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22387fi
22388
22389
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022390CC="$ac_save_cc"
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022391{ echo "$as_me:$LINENO: result: $ac_cv_x87_double_rounding" >&5
22392echo "${ECHO_T}$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022393if test "$ac_cv_x87_double_rounding" = yes
22394then
22395
22396cat >>confdefs.h <<\_ACEOF
22397#define X87_DOUBLE_ROUNDING 1
22398_ACEOF
22399
22400fi
22401
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022402# ************************************
22403# * Check for mathematical functions *
22404# ************************************
22405
22406LIBS_SAVE=$LIBS
22407LIBS="$LIBS $LIBM"
22408
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022409# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
22410# -0. on some architectures.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022411{ echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5
22412echo $ECHO_N "checking whether tanh preserves the sign of zero... $ECHO_C" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022413if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022414 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022415else
22416
22417if test "$cross_compiling" = yes; then
22418 ac_cv_tanh_preserves_zero_sign=no
22419else
22420 cat >conftest.$ac_ext <<_ACEOF
22421/* confdefs.h. */
22422_ACEOF
22423cat confdefs.h >>conftest.$ac_ext
22424cat >>conftest.$ac_ext <<_ACEOF
22425/* end confdefs.h. */
22426
22427#include <math.h>
22428#include <stdlib.h>
22429int main() {
22430 /* return 0 if either negative zeros don't exist
22431 on this platform or if negative zeros exist
22432 and tanh(-0.) == -0. */
22433 if (atan2(0., -1.) == atan2(-0., -1.) ||
22434 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
22435 else exit(1);
22436}
22437
22438_ACEOF
22439rm -f conftest$ac_exeext
22440if { (ac_try="$ac_link"
22441case "(($ac_try" in
22442 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22443 *) ac_try_echo=$ac_try;;
22444esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022445eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022446 (eval "$ac_link") 2>&5
22447 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022449 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22450 { (case "(($ac_try" in
22451 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22452 *) ac_try_echo=$ac_try;;
22453esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022454eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022455 (eval "$ac_try") 2>&5
22456 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022458 (exit $ac_status); }; }; then
22459 ac_cv_tanh_preserves_zero_sign=yes
22460else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022461 echo "$as_me: program exited with status $ac_status" >&5
22462echo "$as_me: failed program was:" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022463sed 's/^/| /' conftest.$ac_ext >&5
22464
22465( exit $ac_status )
22466ac_cv_tanh_preserves_zero_sign=no
22467fi
22468rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22469fi
22470
22471
22472fi
22473
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022474{ echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5
22475echo "${ECHO_T}$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022476if test "$ac_cv_tanh_preserves_zero_sign" = yes
22477then
22478
22479cat >>confdefs.h <<\_ACEOF
22480#define TANH_PRESERVES_ZERO_SIGN 1
22481_ACEOF
22482
22483fi
22484
22485
Guido van Rossum2b3ac691996-08-30 15:18:41 +000022486
Michael W. Hudson54241132001-12-07 15:38:26 +000022487
Christian Heimes99170a52007-12-19 02:07:34 +000022488
22489
22490
22491
22492
Mark Dickinsonf2537862009-04-18 13:58:18 +000022493
22494for ac_func in acosh asinh atanh copysign expm1 finite hypot log1p round
Christian Heimes99170a52007-12-19 02:07:34 +000022495do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022496as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
22497{ echo "$as_me:$LINENO: checking for $ac_func" >&5
22498echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Christian Heimes99170a52007-12-19 02:07:34 +000022499if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022500 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes99170a52007-12-19 02:07:34 +000022501else
22502 cat >conftest.$ac_ext <<_ACEOF
22503/* confdefs.h. */
22504_ACEOF
22505cat confdefs.h >>conftest.$ac_ext
22506cat >>conftest.$ac_ext <<_ACEOF
22507/* end confdefs.h. */
22508/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22509 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22510#define $ac_func innocuous_$ac_func
22511
22512/* System header to define __stub macros and hopefully few prototypes,
22513 which can conflict with char $ac_func (); below.
22514 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22515 <limits.h> exists even on freestanding compilers. */
22516
22517#ifdef __STDC__
22518# include <limits.h>
22519#else
22520# include <assert.h>
22521#endif
22522
22523#undef $ac_func
22524
22525/* Override any GCC internal prototype to avoid an error.
22526 Use char because int might match the return type of a GCC
22527 builtin and then its argument prototype would still apply. */
22528#ifdef __cplusplus
22529extern "C"
22530#endif
22531char $ac_func ();
22532/* The GNU C library defines this for functions which it implements
22533 to always fail with ENOSYS. Some functions are actually named
22534 something starting with __ and the normal name is an alias. */
22535#if defined __stub_$ac_func || defined __stub___$ac_func
22536choke me
22537#endif
22538
22539int
22540main ()
22541{
22542return $ac_func ();
22543 ;
22544 return 0;
22545}
22546_ACEOF
22547rm -f conftest.$ac_objext conftest$ac_exeext
22548if { (ac_try="$ac_link"
22549case "(($ac_try" in
22550 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22551 *) ac_try_echo=$ac_try;;
22552esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022553eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes99170a52007-12-19 02:07:34 +000022554 (eval "$ac_link") 2>conftest.er1
22555 ac_status=$?
22556 grep -v '^ *+' conftest.er1 >conftest.err
22557 rm -f conftest.er1
22558 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes99170a52007-12-19 02:07:34 +000022560 (exit $ac_status); } && {
22561 test -z "$ac_c_werror_flag" ||
22562 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022563 } && test -s conftest$ac_exeext &&
22564 $as_test_x conftest$ac_exeext; then
Christian Heimes99170a52007-12-19 02:07:34 +000022565 eval "$as_ac_var=yes"
22566else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022567 echo "$as_me: failed program was:" >&5
Christian Heimes99170a52007-12-19 02:07:34 +000022568sed 's/^/| /' conftest.$ac_ext >&5
22569
22570 eval "$as_ac_var=no"
22571fi
22572
22573rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
22574 conftest$ac_exeext conftest.$ac_ext
22575fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022576ac_res=`eval echo '${'$as_ac_var'}'`
22577 { echo "$as_me:$LINENO: result: $ac_res" >&5
22578echo "${ECHO_T}$ac_res" >&6; }
22579if test `eval echo '${'$as_ac_var'}'` = yes; then
Christian Heimes99170a52007-12-19 02:07:34 +000022580 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022581#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes99170a52007-12-19 02:07:34 +000022582_ACEOF
22583
22584fi
22585done
22586
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022587{ echo "$as_me:$LINENO: checking whether isinf is declared" >&5
22588echo $ECHO_N "checking whether isinf is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022589if test "${ac_cv_have_decl_isinf+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022590 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022591else
22592 cat >conftest.$ac_ext <<_ACEOF
22593/* confdefs.h. */
22594_ACEOF
22595cat confdefs.h >>conftest.$ac_ext
22596cat >>conftest.$ac_ext <<_ACEOF
22597/* end confdefs.h. */
22598#include <math.h>
22599
22600int
22601main ()
22602{
22603#ifndef isinf
22604 (void) isinf;
22605#endif
22606
22607 ;
22608 return 0;
22609}
22610_ACEOF
22611rm -f conftest.$ac_objext
22612if { (ac_try="$ac_compile"
22613case "(($ac_try" in
22614 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22615 *) ac_try_echo=$ac_try;;
22616esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022617eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022618 (eval "$ac_compile") 2>conftest.er1
22619 ac_status=$?
22620 grep -v '^ *+' conftest.er1 >conftest.err
22621 rm -f conftest.er1
22622 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022624 (exit $ac_status); } && {
22625 test -z "$ac_c_werror_flag" ||
22626 test ! -s conftest.err
22627 } && test -s conftest.$ac_objext; then
22628 ac_cv_have_decl_isinf=yes
22629else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022630 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022631sed 's/^/| /' conftest.$ac_ext >&5
22632
22633 ac_cv_have_decl_isinf=no
22634fi
22635
22636rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22637fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022638{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isinf" >&5
22639echo "${ECHO_T}$ac_cv_have_decl_isinf" >&6; }
22640if test $ac_cv_have_decl_isinf = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022641
22642cat >>confdefs.h <<_ACEOF
22643#define HAVE_DECL_ISINF 1
22644_ACEOF
22645
22646
22647else
22648 cat >>confdefs.h <<_ACEOF
22649#define HAVE_DECL_ISINF 0
22650_ACEOF
22651
22652
22653fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022654{ echo "$as_me:$LINENO: checking whether isnan is declared" >&5
22655echo $ECHO_N "checking whether isnan is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022656if test "${ac_cv_have_decl_isnan+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022657 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022658else
22659 cat >conftest.$ac_ext <<_ACEOF
22660/* confdefs.h. */
22661_ACEOF
22662cat confdefs.h >>conftest.$ac_ext
22663cat >>conftest.$ac_ext <<_ACEOF
22664/* end confdefs.h. */
22665#include <math.h>
22666
22667int
22668main ()
22669{
22670#ifndef isnan
22671 (void) isnan;
22672#endif
22673
22674 ;
22675 return 0;
22676}
22677_ACEOF
22678rm -f conftest.$ac_objext
22679if { (ac_try="$ac_compile"
22680case "(($ac_try" in
22681 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22682 *) ac_try_echo=$ac_try;;
22683esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022684eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022685 (eval "$ac_compile") 2>conftest.er1
22686 ac_status=$?
22687 grep -v '^ *+' conftest.er1 >conftest.err
22688 rm -f conftest.er1
22689 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022691 (exit $ac_status); } && {
22692 test -z "$ac_c_werror_flag" ||
22693 test ! -s conftest.err
22694 } && test -s conftest.$ac_objext; then
22695 ac_cv_have_decl_isnan=yes
22696else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022697 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022698sed 's/^/| /' conftest.$ac_ext >&5
22699
22700 ac_cv_have_decl_isnan=no
22701fi
22702
22703rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22704fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022705{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isnan" >&5
22706echo "${ECHO_T}$ac_cv_have_decl_isnan" >&6; }
22707if test $ac_cv_have_decl_isnan = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022708
22709cat >>confdefs.h <<_ACEOF
22710#define HAVE_DECL_ISNAN 1
22711_ACEOF
22712
22713
22714else
22715 cat >>confdefs.h <<_ACEOF
22716#define HAVE_DECL_ISNAN 0
22717_ACEOF
22718
22719
22720fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022721{ echo "$as_me:$LINENO: checking whether isfinite is declared" >&5
22722echo $ECHO_N "checking whether isfinite is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022723if test "${ac_cv_have_decl_isfinite+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022724 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022725else
22726 cat >conftest.$ac_ext <<_ACEOF
22727/* confdefs.h. */
22728_ACEOF
22729cat confdefs.h >>conftest.$ac_ext
22730cat >>conftest.$ac_ext <<_ACEOF
22731/* end confdefs.h. */
22732#include <math.h>
22733
22734int
22735main ()
22736{
22737#ifndef isfinite
22738 (void) isfinite;
22739#endif
22740
22741 ;
22742 return 0;
22743}
22744_ACEOF
22745rm -f conftest.$ac_objext
22746if { (ac_try="$ac_compile"
22747case "(($ac_try" in
22748 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22749 *) ac_try_echo=$ac_try;;
22750esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022751eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022752 (eval "$ac_compile") 2>conftest.er1
22753 ac_status=$?
22754 grep -v '^ *+' conftest.er1 >conftest.err
22755 rm -f conftest.er1
22756 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022757 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022758 (exit $ac_status); } && {
22759 test -z "$ac_c_werror_flag" ||
22760 test ! -s conftest.err
22761 } && test -s conftest.$ac_objext; then
22762 ac_cv_have_decl_isfinite=yes
22763else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022764 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022765sed 's/^/| /' conftest.$ac_ext >&5
22766
22767 ac_cv_have_decl_isfinite=no
22768fi
22769
22770rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22771fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022772{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isfinite" >&5
22773echo "${ECHO_T}$ac_cv_have_decl_isfinite" >&6; }
22774if test $ac_cv_have_decl_isfinite = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022775
22776cat >>confdefs.h <<_ACEOF
22777#define HAVE_DECL_ISFINITE 1
22778_ACEOF
22779
22780
22781else
22782 cat >>confdefs.h <<_ACEOF
22783#define HAVE_DECL_ISFINITE 0
22784_ACEOF
22785
22786
22787fi
22788
22789
Christian Heimes99170a52007-12-19 02:07:34 +000022790
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000022791LIBS=$LIBS_SAVE
22792
Mark Dickinson875ada42009-11-28 12:52:39 +000022793# For multiprocessing module, check that sem_open
22794# actually works. For FreeBSD versions <= 7.2,
22795# the kernel module that provides POSIX semaphores
22796# isn't loaded by default, so an attempt to call
22797# sem_open results in a 'Signal 12' error.
22798{ echo "$as_me:$LINENO: checking whether POSIX semaphores are enabled" >&5
22799echo $ECHO_N "checking whether POSIX semaphores are enabled... $ECHO_C" >&6; }
22800if test "${ac_cv_posix_semaphores_enabled+set}" = set; then
22801 echo $ECHO_N "(cached) $ECHO_C" >&6
22802else
22803 if test "$cross_compiling" = yes; then
22804 ac_cv_posix_semaphores_enabled=yes
22805else
22806 cat >conftest.$ac_ext <<_ACEOF
22807/* confdefs.h. */
22808_ACEOF
22809cat confdefs.h >>conftest.$ac_ext
22810cat >>conftest.$ac_ext <<_ACEOF
22811/* end confdefs.h. */
22812
22813#include <unistd.h>
22814#include <fcntl.h>
22815#include <stdio.h>
22816#include <semaphore.h>
22817#include <sys/stat.h>
22818
22819int main(void) {
22820 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
22821 if (a == SEM_FAILED) {
22822 perror("sem_open");
22823 return 1;
22824 }
22825 sem_close(a);
Mark Dickinson62eda4d2009-12-13 21:18:16 +000022826 sem_unlink("/autoconf");
Mark Dickinson875ada42009-11-28 12:52:39 +000022827 return 0;
22828}
22829
22830_ACEOF
22831rm -f conftest$ac_exeext
22832if { (ac_try="$ac_link"
22833case "(($ac_try" in
22834 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22835 *) ac_try_echo=$ac_try;;
22836esac
22837eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22838 (eval "$ac_link") 2>&5
22839 ac_status=$?
22840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22841 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22842 { (case "(($ac_try" in
22843 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22844 *) ac_try_echo=$ac_try;;
22845esac
22846eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22847 (eval "$ac_try") 2>&5
22848 ac_status=$?
22849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22850 (exit $ac_status); }; }; then
22851 ac_cv_posix_semaphores_enabled=yes
22852else
22853 echo "$as_me: program exited with status $ac_status" >&5
22854echo "$as_me: failed program was:" >&5
22855sed 's/^/| /' conftest.$ac_ext >&5
22856
22857( exit $ac_status )
22858ac_cv_posix_semaphores_enabled=no
22859fi
22860rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22861fi
22862
22863
22864
22865fi
22866
22867{ echo "$as_me:$LINENO: result: $ac_cv_posix_semaphores_enabled" >&5
22868echo "${ECHO_T}$ac_cv_posix_semaphores_enabled" >&6; }
22869if test $ac_cv_posix_semaphores_enabled = no
22870then
22871
22872cat >>confdefs.h <<\_ACEOF
22873#define POSIX_SEMAPHORES_NOT_ENABLED 1
22874_ACEOF
22875
22876fi
22877
Mark Dickinson10683072009-04-18 21:18:19 +000022878# Multiprocessing check for broken sem_getvalue
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022879{ echo "$as_me:$LINENO: checking for broken sem_getvalue" >&5
22880echo $ECHO_N "checking for broken sem_getvalue... $ECHO_C" >&6; }
Mark Dickinson10683072009-04-18 21:18:19 +000022881if test "$cross_compiling" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022882 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
Mark Dickinson10683072009-04-18 21:18:19 +000022883See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022884echo "$as_me: error: cannot run test program while cross compiling
Mark Dickinson10683072009-04-18 21:18:19 +000022885See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022886 { (exit 1); exit 1; }; }
Mark Dickinson10683072009-04-18 21:18:19 +000022887else
22888 cat >conftest.$ac_ext <<_ACEOF
22889/* confdefs.h. */
22890_ACEOF
22891cat confdefs.h >>conftest.$ac_ext
22892cat >>conftest.$ac_ext <<_ACEOF
22893/* end confdefs.h. */
22894
22895#include <unistd.h>
22896#include <fcntl.h>
22897#include <stdio.h>
22898#include <semaphore.h>
22899#include <sys/stat.h>
22900
22901int main(void){
Mark Dickinson62eda4d2009-12-13 21:18:16 +000022902 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000022903 int count;
22904 int res;
22905 if(a==SEM_FAILED){
22906 perror("sem_open");
22907 return 1;
22908
22909 }
22910 res = sem_getvalue(a, &count);
22911 sem_close(a);
Mark Dickinson62eda4d2009-12-13 21:18:16 +000022912 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000022913 return res==-1 ? 1 : 0;
22914}
22915
22916
22917_ACEOF
22918rm -f conftest$ac_exeext
22919if { (ac_try="$ac_link"
22920case "(($ac_try" in
22921 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22922 *) ac_try_echo=$ac_try;;
22923esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022924eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson10683072009-04-18 21:18:19 +000022925 (eval "$ac_link") 2>&5
22926 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000022928 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22929 { (case "(($ac_try" in
22930 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22931 *) ac_try_echo=$ac_try;;
22932esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022933eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson10683072009-04-18 21:18:19 +000022934 (eval "$ac_try") 2>&5
22935 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000022937 (exit $ac_status); }; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022938 { echo "$as_me:$LINENO: result: no" >&5
22939echo "${ECHO_T}no" >&6; }
Mark Dickinson10683072009-04-18 21:18:19 +000022940else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022941 echo "$as_me: program exited with status $ac_status" >&5
22942echo "$as_me: failed program was:" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000022943sed 's/^/| /' conftest.$ac_ext >&5
22944
22945( exit $ac_status )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022946{ echo "$as_me:$LINENO: result: yes" >&5
22947echo "${ECHO_T}yes" >&6; }
Mark Dickinson10683072009-04-18 21:18:19 +000022948
22949cat >>confdefs.h <<\_ACEOF
22950#define HAVE_BROKEN_SEM_GETVALUE 1
22951_ACEOF
22952
22953
22954fi
22955rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22956fi
22957
22958
22959
Mark Dickinsonbd792642009-03-18 20:06:12 +000022960# determine what size digit to use for Python's longs
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022961{ echo "$as_me:$LINENO: checking digit size for Python's longs" >&5
22962echo $ECHO_N "checking digit size for Python's longs... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000022963# Check whether --enable-big-digits was given.
22964if test "${enable_big_digits+set}" = set; then
22965 enableval=$enable_big_digits; case $enable_big_digits in
22966yes)
22967 enable_big_digits=30 ;;
22968no)
22969 enable_big_digits=15 ;;
2297015|30)
22971 ;;
22972*)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022973 { { echo "$as_me:$LINENO: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&5
22974echo "$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 +000022975 { (exit 1); exit 1; }; } ;;
22976esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022977{ echo "$as_me:$LINENO: result: $enable_big_digits" >&5
22978echo "${ECHO_T}$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000022979
22980cat >>confdefs.h <<_ACEOF
22981#define PYLONG_BITS_IN_DIGIT $enable_big_digits
22982_ACEOF
22983
22984
22985else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022986 { echo "$as_me:$LINENO: result: no value specified" >&5
22987echo "${ECHO_T}no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000022988fi
22989
22990
Guido van Rossumef2255b2000-03-10 22:30:29 +000022991# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000022992if test "${ac_cv_header_wchar_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022993 { echo "$as_me:$LINENO: checking for wchar.h" >&5
22994echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022995if test "${ac_cv_header_wchar_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022996 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000022997fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022998{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
22999echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000023000else
Martin v. Löwis11437992002-04-12 09:54:03 +000023001 # Is the header compilable?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023002{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
23003echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023004cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023005/* confdefs.h. */
23006_ACEOF
23007cat confdefs.h >>conftest.$ac_ext
23008cat >>conftest.$ac_ext <<_ACEOF
23009/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023010$ac_includes_default
23011#include <wchar.h>
23012_ACEOF
23013rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023014if { (ac_try="$ac_compile"
23015case "(($ac_try" in
23016 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23017 *) ac_try_echo=$ac_try;;
23018esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023019eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023020 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023021 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023022 grep -v '^ *+' conftest.er1 >conftest.err
23023 rm -f conftest.er1
23024 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023026 (exit $ac_status); } && {
23027 test -z "$ac_c_werror_flag" ||
23028 test ! -s conftest.err
23029 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023030 ac_header_compiler=yes
23031else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023032 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023033sed 's/^/| /' conftest.$ac_ext >&5
23034
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023035 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000023036fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023037
23038rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023039{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
23040echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023041
23042# Is the header present?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023043{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
23044echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023045cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023046/* confdefs.h. */
23047_ACEOF
23048cat confdefs.h >>conftest.$ac_ext
23049cat >>conftest.$ac_ext <<_ACEOF
23050/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000023051#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023052_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023053if { (ac_try="$ac_cpp conftest.$ac_ext"
23054case "(($ac_try" in
23055 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23056 *) ac_try_echo=$ac_try;;
23057esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023058eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023059 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023060 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000023061 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000023062 rm -f conftest.er1
23063 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023065 (exit $ac_status); } >/dev/null && {
23066 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23067 test ! -s conftest.err
23068 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023069 ac_header_preproc=yes
23070else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023071 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023072sed 's/^/| /' conftest.$ac_ext >&5
23073
Martin v. Löwis11437992002-04-12 09:54:03 +000023074 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000023075fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023076
Martin v. Löwis11437992002-04-12 09:54:03 +000023077rm -f conftest.err conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023078{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
23079echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023080
23081# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023082case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
23083 yes:no: )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023084 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
23085echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
23086 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
23087echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000023088 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023089 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000023090 no:yes:* )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023091 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
23092echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
23093 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
23094echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
23095 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
23096echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
23097 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
23098echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
23099 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
23100echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
23101 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
23102echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023103 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000023104## -------------------------------------- ##
23105## Report this to http://bugs.python.org/ ##
23106## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000023107_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023108 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000023109 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000023110esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023111{ echo "$as_me:$LINENO: checking for wchar.h" >&5
23112echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023113if test "${ac_cv_header_wchar_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023114 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000023115else
23116 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000023117fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023118{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
23119echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023120
23121fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023122if test $ac_cv_header_wchar_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023123
23124
23125cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000023126#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023127_ACEOF
23128
Martin v. Löwisc45929e2002-04-06 10:10:49 +000023129 wchar_h="yes"
23130
Guido van Rossumef2255b2000-03-10 22:30:29 +000023131else
Martin v. Löwis11437992002-04-12 09:54:03 +000023132 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000023133
23134fi
23135
Michael W. Hudson54241132001-12-07 15:38:26 +000023136
Martin v. Löwis11437992002-04-12 09:54:03 +000023137
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023138# determine wchar_t size
23139if test "$wchar_h" = yes
23140then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023141 { echo "$as_me:$LINENO: checking for wchar_t" >&5
23142echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
23143if test "${ac_cv_type_wchar_t+set}" = set; then
23144 echo $ECHO_N "(cached) $ECHO_C" >&6
23145else
23146 cat >conftest.$ac_ext <<_ACEOF
23147/* confdefs.h. */
23148_ACEOF
23149cat confdefs.h >>conftest.$ac_ext
23150cat >>conftest.$ac_ext <<_ACEOF
23151/* end confdefs.h. */
23152#include <wchar.h>
23153
23154typedef wchar_t ac__type_new_;
23155int
23156main ()
23157{
23158if ((ac__type_new_ *) 0)
23159 return 0;
23160if (sizeof (ac__type_new_))
23161 return 0;
23162 ;
23163 return 0;
23164}
23165_ACEOF
23166rm -f conftest.$ac_objext
23167if { (ac_try="$ac_compile"
23168case "(($ac_try" in
23169 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23170 *) ac_try_echo=$ac_try;;
23171esac
23172eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23173 (eval "$ac_compile") 2>conftest.er1
23174 ac_status=$?
23175 grep -v '^ *+' conftest.er1 >conftest.err
23176 rm -f conftest.er1
23177 cat conftest.err >&5
23178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23179 (exit $ac_status); } && {
23180 test -z "$ac_c_werror_flag" ||
23181 test ! -s conftest.err
23182 } && test -s conftest.$ac_objext; then
23183 ac_cv_type_wchar_t=yes
23184else
23185 echo "$as_me: failed program was:" >&5
23186sed 's/^/| /' conftest.$ac_ext >&5
23187
23188 ac_cv_type_wchar_t=no
23189fi
23190
23191rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23192fi
23193{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
23194echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
23195
23196# The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023197# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
23198# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
23199# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023200{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
23201echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023202if test "${ac_cv_sizeof_wchar_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023203 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000023204else
Martin v. Löwis11437992002-04-12 09:54:03 +000023205 if test "$cross_compiling" = yes; then
23206 # Depending upon the size, compute the lo and hi bounds.
23207cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023208/* confdefs.h. */
23209_ACEOF
23210cat confdefs.h >>conftest.$ac_ext
23211cat >>conftest.$ac_ext <<_ACEOF
23212/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023213#include <wchar.h>
23214
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023215 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000023216int
23217main ()
23218{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023219static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000023220test_array [0] = 0
23221
23222 ;
23223 return 0;
23224}
23225_ACEOF
23226rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023227if { (ac_try="$ac_compile"
23228case "(($ac_try" in
23229 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23230 *) ac_try_echo=$ac_try;;
23231esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023232eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023233 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023234 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023235 grep -v '^ *+' conftest.er1 >conftest.err
23236 rm -f conftest.er1
23237 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023238 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023239 (exit $ac_status); } && {
23240 test -z "$ac_c_werror_flag" ||
23241 test ! -s conftest.err
23242 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023243 ac_lo=0 ac_mid=0
23244 while :; do
23245 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023246/* confdefs.h. */
23247_ACEOF
23248cat confdefs.h >>conftest.$ac_ext
23249cat >>conftest.$ac_ext <<_ACEOF
23250/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023251#include <wchar.h>
23252
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023253 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000023254int
23255main ()
23256{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023257static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000023258test_array [0] = 0
23259
23260 ;
23261 return 0;
23262}
23263_ACEOF
23264rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023265if { (ac_try="$ac_compile"
23266case "(($ac_try" in
23267 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23268 *) ac_try_echo=$ac_try;;
23269esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023270eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023271 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023272 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023273 grep -v '^ *+' conftest.er1 >conftest.err
23274 rm -f conftest.er1
23275 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023277 (exit $ac_status); } && {
23278 test -z "$ac_c_werror_flag" ||
23279 test ! -s conftest.err
23280 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023281 ac_hi=$ac_mid; break
23282else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023283 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023284sed 's/^/| /' conftest.$ac_ext >&5
23285
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023286 ac_lo=`expr $ac_mid + 1`
23287 if test $ac_lo -le $ac_mid; then
23288 ac_lo= ac_hi=
23289 break
23290 fi
23291 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000023292fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023293
23294rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023295 done
23296else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023297 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023298sed 's/^/| /' conftest.$ac_ext >&5
23299
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023300 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023301/* confdefs.h. */
23302_ACEOF
23303cat confdefs.h >>conftest.$ac_ext
23304cat >>conftest.$ac_ext <<_ACEOF
23305/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023306#include <wchar.h>
23307
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023308 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000023309int
23310main ()
23311{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023312static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000023313test_array [0] = 0
23314
23315 ;
23316 return 0;
23317}
23318_ACEOF
23319rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023320if { (ac_try="$ac_compile"
23321case "(($ac_try" in
23322 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23323 *) ac_try_echo=$ac_try;;
23324esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023325eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023326 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023327 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023328 grep -v '^ *+' conftest.er1 >conftest.err
23329 rm -f conftest.er1
23330 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023332 (exit $ac_status); } && {
23333 test -z "$ac_c_werror_flag" ||
23334 test ! -s conftest.err
23335 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023336 ac_hi=-1 ac_mid=-1
23337 while :; do
23338 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023339/* confdefs.h. */
23340_ACEOF
23341cat confdefs.h >>conftest.$ac_ext
23342cat >>conftest.$ac_ext <<_ACEOF
23343/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023344#include <wchar.h>
23345
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023346 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000023347int
23348main ()
23349{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023350static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000023351test_array [0] = 0
23352
23353 ;
23354 return 0;
23355}
23356_ACEOF
23357rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023358if { (ac_try="$ac_compile"
23359case "(($ac_try" in
23360 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23361 *) ac_try_echo=$ac_try;;
23362esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023363eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023364 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023365 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023366 grep -v '^ *+' conftest.er1 >conftest.err
23367 rm -f conftest.er1
23368 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023369 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023370 (exit $ac_status); } && {
23371 test -z "$ac_c_werror_flag" ||
23372 test ! -s conftest.err
23373 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023374 ac_lo=$ac_mid; break
23375else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023376 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023377sed 's/^/| /' conftest.$ac_ext >&5
23378
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023379 ac_hi=`expr '(' $ac_mid ')' - 1`
23380 if test $ac_mid -le $ac_hi; then
23381 ac_lo= ac_hi=
23382 break
23383 fi
23384 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000023385fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023386
23387rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023388 done
23389else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023390 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023391sed 's/^/| /' conftest.$ac_ext >&5
23392
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023393 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000023394fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023395
23396rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023397fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023398
23399rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023400# Binary search between lo and hi bounds.
23401while test "x$ac_lo" != "x$ac_hi"; do
23402 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
23403 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023404/* confdefs.h. */
23405_ACEOF
23406cat confdefs.h >>conftest.$ac_ext
23407cat >>conftest.$ac_ext <<_ACEOF
23408/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023409#include <wchar.h>
23410
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023411 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000023412int
23413main ()
23414{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023415static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000023416test_array [0] = 0
23417
23418 ;
23419 return 0;
23420}
23421_ACEOF
23422rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023423if { (ac_try="$ac_compile"
23424case "(($ac_try" in
23425 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23426 *) ac_try_echo=$ac_try;;
23427esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023428eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023429 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023430 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023431 grep -v '^ *+' conftest.er1 >conftest.err
23432 rm -f conftest.er1
23433 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023435 (exit $ac_status); } && {
23436 test -z "$ac_c_werror_flag" ||
23437 test ! -s conftest.err
23438 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023439 ac_hi=$ac_mid
23440else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023441 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023442sed 's/^/| /' conftest.$ac_ext >&5
23443
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023444 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000023445fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023446
23447rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023448done
23449case $ac_lo in
23450?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023451'') if test "$ac_cv_type_wchar_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023452 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000023453See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023454echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000023455See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023456 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023457 else
23458 ac_cv_sizeof_wchar_t=0
23459 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000023460esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023461else
Martin v. Löwis11437992002-04-12 09:54:03 +000023462 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023463/* confdefs.h. */
23464_ACEOF
23465cat confdefs.h >>conftest.$ac_ext
23466cat >>conftest.$ac_ext <<_ACEOF
23467/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023468#include <wchar.h>
23469
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023470 typedef wchar_t ac__type_sizeof_;
23471static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
23472static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000023473#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023474#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023475int
23476main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023477{
Martin v. Löwis11437992002-04-12 09:54:03 +000023478
23479 FILE *f = fopen ("conftest.val", "w");
23480 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023481 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023482 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000023483 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023484 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023485 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023486 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023487 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000023488 }
23489 else
23490 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023491 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023492 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023493 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023494 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000023495 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023496 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000023497
23498 ;
23499 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000023500}
Martin v. Löwis11437992002-04-12 09:54:03 +000023501_ACEOF
23502rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023503if { (ac_try="$ac_link"
23504case "(($ac_try" in
23505 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23506 *) ac_try_echo=$ac_try;;
23507esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023508eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023509 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023510 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023512 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023513 { (case "(($ac_try" in
23514 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23515 *) ac_try_echo=$ac_try;;
23516esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023517eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023518 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023519 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023520 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023521 (exit $ac_status); }; }; then
23522 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000023523else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023524 echo "$as_me: program exited with status $ac_status" >&5
23525echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023526sed 's/^/| /' conftest.$ac_ext >&5
23527
Martin v. Löwis11437992002-04-12 09:54:03 +000023528( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023529if test "$ac_cv_type_wchar_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023530 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000023531See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023532echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000023533See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023534 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023535 else
23536 ac_cv_sizeof_wchar_t=0
23537 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000023538fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023539rm -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 +000023540fi
23541rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000023542fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023543{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
23544echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023545
23546
23547
Martin v. Löwis11437992002-04-12 09:54:03 +000023548cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023549#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000023550_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023551
Michael W. Hudson54241132001-12-07 15:38:26 +000023552
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023553fi
23554
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023555{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
23556echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023557have_ucs4_tcl=no
23558cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023559/* confdefs.h. */
23560_ACEOF
23561cat confdefs.h >>conftest.$ac_ext
23562cat >>conftest.$ac_ext <<_ACEOF
23563/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023564
23565#include <tcl.h>
23566#if TCL_UTF_MAX != 6
23567# error "NOT UCS4_TCL"
23568#endif
23569int
23570main ()
23571{
23572
23573 ;
23574 return 0;
23575}
23576_ACEOF
23577rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023578if { (ac_try="$ac_compile"
23579case "(($ac_try" in
23580 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23581 *) ac_try_echo=$ac_try;;
23582esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023583eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023584 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023585 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023586 grep -v '^ *+' conftest.er1 >conftest.err
23587 rm -f conftest.er1
23588 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023590 (exit $ac_status); } && {
23591 test -z "$ac_c_werror_flag" ||
23592 test ! -s conftest.err
23593 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023594
23595
23596cat >>confdefs.h <<\_ACEOF
23597#define HAVE_UCS4_TCL 1
23598_ACEOF
23599
23600 have_ucs4_tcl=yes
23601
23602else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023603 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023604sed 's/^/| /' conftest.$ac_ext >&5
23605
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023606
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023607fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023608
23609rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023610{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
23611echo "${ECHO_T}$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023612
Skip Montanaro6dead952003-09-25 14:50:04 +000023613# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023614if test "$wchar_h" = yes
23615then
23616 # check whether wchar_t is signed or not
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023617 { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
23618echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023619 if test "${ac_cv_wchar_t_signed+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023620 echo $ECHO_N "(cached) $ECHO_C" >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023621else
23622
23623 if test "$cross_compiling" = yes; then
23624 ac_cv_wchar_t_signed=yes
23625else
23626 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023627/* confdefs.h. */
23628_ACEOF
23629cat confdefs.h >>conftest.$ac_ext
23630cat >>conftest.$ac_ext <<_ACEOF
23631/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023632
23633 #include <wchar.h>
23634 int main()
23635 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000023636 /* Success: exit code 0 */
23637 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023638 }
23639
23640_ACEOF
23641rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023642if { (ac_try="$ac_link"
23643case "(($ac_try" in
23644 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23645 *) ac_try_echo=$ac_try;;
23646esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023647eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023648 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023649 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023651 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023652 { (case "(($ac_try" in
23653 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23654 *) ac_try_echo=$ac_try;;
23655esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023656eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023657 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023658 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023660 (exit $ac_status); }; }; then
23661 ac_cv_wchar_t_signed=yes
23662else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023663 echo "$as_me: program exited with status $ac_status" >&5
23664echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023665sed 's/^/| /' conftest.$ac_ext >&5
23666
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023667( exit $ac_status )
23668ac_cv_wchar_t_signed=no
23669fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023670rm -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 +000023671fi
23672
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023673
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023674fi
23675
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023676 { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
23677echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023678fi
23679
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023680{ echo "$as_me:$LINENO: checking what type to use for str" >&5
23681echo $ECHO_N "checking what type to use for str... $ECHO_C" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000023682
23683# Check whether --with-wide-unicode was given.
23684if test "${with_wide_unicode+set}" = set; then
23685 withval=$with_wide_unicode;
23686if test "$withval" != no
23687then unicode_size="4"
23688else unicode_size="2"
23689fi
23690
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023691else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023692
Georg Brandl52d168a2008-01-07 18:10:24 +000023693case "$have_ucs4_tcl" in
23694 yes) unicode_size="4" ;;
23695 *) unicode_size="2" ;;
23696esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023697
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023698fi
23699
Martin v. Löwis0036cba2002-04-12 09:58:45 +000023700
23701
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023702
Georg Brandl52d168a2008-01-07 18:10:24 +000023703case "$unicode_size" in
23704 4) cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023705#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000023706_ACEOF
Georg Brandl52d168a2008-01-07 18:10:24 +000023707 ;;
23708 *) cat >>confdefs.h <<\_ACEOF
23709#define Py_UNICODE_SIZE 2
23710_ACEOF
23711 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023712esac
23713
Michael W. Hudson54241132001-12-07 15:38:26 +000023714
Martin v. Löwis11437992002-04-12 09:54:03 +000023715
23716
Georg Brandl52d168a2008-01-07 18:10:24 +000023717# wchar_t is only usable if it maps to an unsigned type
23718if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000023719 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000023720then
23721 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023722
Martin v. Löwis11437992002-04-12 09:54:03 +000023723cat >>confdefs.h <<\_ACEOF
23724#define HAVE_USABLE_WCHAR_T 1
23725_ACEOF
23726
Georg Brandl52d168a2008-01-07 18:10:24 +000023727 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023728#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000023729_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023730
Georg Brandl52d168a2008-01-07 18:10:24 +000023731elif test "$ac_cv_sizeof_short" = "$unicode_size"
23732then
23733 PY_UNICODE_TYPE="unsigned short"
23734 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023735#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000023736_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023737
Georg Brandl52d168a2008-01-07 18:10:24 +000023738elif test "$ac_cv_sizeof_long" = "$unicode_size"
23739then
23740 PY_UNICODE_TYPE="unsigned long"
23741 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023742#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000023743_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023744
Georg Brandl52d168a2008-01-07 18:10:24 +000023745else
23746 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023747fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023748{ echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
23749echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000023750
23751# check for endianness
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023752{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
23753echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023754if test "${ac_cv_c_bigendian+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023755 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000023756else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023757 # See if sys/param.h defines the BYTE_ORDER macro.
23758cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023759/* confdefs.h. */
23760_ACEOF
23761cat confdefs.h >>conftest.$ac_ext
23762cat >>conftest.$ac_ext <<_ACEOF
23763/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000023764#include <sys/types.h>
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023765#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000023766
Martin v. Löwis11437992002-04-12 09:54:03 +000023767int
23768main ()
23769{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023770#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
23771 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
23772 bogus endian macros
23773#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023774
23775 ;
23776 return 0;
23777}
23778_ACEOF
23779rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023780if { (ac_try="$ac_compile"
23781case "(($ac_try" in
23782 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23783 *) ac_try_echo=$ac_try;;
23784esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023785eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023786 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023787 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023788 grep -v '^ *+' conftest.er1 >conftest.err
23789 rm -f conftest.er1
23790 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023792 (exit $ac_status); } && {
23793 test -z "$ac_c_werror_flag" ||
23794 test ! -s conftest.err
23795 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000023796 # It does; now see whether it defined to BIG_ENDIAN or not.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023797cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023798/* confdefs.h. */
23799_ACEOF
23800cat confdefs.h >>conftest.$ac_ext
23801cat >>conftest.$ac_ext <<_ACEOF
23802/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000023803#include <sys/types.h>
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023804#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000023805
Martin v. Löwis11437992002-04-12 09:54:03 +000023806int
23807main ()
23808{
Guido van Rossumef2255b2000-03-10 22:30:29 +000023809#if BYTE_ORDER != BIG_ENDIAN
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023810 not big endian
23811#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023812
23813 ;
23814 return 0;
23815}
23816_ACEOF
23817rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023818if { (ac_try="$ac_compile"
23819case "(($ac_try" in
23820 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23821 *) ac_try_echo=$ac_try;;
23822esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023823eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023824 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023825 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023826 grep -v '^ *+' conftest.er1 >conftest.err
23827 rm -f conftest.er1
23828 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023829 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023830 (exit $ac_status); } && {
23831 test -z "$ac_c_werror_flag" ||
23832 test ! -s conftest.err
23833 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000023834 ac_cv_c_bigendian=yes
23835else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023836 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023837sed 's/^/| /' conftest.$ac_ext >&5
23838
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023839 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000023840fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023841
23842rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000023843else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023844 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023845sed 's/^/| /' conftest.$ac_ext >&5
23846
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023847 # It does not; compile a test program.
23848if test "$cross_compiling" = yes; then
23849 # try to guess the endianness by grepping values into an object file
23850 ac_cv_c_bigendian=unknown
23851 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023852/* confdefs.h. */
23853_ACEOF
23854cat confdefs.h >>conftest.$ac_ext
23855cat >>conftest.$ac_ext <<_ACEOF
23856/* end confdefs.h. */
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023857short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
23858short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
23859void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
23860short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
23861short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
23862void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023863int
23864main ()
23865{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023866 _ascii (); _ebcdic ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023867 ;
23868 return 0;
23869}
23870_ACEOF
23871rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023872if { (ac_try="$ac_compile"
23873case "(($ac_try" in
23874 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23875 *) ac_try_echo=$ac_try;;
23876esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023877eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023878 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023879 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023880 grep -v '^ *+' conftest.er1 >conftest.err
23881 rm -f conftest.er1
23882 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023883 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023884 (exit $ac_status); } && {
23885 test -z "$ac_c_werror_flag" ||
23886 test ! -s conftest.err
23887 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023888 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023889 ac_cv_c_bigendian=yes
Benjamin Petersona8332062009-09-11 22:36:27 +000023890fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023891if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
23892 if test "$ac_cv_c_bigendian" = unknown; then
23893 ac_cv_c_bigendian=no
23894 else
23895 # finding both strings is unlikely to happen, but who knows?
23896 ac_cv_c_bigendian=unknown
23897 fi
Benjamin Petersona8332062009-09-11 22:36:27 +000023898fi
Benjamin Petersona8332062009-09-11 22:36:27 +000023899else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023900 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023901sed 's/^/| /' conftest.$ac_ext >&5
23902
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023903
Martin v. Löwis11437992002-04-12 09:54:03 +000023904fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023905
23906rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023907else
23908 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023909/* confdefs.h. */
23910_ACEOF
23911cat confdefs.h >>conftest.$ac_ext
23912cat >>conftest.$ac_ext <<_ACEOF
23913/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023914$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000023915int
23916main ()
23917{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023918
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023919 /* Are we little or big endian? From Harbison&Steele. */
23920 union
23921 {
23922 long int l;
23923 char c[sizeof (long int)];
23924 } u;
23925 u.l = 1;
23926 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023927
23928 ;
23929 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000023930}
Martin v. Löwis11437992002-04-12 09:54:03 +000023931_ACEOF
23932rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023933if { (ac_try="$ac_link"
23934case "(($ac_try" in
23935 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23936 *) ac_try_echo=$ac_try;;
23937esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023938eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023939 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023940 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023942 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023943 { (case "(($ac_try" in
23944 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23945 *) ac_try_echo=$ac_try;;
23946esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023947eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023948 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023949 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023951 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000023952 ac_cv_c_bigendian=no
23953else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023954 echo "$as_me: program exited with status $ac_status" >&5
23955echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023956sed 's/^/| /' conftest.$ac_ext >&5
23957
Martin v. Löwis11437992002-04-12 09:54:03 +000023958( exit $ac_status )
23959ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000023960fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023961rm -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 +000023962fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023963
23964
Martin v. Löwis11437992002-04-12 09:54:03 +000023965fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023966
23967rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23968fi
23969{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
23970echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
23971case $ac_cv_c_bigendian in
23972 yes)
Benjamin Petersona8332062009-09-11 22:36:27 +000023973
23974cat >>confdefs.h <<\_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023975#define WORDS_BIGENDIAN 1
Benjamin Petersona8332062009-09-11 22:36:27 +000023976_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023977 ;;
23978 no)
23979 ;;
23980 *)
23981 { { echo "$as_me:$LINENO: error: unknown endianness
23982presetting ac_cv_c_bigendian=no (or yes) will help" >&5
23983echo "$as_me: error: unknown endianness
23984presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023985 { (exit 1); exit 1; }; } ;;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023986esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000023987
Michael W. Hudson54241132001-12-07 15:38:26 +000023988
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023989# Check whether right shifting a negative integer extends the sign bit
23990# or fills with zeros (like the Cray J90, according to Tim Peters).
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023991{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
23992echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023993if test "${ac_cv_rshift_extends_sign+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023994 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000023995else
Martin v. Löwis11437992002-04-12 09:54:03 +000023996
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023997if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000023998 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023999else
Martin v. Löwis11437992002-04-12 09:54:03 +000024000 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024001/* confdefs.h. */
24002_ACEOF
24003cat confdefs.h >>conftest.$ac_ext
24004cat >>conftest.$ac_ext <<_ACEOF
24005/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024006
24007int main()
24008{
Vladimir Marangozova6180282000-07-12 05:05:06 +000024009 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024010}
24011
Martin v. Löwis11437992002-04-12 09:54:03 +000024012_ACEOF
24013rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024014if { (ac_try="$ac_link"
24015case "(($ac_try" in
24016 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24017 *) ac_try_echo=$ac_try;;
24018esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024019eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024020 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024021 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024023 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024024 { (case "(($ac_try" in
24025 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24026 *) ac_try_echo=$ac_try;;
24027esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024028eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024029 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024030 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024032 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000024033 ac_cv_rshift_extends_sign=yes
24034else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024035 echo "$as_me: program exited with status $ac_status" >&5
24036echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024037sed 's/^/| /' conftest.$ac_ext >&5
24038
Martin v. Löwis11437992002-04-12 09:54:03 +000024039( exit $ac_status )
24040ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000024041fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024042rm -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 +000024043fi
24044
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024045
24046fi
24047
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024048{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
24049echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000024050if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024051then
Martin v. Löwis11437992002-04-12 09:54:03 +000024052
24053cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024054#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024055_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024056
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024057fi
24058
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024059# check for getc_unlocked and related locking functions
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024060{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
24061echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024062if test "${ac_cv_have_getc_unlocked+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024063 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024064else
Martin v. Löwis11437992002-04-12 09:54:03 +000024065
24066cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024067/* confdefs.h. */
24068_ACEOF
24069cat confdefs.h >>conftest.$ac_ext
24070cat >>conftest.$ac_ext <<_ACEOF
24071/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024072#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024073int
24074main ()
24075{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024076
24077 FILE *f = fopen("/dev/null", "r");
24078 flockfile(f);
24079 getc_unlocked(f);
24080 funlockfile(f);
24081
Martin v. Löwis11437992002-04-12 09:54:03 +000024082 ;
24083 return 0;
24084}
24085_ACEOF
24086rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024087if { (ac_try="$ac_link"
24088case "(($ac_try" in
24089 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24090 *) ac_try_echo=$ac_try;;
24091esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024092eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024093 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024094 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024095 grep -v '^ *+' conftest.er1 >conftest.err
24096 rm -f conftest.er1
24097 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024099 (exit $ac_status); } && {
24100 test -z "$ac_c_werror_flag" ||
24101 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024102 } && test -s conftest$ac_exeext &&
24103 $as_test_x conftest$ac_exeext; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024104 ac_cv_have_getc_unlocked=yes
24105else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024106 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024107sed 's/^/| /' conftest.$ac_ext >&5
24108
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024109 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024110fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024111
24112rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024113 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024114fi
24115
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024116{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
24117echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024118if test "$ac_cv_have_getc_unlocked" = yes
24119then
Martin v. Löwis11437992002-04-12 09:54:03 +000024120
24121cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024122#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024123_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024124
24125fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024126
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024127# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000024128# save the value of LIBS so we don't actually link Python with readline
24129LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024130
Gregory P. Smith18820942008-09-07 06:24:49 +000024131# On some systems we need to link readline to a termcap compatible
24132# library. NOTE: Keep the precedence of listed libraries synchronised
24133# with setup.py.
24134py_cv_lib_readline=no
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024135{ echo "$as_me:$LINENO: checking how to link readline libs" >&5
24136echo $ECHO_N "checking how to link readline libs... $ECHO_C" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000024137for py_libtermcap in "" ncursesw ncurses curses termcap; do
24138 if test -z "$py_libtermcap"; then
24139 READLINE_LIBS="-lreadline"
24140 else
24141 READLINE_LIBS="-lreadline -l$py_libtermcap"
24142 fi
24143 LIBS="$READLINE_LIBS $LIBS_no_readline"
24144 cat >conftest.$ac_ext <<_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024145/* confdefs.h. */
24146_ACEOF
24147cat confdefs.h >>conftest.$ac_ext
24148cat >>conftest.$ac_ext <<_ACEOF
24149/* end confdefs.h. */
24150
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024151/* Override any GCC internal prototype to avoid an error.
24152 Use char because int might match the return type of a GCC
24153 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024154#ifdef __cplusplus
24155extern "C"
24156#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024157char readline ();
24158int
24159main ()
24160{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024161return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024162 ;
24163 return 0;
24164}
24165_ACEOF
24166rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024167if { (ac_try="$ac_link"
24168case "(($ac_try" in
24169 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24170 *) ac_try_echo=$ac_try;;
24171esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024172eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024173 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024174 ac_status=$?
24175 grep -v '^ *+' conftest.er1 >conftest.err
24176 rm -f conftest.er1
24177 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024179 (exit $ac_status); } && {
24180 test -z "$ac_c_werror_flag" ||
24181 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024182 } && test -s conftest$ac_exeext &&
24183 $as_test_x conftest$ac_exeext; then
Gregory P. Smith18820942008-09-07 06:24:49 +000024184 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024185else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024186 echo "$as_me: failed program was:" >&5
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024187sed 's/^/| /' conftest.$ac_ext >&5
24188
Gregory P. Smith18820942008-09-07 06:24:49 +000024189
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024190fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024191
24192rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024193 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000024194 if test $py_cv_lib_readline = yes; then
24195 break
24196 fi
24197done
24198# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
24199#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000024200if test $py_cv_lib_readline = no; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024201 { echo "$as_me:$LINENO: result: none" >&5
24202echo "${ECHO_T}none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000024203else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024204 { echo "$as_me:$LINENO: result: $READLINE_LIBS" >&5
24205echo "${ECHO_T}$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000024206
24207cat >>confdefs.h <<\_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024208#define HAVE_LIBREADLINE 1
24209_ACEOF
24210
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024211fi
24212
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024213# check for readline 2.1
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024214{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
24215echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024216if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024217 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024218else
24219 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000024220LIBS="-lreadline $READLINE_LIBS $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024221cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024222/* confdefs.h. */
24223_ACEOF
24224cat confdefs.h >>conftest.$ac_ext
24225cat >>conftest.$ac_ext <<_ACEOF
24226/* end confdefs.h. */
24227
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024228/* Override any GCC internal prototype to avoid an error.
24229 Use char because int might match the return type of a GCC
24230 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024231#ifdef __cplusplus
24232extern "C"
24233#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024234char rl_callback_handler_install ();
24235int
24236main ()
24237{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024238return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024239 ;
24240 return 0;
24241}
24242_ACEOF
24243rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024244if { (ac_try="$ac_link"
24245case "(($ac_try" in
24246 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24247 *) ac_try_echo=$ac_try;;
24248esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024249eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024250 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024251 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024252 grep -v '^ *+' conftest.er1 >conftest.err
24253 rm -f conftest.er1
24254 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024256 (exit $ac_status); } && {
24257 test -z "$ac_c_werror_flag" ||
24258 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024259 } && test -s conftest$ac_exeext &&
24260 $as_test_x conftest$ac_exeext; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024261 ac_cv_lib_readline_rl_callback_handler_install=yes
24262else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024263 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024264sed 's/^/| /' conftest.$ac_ext >&5
24265
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024266 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024267fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024268
24269rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024270 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024271LIBS=$ac_check_lib_save_LIBS
24272fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024273{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
24274echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
24275if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024276
24277cat >>confdefs.h <<\_ACEOF
24278#define HAVE_RL_CALLBACK 1
24279_ACEOF
24280
24281fi
24282
24283
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024284# check for readline 2.2
24285cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024286/* confdefs.h. */
24287_ACEOF
24288cat confdefs.h >>conftest.$ac_ext
24289cat >>conftest.$ac_ext <<_ACEOF
24290/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024291#include <readline/readline.h>
24292_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024293if { (ac_try="$ac_cpp conftest.$ac_ext"
24294case "(($ac_try" in
24295 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24296 *) ac_try_echo=$ac_try;;
24297esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024298eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024299 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024300 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000024301 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024302 rm -f conftest.er1
24303 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024305 (exit $ac_status); } >/dev/null && {
24306 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
24307 test ! -s conftest.err
24308 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024309 have_readline=yes
24310else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024311 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024312sed 's/^/| /' conftest.$ac_ext >&5
24313
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024314 have_readline=no
24315fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024316
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024317rm -f conftest.err conftest.$ac_ext
24318if test $have_readline = yes
24319then
24320 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024321/* confdefs.h. */
24322_ACEOF
24323cat confdefs.h >>conftest.$ac_ext
24324cat >>conftest.$ac_ext <<_ACEOF
24325/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024326#include <readline/readline.h>
24327
24328_ACEOF
24329if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000024330 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024331
24332cat >>confdefs.h <<\_ACEOF
24333#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
24334_ACEOF
24335
24336fi
Jesus Cea0f752ee2010-04-28 12:03:06 +000024337rm -f conftest*
Antoine Pitrou37276002009-10-26 19:32:51 +000024338
24339 cat >conftest.$ac_ext <<_ACEOF
24340/* confdefs.h. */
24341_ACEOF
24342cat confdefs.h >>conftest.$ac_ext
24343cat >>conftest.$ac_ext <<_ACEOF
24344/* end confdefs.h. */
24345#include <readline/readline.h>
24346
24347_ACEOF
24348if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
24349 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then
24350
24351cat >>confdefs.h <<\_ACEOF
24352#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1
24353_ACEOF
24354
24355fi
Jesus Cea0f752ee2010-04-28 12:03:06 +000024356rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024357
24358fi
24359
Martin v. Löwis0daad592001-09-30 21:09:59 +000024360# check for readline 4.0
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024361{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
24362echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024363if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024364 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000024365else
Martin v. Löwis11437992002-04-12 09:54:03 +000024366 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000024367LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000024368cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024369/* confdefs.h. */
24370_ACEOF
24371cat confdefs.h >>conftest.$ac_ext
24372cat >>conftest.$ac_ext <<_ACEOF
24373/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024374
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024375/* Override any GCC internal prototype to avoid an error.
24376 Use char because int might match the return type of a GCC
24377 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024378#ifdef __cplusplus
24379extern "C"
24380#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000024381char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000024382int
24383main ()
24384{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024385return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000024386 ;
24387 return 0;
24388}
24389_ACEOF
24390rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024391if { (ac_try="$ac_link"
24392case "(($ac_try" in
24393 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24394 *) ac_try_echo=$ac_try;;
24395esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024396eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024397 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024398 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024399 grep -v '^ *+' conftest.er1 >conftest.err
24400 rm -f conftest.er1
24401 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024403 (exit $ac_status); } && {
24404 test -z "$ac_c_werror_flag" ||
24405 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024406 } && test -s conftest$ac_exeext &&
24407 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024408 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000024409else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024410 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024411sed 's/^/| /' conftest.$ac_ext >&5
24412
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024413 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000024414fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024415
24416rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024417 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024418LIBS=$ac_check_lib_save_LIBS
24419fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024420{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
24421echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
24422if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000024423
Martin v. Löwis11437992002-04-12 09:54:03 +000024424cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000024425#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024426_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000024427
Martin v. Löwis0daad592001-09-30 21:09:59 +000024428fi
24429
Michael W. Hudson54241132001-12-07 15:38:26 +000024430
Thomas Wouters89d996e2007-09-08 17:39:28 +000024431# also in 4.0
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024432{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
24433echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; }
Thomas Wouters89d996e2007-09-08 17:39:28 +000024434if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024435 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000024436else
24437 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000024438LIBS="-lreadline $READLINE_LIBS $LIBS"
Thomas Wouters89d996e2007-09-08 17:39:28 +000024439cat >conftest.$ac_ext <<_ACEOF
24440/* confdefs.h. */
24441_ACEOF
24442cat confdefs.h >>conftest.$ac_ext
24443cat >>conftest.$ac_ext <<_ACEOF
24444/* end confdefs.h. */
24445
24446/* Override any GCC internal prototype to avoid an error.
24447 Use char because int might match the return type of a GCC
24448 builtin and then its argument prototype would still apply. */
24449#ifdef __cplusplus
24450extern "C"
24451#endif
24452char rl_completion_display_matches_hook ();
24453int
24454main ()
24455{
24456return rl_completion_display_matches_hook ();
24457 ;
24458 return 0;
24459}
24460_ACEOF
24461rm -f conftest.$ac_objext conftest$ac_exeext
24462if { (ac_try="$ac_link"
24463case "(($ac_try" in
24464 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24465 *) ac_try_echo=$ac_try;;
24466esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024467eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000024468 (eval "$ac_link") 2>conftest.er1
24469 ac_status=$?
24470 grep -v '^ *+' conftest.er1 >conftest.err
24471 rm -f conftest.er1
24472 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000024474 (exit $ac_status); } && {
24475 test -z "$ac_c_werror_flag" ||
24476 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024477 } && test -s conftest$ac_exeext &&
24478 $as_test_x conftest$ac_exeext; then
Thomas Wouters89d996e2007-09-08 17:39:28 +000024479 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
24480else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024481 echo "$as_me: failed program was:" >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000024482sed 's/^/| /' conftest.$ac_ext >&5
24483
24484 ac_cv_lib_readline_rl_completion_display_matches_hook=no
24485fi
24486
24487rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
24488 conftest$ac_exeext conftest.$ac_ext
24489LIBS=$ac_check_lib_save_LIBS
24490fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024491{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
24492echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
24493if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then
Thomas Wouters89d996e2007-09-08 17:39:28 +000024494
24495cat >>confdefs.h <<\_ACEOF
24496#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
24497_ACEOF
24498
24499fi
24500
24501
Martin v. Löwis0daad592001-09-30 21:09:59 +000024502# check for readline 4.2
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024503{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
24504echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024505if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024506 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000024507else
Martin v. Löwis11437992002-04-12 09:54:03 +000024508 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000024509LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000024510cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024511/* confdefs.h. */
24512_ACEOF
24513cat confdefs.h >>conftest.$ac_ext
24514cat >>conftest.$ac_ext <<_ACEOF
24515/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024516
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024517/* Override any GCC internal prototype to avoid an error.
24518 Use char because int might match the return type of a GCC
24519 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024520#ifdef __cplusplus
24521extern "C"
24522#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000024523char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000024524int
24525main ()
24526{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024527return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000024528 ;
24529 return 0;
24530}
24531_ACEOF
24532rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024533if { (ac_try="$ac_link"
24534case "(($ac_try" in
24535 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24536 *) ac_try_echo=$ac_try;;
24537esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024538eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024539 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024540 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024541 grep -v '^ *+' conftest.er1 >conftest.err
24542 rm -f conftest.er1
24543 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024545 (exit $ac_status); } && {
24546 test -z "$ac_c_werror_flag" ||
24547 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024548 } && test -s conftest$ac_exeext &&
24549 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024550 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000024551else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024552 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024553sed 's/^/| /' conftest.$ac_ext >&5
24554
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024555 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000024556fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024557
24558rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024559 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024560LIBS=$ac_check_lib_save_LIBS
24561fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024562{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
24563echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
24564if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000024565
Martin v. Löwis11437992002-04-12 09:54:03 +000024566cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000024567#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024568_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000024569
Guido van Rossum353ae582001-07-10 16:45:32 +000024570fi
24571
Jack Jansendd19cf82001-12-06 22:36:17 +000024572
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024573# also in readline 4.2
24574cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024575/* confdefs.h. */
24576_ACEOF
24577cat confdefs.h >>conftest.$ac_ext
24578cat >>conftest.$ac_ext <<_ACEOF
24579/* end confdefs.h. */
24580#include <readline/readline.h>
24581_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024582if { (ac_try="$ac_cpp conftest.$ac_ext"
24583case "(($ac_try" in
24584 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24585 *) ac_try_echo=$ac_try;;
24586esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024587eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024588 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024589 ac_status=$?
24590 grep -v '^ *+' conftest.er1 >conftest.err
24591 rm -f conftest.er1
24592 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024594 (exit $ac_status); } >/dev/null && {
24595 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
24596 test ! -s conftest.err
24597 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024598 have_readline=yes
24599else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024600 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024601sed 's/^/| /' conftest.$ac_ext >&5
24602
24603 have_readline=no
24604fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024605
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024606rm -f conftest.err conftest.$ac_ext
24607if test $have_readline = yes
24608then
24609 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024610/* confdefs.h. */
24611_ACEOF
24612cat confdefs.h >>conftest.$ac_ext
24613cat >>conftest.$ac_ext <<_ACEOF
24614/* end confdefs.h. */
24615#include <readline/readline.h>
24616
24617_ACEOF
24618if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
24619 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
24620
24621cat >>confdefs.h <<\_ACEOF
24622#define HAVE_RL_CATCH_SIGNAL 1
24623_ACEOF
24624
24625fi
Jesus Cea0f752ee2010-04-28 12:03:06 +000024626rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024627
24628fi
24629
Martin v. Löwis82bca632006-02-10 20:49:30 +000024630# End of readline checks: restore LIBS
24631LIBS=$LIBS_no_readline
24632
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024633{ echo "$as_me:$LINENO: checking for broken nice()" >&5
24634echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024635if test "${ac_cv_broken_nice+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024636 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000024637else
Martin v. Löwis11437992002-04-12 09:54:03 +000024638
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024639if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000024640 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024641else
Martin v. Löwis11437992002-04-12 09:54:03 +000024642 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024643/* confdefs.h. */
24644_ACEOF
24645cat confdefs.h >>conftest.$ac_ext
24646cat >>conftest.$ac_ext <<_ACEOF
24647/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024648
24649int main()
24650{
24651 int val1 = nice(1);
24652 if (val1 != -1 && val1 == nice(2))
24653 exit(0);
24654 exit(1);
24655}
24656
Martin v. Löwis11437992002-04-12 09:54:03 +000024657_ACEOF
24658rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024659if { (ac_try="$ac_link"
24660case "(($ac_try" in
24661 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24662 *) ac_try_echo=$ac_try;;
24663esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024664eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024665 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024666 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024668 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024669 { (case "(($ac_try" in
24670 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24671 *) ac_try_echo=$ac_try;;
24672esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024673eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024674 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024675 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024677 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024678 ac_cv_broken_nice=yes
24679else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024680 echo "$as_me: program exited with status $ac_status" >&5
24681echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024682sed 's/^/| /' conftest.$ac_ext >&5
24683
Martin v. Löwis11437992002-04-12 09:54:03 +000024684( exit $ac_status )
24685ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024686fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024687rm -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 +000024688fi
24689
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024690
24691fi
24692
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024693{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
24694echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024695if test "$ac_cv_broken_nice" = yes
24696then
Martin v. Löwis11437992002-04-12 09:54:03 +000024697
24698cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024699#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024700_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024701
24702fi
24703
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024704{ echo "$as_me:$LINENO: checking for broken poll()" >&5
24705echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024706if test "$cross_compiling" = yes; then
24707 ac_cv_broken_poll=no
24708else
24709 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024710/* confdefs.h. */
24711_ACEOF
24712cat confdefs.h >>conftest.$ac_ext
24713cat >>conftest.$ac_ext <<_ACEOF
24714/* end confdefs.h. */
24715
24716#include <poll.h>
24717
24718int main (void)
24719 {
24720 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
24721
24722 close (42);
24723
24724 int poll_test = poll (&poll_struct, 1, 0);
24725
24726 if (poll_test < 0)
24727 {
24728 exit(0);
24729 }
24730 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
24731 {
24732 exit(0);
24733 }
24734 else
24735 {
24736 exit(1);
24737 }
24738 }
24739
24740_ACEOF
24741rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024742if { (ac_try="$ac_link"
24743case "(($ac_try" in
24744 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24745 *) ac_try_echo=$ac_try;;
24746esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024747eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024748 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024749 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024751 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024752 { (case "(($ac_try" in
24753 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24754 *) ac_try_echo=$ac_try;;
24755esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024756eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024757 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024758 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024759 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024760 (exit $ac_status); }; }; then
24761 ac_cv_broken_poll=yes
24762else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024763 echo "$as_me: program exited with status $ac_status" >&5
24764echo "$as_me: failed program was:" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024765sed 's/^/| /' conftest.$ac_ext >&5
24766
24767( exit $ac_status )
24768ac_cv_broken_poll=no
24769fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024770rm -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 +000024771fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024772
24773
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024774{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
24775echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024776if test "$ac_cv_broken_poll" = yes
24777then
24778
24779cat >>confdefs.h <<\_ACEOF
24780#define HAVE_BROKEN_POLL 1
24781_ACEOF
24782
24783fi
24784
Brett Cannon43802422005-02-10 20:48:03 +000024785# 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 +000024786# (which is not required by ISO C or UNIX spec) and/or if we support
24787# tzname[]
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024788{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
24789echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000024790if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024791 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000024792else
24793 cat >conftest.$ac_ext <<_ACEOF
24794/* confdefs.h. */
24795_ACEOF
24796cat confdefs.h >>conftest.$ac_ext
24797cat >>conftest.$ac_ext <<_ACEOF
24798/* end confdefs.h. */
24799#include <sys/types.h>
24800#include <$ac_cv_struct_tm>
24801
24802
24803int
24804main ()
24805{
24806static struct tm ac_aggr;
24807if (ac_aggr.tm_zone)
24808return 0;
24809 ;
24810 return 0;
24811}
24812_ACEOF
24813rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024814if { (ac_try="$ac_compile"
24815case "(($ac_try" in
24816 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24817 *) ac_try_echo=$ac_try;;
24818esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024819eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024820 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000024821 ac_status=$?
24822 grep -v '^ *+' conftest.er1 >conftest.err
24823 rm -f conftest.er1
24824 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024826 (exit $ac_status); } && {
24827 test -z "$ac_c_werror_flag" ||
24828 test ! -s conftest.err
24829 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000024830 ac_cv_member_struct_tm_tm_zone=yes
24831else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024832 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000024833sed 's/^/| /' conftest.$ac_ext >&5
24834
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024835 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000024836/* confdefs.h. */
24837_ACEOF
24838cat confdefs.h >>conftest.$ac_ext
24839cat >>conftest.$ac_ext <<_ACEOF
24840/* end confdefs.h. */
24841#include <sys/types.h>
24842#include <$ac_cv_struct_tm>
24843
24844
24845int
24846main ()
24847{
24848static struct tm ac_aggr;
24849if (sizeof ac_aggr.tm_zone)
24850return 0;
24851 ;
24852 return 0;
24853}
24854_ACEOF
24855rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024856if { (ac_try="$ac_compile"
24857case "(($ac_try" in
24858 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24859 *) ac_try_echo=$ac_try;;
24860esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024861eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024862 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000024863 ac_status=$?
24864 grep -v '^ *+' conftest.er1 >conftest.err
24865 rm -f conftest.er1
24866 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024868 (exit $ac_status); } && {
24869 test -z "$ac_c_werror_flag" ||
24870 test ! -s conftest.err
24871 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000024872 ac_cv_member_struct_tm_tm_zone=yes
24873else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024874 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000024875sed 's/^/| /' conftest.$ac_ext >&5
24876
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024877 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000024878fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024879
24880rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000024881fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024882
24883rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000024884fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024885{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
24886echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
24887if test $ac_cv_member_struct_tm_tm_zone = yes; then
Brett Cannon43802422005-02-10 20:48:03 +000024888
24889cat >>confdefs.h <<_ACEOF
24890#define HAVE_STRUCT_TM_TM_ZONE 1
24891_ACEOF
24892
24893
24894fi
24895
24896if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
24897
24898cat >>confdefs.h <<\_ACEOF
24899#define HAVE_TM_ZONE 1
24900_ACEOF
24901
24902else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024903 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
24904echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024905if test "${ac_cv_have_decl_tzname+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024906 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024907else
24908 cat >conftest.$ac_ext <<_ACEOF
24909/* confdefs.h. */
24910_ACEOF
24911cat confdefs.h >>conftest.$ac_ext
24912cat >>conftest.$ac_ext <<_ACEOF
24913/* end confdefs.h. */
24914#include <time.h>
24915
24916int
24917main ()
24918{
24919#ifndef tzname
24920 (void) tzname;
24921#endif
24922
24923 ;
24924 return 0;
24925}
24926_ACEOF
24927rm -f conftest.$ac_objext
24928if { (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
24935 ac_status=$?
24936 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
24944 ac_cv_have_decl_tzname=yes
24945else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024946 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024947sed 's/^/| /' conftest.$ac_ext >&5
24948
24949 ac_cv_have_decl_tzname=no
24950fi
24951
24952rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24953fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024954{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
24955echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
24956if test $ac_cv_have_decl_tzname = yes; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024957
24958cat >>confdefs.h <<_ACEOF
24959#define HAVE_DECL_TZNAME 1
24960_ACEOF
24961
24962
24963else
24964 cat >>confdefs.h <<_ACEOF
24965#define HAVE_DECL_TZNAME 0
24966_ACEOF
24967
24968
24969fi
24970
24971
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024972 { echo "$as_me:$LINENO: checking for tzname" >&5
24973echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000024974if test "${ac_cv_var_tzname+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024975 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000024976else
24977 cat >conftest.$ac_ext <<_ACEOF
24978/* confdefs.h. */
24979_ACEOF
24980cat confdefs.h >>conftest.$ac_ext
24981cat >>conftest.$ac_ext <<_ACEOF
24982/* end confdefs.h. */
24983#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024984#if !HAVE_DECL_TZNAME
24985extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000024986#endif
24987
24988int
24989main ()
24990{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024991return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000024992 ;
24993 return 0;
24994}
24995_ACEOF
24996rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024997if { (ac_try="$ac_link"
24998case "(($ac_try" in
24999 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25000 *) ac_try_echo=$ac_try;;
25001esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025002eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025003 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000025004 ac_status=$?
25005 grep -v '^ *+' conftest.er1 >conftest.err
25006 rm -f conftest.er1
25007 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025009 (exit $ac_status); } && {
25010 test -z "$ac_c_werror_flag" ||
25011 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025012 } && test -s conftest$ac_exeext &&
25013 $as_test_x conftest$ac_exeext; then
Brett Cannon43802422005-02-10 20:48:03 +000025014 ac_cv_var_tzname=yes
25015else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025016 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000025017sed 's/^/| /' conftest.$ac_ext >&5
25018
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025019 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000025020fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025021
25022rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000025023 conftest$ac_exeext conftest.$ac_ext
25024fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025025{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
25026echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000025027 if test $ac_cv_var_tzname = yes; then
25028
25029cat >>confdefs.h <<\_ACEOF
25030#define HAVE_TZNAME 1
25031_ACEOF
25032
25033 fi
25034fi
25035
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025036
Martin v. Löwis1d459062005-03-14 21:23:33 +000025037# check tzset(3) exists and works like we expect it to
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025038{ echo "$as_me:$LINENO: checking for working tzset()" >&5
25039echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025040if test "${ac_cv_working_tzset+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025041 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025042else
25043
25044if test "$cross_compiling" = yes; then
25045 ac_cv_working_tzset=no
25046else
25047 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025048/* confdefs.h. */
25049_ACEOF
25050cat confdefs.h >>conftest.$ac_ext
25051cat >>conftest.$ac_ext <<_ACEOF
25052/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025053
25054#include <stdlib.h>
25055#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000025056#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000025057
25058#if HAVE_TZNAME
25059extern char *tzname[];
25060#endif
25061
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025062int main()
25063{
Brett Cannon18367812003-09-19 00:59:16 +000025064 /* Note that we need to ensure that not only does tzset(3)
25065 do 'something' with localtime, but it works as documented
25066 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000025067 This includes making sure that tzname is set properly if
25068 tm->tm_zone does not exist since it is the alternative way
25069 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000025070
25071 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000025072 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000025073 */
25074
Martin v. Löwis1d459062005-03-14 21:23:33 +000025075 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000025076 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
25077
Neal Norwitz7f2588c2003-04-11 15:35:53 +000025078 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025079 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000025080 if (localtime(&groundhogday)->tm_hour != 0)
25081 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025082#if HAVE_TZNAME
25083 /* For UTC, tzname[1] is sometimes "", sometimes " " */
25084 if (strcmp(tzname[0], "UTC") ||
25085 (tzname[1][0] != 0 && tzname[1][0] != ' '))
25086 exit(1);
25087#endif
Brett Cannon18367812003-09-19 00:59:16 +000025088
Neal Norwitz7f2588c2003-04-11 15:35:53 +000025089 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025090 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000025091 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025092 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025093#if HAVE_TZNAME
25094 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
25095 exit(1);
25096#endif
Brett Cannon18367812003-09-19 00:59:16 +000025097
25098 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
25099 tzset();
25100 if (localtime(&groundhogday)->tm_hour != 11)
25101 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025102#if HAVE_TZNAME
25103 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
25104 exit(1);
25105#endif
25106
25107#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000025108 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
25109 exit(1);
25110 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
25111 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025112#endif
Brett Cannon18367812003-09-19 00:59:16 +000025113
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025114 exit(0);
25115}
25116
25117_ACEOF
25118rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025119if { (ac_try="$ac_link"
25120case "(($ac_try" in
25121 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25122 *) ac_try_echo=$ac_try;;
25123esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025124eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025125 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025126 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025128 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025129 { (case "(($ac_try" in
25130 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25131 *) ac_try_echo=$ac_try;;
25132esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025133eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025134 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025135 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025136 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025137 (exit $ac_status); }; }; then
25138 ac_cv_working_tzset=yes
25139else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025140 echo "$as_me: program exited with status $ac_status" >&5
25141echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025142sed 's/^/| /' conftest.$ac_ext >&5
25143
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025144( exit $ac_status )
25145ac_cv_working_tzset=no
25146fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025147rm -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 +000025148fi
25149
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025150
25151fi
25152
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025153{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
25154echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025155if test "$ac_cv_working_tzset" = yes
25156then
25157
25158cat >>confdefs.h <<\_ACEOF
25159#define HAVE_WORKING_TZSET 1
25160_ACEOF
25161
25162fi
25163
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025164# Look for subsecond timestamps in struct stat
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025165{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
25166echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025167if test "${ac_cv_stat_tv_nsec+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025168 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025169else
25170 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025171/* confdefs.h. */
25172_ACEOF
25173cat confdefs.h >>conftest.$ac_ext
25174cat >>conftest.$ac_ext <<_ACEOF
25175/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025176#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025177int
25178main ()
25179{
25180
25181struct stat st;
25182st.st_mtim.tv_nsec = 1;
25183
25184 ;
25185 return 0;
25186}
25187_ACEOF
25188rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025189if { (ac_try="$ac_compile"
25190case "(($ac_try" in
25191 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25192 *) ac_try_echo=$ac_try;;
25193esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025194eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025195 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025196 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025197 grep -v '^ *+' conftest.er1 >conftest.err
25198 rm -f conftest.er1
25199 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025201 (exit $ac_status); } && {
25202 test -z "$ac_c_werror_flag" ||
25203 test ! -s conftest.err
25204 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000025205 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025206else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025207 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025208sed 's/^/| /' conftest.$ac_ext >&5
25209
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025210 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025211fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000025212
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025213rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25214fi
25215
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025216{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
25217echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025218if test "$ac_cv_stat_tv_nsec" = yes
25219then
25220
25221cat >>confdefs.h <<\_ACEOF
25222#define HAVE_STAT_TV_NSEC 1
25223_ACEOF
25224
25225fi
25226
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025227# Look for BSD style subsecond timestamps in struct stat
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025228{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
25229echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025230if test "${ac_cv_stat_tv_nsec2+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025231 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025232else
25233 cat >conftest.$ac_ext <<_ACEOF
25234/* confdefs.h. */
25235_ACEOF
25236cat confdefs.h >>conftest.$ac_ext
25237cat >>conftest.$ac_ext <<_ACEOF
25238/* end confdefs.h. */
25239#include <sys/stat.h>
25240int
25241main ()
25242{
25243
25244struct stat st;
25245st.st_mtimespec.tv_nsec = 1;
25246
25247 ;
25248 return 0;
25249}
25250_ACEOF
25251rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025252if { (ac_try="$ac_compile"
25253case "(($ac_try" in
25254 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25255 *) ac_try_echo=$ac_try;;
25256esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025257eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025258 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025259 ac_status=$?
25260 grep -v '^ *+' conftest.er1 >conftest.err
25261 rm -f conftest.er1
25262 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025264 (exit $ac_status); } && {
25265 test -z "$ac_c_werror_flag" ||
25266 test ! -s conftest.err
25267 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025268 ac_cv_stat_tv_nsec2=yes
25269else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025270 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025271sed 's/^/| /' conftest.$ac_ext >&5
25272
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025273 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025274fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000025275
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025276rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25277fi
25278
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025279{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
25280echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025281if test "$ac_cv_stat_tv_nsec2" = yes
25282then
25283
25284cat >>confdefs.h <<\_ACEOF
25285#define HAVE_STAT_TV_NSEC2 1
25286_ACEOF
25287
25288fi
25289
Jack Jansen666b1e72001-10-31 12:11:48 +000025290# On HP/UX 11.0, mvwdelch is a block with a return statement
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025291{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
25292echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025293if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025294 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000025295else
Martin v. Löwis11437992002-04-12 09:54:03 +000025296 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025297/* confdefs.h. */
25298_ACEOF
25299cat confdefs.h >>conftest.$ac_ext
25300cat >>conftest.$ac_ext <<_ACEOF
25301/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000025302#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025303int
25304main ()
25305{
Jack Jansen666b1e72001-10-31 12:11:48 +000025306
25307 int rtn;
25308 rtn = mvwdelch(0,0,0);
25309
Martin v. Löwis11437992002-04-12 09:54:03 +000025310 ;
25311 return 0;
25312}
25313_ACEOF
25314rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025315if { (ac_try="$ac_compile"
25316case "(($ac_try" in
25317 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25318 *) ac_try_echo=$ac_try;;
25319esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025320eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025321 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025322 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025323 grep -v '^ *+' conftest.er1 >conftest.err
25324 rm -f conftest.er1
25325 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025326 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025327 (exit $ac_status); } && {
25328 test -z "$ac_c_werror_flag" ||
25329 test ! -s conftest.err
25330 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000025331 ac_cv_mvwdelch_is_expression=yes
25332else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025333 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025334sed 's/^/| /' conftest.$ac_ext >&5
25335
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025336 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000025337fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000025338
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025339rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25340fi
25341
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025342{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
25343echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000025344
25345if test "$ac_cv_mvwdelch_is_expression" = yes
25346then
Martin v. Löwis11437992002-04-12 09:54:03 +000025347
25348cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000025349#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025350_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000025351
25352fi
25353
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025354{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
25355echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025356if test "${ac_cv_window_has_flags+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025357 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000025358else
Martin v. Löwis11437992002-04-12 09:54:03 +000025359 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025360/* confdefs.h. */
25361_ACEOF
25362cat confdefs.h >>conftest.$ac_ext
25363cat >>conftest.$ac_ext <<_ACEOF
25364/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000025365#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025366int
25367main ()
25368{
Jack Jansen666b1e72001-10-31 12:11:48 +000025369
25370 WINDOW *w;
25371 w->_flags = 0;
25372
Martin v. Löwis11437992002-04-12 09:54:03 +000025373 ;
25374 return 0;
25375}
25376_ACEOF
25377rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025378if { (ac_try="$ac_compile"
25379case "(($ac_try" in
25380 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25381 *) ac_try_echo=$ac_try;;
25382esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025383eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025384 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025385 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025386 grep -v '^ *+' conftest.er1 >conftest.err
25387 rm -f conftest.er1
25388 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025389 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025390 (exit $ac_status); } && {
25391 test -z "$ac_c_werror_flag" ||
25392 test ! -s conftest.err
25393 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000025394 ac_cv_window_has_flags=yes
25395else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025396 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025397sed 's/^/| /' conftest.$ac_ext >&5
25398
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025399 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000025400fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000025401
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025402rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25403fi
25404
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025405{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
25406echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000025407
Jack Jansen666b1e72001-10-31 12:11:48 +000025408
25409if test "$ac_cv_window_has_flags" = yes
25410then
Martin v. Löwis11437992002-04-12 09:54:03 +000025411
25412cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000025413#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025414_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000025415
25416fi
25417
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025418{ echo "$as_me:$LINENO: checking for is_term_resized" >&5
25419echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025420cat >conftest.$ac_ext <<_ACEOF
25421/* confdefs.h. */
25422_ACEOF
25423cat confdefs.h >>conftest.$ac_ext
25424cat >>conftest.$ac_ext <<_ACEOF
25425/* end confdefs.h. */
25426#include <curses.h>
25427int
25428main ()
25429{
25430void *x=is_term_resized
25431 ;
25432 return 0;
25433}
25434_ACEOF
25435rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025436if { (ac_try="$ac_compile"
25437case "(($ac_try" in
25438 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25439 *) ac_try_echo=$ac_try;;
25440esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025441eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025442 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025443 ac_status=$?
25444 grep -v '^ *+' conftest.er1 >conftest.err
25445 rm -f conftest.er1
25446 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025448 (exit $ac_status); } && {
25449 test -z "$ac_c_werror_flag" ||
25450 test ! -s conftest.err
25451 } && test -s conftest.$ac_objext; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000025452
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025453cat >>confdefs.h <<\_ACEOF
25454#define HAVE_CURSES_IS_TERM_RESIZED 1
25455_ACEOF
25456
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025457 { echo "$as_me:$LINENO: result: yes" >&5
25458echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025459else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025460 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025461sed 's/^/| /' conftest.$ac_ext >&5
25462
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025463 { echo "$as_me:$LINENO: result: no" >&5
25464echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025465
25466fi
25467
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025468rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25469
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025470{ echo "$as_me:$LINENO: checking for resize_term" >&5
25471echo $ECHO_N "checking for resize_term... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025472cat >conftest.$ac_ext <<_ACEOF
25473/* confdefs.h. */
25474_ACEOF
25475cat confdefs.h >>conftest.$ac_ext
25476cat >>conftest.$ac_ext <<_ACEOF
25477/* end confdefs.h. */
25478#include <curses.h>
25479int
25480main ()
25481{
25482void *x=resize_term
25483 ;
25484 return 0;
25485}
25486_ACEOF
25487rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025488if { (ac_try="$ac_compile"
25489case "(($ac_try" in
25490 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25491 *) ac_try_echo=$ac_try;;
25492esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025493eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025494 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025495 ac_status=$?
25496 grep -v '^ *+' conftest.er1 >conftest.err
25497 rm -f conftest.er1
25498 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025500 (exit $ac_status); } && {
25501 test -z "$ac_c_werror_flag" ||
25502 test ! -s conftest.err
25503 } && test -s conftest.$ac_objext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025504
25505cat >>confdefs.h <<\_ACEOF
25506#define HAVE_CURSES_RESIZE_TERM 1
25507_ACEOF
25508
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025509 { echo "$as_me:$LINENO: result: yes" >&5
25510echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025511else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025512 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025513sed 's/^/| /' conftest.$ac_ext >&5
25514
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025515 { echo "$as_me:$LINENO: result: no" >&5
25516echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025517
25518fi
25519
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025520rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25521
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025522{ echo "$as_me:$LINENO: checking for resizeterm" >&5
25523echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025524cat >conftest.$ac_ext <<_ACEOF
25525/* confdefs.h. */
25526_ACEOF
25527cat confdefs.h >>conftest.$ac_ext
25528cat >>conftest.$ac_ext <<_ACEOF
25529/* end confdefs.h. */
25530#include <curses.h>
25531int
25532main ()
25533{
25534void *x=resizeterm
25535 ;
25536 return 0;
25537}
25538_ACEOF
25539rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025540if { (ac_try="$ac_compile"
25541case "(($ac_try" in
25542 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25543 *) ac_try_echo=$ac_try;;
25544esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025545eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025546 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025547 ac_status=$?
25548 grep -v '^ *+' conftest.er1 >conftest.err
25549 rm -f conftest.er1
25550 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025552 (exit $ac_status); } && {
25553 test -z "$ac_c_werror_flag" ||
25554 test ! -s conftest.err
25555 } && test -s conftest.$ac_objext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025556
25557cat >>confdefs.h <<\_ACEOF
25558#define HAVE_CURSES_RESIZETERM 1
25559_ACEOF
25560
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025561 { echo "$as_me:$LINENO: result: yes" >&5
25562echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025563else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025564 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025565sed 's/^/| /' conftest.$ac_ext >&5
25566
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025567 { echo "$as_me:$LINENO: result: no" >&5
25568echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025569
25570fi
25571
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025572rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25573
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025574{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
25575echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000025576
25577if test -r /dev/ptmx
25578then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025579 { echo "$as_me:$LINENO: result: yes" >&5
25580echo "${ECHO_T}yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000025581
25582cat >>confdefs.h <<\_ACEOF
25583#define HAVE_DEV_PTMX 1
25584_ACEOF
25585
Thomas Wouters89f507f2006-12-13 04:49:30 +000025586else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025587 { echo "$as_me:$LINENO: result: no" >&5
25588echo "${ECHO_T}no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000025589fi
25590
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025591{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
25592echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000025593
25594if test -r /dev/ptc
25595then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025596 { echo "$as_me:$LINENO: result: yes" >&5
25597echo "${ECHO_T}yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000025598
25599cat >>confdefs.h <<\_ACEOF
25600#define HAVE_DEV_PTC 1
25601_ACEOF
25602
Thomas Wouters89f507f2006-12-13 04:49:30 +000025603else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025604 { echo "$as_me:$LINENO: result: no" >&5
25605echo "${ECHO_T}no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000025606fi
25607
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025608{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
25609echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000025610if test "$cross_compiling" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025611 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
Thomas Wouters477c8d52006-05-27 19:21:47 +000025612See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025613echo "$as_me: error: cannot run test program while cross compiling
Thomas Wouters477c8d52006-05-27 19:21:47 +000025614See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025615 { (exit 1); exit 1; }; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000025616else
25617 cat >conftest.$ac_ext <<_ACEOF
25618/* confdefs.h. */
25619_ACEOF
25620cat confdefs.h >>conftest.$ac_ext
25621cat >>conftest.$ac_ext <<_ACEOF
25622/* end confdefs.h. */
25623#include <stdio.h>
25624#include <stddef.h>
25625#include <string.h>
25626
Christian Heimes2c181612007-12-17 20:04:13 +000025627#ifdef HAVE_SYS_TYPES_H
25628#include <sys/types.h>
25629#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000025630
25631#ifdef HAVE_SSIZE_T
25632typedef ssize_t Py_ssize_t;
25633#elif SIZEOF_VOID_P == SIZEOF_LONG
25634typedef long Py_ssize_t;
25635#else
25636typedef int Py_ssize_t;
25637#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000025638
Christian Heimes2c181612007-12-17 20:04:13 +000025639int main()
25640{
25641 char buffer[256];
25642
Thomas Wouters477c8d52006-05-27 19:21:47 +000025643 if(sprintf(buffer, "%zd", (size_t)123) < 0)
25644 return 1;
25645
Thomas Wouters89f507f2006-12-13 04:49:30 +000025646 if (strcmp(buffer, "123"))
25647 return 1;
25648
25649 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
25650 return 1;
25651
25652 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000025653 return 1;
25654
25655 return 0;
25656}
25657_ACEOF
25658rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025659if { (ac_try="$ac_link"
25660case "(($ac_try" in
25661 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25662 *) ac_try_echo=$ac_try;;
25663esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025664eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025665 (eval "$ac_link") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000025666 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000025668 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025669 { (case "(($ac_try" in
25670 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25671 *) ac_try_echo=$ac_try;;
25672esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025673eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025674 (eval "$ac_try") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000025675 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000025677 (exit $ac_status); }; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025678 { echo "$as_me:$LINENO: result: yes" >&5
25679echo "${ECHO_T}yes" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000025680
25681cat >>confdefs.h <<\_ACEOF
25682#define PY_FORMAT_SIZE_T "z"
25683_ACEOF
25684
25685else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025686 echo "$as_me: program exited with status $ac_status" >&5
25687echo "$as_me: failed program was:" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000025688sed 's/^/| /' conftest.$ac_ext >&5
25689
25690( exit $ac_status )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025691{ echo "$as_me:$LINENO: result: no" >&5
25692echo "${ECHO_T}no" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000025693fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025694rm -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 +000025695fi
25696
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025697
25698
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025699{ echo "$as_me:$LINENO: checking for socklen_t" >&5
25700echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025701if test "${ac_cv_type_socklen_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025702 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000025703else
Martin v. Löwis11437992002-04-12 09:54:03 +000025704 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025705/* confdefs.h. */
25706_ACEOF
25707cat confdefs.h >>conftest.$ac_ext
25708cat >>conftest.$ac_ext <<_ACEOF
25709/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000025710
25711#ifdef HAVE_SYS_TYPES_H
25712#include <sys/types.h>
25713#endif
25714#ifdef HAVE_SYS_SOCKET_H
25715#include <sys/socket.h>
25716#endif
25717
25718
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025719typedef socklen_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000025720int
25721main ()
25722{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025723if ((ac__type_new_ *) 0)
25724 return 0;
25725if (sizeof (ac__type_new_))
25726 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000025727 ;
25728 return 0;
25729}
25730_ACEOF
25731rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025732if { (ac_try="$ac_compile"
25733case "(($ac_try" in
25734 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25735 *) ac_try_echo=$ac_try;;
25736esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025737eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025738 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025739 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025740 grep -v '^ *+' conftest.er1 >conftest.err
25741 rm -f conftest.er1
25742 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025744 (exit $ac_status); } && {
25745 test -z "$ac_c_werror_flag" ||
25746 test ! -s conftest.err
25747 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025748 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000025749else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025750 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025751sed 's/^/| /' conftest.$ac_ext >&5
25752
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025753 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000025754fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025755
25756rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025757fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025758{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
25759echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
25760if test $ac_cv_type_socklen_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025761 :
25762else
Guido van Rossum95713eb2000-05-18 20:53:31 +000025763
Martin v. Löwis01c04012002-11-11 14:58:44 +000025764cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000025765#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000025766_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000025767
25768fi
25769
Michael W. Hudson54241132001-12-07 15:38:26 +000025770
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025771{ echo "$as_me:$LINENO: checking for broken mbstowcs" >&5
25772echo $ECHO_N "checking for broken mbstowcs... $ECHO_C" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000025773if test "$cross_compiling" = yes; then
25774 ac_cv_broken_mbstowcs=no
25775else
25776 cat >conftest.$ac_ext <<_ACEOF
25777/* confdefs.h. */
25778_ACEOF
25779cat confdefs.h >>conftest.$ac_ext
25780cat >>conftest.$ac_ext <<_ACEOF
25781/* end confdefs.h. */
25782
25783#include<stdlib.h>
25784int main() {
25785 size_t len = -1;
25786 const char *str = "text";
25787 len = mbstowcs(NULL, str, 0);
25788 return (len != 4);
25789}
25790
25791_ACEOF
25792rm -f conftest$ac_exeext
25793if { (ac_try="$ac_link"
25794case "(($ac_try" in
25795 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25796 *) ac_try_echo=$ac_try;;
25797esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025798eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000025799 (eval "$ac_link") 2>&5
25800 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000025802 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
25803 { (case "(($ac_try" in
25804 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25805 *) ac_try_echo=$ac_try;;
25806esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025807eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000025808 (eval "$ac_try") 2>&5
25809 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000025811 (exit $ac_status); }; }; then
25812 ac_cv_broken_mbstowcs=no
25813else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025814 echo "$as_me: program exited with status $ac_status" >&5
25815echo "$as_me: failed program was:" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000025816sed 's/^/| /' conftest.$ac_ext >&5
25817
25818( exit $ac_status )
25819ac_cv_broken_mbstowcs=yes
25820fi
25821rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
25822fi
25823
25824
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025825{ echo "$as_me:$LINENO: result: $ac_cv_broken_mbstowcs" >&5
25826echo "${ECHO_T}$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000025827if test "$ac_cv_broken_mbstowcs" = yes
25828then
25829
25830cat >>confdefs.h <<\_ACEOF
25831#define HAVE_BROKEN_MBSTOWCS 1
25832_ACEOF
25833
25834fi
25835
Antoine Pitroub52ec782009-01-25 16:34:23 +000025836# Check for --with-computed-gotos
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025837{ echo "$as_me:$LINENO: checking for --with-computed-gotos" >&5
25838echo $ECHO_N "checking for --with-computed-gotos... $ECHO_C" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000025839
25840# Check whether --with-computed-gotos was given.
25841if test "${with_computed_gotos+set}" = set; then
25842 withval=$with_computed_gotos;
25843if test "$withval" != no
25844then
25845
25846cat >>confdefs.h <<\_ACEOF
25847#define USE_COMPUTED_GOTOS 1
25848_ACEOF
25849
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025850 { echo "$as_me:$LINENO: result: yes" >&5
25851echo "${ECHO_T}yes" >&6; }
25852else { echo "$as_me:$LINENO: result: no" >&5
25853echo "${ECHO_T}no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000025854fi
25855else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025856 { echo "$as_me:$LINENO: result: no" >&5
25857echo "${ECHO_T}no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000025858fi
25859
25860
Ronald Oussoren1b2cad02009-11-19 17:30:05 +000025861if test $ac_sys_system = Darwin
25862then
25863 LIBS="$LIBS -framework CoreFoundation"
25864fi
25865
25866
Antoine Pitroub52ec782009-01-25 16:34:23 +000025867
Michael W. Hudson54241132001-12-07 15:38:26 +000025868
25869
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000025870for h in `(cd $srcdir;echo Python/thread_*.h)`
25871do
25872 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
25873done
25874
Michael W. Hudson54241132001-12-07 15:38:26 +000025875
Neal Norwitzd24499d2005-12-18 21:36:39 +000025876SRCDIRS="Parser Grammar Objects Python Modules Mac"
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025877{ echo "$as_me:$LINENO: checking for build directories" >&5
25878echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000025879for dir in $SRCDIRS; do
25880 if test ! -d $dir; then
25881 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000025882 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000025883done
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025884{ echo "$as_me:$LINENO: result: done" >&5
25885echo "${ECHO_T}done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000025886
Guido van Rossum627b2d71993-12-24 10:39:16 +000025887# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000025888ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000025889
Martin v. Löwis11437992002-04-12 09:54:03 +000025890cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025891# This file is a shell script that caches the results of configure
25892# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000025893# scripts and configure runs, see configure's option --config-cache.
25894# It is not useful on other systems. If it contains results you don't
25895# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025896#
Martin v. Löwis11437992002-04-12 09:54:03 +000025897# config.status only pays attention to the cache file if you give it
25898# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025899#
Skip Montanaro6dead952003-09-25 14:50:04 +000025900# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000025901# loading this file, other *unset* `ac_cv_foo' will be assigned the
25902# following values.
25903
25904_ACEOF
25905
Guido van Rossumf78abae1997-01-21 22:02:36 +000025906# The following way of writing the cache mishandles newlines in values,
25907# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025908# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000025909# Ultrix sh set writes to stderr and can't be redirected directly,
25910# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025911(
25912 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
25913 eval ac_val=\$$ac_var
25914 case $ac_val in #(
25915 *${as_nl}*)
25916 case $ac_var in #(
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025917 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
25918echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025919 esac
25920 case $ac_var in #(
25921 _ | IFS | as_nl) ;; #(
25922 *) $as_unset $ac_var ;;
25923 esac ;;
25924 esac
25925 done
25926
Martin v. Löwis11437992002-04-12 09:54:03 +000025927 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025928 case $as_nl`(ac_space=' '; set) 2>&1` in #(
25929 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000025930 # `set' does not quote correctly, so add quotes (double-quote
25931 # substitution turns \\\\ into \\, and sed turns \\ into \).
25932 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025933 "s/'/'\\\\''/g;
25934 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025935 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000025936 *)
25937 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025938 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000025939 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025940 esac |
25941 sort
25942) |
Martin v. Löwis11437992002-04-12 09:54:03 +000025943 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025944 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000025945 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025946 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000025947 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
25948 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025949 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
25950 :end' >>confcache
25951if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
25952 if test -w "$cache_file"; then
25953 test "x$cache_file" != "x/dev/null" &&
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025954 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
25955echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000025956 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000025957 else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025958 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
25959echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000025960 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025961fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000025962rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000025963
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025964test "x$prefix" = xNONE && prefix=$ac_default_prefix
25965# Let make expand exec_prefix.
25966test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000025967
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025968DEFS=-DHAVE_CONFIG_H
25969
Skip Montanaro6dead952003-09-25 14:50:04 +000025970ac_libobjs=
25971ac_ltlibobjs=
25972for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
25973 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025974 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025975 ac_i=`echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025976 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
25977 # will be set to the directory where LIBOBJS objects are built.
25978 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
25979 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000025980done
25981LIBOBJS=$ac_libobjs
25982
25983LTLIBOBJS=$ac_ltlibobjs
25984
25985
Martin v. Löwis11437992002-04-12 09:54:03 +000025986
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025987: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000025988ac_clean_files_save=$ac_clean_files
25989ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025990{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
25991echo "$as_me: creating $CONFIG_STATUS" >&6;}
25992cat >$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025993#! $SHELL
25994# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000025995# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025996# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000025997# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000025998
Martin v. Löwis11437992002-04-12 09:54:03 +000025999debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000026000ac_cs_recheck=false
26001ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000026002SHELL=\${CONFIG_SHELL-$SHELL}
26003_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000026004
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026005cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026006## --------------------- ##
26007## M4sh Initialization. ##
26008## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000026009
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026010# Be more Bourne compatible
26011DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000026012if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26013 emulate sh
26014 NULLCMD=:
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026015 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000026016 # is contrary to our usage. Disable this feature.
26017 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026018 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000026019else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026020 case `(set -o) 2>/dev/null` in
26021 *posix*) set -o posix ;;
26022esac
26023
Michael W. Hudson54241132001-12-07 15:38:26 +000026024fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000026025
26026
Michael W. Hudson54241132001-12-07 15:38:26 +000026027
Michael W. Hudson54241132001-12-07 15:38:26 +000026028
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026029# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000026030# Avoid depending upon Character Ranges.
26031as_cr_letters='abcdefghijklmnopqrstuvwxyz'
26032as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
26033as_cr_Letters=$as_cr_letters$as_cr_LETTERS
26034as_cr_digits='0123456789'
26035as_cr_alnum=$as_cr_Letters$as_cr_digits
26036
26037# The user is always right.
26038if test "${PATH_SEPARATOR+set}" != set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026039 echo "#! /bin/sh" >conf$$.sh
26040 echo "exit 0" >>conf$$.sh
26041 chmod +x conf$$.sh
26042 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
26043 PATH_SEPARATOR=';'
26044 else
26045 PATH_SEPARATOR=:
26046 fi
26047 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000026048fi
26049
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026050# Support unset when possible.
26051if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
26052 as_unset=unset
26053else
26054 as_unset=false
26055fi
Martin v. Löwis11437992002-04-12 09:54:03 +000026056
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026057
26058# IFS
26059# We need space, tab and new line, in precisely that order. Quoting is
26060# there to prevent editors from complaining about space-tab.
26061# (If _AS_PATH_WALK were called with IFS unset, it would disable word
26062# splitting by setting IFS to empty value.)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026063as_nl='
26064'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026065IFS=" "" $as_nl"
26066
26067# Find who we are. Look in the path if we contain no directory separator.
26068case $0 in
26069 *[\\/]* ) as_myself=$0 ;;
26070 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000026071for as_dir in $PATH
26072do
26073 IFS=$as_save_IFS
26074 test -z "$as_dir" && as_dir=.
26075 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
26076done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026077IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000026078
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026079 ;;
26080esac
26081# We did not find ourselves, most probably we were run as `sh COMMAND'
26082# in which case we are not to be found in the path.
26083if test "x$as_myself" = x; then
26084 as_myself=$0
26085fi
26086if test ! -f "$as_myself"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026087 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026088 { (exit 1); exit 1; }
26089fi
26090
26091# Work around bugs in pre-3.0 UWIN ksh.
26092for as_var in ENV MAIL MAILPATH
26093do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
26094done
26095PS1='$ '
26096PS2='> '
26097PS4='+ '
26098
26099# NLS nuisances.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026100for as_var in \
26101 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
26102 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
26103 LC_TELEPHONE LC_TIME
26104do
26105 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
26106 eval $as_var=C; export $as_var
26107 else
26108 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
26109 fi
26110done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026111
26112# Required to use basename.
26113if expr a : '\(a\)' >/dev/null 2>&1 &&
26114 test "X`expr 00001 : '.*\(...\)'`" = X001; then
26115 as_expr=expr
26116else
26117 as_expr=false
26118fi
26119
26120if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
26121 as_basename=basename
26122else
26123 as_basename=false
26124fi
26125
26126
26127# Name of the executable.
26128as_me=`$as_basename -- "$0" ||
26129$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
26130 X"$0" : 'X\(//\)$' \| \
26131 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026132echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026133 sed '/^.*\/\([^/][^/]*\)\/*$/{
26134 s//\1/
26135 q
26136 }
26137 /^X\/\(\/\/\)$/{
26138 s//\1/
26139 q
26140 }
26141 /^X\/\(\/\).*/{
26142 s//\1/
26143 q
26144 }
26145 s/.*/./; q'`
26146
26147# CDPATH.
26148$as_unset CDPATH
26149
26150
26151
Martin v. Löwis11437992002-04-12 09:54:03 +000026152 as_lineno_1=$LINENO
26153 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000026154 test "x$as_lineno_1" != "x$as_lineno_2" &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026155 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000026156
Martin v. Löwis11437992002-04-12 09:54:03 +000026157 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
26158 # uniformly replaced by the line number. The first 'sed' inserts a
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026159 # line-number line after each line using $LINENO; the second 'sed'
26160 # does the real work. The second script uses 'N' to pair each
26161 # line-number line with the line containing $LINENO, and appends
26162 # trailing '-' during substitution so that $LINENO is not a special
26163 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000026164 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026165 # scripts with optimization help from Paolo Bonzini. Blame Lee
26166 # E. McMahon (1931-1989) for sed's syntax. :-)
26167 sed -n '
26168 p
26169 /[$]LINENO/=
26170 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000026171 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026172 s/[$]LINENO.*/&-/
26173 t lineno
26174 b
26175 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000026176 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026177 :loop
26178 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000026179 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026180 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000026181 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026182 chmod +x "$as_me.lineno" ||
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026183 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000026184 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000026185
Martin v. Löwis11437992002-04-12 09:54:03 +000026186 # Don't try to exec as it changes $[0], causing all sort of problems
26187 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026188 # original and so on. Autoconf is especially sensitive to this).
26189 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000026190 # Exit status is that of the last command.
26191 exit
26192}
26193
26194
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026195if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
26196 as_dirname=dirname
26197else
26198 as_dirname=false
26199fi
26200
26201ECHO_C= ECHO_N= ECHO_T=
26202case `echo -n x` in
26203-n*)
26204 case `echo 'x\c'` in
26205 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
26206 *) ECHO_C='\c';;
26207 esac;;
26208*)
26209 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000026210esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026211
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026212if expr a : '\(a\)' >/dev/null 2>&1 &&
26213 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026214 as_expr=expr
26215else
26216 as_expr=false
26217fi
26218
26219rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026220if test -d conf$$.dir; then
26221 rm -f conf$$.dir/conf$$.file
26222else
26223 rm -f conf$$.dir
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026224 mkdir conf$$.dir
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026225fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026226echo >conf$$.file
26227if ln -s conf$$.file conf$$ 2>/dev/null; then
26228 as_ln_s='ln -s'
26229 # ... but there are two gotchas:
26230 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
26231 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
26232 # In both cases, we have to default to `cp -p'.
26233 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +000026234 as_ln_s='cp -p'
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026235elif ln conf$$.file conf$$ 2>/dev/null; then
26236 as_ln_s=ln
Martin v. Löwis11437992002-04-12 09:54:03 +000026237else
26238 as_ln_s='cp -p'
26239fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026240rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
26241rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000026242
Skip Montanaro6dead952003-09-25 14:50:04 +000026243if mkdir -p . 2>/dev/null; then
26244 as_mkdir_p=:
26245else
Skip Montanarof0d5f792004-08-15 14:08:23 +000026246 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000026247 as_mkdir_p=false
26248fi
26249
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026250if test -x / >/dev/null 2>&1; then
26251 as_test_x='test -x'
26252else
26253 if ls -dL / >/dev/null 2>&1; then
26254 as_ls_L_option=L
26255 else
26256 as_ls_L_option=
26257 fi
26258 as_test_x='
26259 eval sh -c '\''
26260 if test -d "$1"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026261 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026262 else
26263 case $1 in
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026264 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026265 esac;
26266 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
26267 ???[sx]*):;;*)false;;esac;fi
26268 '\'' sh
26269 '
26270fi
26271as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000026272
26273# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000026274as_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 +000026275
26276# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000026277as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000026278
26279
Martin v. Löwis11437992002-04-12 09:54:03 +000026280exec 6>&1
26281
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026282# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000026283# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026284# values after options handling.
26285ac_log="
Christian Heimes70e5cab2008-12-03 18:18:23 +000026286This file was extended by python $as_me 3.1, which was
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026287generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000026288
26289 CONFIG_FILES = $CONFIG_FILES
26290 CONFIG_HEADERS = $CONFIG_HEADERS
26291 CONFIG_LINKS = $CONFIG_LINKS
26292 CONFIG_COMMANDS = $CONFIG_COMMANDS
26293 $ $0 $@
26294
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026295on `(hostname || uname -n) 2>/dev/null | sed 1q`
26296"
26297
Martin v. Löwis11437992002-04-12 09:54:03 +000026298_ACEOF
26299
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026300cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026301# Files that config.status was made for.
Martin v. Löwis113a0852009-05-29 17:25:39 +000026302config_files="$ac_config_files"
26303config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000026304
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026305_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026306
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026307cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026308ac_cs_usage="\
26309\`$as_me' instantiates files from templates according to the
26310current configuration.
26311
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026312Usage: $0 [OPTIONS] [FILE]...
Martin v. Löwis11437992002-04-12 09:54:03 +000026313
26314 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026315 -V, --version print version number and configuration settings, then exit
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026316 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000026317 -d, --debug don't remove temporary files
26318 --recheck update $as_me by reconfiguring in the same conditions
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026319 --file=FILE[:TEMPLATE]
26320 instantiate the configuration file FILE
26321 --header=FILE[:TEMPLATE]
26322 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000026323
26324Configuration files:
26325$config_files
26326
26327Configuration headers:
26328$config_headers
26329
26330Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000026331
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026332_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026333cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026334ac_cs_version="\\
Christian Heimes70e5cab2008-12-03 18:18:23 +000026335python config.status 3.1
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026336configured by $0, generated by GNU Autoconf 2.61,
26337 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000026338
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026339Copyright (C) 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000026340This config.status script is free software; the Free Software Foundation
26341gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026342
26343ac_pwd='$ac_pwd'
26344srcdir='$srcdir'
26345INSTALL='$INSTALL'
Martin v. Löwis11437992002-04-12 09:54:03 +000026346_ACEOF
26347
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026348cat >>$CONFIG_STATUS <<\_ACEOF
26349# If no file are specified by the user, then we need to provide default
26350# value. By we need to know if files were specified by the user.
Martin v. Löwis11437992002-04-12 09:54:03 +000026351ac_need_defaults=:
26352while test $# != 0
26353do
26354 case $1 in
26355 --*=*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026356 ac_option=`expr "X$1" : 'X\([^=]*\)='`
26357 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000026358 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000026359 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026360 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000026361 ac_option=$1
26362 ac_optarg=$2
26363 ac_shift=shift
26364 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026365 esac
26366
Skip Montanaro6dead952003-09-25 14:50:04 +000026367 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000026368 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000026369 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
26370 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026371 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026372 echo "$ac_cs_version"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026373 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000026374 debug=: ;;
26375 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000026376 $ac_shift
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026377 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000026378 ac_need_defaults=false;;
26379 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000026380 $ac_shift
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026381 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000026382 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026383 --he | --h)
26384 # Conflict between --help and --header
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026385 { echo "$as_me: error: ambiguous option: $1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026386Try \`$0 --help' for more information." >&2
26387 { (exit 1); exit 1; }; };;
26388 --help | --hel | -h )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026389 echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000026390 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
26391 | -silent | --silent | --silen | --sile | --sil | --si | --s)
26392 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026393
26394 # This is an error.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026395 -*) { echo "$as_me: error: unrecognized option: $1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026396Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000026397 { (exit 1); exit 1; }; } ;;
26398
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026399 *) ac_config_targets="$ac_config_targets $1"
26400 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026401
26402 esac
26403 shift
26404done
26405
Skip Montanaro6dead952003-09-25 14:50:04 +000026406ac_configure_extra_args=
26407
26408if $ac_cs_silent; then
26409 exec 6>/dev/null
26410 ac_configure_extra_args="$ac_configure_extra_args --silent"
26411fi
26412
26413_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026414cat >>$CONFIG_STATUS <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026415if \$ac_cs_recheck; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026416 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
26417 CONFIG_SHELL=$SHELL
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026418 export CONFIG_SHELL
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026419 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000026420fi
26421
Martin v. Löwis11437992002-04-12 09:54:03 +000026422_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026423cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026424exec 5>>config.log
26425{
26426 echo
26427 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
26428## Running $as_me. ##
26429_ASBOX
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026430 echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026431} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026432
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026433_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026434cat >>$CONFIG_STATUS <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026435_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026436
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026437cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026438
26439# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000026440for ac_config_target in $ac_config_targets
26441do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026442 case $ac_config_target in
26443 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
26444 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
26445 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000026446 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
26447 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026448 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
26449 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000026450 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026451
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026452 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
26453echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000026454 { (exit 1); exit 1; }; };;
26455 esac
26456done
26457
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026458
Martin v. Löwis11437992002-04-12 09:54:03 +000026459# If the user did not use the arguments to specify the items to instantiate,
26460# then the envvar interface is used. Set only those that are not.
26461# We use the long form for the default assignment because of an extremely
26462# bizarre bug on SunOS 4.1.3.
26463if $ac_need_defaults; then
26464 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
26465 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
26466fi
26467
Skip Montanaro6dead952003-09-25 14:50:04 +000026468# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026469# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000026470# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026471# Hook for its removal unless debugging.
26472# Note that there is a small window in which the directory will not be cleaned:
26473# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000026474$debug ||
26475{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026476 tmp=
26477 trap 'exit_status=$?
26478 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
26479' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000026480 trap '{ (exit 1); exit 1; }' 1 2 13 15
26481}
Martin v. Löwis11437992002-04-12 09:54:03 +000026482# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000026483
Martin v. Löwis11437992002-04-12 09:54:03 +000026484{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026485 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000026486 test -n "$tmp" && test -d "$tmp"
26487} ||
26488{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026489 tmp=./conf$$-$RANDOM
26490 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000026491} ||
26492{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026493 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000026494 { (exit 1); exit 1; }
26495}
26496
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026497#
26498# Set up the sed scripts for CONFIG_FILES section.
26499#
26500
26501# No need to generate the scripts if there are no CONFIG_FILES.
26502# This happens for instance when ./config.status config.h
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026503if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026504
26505_ACEOF
26506
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026507
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026508
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026509ac_delim='%!_!# '
26510for ac_last_try in false false false false false :; do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026511 cat >conf$$subs.sed <<_ACEOF
26512SHELL!$SHELL$ac_delim
26513PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
26514PACKAGE_NAME!$PACKAGE_NAME$ac_delim
26515PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
26516PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
26517PACKAGE_STRING!$PACKAGE_STRING$ac_delim
26518PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
26519exec_prefix!$exec_prefix$ac_delim
26520prefix!$prefix$ac_delim
26521program_transform_name!$program_transform_name$ac_delim
26522bindir!$bindir$ac_delim
26523sbindir!$sbindir$ac_delim
26524libexecdir!$libexecdir$ac_delim
26525datarootdir!$datarootdir$ac_delim
26526datadir!$datadir$ac_delim
26527sysconfdir!$sysconfdir$ac_delim
26528sharedstatedir!$sharedstatedir$ac_delim
26529localstatedir!$localstatedir$ac_delim
26530includedir!$includedir$ac_delim
26531oldincludedir!$oldincludedir$ac_delim
26532docdir!$docdir$ac_delim
26533infodir!$infodir$ac_delim
26534htmldir!$htmldir$ac_delim
26535dvidir!$dvidir$ac_delim
26536pdfdir!$pdfdir$ac_delim
26537psdir!$psdir$ac_delim
26538libdir!$libdir$ac_delim
26539localedir!$localedir$ac_delim
26540mandir!$mandir$ac_delim
26541DEFS!$DEFS$ac_delim
26542ECHO_C!$ECHO_C$ac_delim
26543ECHO_N!$ECHO_N$ac_delim
26544ECHO_T!$ECHO_T$ac_delim
26545LIBS!$LIBS$ac_delim
26546build_alias!$build_alias$ac_delim
26547host_alias!$host_alias$ac_delim
26548target_alias!$target_alias$ac_delim
26549VERSION!$VERSION$ac_delim
26550SOVERSION!$SOVERSION$ac_delim
26551CONFIG_ARGS!$CONFIG_ARGS$ac_delim
26552UNIVERSALSDK!$UNIVERSALSDK$ac_delim
26553ARCH_RUN_32BIT!$ARCH_RUN_32BIT$ac_delim
Benjamin Petersone7e59c22010-03-23 21:05:56 +000026554LIPO_32BIT_FLAGS!$LIPO_32BIT_FLAGS$ac_delim
26555LIPO_64BIT_FLAGS!$LIPO_64BIT_FLAGS$ac_delim
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026556PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
26557PYTHONFRAMEWORKIDENTIFIER!$PYTHONFRAMEWORKIDENTIFIER$ac_delim
26558PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
26559PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
26560PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
26561FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
26562FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
26563FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
26564FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
26565FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
26566MACHDEP!$MACHDEP$ac_delim
26567SGI_ABI!$SGI_ABI$ac_delim
26568CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
26569EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim
26570CC!$CC$ac_delim
26571CFLAGS!$CFLAGS$ac_delim
26572LDFLAGS!$LDFLAGS$ac_delim
26573CPPFLAGS!$CPPFLAGS$ac_delim
26574ac_ct_CC!$ac_ct_CC$ac_delim
26575EXEEXT!$EXEEXT$ac_delim
26576OBJEXT!$OBJEXT$ac_delim
26577CXX!$CXX$ac_delim
26578MAINCC!$MAINCC$ac_delim
26579CPP!$CPP$ac_delim
26580GREP!$GREP$ac_delim
26581EGREP!$EGREP$ac_delim
26582BUILDEXEEXT!$BUILDEXEEXT$ac_delim
26583LIBRARY!$LIBRARY$ac_delim
26584LDLIBRARY!$LDLIBRARY$ac_delim
26585DLLLIBRARY!$DLLLIBRARY$ac_delim
26586BLDLIBRARY!$BLDLIBRARY$ac_delim
26587LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
26588INSTSONAME!$INSTSONAME$ac_delim
26589RUNSHARED!$RUNSHARED$ac_delim
26590LINKCC!$LINKCC$ac_delim
26591GNULD!$GNULD$ac_delim
26592RANLIB!$RANLIB$ac_delim
26593AR!$AR$ac_delim
26594ARFLAGS!$ARFLAGS$ac_delim
26595SVNVERSION!$SVNVERSION$ac_delim
26596INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
26597INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
26598INSTALL_DATA!$INSTALL_DATA$ac_delim
26599LN!$LN$ac_delim
26600OPT!$OPT$ac_delim
26601BASECFLAGS!$BASECFLAGS$ac_delim
26602UNIVERSAL_ARCH_FLAGS!$UNIVERSAL_ARCH_FLAGS$ac_delim
26603OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
26604LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
26605SO!$SO$ac_delim
26606LDSHARED!$LDSHARED$ac_delim
26607BLDSHARED!$BLDSHARED$ac_delim
26608CCSHARED!$CCSHARED$ac_delim
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026609_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026610
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026611 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026612 break
26613 elif $ac_last_try; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026614 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
26615echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026616 { (exit 1); exit 1; }; }
26617 else
26618 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000026619 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026620done
26621
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026622ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
26623if test -n "$ac_eof"; then
26624 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
26625 ac_eof=`expr $ac_eof + 1`
26626fi
26627
26628cat >>$CONFIG_STATUS <<_ACEOF
26629cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
26630/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026631_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026632sed '
26633s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
26634s/^/s,@/; s/!/@,|#_!!_#|/
26635:n
26636t n
26637s/'"$ac_delim"'$/,g/; t
26638s/$/\\/; p
26639N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
26640' >>$CONFIG_STATUS <conf$$subs.sed
26641rm -f conf$$subs.sed
26642cat >>$CONFIG_STATUS <<_ACEOF
26643CEOF$ac_eof
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026644_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026645
26646
26647ac_delim='%!_!# '
26648for ac_last_try in false false false false false :; do
26649 cat >conf$$subs.sed <<_ACEOF
Benjamin Petersone7e59c22010-03-23 21:05:56 +000026650LINKFORSHARED!$LINKFORSHARED$ac_delim
26651CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026652SHLIBS!$SHLIBS$ac_delim
26653USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
26654SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
26655USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
26656LDLAST!$LDLAST$ac_delim
26657THREADOBJ!$THREADOBJ$ac_delim
26658DLINCLDIR!$DLINCLDIR$ac_delim
26659DYNLOADFILE!$DYNLOADFILE$ac_delim
26660MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
26661TRUE!$TRUE$ac_delim
26662LIBOBJS!$LIBOBJS$ac_delim
26663HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
26664HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
26665HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
26666HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
26667HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
26668LIBM!$LIBM$ac_delim
26669LIBC!$LIBC$ac_delim
26670THREADHEADERS!$THREADHEADERS$ac_delim
26671SRCDIRS!$SRCDIRS$ac_delim
26672LTLIBOBJS!$LTLIBOBJS$ac_delim
26673_ACEOF
26674
Benjamin Petersone7e59c22010-03-23 21:05:56 +000026675 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 23; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026676 break
26677 elif $ac_last_try; then
26678 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
26679echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026680 { (exit 1); exit 1; }; }
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026681 else
26682 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
26683 fi
26684done
26685
26686ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
26687if test -n "$ac_eof"; then
26688 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
26689 ac_eof=`expr $ac_eof + 1`
26690fi
26691
26692cat >>$CONFIG_STATUS <<_ACEOF
26693cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
26694/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026695_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026696sed '
26697s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
26698s/^/s,@/; s/!/@,|#_!!_#|/
26699:n
26700t n
26701s/'"$ac_delim"'$/,g/; t
26702s/$/\\/; p
26703N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
26704' >>$CONFIG_STATUS <conf$$subs.sed
26705rm -f conf$$subs.sed
26706cat >>$CONFIG_STATUS <<_ACEOF
26707:end
26708s/|#_!!_#|//g
26709CEOF$ac_eof
26710_ACEOF
26711
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026712
26713# VPATH may cause trouble with some makes, so we remove $(srcdir),
26714# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
26715# trailing colons and then remove the whole line if VPATH becomes empty
26716# (actually we leave an empty line to preserve line numbers).
26717if test "x$srcdir" = x.; then
26718 ac_vpsub='/^[ ]*VPATH[ ]*=/{
26719s/:*\$(srcdir):*/:/
26720s/:*\${srcdir}:*/:/
26721s/:*@srcdir@:*/:/
26722s/^\([^=]*=[ ]*\):*/\1/
26723s/:*$//
26724s/^[^=]*=[ ]*$//
26725}'
26726fi
26727
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026728cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026729fi # test -n "$CONFIG_FILES"
26730
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026731
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026732for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026733do
26734 case $ac_tag in
26735 :[FHLC]) ac_mode=$ac_tag; continue;;
26736 esac
26737 case $ac_mode$ac_tag in
26738 :[FHL]*:*);;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026739 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
26740echo "$as_me: error: Invalid tag $ac_tag." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026741 { (exit 1); exit 1; }; };;
26742 :[FH]-) ac_tag=-:-;;
26743 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
26744 esac
26745 ac_save_IFS=$IFS
26746 IFS=:
26747 set x $ac_tag
26748 IFS=$ac_save_IFS
26749 shift
26750 ac_file=$1
26751 shift
26752
26753 case $ac_mode in
26754 :L) ac_source=$1;;
26755 :[FH])
26756 ac_file_inputs=
26757 for ac_f
26758 do
26759 case $ac_f in
26760 -) ac_f="$tmp/stdin";;
26761 *) # Look for the file first in the build tree, then in the source tree
26762 # (if the path is not absolute). The absolute path cannot be DOS-style,
26763 # because $ac_f cannot contain `:'.
26764 test -f "$ac_f" ||
26765 case $ac_f in
26766 [\\/$]*) false;;
26767 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
26768 esac ||
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026769 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
26770echo "$as_me: error: cannot find input file: $ac_f" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026771 { (exit 1); exit 1; }; };;
26772 esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026773 ac_file_inputs="$ac_file_inputs $ac_f"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026774 done
26775
26776 # Let's still pretend it is `configure' which instantiates (i.e., don't
26777 # use $as_me), people would be surprised to read:
26778 # /* config.h. Generated by config.status. */
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026779 configure_input="Generated from "`IFS=:
26780 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026781 if test x"$ac_file" != x-; then
26782 configure_input="$ac_file. $configure_input"
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026783 { echo "$as_me:$LINENO: creating $ac_file" >&5
26784echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026785 fi
26786
26787 case $ac_tag in
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026788 *:-:* | *:-) cat >"$tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026789 esac
26790 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026791 esac
26792
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026793 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000026794$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026795 X"$ac_file" : 'X\(//\)[^/]' \| \
26796 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026797 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026798echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026799 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26800 s//\1/
26801 q
26802 }
26803 /^X\(\/\/\)[^/].*/{
26804 s//\1/
26805 q
26806 }
26807 /^X\(\/\/\)$/{
26808 s//\1/
26809 q
26810 }
26811 /^X\(\/\).*/{
26812 s//\1/
26813 q
26814 }
26815 s/.*/./; q'`
26816 { as_dir="$ac_dir"
26817 case $as_dir in #(
26818 -*) as_dir=./$as_dir;;
26819 esac
26820 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000026821 as_dirs=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026822 while :; do
26823 case $as_dir in #(
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026824 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026825 *) as_qdir=$as_dir;;
26826 esac
26827 as_dirs="'$as_qdir' $as_dirs"
26828 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000026829$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026830 X"$as_dir" : 'X\(//\)[^/]' \| \
26831 X"$as_dir" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026832 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026833echo X"$as_dir" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026834 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26835 s//\1/
26836 q
26837 }
26838 /^X\(\/\/\)[^/].*/{
26839 s//\1/
26840 q
26841 }
26842 /^X\(\/\/\)$/{
26843 s//\1/
26844 q
26845 }
26846 /^X\(\/\).*/{
26847 s//\1/
26848 q
26849 }
26850 s/.*/./; q'`
26851 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000026852 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026853 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026854 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
26855echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000026856 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026857 ac_builddir=.
26858
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026859case "$ac_dir" in
26860.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
26861*)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026862 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026863 # A ".." for each directory in $ac_dir_suffix.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026864 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026865 case $ac_top_builddir_sub in
26866 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
26867 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
26868 esac ;;
26869esac
26870ac_abs_top_builddir=$ac_pwd
26871ac_abs_builddir=$ac_pwd$ac_dir_suffix
26872# for backward compatibility:
26873ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000026874
26875case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026876 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000026877 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026878 ac_top_srcdir=$ac_top_builddir_sub
26879 ac_abs_top_srcdir=$ac_pwd ;;
26880 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000026881 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026882 ac_top_srcdir=$srcdir
26883 ac_abs_top_srcdir=$srcdir ;;
26884 *) # Relative name.
26885 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
26886 ac_top_srcdir=$ac_top_build_prefix$srcdir
26887 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026888esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026889ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000026890
Martin v. Löwis11437992002-04-12 09:54:03 +000026891
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026892 case $ac_mode in
26893 :F)
26894 #
26895 # CONFIG_FILE
26896 #
Martin v. Löwis11437992002-04-12 09:54:03 +000026897
26898 case $INSTALL in
26899 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026900 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026901 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000026902_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026903
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026904cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026905# If the template does not know about datarootdir, expand it.
26906# FIXME: This hack should be removed a few years after 2.60.
26907ac_datarootdir_hack=; ac_datarootdir_seen=
26908
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026909case `sed -n '/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026910 p
26911 q
26912}
26913/@datadir@/p
26914/@docdir@/p
26915/@infodir@/p
26916/@localedir@/p
26917/@mandir@/p
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026918' $ac_file_inputs` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026919*datarootdir*) ac_datarootdir_seen=yes;;
26920*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026921 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
26922echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026923_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026924cat >>$CONFIG_STATUS <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026925 ac_datarootdir_hack='
26926 s&@datadir@&$datadir&g
26927 s&@docdir@&$docdir&g
26928 s&@infodir@&$infodir&g
26929 s&@localedir@&$localedir&g
26930 s&@mandir@&$mandir&g
26931 s&\\\${datarootdir}&$datarootdir&g' ;;
26932esac
26933_ACEOF
26934
26935# Neutralize VPATH when `$srcdir' = `.'.
26936# Shell code in configure.ac might set extrasub.
26937# FIXME: do we really want to maintain this feature?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026938cat >>$CONFIG_STATUS <<_ACEOF
26939 sed "$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000026940$extrasub
26941_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026942cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026943:t
26944/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026945s&@configure_input@&$configure_input&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026946s&@top_builddir@&$ac_top_builddir_sub&;t t
26947s&@srcdir@&$ac_srcdir&;t t
26948s&@abs_srcdir@&$ac_abs_srcdir&;t t
26949s&@top_srcdir@&$ac_top_srcdir&;t t
26950s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
26951s&@builddir@&$ac_builddir&;t t
26952s&@abs_builddir@&$ac_abs_builddir&;t t
26953s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
26954s&@INSTALL@&$ac_INSTALL&;t t
26955$ac_datarootdir_hack
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026956" $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 +000026957
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026958test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
26959 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
26960 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026961 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026962which seems to be undefined. Please make sure it is defined." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026963echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026964which seems to be undefined. Please make sure it is defined." >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000026965
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026966 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000026967 case $ac_file in
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026968 -) cat "$tmp/out"; rm -f "$tmp/out";;
26969 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
26970 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026971 ;;
26972 :H)
26973 #
26974 # CONFIG_HEADER
26975 #
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026976_ACEOF
26977
26978# Transform confdefs.h into a sed script `conftest.defines', that
26979# substitutes the proper values into config.h.in to produce config.h.
26980rm -f conftest.defines conftest.tail
26981# First, append a space to every undef/define line, to ease matching.
26982echo 's/$/ /' >conftest.defines
26983# Then, protect against being on the right side of a sed subst, or in
26984# an unquoted here document, in config.status. If some macros were
26985# called several times there might be several #defines for the same
26986# symbol, which is useless. But do not sort them, since the last
26987# AC_DEFINE must be honored.
26988ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
26989# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
26990# NAME is the cpp macro being defined, VALUE is the value it is being given.
26991# PARAMS is the parameter list in the macro definition--in most cases, it's
26992# just an empty string.
26993ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
26994ac_dB='\\)[ (].*,\\1define\\2'
26995ac_dC=' '
26996ac_dD=' ,'
26997
26998uniq confdefs.h |
26999 sed -n '
27000 t rset
27001 :rset
27002 s/^[ ]*#[ ]*define[ ][ ]*//
27003 t ok
27004 d
27005 :ok
27006 s/[\\&,]/\\&/g
27007 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
27008 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
27009 ' >>conftest.defines
27010
27011# Remove the space that was appended to ease matching.
27012# Then replace #undef with comments. This is necessary, for
27013# example, in the case of _POSIX_SOURCE, which is predefined and required
27014# on some systems where configure will not decide to define it.
27015# (The regexp can be short, since the line contains either #define or #undef.)
27016echo 's/ $//
27017s,^[ #]*u.*,/* & */,' >>conftest.defines
27018
27019# Break up conftest.defines:
27020ac_max_sed_lines=50
27021
27022# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
27023# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
27024# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
27025# et cetera.
27026ac_in='$ac_file_inputs'
27027ac_out='"$tmp/out1"'
27028ac_nxt='"$tmp/out2"'
27029
27030while :
27031do
27032 # Write a here document:
27033 cat >>$CONFIG_STATUS <<_ACEOF
27034 # First, check the format of the line:
27035 cat >"\$tmp/defines.sed" <<\\CEOF
27036/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
27037/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
27038b
27039:def
27040_ACEOF
27041 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
27042 echo 'CEOF
27043 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
27044 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
27045 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
27046 grep . conftest.tail >/dev/null || break
27047 rm -f conftest.defines
27048 mv conftest.tail conftest.defines
27049done
27050rm -f conftest.defines conftest.tail
27051
27052echo "ac_result=$ac_in" >>$CONFIG_STATUS
27053cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027054 if test x"$ac_file" != x-; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000027055 echo "/* $configure_input */" >"$tmp/config.h"
27056 cat "$ac_result" >>"$tmp/config.h"
27057 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
27058 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
27059echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027060 else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000027061 rm -f $ac_file
27062 mv "$tmp/config.h" $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000027063 fi
27064 else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000027065 echo "/* $configure_input */"
27066 cat "$ac_result"
Martin v. Löwis11437992002-04-12 09:54:03 +000027067 fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000027068 rm -f "$tmp/out12"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027069 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000027070
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027071
27072 esac
27073
27074done # for ac_tag
27075
Guido van Rossum627b2d71993-12-24 10:39:16 +000027076
Martin v. Löwis11437992002-04-12 09:54:03 +000027077{ (exit 0); exit 0; }
27078_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027079chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000027080ac_clean_files=$ac_clean_files_save
27081
27082
27083# configure is writing to config.log, and then calls config.status.
27084# config.status does its own redirection, appending to config.log.
27085# Unfortunately, on DOS this fails, as config.log is still kept open
27086# by configure, so config.status won't be able to write to it; its
27087# output is simply discarded. So we exec the FD to /dev/null,
27088# effectively closing config.log, so it can be properly (re)opened and
27089# appended to by config.status. When coming back to configure, we
27090# need to make the FD available again.
27091if test "$no_create" != yes; then
27092 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000027093 ac_config_status_args=
27094 test "$silent" = yes &&
27095 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000027096 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000027097 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000027098 exec 5>>config.log
27099 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
27100 # would make configure fail if this is the last instruction.
27101 $ac_cs_success || { (exit 1); exit 1; }
27102fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000027103
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000027104
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000027105echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000027106if test ! -f Modules/Setup
27107then
27108 cp $srcdir/Modules/Setup.dist Modules/Setup
27109fi
27110
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000027111echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000027112if test ! -f Modules/Setup.local
27113then
27114 echo "# Edit this file for local setup changes" >Modules/Setup.local
27115fi
27116
27117echo "creating Makefile"
27118$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
27119 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000027120 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000027121mv config.c Modules