blob: bae822ba6f995e98175b5bc7928173cea8a09d69 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Martin v. Löwisf6594222010-02-15 08:37:47 +00002# From configure.in Revision: 78157 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004# Generated by GNU Autoconf 2.61 for python 3.1.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Georg Brandle2e15612009-05-20 18:25:10 +00006# Report bugs to <http://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00007#
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010# This configure script is free software; the Free Software Foundation
11# gives unlimited permission to copy, distribute and modify it.
Martin v. Löwis11437992002-04-12 09:54:03 +000012## --------------------- ##
13## M4sh Initialization. ##
14## --------------------- ##
15
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016# Be more Bourne compatible
17DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000018if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
19 emulate sh
20 NULLCMD=:
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000022 # is contrary to our usage. Disable this feature.
23 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000025else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026 case `(set -o) 2>/dev/null` in
27 *posix*) set -o posix ;;
28esac
29
Martin v. Löwis11437992002-04-12 09:54:03 +000030fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000031
32
Martin v. Löwis11437992002-04-12 09:54:03 +000033
Martin v. Löwis11437992002-04-12 09:54:03 +000034
Thomas Wouters47b49bf2007-08-30 22:15:33 +000035# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000036# Avoid depending upon Character Ranges.
37as_cr_letters='abcdefghijklmnopqrstuvwxyz'
38as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
39as_cr_Letters=$as_cr_letters$as_cr_LETTERS
40as_cr_digits='0123456789'
41as_cr_alnum=$as_cr_Letters$as_cr_digits
42
43# The user is always right.
44if test "${PATH_SEPARATOR+set}" != set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000045 echo "#! /bin/sh" >conf$$.sh
46 echo "exit 0" >>conf$$.sh
47 chmod +x conf$$.sh
48 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
49 PATH_SEPARATOR=';'
50 else
51 PATH_SEPARATOR=:
52 fi
53 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000054fi
55
Thomas Wouters47b49bf2007-08-30 22:15:33 +000056# Support unset when possible.
57if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
58 as_unset=unset
59else
60 as_unset=false
61fi
Martin v. Löwis11437992002-04-12 09:54:03 +000062
Thomas Wouters47b49bf2007-08-30 22:15:33 +000063
64# IFS
65# We need space, tab and new line, in precisely that order. Quoting is
66# there to prevent editors from complaining about space-tab.
67# (If _AS_PATH_WALK were called with IFS unset, it would disable word
68# splitting by setting IFS to empty value.)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000069as_nl='
70'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000071IFS=" "" $as_nl"
72
73# Find who we are. Look in the path if we contain no directory separator.
74case $0 in
75 *[\\/]* ) as_myself=$0 ;;
76 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000077for as_dir in $PATH
78do
79 IFS=$as_save_IFS
80 test -z "$as_dir" && as_dir=.
81 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
82done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000083IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000084
Thomas Wouters47b49bf2007-08-30 22:15:33 +000085 ;;
86esac
87# We did not find ourselves, most probably we were run as `sh COMMAND'
88# in which case we are not to be found in the path.
89if test "x$as_myself" = x; then
90 as_myself=$0
91fi
92if test ! -f "$as_myself"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000093 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +000094 { (exit 1); exit 1; }
95fi
96
97# Work around bugs in pre-3.0 UWIN ksh.
98for as_var in ENV MAIL MAILPATH
99do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
100done
101PS1='$ '
102PS2='> '
103PS4='+ '
104
105# NLS nuisances.
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000106for as_var in \
107 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
108 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
109 LC_TELEPHONE LC_TIME
110do
111 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
112 eval $as_var=C; export $as_var
113 else
114 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
115 fi
116done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000117
118# Required to use basename.
119if expr a : '\(a\)' >/dev/null 2>&1 &&
120 test "X`expr 00001 : '.*\(...\)'`" = X001; then
121 as_expr=expr
122else
123 as_expr=false
124fi
125
126if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
127 as_basename=basename
128else
129 as_basename=false
130fi
131
132
133# Name of the executable.
134as_me=`$as_basename -- "$0" ||
135$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
136 X"$0" : 'X\(//\)$' \| \
137 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000138echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000139 sed '/^.*\/\([^/][^/]*\)\/*$/{
140 s//\1/
141 q
142 }
143 /^X\/\(\/\/\)$/{
144 s//\1/
145 q
146 }
147 /^X\/\(\/\).*/{
148 s//\1/
149 q
150 }
151 s/.*/./; q'`
152
153# CDPATH.
154$as_unset CDPATH
155
156
157if test "x$CONFIG_SHELL" = x; then
158 if (eval ":") 2>/dev/null; then
159 as_have_required=yes
160else
161 as_have_required=no
162fi
163
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000164 if test $as_have_required = yes && (eval ":
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000165(as_func_return () {
166 (exit \$1)
167}
168as_func_success () {
169 as_func_return 0
170}
171as_func_failure () {
172 as_func_return 1
173}
174as_func_ret_success () {
175 return 0
176}
177as_func_ret_failure () {
178 return 1
179}
180
181exitcode=0
182if as_func_success; then
183 :
184else
185 exitcode=1
186 echo as_func_success failed.
187fi
188
189if as_func_failure; then
190 exitcode=1
191 echo as_func_failure succeeded.
192fi
193
194if as_func_ret_success; then
195 :
196else
197 exitcode=1
198 echo as_func_ret_success failed.
199fi
200
201if as_func_ret_failure; then
202 exitcode=1
203 echo as_func_ret_failure succeeded.
204fi
205
206if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
207 :
208else
209 exitcode=1
210 echo positional parameters were not saved.
211fi
212
213test \$exitcode = 0) || { (exit 1); exit 1; }
214
215(
216 as_lineno_1=\$LINENO
217 as_lineno_2=\$LINENO
218 test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
219 test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
220") 2> /dev/null; then
221 :
222else
223 as_candidate_shells=
Martin v. Löwis11437992002-04-12 09:54:03 +0000224 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters89f507f2006-12-13 04:49:30 +0000225for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
Martin v. Löwis11437992002-04-12 09:54:03 +0000226do
227 IFS=$as_save_IFS
228 test -z "$as_dir" && as_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000229 case $as_dir in
Martin v. Löwis11437992002-04-12 09:54:03 +0000230 /*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000231 for as_base in sh bash ksh sh5; do
232 as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
233 done;;
234 esac
235done
236IFS=$as_save_IFS
237
238
239 for as_shell in $as_candidate_shells $SHELL; do
240 # Try only shells that exist, to save several forks.
241 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
242 { ("$as_shell") 2> /dev/null <<\_ASEOF
243if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
244 emulate sh
245 NULLCMD=:
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000246 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000247 # is contrary to our usage. Disable this feature.
248 alias -g '${1+"$@"}'='"$@"'
249 setopt NO_GLOB_SUBST
250else
251 case `(set -o) 2>/dev/null` in
252 *posix*) set -o posix ;;
253esac
254
255fi
256
257
258:
259_ASEOF
260}; then
261 CONFIG_SHELL=$as_shell
262 as_have_required=yes
263 if { "$as_shell" 2> /dev/null <<\_ASEOF
264if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
265 emulate sh
266 NULLCMD=:
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000267 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000268 # is contrary to our usage. Disable this feature.
269 alias -g '${1+"$@"}'='"$@"'
270 setopt NO_GLOB_SUBST
271else
272 case `(set -o) 2>/dev/null` in
273 *posix*) set -o posix ;;
274esac
275
276fi
277
278
279:
280(as_func_return () {
281 (exit $1)
282}
283as_func_success () {
284 as_func_return 0
285}
286as_func_failure () {
287 as_func_return 1
288}
289as_func_ret_success () {
290 return 0
291}
292as_func_ret_failure () {
293 return 1
294}
295
296exitcode=0
297if as_func_success; then
298 :
299else
300 exitcode=1
301 echo as_func_success failed.
302fi
303
304if as_func_failure; then
305 exitcode=1
306 echo as_func_failure succeeded.
307fi
308
309if as_func_ret_success; then
310 :
311else
312 exitcode=1
313 echo as_func_ret_success failed.
314fi
315
316if as_func_ret_failure; then
317 exitcode=1
318 echo as_func_ret_failure succeeded.
319fi
320
321if ( set x; as_func_ret_success y && test x = "$1" ); then
322 :
323else
324 exitcode=1
325 echo positional parameters were not saved.
326fi
327
328test $exitcode = 0) || { (exit 1); exit 1; }
329
330(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000331 as_lineno_1=$LINENO
332 as_lineno_2=$LINENO
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000333 test "x$as_lineno_1" != "x$as_lineno_2" &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000334 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
335
336_ASEOF
337}; then
338 break
339fi
340
341fi
342
343 done
344
345 if test "x$CONFIG_SHELL" != x; then
346 for as_var in BASH_ENV ENV
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000347 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
348 done
349 export CONFIG_SHELL
350 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000351fi
352
353
354 if test $as_have_required = no; then
355 echo This script requires a shell more modern than all the
356 echo shells that I found on your system. Please install a
357 echo modern shell, or manually run the script under such a
358 echo shell if you do have one.
359 { (exit 1); exit 1; }
360fi
361
362
363fi
364
365fi
366
367
368
369(eval "as_func_return () {
370 (exit \$1)
371}
372as_func_success () {
373 as_func_return 0
374}
375as_func_failure () {
376 as_func_return 1
377}
378as_func_ret_success () {
379 return 0
380}
381as_func_ret_failure () {
382 return 1
383}
384
385exitcode=0
386if as_func_success; then
387 :
388else
389 exitcode=1
390 echo as_func_success failed.
391fi
392
393if as_func_failure; then
394 exitcode=1
395 echo as_func_failure succeeded.
396fi
397
398if as_func_ret_success; then
399 :
400else
401 exitcode=1
402 echo as_func_ret_success failed.
403fi
404
405if as_func_ret_failure; then
406 exitcode=1
407 echo as_func_ret_failure succeeded.
408fi
409
410if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
411 :
412else
413 exitcode=1
414 echo positional parameters were not saved.
415fi
416
417test \$exitcode = 0") || {
418 echo No shell found that supports shell functions.
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000419 echo Please tell autoconf@gnu.org about your system,
420 echo including any error possibly output before this
421 echo message
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000422}
423
424
425
426 as_lineno_1=$LINENO
427 as_lineno_2=$LINENO
428 test "x$as_lineno_1" != "x$as_lineno_2" &&
429 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Martin v. Löwis11437992002-04-12 09:54:03 +0000430
431 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
432 # uniformly replaced by the line number. The first 'sed' inserts a
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000433 # line-number line after each line using $LINENO; the second 'sed'
434 # does the real work. The second script uses 'N' to pair each
435 # line-number line with the line containing $LINENO, and appends
436 # trailing '-' during substitution so that $LINENO is not a special
437 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +0000438 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000439 # scripts with optimization help from Paolo Bonzini. Blame Lee
440 # E. McMahon (1931-1989) for sed's syntax. :-)
441 sed -n '
442 p
443 /[$]LINENO/=
444 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000445 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000446 s/[$]LINENO.*/&-/
447 t lineno
448 b
449 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000450 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000451 :loop
452 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000453 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000454 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000455 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000456 chmod +x "$as_me.lineno" ||
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000457 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000458 { (exit 1); exit 1; }; }
459
460 # Don't try to exec as it changes $[0], causing all sort of problems
461 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000462 # original and so on. Autoconf is especially sensitive to this).
463 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000464 # Exit status is that of the last command.
465 exit
466}
467
468
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000469if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
470 as_dirname=dirname
471else
472 as_dirname=false
473fi
474
475ECHO_C= ECHO_N= ECHO_T=
476case `echo -n x` in
477-n*)
478 case `echo 'x\c'` in
479 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
480 *) ECHO_C='\c';;
481 esac;;
482*)
483 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000484esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000485
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000486if expr a : '\(a\)' >/dev/null 2>&1 &&
487 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000488 as_expr=expr
489else
490 as_expr=false
491fi
492
493rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000494if test -d conf$$.dir; then
495 rm -f conf$$.dir/conf$$.file
496else
497 rm -f conf$$.dir
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000498 mkdir conf$$.dir
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000499fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000500echo >conf$$.file
501if ln -s conf$$.file conf$$ 2>/dev/null; then
502 as_ln_s='ln -s'
503 # ... but there are two gotchas:
504 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
505 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
506 # In both cases, we have to default to `cp -p'.
507 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +0000508 as_ln_s='cp -p'
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000509elif ln conf$$.file conf$$ 2>/dev/null; then
510 as_ln_s=ln
Martin v. Löwis11437992002-04-12 09:54:03 +0000511else
512 as_ln_s='cp -p'
513fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000514rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
515rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000516
Skip Montanaro6dead952003-09-25 14:50:04 +0000517if mkdir -p . 2>/dev/null; then
518 as_mkdir_p=:
519else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000520 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000521 as_mkdir_p=false
522fi
523
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000524if test -x / >/dev/null 2>&1; then
525 as_test_x='test -x'
526else
527 if ls -dL / >/dev/null 2>&1; then
528 as_ls_L_option=L
529 else
530 as_ls_L_option=
531 fi
532 as_test_x='
533 eval sh -c '\''
534 if test -d "$1"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000535 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000536 else
537 case $1 in
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000538 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000539 esac;
540 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
541 ???[sx]*):;;*)false;;esac;fi
542 '\'' sh
543 '
544fi
545as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +0000546
547# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000548as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000549
550# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000551as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000552
553
Martin v. Löwis11437992002-04-12 09:54:03 +0000554
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000555exec 7<&0 </dev/null 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000556
557# Name of the host.
558# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
559# so uname gets run too.
560ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
561
Martin v. Löwis11437992002-04-12 09:54:03 +0000562#
563# Initializations.
564#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000565ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000566ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000567ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000568LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000569cross_compiling=no
570subdirs=
571MFLAGS=
572MAKEFLAGS=
573SHELL=${CONFIG_SHELL-/bin/sh}
574
Martin v. Löwis11437992002-04-12 09:54:03 +0000575# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000576PACKAGE_NAME='python'
577PACKAGE_TARNAME='python'
Christian Heimes70e5cab2008-12-03 18:18:23 +0000578PACKAGE_VERSION='3.1'
579PACKAGE_STRING='python 3.1'
Georg Brandle2e15612009-05-20 18:25:10 +0000580PACKAGE_BUGREPORT='http://bugs.python.org/'
Martin v. Löwis11437992002-04-12 09:54:03 +0000581
582ac_unique_file="Include/object.h"
583# Factoring default headers for most tests.
584ac_includes_default="\
585#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000586#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000587# include <sys/types.h>
588#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000589#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000590# include <sys/stat.h>
591#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000592#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <stdlib.h>
594# include <stddef.h>
595#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000596# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000597# include <stdlib.h>
598# endif
599#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000600#ifdef HAVE_STRING_H
601# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000602# include <memory.h>
603# endif
604# include <string.h>
605#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000606#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000607# include <strings.h>
608#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000609#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000610# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000611#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000612#ifdef HAVE_STDINT_H
613# include <stdint.h>
614#endif
615#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000616# include <unistd.h>
617#endif"
618
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000619ac_subst_vars='SHELL
Benjamin Petersona8332062009-09-11 22:36:27 +0000620PATH_SEPARATOR
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000621PACKAGE_NAME
622PACKAGE_TARNAME
623PACKAGE_VERSION
624PACKAGE_STRING
625PACKAGE_BUGREPORT
626exec_prefix
627prefix
628program_transform_name
629bindir
630sbindir
631libexecdir
632datarootdir
633datadir
634sysconfdir
635sharedstatedir
636localstatedir
637includedir
638oldincludedir
639docdir
640infodir
641htmldir
642dvidir
643pdfdir
644psdir
645libdir
646localedir
647mandir
648DEFS
649ECHO_C
650ECHO_N
651ECHO_T
652LIBS
653build_alias
654host_alias
655target_alias
656VERSION
657SOVERSION
658CONFIG_ARGS
659UNIVERSALSDK
660ARCH_RUN_32BIT
661PYTHONFRAMEWORK
662PYTHONFRAMEWORKIDENTIFIER
663PYTHONFRAMEWORKDIR
664PYTHONFRAMEWORKPREFIX
665PYTHONFRAMEWORKINSTALLDIR
666FRAMEWORKINSTALLFIRST
667FRAMEWORKINSTALLLAST
668FRAMEWORKALTINSTALLFIRST
669FRAMEWORKALTINSTALLLAST
670FRAMEWORKUNIXTOOLSPREFIX
671MACHDEP
672SGI_ABI
673CONFIGURE_MACOSX_DEPLOYMENT_TARGET
674EXPORT_MACOSX_DEPLOYMENT_TARGET
675CC
676CFLAGS
677LDFLAGS
678CPPFLAGS
679ac_ct_CC
680EXEEXT
681OBJEXT
682CXX
683MAINCC
684CPP
685GREP
686EGREP
687BUILDEXEEXT
688LIBRARY
689LDLIBRARY
690DLLLIBRARY
691BLDLIBRARY
692LDLIBRARYDIR
693INSTSONAME
694RUNSHARED
695LINKCC
696GNULD
697RANLIB
698AR
699ARFLAGS
700SVNVERSION
701INSTALL_PROGRAM
702INSTALL_SCRIPT
703INSTALL_DATA
704LN
705OPT
706BASECFLAGS
707UNIVERSAL_ARCH_FLAGS
708OTHER_LIBTOOL_OPT
709LIBTOOL_CRUFT
710SO
711LDSHARED
712BLDSHARED
713CCSHARED
714LINKFORSHARED
715CFLAGSFORSHARED
716SHLIBS
717USE_SIGNAL_MODULE
718SIGNAL_OBJS
719USE_THREAD_MODULE
720LDLAST
721THREADOBJ
722DLINCLDIR
723DYNLOADFILE
724MACHDEP_OBJS
725TRUE
726LIBOBJS
727HAVE_GETHOSTBYNAME_R_6_ARG
728HAVE_GETHOSTBYNAME_R_5_ARG
729HAVE_GETHOSTBYNAME_R_3_ARG
730HAVE_GETHOSTBYNAME_R
731HAVE_GETHOSTBYNAME
732LIBM
733LIBC
734THREADHEADERS
735SRCDIRS
736LTLIBOBJS'
Skip Montanaro6dead952003-09-25 14:50:04 +0000737ac_subst_files=''
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000738 ac_precious_vars='build_alias
739host_alias
740target_alias
741CC
742CFLAGS
743LDFLAGS
744LIBS
745CPPFLAGS
746CPP'
747
Guido van Rossum627b2d71993-12-24 10:39:16 +0000748
Guido van Rossum7f43da71994-08-01 12:15:30 +0000749# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000750ac_init_help=
751ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000752# The variables have the same names as the options, with
753# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000754cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000755exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000756no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000757no_recursion=
758prefix=NONE
759program_prefix=NONE
760program_suffix=NONE
761program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000762silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000763site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000764srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000765verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000766x_includes=NONE
767x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000768
769# Installation directory options.
770# These are left unexpanded so users can "make install exec_prefix=/foo"
771# and all the variables that are supposed to be based on exec_prefix
772# by default will actually change.
773# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000774# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000775bindir='${exec_prefix}/bin'
776sbindir='${exec_prefix}/sbin'
777libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000778datarootdir='${prefix}/share'
779datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000780sysconfdir='${prefix}/etc'
781sharedstatedir='${prefix}/com'
782localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000783includedir='${prefix}/include'
784oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000785docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
786infodir='${datarootdir}/info'
787htmldir='${docdir}'
788dvidir='${docdir}'
789pdfdir='${docdir}'
790psdir='${docdir}'
791libdir='${exec_prefix}/lib'
792localedir='${datarootdir}/locale'
793mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000794
Guido van Rossum7f43da71994-08-01 12:15:30 +0000795ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000796ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000797for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000798do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000799 # If the previous option needs an argument, assign it.
800 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000801 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000802 ac_prev=
803 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000804 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000805
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000806 case $ac_option in
807 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
808 *) ac_optarg=yes ;;
809 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000810
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000811 # Accept the important Cygnus configure options, so we can diagnose typos.
812
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000813 case $ac_dashdash$ac_option in
814 --)
815 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000816
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000817 -bindir | --bindir | --bindi | --bind | --bin | --bi)
818 ac_prev=bindir ;;
819 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000820 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000821
822 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000823 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000824 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000825 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000826
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000827 -cache-file | --cache-file | --cache-fil | --cache-fi \
828 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
829 ac_prev=cache_file ;;
830 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
831 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000832 cache_file=$ac_optarg ;;
833
834 --config-cache | -C)
835 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000836
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000837 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000838 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000839 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000840 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000841
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000842 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
843 | --dataroo | --dataro | --datar)
844 ac_prev=datarootdir ;;
845 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
846 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
847 datarootdir=$ac_optarg ;;
848
Guido van Rossum7f43da71994-08-01 12:15:30 +0000849 -disable-* | --disable-*)
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000850 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000851 # Reject names that are not valid shell variable names.
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000852 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
853 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000854 { (exit 1); exit 1; }; }
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000855 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
856 eval enable_$ac_feature=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000857
858 -docdir | --docdir | --docdi | --doc | --do)
859 ac_prev=docdir ;;
860 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
861 docdir=$ac_optarg ;;
862
863 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
864 ac_prev=dvidir ;;
865 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
866 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000867
868 -enable-* | --enable-*)
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000869 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000870 # Reject names that are not valid shell variable names.
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000871 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
872 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000873 { (exit 1); exit 1; }; }
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000874 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
875 eval enable_$ac_feature=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000876
Guido van Rossum7f43da71994-08-01 12:15:30 +0000877 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
878 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
879 | --exec | --exe | --ex)
880 ac_prev=exec_prefix ;;
881 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
882 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
883 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000884 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000885
886 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000887 # Obsolete; use --with-gas.
888 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000889
Martin v. Löwis11437992002-04-12 09:54:03 +0000890 -help | --help | --hel | --he | -h)
891 ac_init_help=long ;;
892 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
893 ac_init_help=recursive ;;
894 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
895 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000896
897 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000898 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000899 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000900 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000901
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000902 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
903 ac_prev=htmldir ;;
904 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
905 | --ht=*)
906 htmldir=$ac_optarg ;;
907
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000908 -includedir | --includedir | --includedi | --included | --include \
909 | --includ | --inclu | --incl | --inc)
910 ac_prev=includedir ;;
911 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
912 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000913 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000914
915 -infodir | --infodir | --infodi | --infod | --info | --inf)
916 ac_prev=infodir ;;
917 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000918 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000919
920 -libdir | --libdir | --libdi | --libd)
921 ac_prev=libdir ;;
922 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000923 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000924
925 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
926 | --libexe | --libex | --libe)
927 ac_prev=libexecdir ;;
928 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
929 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000930 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000931
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000932 -localedir | --localedir | --localedi | --localed | --locale)
933 ac_prev=localedir ;;
934 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
935 localedir=$ac_optarg ;;
936
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000937 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000938 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000939 ac_prev=localstatedir ;;
940 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000941 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000942 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000943
944 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
945 ac_prev=mandir ;;
946 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000947 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000948
Guido van Rossum7f43da71994-08-01 12:15:30 +0000949 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000950 # Obsolete; use --without-fp.
951 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000952
953 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000954 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000955 no_create=yes ;;
956
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000957 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
958 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
959 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000960
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000961 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
962 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
963 | --oldin | --oldi | --old | --ol | --o)
964 ac_prev=oldincludedir ;;
965 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
966 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
967 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000968 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000969
Guido van Rossum7f43da71994-08-01 12:15:30 +0000970 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
971 ac_prev=prefix ;;
972 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000973 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000974
975 -program-prefix | --program-prefix | --program-prefi | --program-pref \
976 | --program-pre | --program-pr | --program-p)
977 ac_prev=program_prefix ;;
978 -program-prefix=* | --program-prefix=* | --program-prefi=* \
979 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000980 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000981
982 -program-suffix | --program-suffix | --program-suffi | --program-suff \
983 | --program-suf | --program-su | --program-s)
984 ac_prev=program_suffix ;;
985 -program-suffix=* | --program-suffix=* | --program-suffi=* \
986 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000987 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000988
989 -program-transform-name | --program-transform-name \
990 | --program-transform-nam | --program-transform-na \
991 | --program-transform-n | --program-transform- \
992 | --program-transform | --program-transfor \
993 | --program-transfo | --program-transf \
994 | --program-trans | --program-tran \
995 | --progr-tra | --program-tr | --program-t)
996 ac_prev=program_transform_name ;;
997 -program-transform-name=* | --program-transform-name=* \
998 | --program-transform-nam=* | --program-transform-na=* \
999 | --program-transform-n=* | --program-transform-=* \
1000 | --program-transform=* | --program-transfor=* \
1001 | --program-transfo=* | --program-transf=* \
1002 | --program-trans=* | --program-tran=* \
1003 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001004 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001005
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001006 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1007 ac_prev=pdfdir ;;
1008 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1009 pdfdir=$ac_optarg ;;
1010
1011 -psdir | --psdir | --psdi | --psd | --ps)
1012 ac_prev=psdir ;;
1013 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1014 psdir=$ac_optarg ;;
1015
Guido van Rossum7f43da71994-08-01 12:15:30 +00001016 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1017 | -silent | --silent | --silen | --sile | --sil)
1018 silent=yes ;;
1019
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001020 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1021 ac_prev=sbindir ;;
1022 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1023 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001024 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001025
1026 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1027 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1028 | --sharedst | --shareds | --shared | --share | --shar \
1029 | --sha | --sh)
1030 ac_prev=sharedstatedir ;;
1031 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1032 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1033 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1034 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001035 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001036
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001037 -site | --site | --sit)
1038 ac_prev=site ;;
1039 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001040 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001041
Guido van Rossum7f43da71994-08-01 12:15:30 +00001042 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1043 ac_prev=srcdir ;;
1044 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001045 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001046
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001047 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1048 | --syscon | --sysco | --sysc | --sys | --sy)
1049 ac_prev=sysconfdir ;;
1050 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1051 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001052 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001053
Guido van Rossum7f43da71994-08-01 12:15:30 +00001054 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001055 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001056 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001057 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001058
1059 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1060 verbose=yes ;;
1061
Martin v. Löwis11437992002-04-12 09:54:03 +00001062 -version | --version | --versio | --versi | --vers | -V)
1063 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001064
1065 -with-* | --with-*)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001066 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001067 # Reject names that are not valid shell variable names.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001068 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1069 { echo "$as_me: error: invalid package name: $ac_package" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001070 { (exit 1); exit 1; }; }
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001071 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1072 eval with_$ac_package=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001073
1074 -without-* | --without-*)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001075 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001076 # Reject names that are not valid shell variable names.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001077 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1078 { echo "$as_me: error: invalid package name: $ac_package" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001079 { (exit 1); exit 1; }; }
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001080 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1081 eval with_$ac_package=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001082
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001083 --x)
1084 # Obsolete; use --with-x.
1085 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001086
1087 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1088 | --x-incl | --x-inc | --x-in | --x-i)
1089 ac_prev=x_includes ;;
1090 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1091 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001092 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001093
1094 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1095 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1096 ac_prev=x_libraries ;;
1097 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1098 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001099 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001100
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001101 -*) { echo "$as_me: error: unrecognized option: $ac_option
Martin v. Löwis11437992002-04-12 09:54:03 +00001102Try \`$0 --help' for more information." >&2
1103 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001104 ;;
1105
Martin v. Löwis11437992002-04-12 09:54:03 +00001106 *=*)
1107 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1108 # Reject names that are not valid shell variable names.
1109 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001110 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001111 { (exit 1); exit 1; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001112 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001113 export $ac_envvar ;;
1114
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001115 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001116 # FIXME: should be removed in autoconf 3.0.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001117 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001118 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001119 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001120 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001121 ;;
1122
1123 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001124done
1125
Guido van Rossum7f43da71994-08-01 12:15:30 +00001126if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001127 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001128 { echo "$as_me: error: missing argument to $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001129 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001130fi
1131
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001132# Be sure to have absolute directory names.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001133for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1134 datadir sysconfdir sharedstatedir localstatedir includedir \
1135 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1136 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001137do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001138 eval ac_val=\$$ac_var
Martin v. Löwis11437992002-04-12 09:54:03 +00001139 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001140 [\\/$]* | ?:[\\/]* ) continue;;
1141 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001142 esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001143 { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001144 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001145done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001146
Martin v. Löwis11437992002-04-12 09:54:03 +00001147# There might be people who depend on the old broken behavior: `$host'
1148# used to hold the argument of --host etc.
1149# FIXME: To remove some day.
1150build=$build_alias
1151host=$host_alias
1152target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001153
Martin v. Löwis11437992002-04-12 09:54:03 +00001154# FIXME: To remove some day.
1155if test "x$host_alias" != x; then
1156 if test "x$build_alias" = x; then
1157 cross_compiling=maybe
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001158 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
Martin v. Löwis11437992002-04-12 09:54:03 +00001159 If a cross compiler is detected then cross compile mode will be used." >&2
1160 elif test "x$build_alias" != "x$host_alias"; then
1161 cross_compiling=yes
1162 fi
1163fi
1164
1165ac_tool_prefix=
1166test -n "$host_alias" && ac_tool_prefix=$host_alias-
1167
1168test "$silent" = yes && exec 6>/dev/null
1169
Guido van Rossum627b2d71993-12-24 10:39:16 +00001170
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001171ac_pwd=`pwd` && test -n "$ac_pwd" &&
1172ac_ls_di=`ls -di .` &&
1173ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001174 { echo "$as_me: error: Working directory cannot be determined" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001175 { (exit 1); exit 1; }; }
1176test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001177 { echo "$as_me: error: pwd does not report name of working directory" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001178 { (exit 1); exit 1; }; }
1179
1180
Guido van Rossum627b2d71993-12-24 10:39:16 +00001181# Find the source files, if location was not specified.
1182if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001183 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001184 # Try the directory containing this script, then the parent directory.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001185 ac_confdir=`$as_dirname -- "$0" ||
1186$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1187 X"$0" : 'X\(//\)[^/]' \| \
1188 X"$0" : 'X\(//\)$' \| \
1189 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
1190echo X"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001191 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1192 s//\1/
1193 q
1194 }
1195 /^X\(\/\/\)[^/].*/{
1196 s//\1/
1197 q
1198 }
1199 /^X\(\/\/\)$/{
1200 s//\1/
1201 q
1202 }
1203 /^X\(\/\).*/{
1204 s//\1/
1205 q
1206 }
1207 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001208 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001209 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001210 srcdir=..
1211 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001212else
1213 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001214fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001215if test ! -r "$srcdir/$ac_unique_file"; then
1216 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001217 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001218 { (exit 1); exit 1; }; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00001219fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001220ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1221ac_abs_confdir=`(
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001222 cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001223 { (exit 1); exit 1; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001224 pwd)`
1225# When building in place, set srcdir=.
1226if test "$ac_abs_confdir" = "$ac_pwd"; then
1227 srcdir=.
1228fi
1229# Remove unnecessary trailing slashes from srcdir.
1230# Double slashes in file names in object file debugging info
1231# mess up M-x gdb in Emacs.
1232case $srcdir in
1233*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1234esac
1235for ac_var in $ac_precious_vars; do
1236 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1237 eval ac_env_${ac_var}_value=\$${ac_var}
1238 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1239 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1240done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001241
Martin v. Löwis11437992002-04-12 09:54:03 +00001242#
1243# Report the --help message.
1244#
1245if test "$ac_init_help" = "long"; then
1246 # Omit some internal or obsolete options to make the list less imposing.
1247 # This message is too long to be a string in the A/UX 3.1 sh.
1248 cat <<_ACEOF
Christian Heimes70e5cab2008-12-03 18:18:23 +00001249\`configure' configures python 3.1 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001250
1251Usage: $0 [OPTION]... [VAR=VALUE]...
1252
1253To assign environment variables (e.g., CC, CFLAGS...), specify them as
1254VAR=VALUE. See below for descriptions of some of the useful variables.
1255
1256Defaults for the options are specified in brackets.
1257
1258Configuration:
1259 -h, --help display this help and exit
1260 --help=short display options specific to this package
1261 --help=recursive display the short help of all the included packages
1262 -V, --version display version information and exit
1263 -q, --quiet, --silent do not print \`checking...' messages
1264 --cache-file=FILE cache test results in FILE [disabled]
1265 -C, --config-cache alias for \`--cache-file=config.cache'
1266 -n, --no-create do not create output files
1267 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1268
Martin v. Löwis11437992002-04-12 09:54:03 +00001269Installation directories:
1270 --prefix=PREFIX install architecture-independent files in PREFIX
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001271 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001272 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001273 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001274
1275By default, \`make install' will install all the files in
1276\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1277an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1278for instance \`--prefix=\$HOME'.
1279
1280For better control, use the options below.
1281
1282Fine tuning of the installation directories:
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001283 --bindir=DIR user executables [EPREFIX/bin]
1284 --sbindir=DIR system admin executables [EPREFIX/sbin]
1285 --libexecdir=DIR program executables [EPREFIX/libexec]
1286 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1287 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1288 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1289 --libdir=DIR object code libraries [EPREFIX/lib]
1290 --includedir=DIR C header files [PREFIX/include]
1291 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1292 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1293 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1294 --infodir=DIR info documentation [DATAROOTDIR/info]
1295 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1296 --mandir=DIR man documentation [DATAROOTDIR/man]
1297 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1298 --htmldir=DIR html documentation [DOCDIR]
1299 --dvidir=DIR dvi documentation [DOCDIR]
1300 --pdfdir=DIR pdf documentation [DOCDIR]
1301 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001302_ACEOF
1303
1304 cat <<\_ACEOF
1305_ACEOF
1306fi
1307
1308if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001309 case $ac_init_help in
Christian Heimes70e5cab2008-12-03 18:18:23 +00001310 short | recursive ) echo "Configuration of python 3.1:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001311 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001312 cat <<\_ACEOF
1313
1314Optional Features:
1315 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1316 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001317 --enable-universalsdk[=SDKDIR]
Christian Heimes292d3512008-02-03 16:51:08 +00001318 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001319 --enable-framework[=INSTALLDIR]
1320 Build (MacOSX|Darwin) framework
1321 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001322 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001323 --enable-ipv6 Enable ipv6 (with ipv4) support
1324 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001325 --enable-big-digits[=BITS]
1326 use big digits for Python longs [BITS=30]
Martin v. Löwis11437992002-04-12 09:54:03 +00001327
1328Optional Packages:
1329 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1330 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001331 --with-universal-archs=ARCH
1332 select architectures for universal build ("32-bit",
Ronald Oussoren856624d2009-09-08 07:13:53 +00001333 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001334 --with-framework-name=FRAMEWORK
1335 specify an alternate name of the framework built
1336 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001337 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001338 --with-cxx-main=<compiler>
1339 compile main() and link python executable with C++
1340 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001341 --with-suffix=.exe set executable suffix
1342 --with-pydebug build with Py_DEBUG defined
1343 --with-libs='lib1 ...' link against additional libs
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001344 --with-system-ffi build _ctypes module using an installed ffi library
Matthias Klose55708cc2009-04-30 08:06:49 +00001345 --with-dbmliborder=db1:db2:...
1346 order to check db backends for dbm. Valid value is a
1347 colon separated string with the backend names
1348 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001349 --with-signal-module disable/enable signal module
1350 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1351 --with(out)-threads[=DIRECTORY]
1352 disable/enable thread support
1353 --with(out)-thread[=DIRECTORY]
1354 deprecated; use --with(out)-threads
1355 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001356 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001357 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001358 --with(out)-pymalloc disable/enable specialized mallocs
1359 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001360 --with-fpectl enable SIGFPE catching
1361 --with-libm=STRING math library
1362 --with-libc=STRING C library
Georg Brandl52d168a2008-01-07 18:10:24 +00001363 --with-wide-unicode Use 4-byte Unicode characters (default is 2 bytes)
Antoine Pitroub52ec782009-01-25 16:34:23 +00001364 --with-computed-gotos Use computed gotos / threaded dispatch in evaluation
1365 loop (not available on all compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001366
1367Some influential environment variables:
1368 CC C compiler command
1369 CFLAGS C compiler flags
1370 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1371 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001372 LIBS libraries to pass to the linker, e.g. -l<library>
1373 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1374 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001375 CPP C preprocessor
1376
1377Use these variables to override the choices made by `configure' or to help
1378it to find libraries and programs with nonstandard names/locations.
1379
Georg Brandle2e15612009-05-20 18:25:10 +00001380Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001381_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001382ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001383fi
1384
1385if test "$ac_init_help" = "recursive"; then
1386 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001387 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001388 test -d "$ac_dir" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001389 ac_builddir=.
1390
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001391case "$ac_dir" in
1392.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1393*)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001394 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001395 # A ".." for each directory in $ac_dir_suffix.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001396 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001397 case $ac_top_builddir_sub in
1398 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1399 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1400 esac ;;
1401esac
1402ac_abs_top_builddir=$ac_pwd
1403ac_abs_builddir=$ac_pwd$ac_dir_suffix
1404# for backward compatibility:
1405ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001406
1407case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001408 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001409 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001410 ac_top_srcdir=$ac_top_builddir_sub
1411 ac_abs_top_srcdir=$ac_pwd ;;
1412 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001413 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001414 ac_top_srcdir=$srcdir
1415 ac_abs_top_srcdir=$srcdir ;;
1416 *) # Relative name.
1417 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1418 ac_top_srcdir=$ac_top_build_prefix$srcdir
1419 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001420esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001421ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001422
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001423 cd "$ac_dir" || { ac_status=$?; continue; }
1424 # Check for guested configure.
1425 if test -f "$ac_srcdir/configure.gnu"; then
1426 echo &&
1427 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1428 elif test -f "$ac_srcdir/configure"; then
1429 echo &&
1430 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001431 else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001432 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001433 fi || ac_status=$?
1434 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001435 done
1436fi
1437
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001438test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001439if $ac_init_version; then
1440 cat <<\_ACEOF
Christian Heimes70e5cab2008-12-03 18:18:23 +00001441python configure 3.1
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001442generated by GNU Autoconf 2.61
Martin v. Löwis11437992002-04-12 09:54:03 +00001443
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001444Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014452002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001446This configure script is free software; the Free Software Foundation
1447gives unlimited permission to copy, distribute and modify it.
1448_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001449 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001450fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001451cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00001452This file contains any messages produced by compilers while
1453running configure, to aid debugging if configure makes a mistake.
1454
Christian Heimes70e5cab2008-12-03 18:18:23 +00001455It was created by python $as_me 3.1, which was
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001456generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00001457
1458 $ $0 $@
1459
1460_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001461exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00001462{
1463cat <<_ASUNAME
1464## --------- ##
1465## Platform. ##
1466## --------- ##
1467
1468hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1469uname -m = `(uname -m) 2>/dev/null || echo unknown`
1470uname -r = `(uname -r) 2>/dev/null || echo unknown`
1471uname -s = `(uname -s) 2>/dev/null || echo unknown`
1472uname -v = `(uname -v) 2>/dev/null || echo unknown`
1473
1474/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1475/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1476
1477/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1478/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1479/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001480/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00001481/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1482/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1483/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1484
1485_ASUNAME
1486
1487as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1488for as_dir in $PATH
1489do
1490 IFS=$as_save_IFS
1491 test -z "$as_dir" && as_dir=.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001492 echo "PATH: $as_dir"
Martin v. Löwis11437992002-04-12 09:54:03 +00001493done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001494IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00001495
1496} >&5
1497
1498cat >&5 <<_ACEOF
1499
1500
1501## ----------- ##
1502## Core tests. ##
1503## ----------- ##
1504
1505_ACEOF
1506
1507
1508# Keep a trace of the command line.
1509# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001510# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001511# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001512# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001513ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001514ac_configure_args0=
1515ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00001516ac_must_keep_next=false
1517for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001518do
Skip Montanaro6dead952003-09-25 14:50:04 +00001519 for ac_arg
1520 do
1521 case $ac_arg in
1522 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1523 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1524 | -silent | --silent | --silen | --sile | --sil)
1525 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001526 *\'*)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001527 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00001528 esac
1529 case $ac_pass in
1530 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1531 2)
1532 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1533 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001534 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00001535 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00001536 case $ac_arg in
1537 *=* | --config-cache | -C | -disable-* | --disable-* \
1538 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1539 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1540 | -with-* | --with-* | -without-* | --without-* | --x)
1541 case "$ac_configure_args0 " in
1542 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1543 esac
1544 ;;
1545 -* ) ac_must_keep_next=true ;;
1546 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00001547 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001548 ac_configure_args="$ac_configure_args '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00001549 ;;
1550 esac
1551 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001552done
Skip Montanaro6dead952003-09-25 14:50:04 +00001553$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1554$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001555
1556# When interrupted or exit'd, cleanup temporary files, and complete
1557# config.log. We remove comments because anyway the quotes in there
1558# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001559# WARNING: Use '\'' to represent an apostrophe within the trap.
1560# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
Martin v. Löwis11437992002-04-12 09:54:03 +00001561trap 'exit_status=$?
1562 # Save into config.log some information that might help in debugging.
1563 {
1564 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001565
Martin v. Löwis11437992002-04-12 09:54:03 +00001566 cat <<\_ASBOX
1567## ---------------- ##
1568## Cache variables. ##
1569## ---------------- ##
1570_ASBOX
1571 echo
1572 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001573(
1574 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1575 eval ac_val=\$$ac_var
1576 case $ac_val in #(
1577 *${as_nl}*)
1578 case $ac_var in #(
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001579 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1580echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001581 esac
1582 case $ac_var in #(
1583 _ | IFS | as_nl) ;; #(
1584 *) $as_unset $ac_var ;;
1585 esac ;;
1586 esac
1587 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001588 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001589 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1590 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001591 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001592 "s/'\''/'\''\\\\'\'''\''/g;
1593 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1594 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001595 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001596 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001597 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001598 esac |
1599 sort
1600)
Martin v. Löwis11437992002-04-12 09:54:03 +00001601 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001602
1603 cat <<\_ASBOX
1604## ----------------- ##
1605## Output variables. ##
1606## ----------------- ##
1607_ASBOX
1608 echo
1609 for ac_var in $ac_subst_vars
1610 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001611 eval ac_val=\$$ac_var
1612 case $ac_val in
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001613 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001614 esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001615 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001616 done | sort
1617 echo
1618
1619 if test -n "$ac_subst_files"; then
1620 cat <<\_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001621## ------------------- ##
1622## File substitutions. ##
1623## ------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00001624_ASBOX
1625 echo
1626 for ac_var in $ac_subst_files
1627 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001628 eval ac_val=\$$ac_var
1629 case $ac_val in
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001630 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001631 esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001632 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001633 done | sort
1634 echo
1635 fi
1636
Martin v. Löwis11437992002-04-12 09:54:03 +00001637 if test -s confdefs.h; then
1638 cat <<\_ASBOX
1639## ----------- ##
1640## confdefs.h. ##
1641## ----------- ##
1642_ASBOX
1643 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001644 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001645 echo
1646 fi
1647 test "$ac_signal" != 0 &&
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001648 echo "$as_me: caught signal $ac_signal"
1649 echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00001650 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001651 rm -f core *.core core.conftest.* &&
1652 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001653 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001654' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00001655for ac_signal in 1 2 13 15; do
1656 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1657done
1658ac_signal=0
1659
1660# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001661rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001662
1663# Predefined preprocessor variables.
1664
1665cat >>confdefs.h <<_ACEOF
1666#define PACKAGE_NAME "$PACKAGE_NAME"
1667_ACEOF
1668
1669
1670cat >>confdefs.h <<_ACEOF
1671#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1672_ACEOF
1673
1674
1675cat >>confdefs.h <<_ACEOF
1676#define PACKAGE_VERSION "$PACKAGE_VERSION"
1677_ACEOF
1678
1679
1680cat >>confdefs.h <<_ACEOF
1681#define PACKAGE_STRING "$PACKAGE_STRING"
1682_ACEOF
1683
1684
1685cat >>confdefs.h <<_ACEOF
1686#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1687_ACEOF
1688
1689
1690# Let the site file select an alternate cache file if it wants to.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001691# Prefer explicitly selected file to automatically selected ones.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001692if test -n "$CONFIG_SITE"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001693 set x "$CONFIG_SITE"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001694elif test "x$prefix" != xNONE; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001695 set x "$prefix/share/config.site" "$prefix/etc/config.site"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001696else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001697 set x "$ac_default_prefix/share/config.site" \
1698 "$ac_default_prefix/etc/config.site"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001699fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001700shift
1701for ac_site_file
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001702do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001703 if test -r "$ac_site_file"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001704 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1705echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001706 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001707 . "$ac_site_file"
1708 fi
1709done
1710
1711if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001712 # Some versions of bash will fail to source /dev/null (special
1713 # files actually), so we avoid doing that.
1714 if test -f "$cache_file"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001715 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1716echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001717 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001718 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1719 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00001720 esac
1721 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001722else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001723 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1724echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001725 >$cache_file
1726fi
1727
1728# Check that the precious variables saved in the cache have kept the same
1729# value.
1730ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001731for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001732 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1733 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001734 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1735 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00001736 case $ac_old_set,$ac_new_set in
1737 set,)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001738 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1739echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001740 ac_cache_corrupted=: ;;
1741 ,set)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001742 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1743echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001744 ac_cache_corrupted=: ;;
1745 ,);;
1746 *)
1747 if test "x$ac_old_val" != "x$ac_new_val"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001748 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1749echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1750 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1751echo "$as_me: former value: $ac_old_val" >&2;}
1752 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1753echo "$as_me: current value: $ac_new_val" >&2;}
1754 ac_cache_corrupted=:
Martin v. Löwis11437992002-04-12 09:54:03 +00001755 fi;;
1756 esac
1757 # Pass precious variables to config.status.
1758 if test "$ac_new_set" = set; then
1759 case $ac_new_val in
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001760 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001761 *) ac_arg=$ac_var=$ac_new_val ;;
1762 esac
1763 case " $ac_configure_args " in
1764 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1765 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1766 esac
1767 fi
1768done
1769if $ac_cache_corrupted; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001770 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1771echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1772 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1773echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001774 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001775fi
1776
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
Guido van Rossum7f43da71994-08-01 12:15:30 +00001801ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001802ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001803ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1804ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1805ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001806
Guido van Rossum627b2d71993-12-24 10:39:16 +00001807
Michael W. Hudson54241132001-12-07 15:38:26 +00001808
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001809ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001810
1811
Martin v. Löwis11437992002-04-12 09:54:03 +00001812
Benjamin Petersond23f8222009-04-05 19:13:16 +00001813if test "$prefix" != "/"; then
1814 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
1815fi
1816
1817
Martin v. Löwis11437992002-04-12 09:54:03 +00001818
1819
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001820
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001821
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001822# We don't use PACKAGE_ variables, and they cause conflicts
1823# with other autoconf-based packages that include Python.h
1824grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1825rm confdefs.h
1826mv confdefs.h.new confdefs.h
1827
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001828
Christian Heimes70e5cab2008-12-03 18:18:23 +00001829VERSION=3.1
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001830
Martin v. Löwis1142de32002-03-29 16:28:31 +00001831
1832SOVERSION=1.0
1833
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001834# The later defininition of _XOPEN_SOURCE disables certain features
1835# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1836
1837cat >>confdefs.h <<\_ACEOF
1838#define _GNU_SOURCE 1
1839_ACEOF
1840
1841
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001842# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1843# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1844# them.
1845
1846cat >>confdefs.h <<\_ACEOF
1847#define _NETBSD_SOURCE 1
1848_ACEOF
1849
1850
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001851# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1852# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1853# them.
1854
1855cat >>confdefs.h <<\_ACEOF
1856#define __BSD_VISIBLE 1
1857_ACEOF
1858
1859
Martin v. Löwisd6320502004-08-12 13:45:08 +00001860# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1861# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
1862
1863cat >>confdefs.h <<\_ACEOF
1864#define _BSD_TYPES 1
1865_ACEOF
1866
1867
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001868# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1869# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
1870# them.
1871
1872cat >>confdefs.h <<\_ACEOF
1873#define _DARWIN_C_SOURCE 1
1874_ACEOF
1875
1876
1877
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001878define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001879
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001880# Arguments passed to configure.
1881
1882CONFIG_ARGS="$ac_configure_args"
1883
Ronald Oussorend5736812010-02-07 12:04:41 +00001884{ echo "$as_me:$LINENO: checking for --enable-universalsdk" >&5
1885echo $ECHO_N "checking for --enable-universalsdk... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001886# Check whether --enable-universalsdk was given.
Thomas Wouters477c8d52006-05-27 19:21:47 +00001887if test "${enable_universalsdk+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001888 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00001889 case $enableval in
1890 yes)
1891 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussorend5736812010-02-07 12:04:41 +00001892 if test ! -d "${enableval}"
1893 then
1894 enableval=/
1895 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00001896 ;;
1897 esac
1898 case $enableval in
1899 no)
1900 UNIVERSALSDK=
1901 enable_universalsdk=
1902 ;;
1903 *)
1904 UNIVERSALSDK=$enableval
Ronald Oussorend5736812010-02-07 12:04:41 +00001905 if test ! -d "${UNIVERSALSDK}"
1906 then
1907 { { echo "$as_me:$LINENO: error: --enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" >&5
1908echo "$as_me: error: --enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" >&2;}
1909 { (exit 1); exit 1; }; }
1910 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00001911 ;;
1912 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001913
Ronald Oussorend5736812010-02-07 12:04:41 +00001914
Thomas Wouters477c8d52006-05-27 19:21:47 +00001915else
1916
1917 UNIVERSALSDK=
1918 enable_universalsdk=
1919
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001920fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00001921
Ronald Oussorend5736812010-02-07 12:04:41 +00001922if test -n "${UNIVERSALSDK}"
1923then
1924 { echo "$as_me:$LINENO: result: ${UNIVERSALSDK}" >&5
1925echo "${ECHO_T}${UNIVERSALSDK}" >&6; }
1926else
1927 { echo "$as_me:$LINENO: result: no" >&5
1928echo "${ECHO_T}no" >&6; }
1929fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00001930
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001931
Benjamin Peterson6794aa32008-07-16 20:33:37 +00001932
1933
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001934UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001935{ echo "$as_me:$LINENO: checking for --with-universal-archs" >&5
1936echo $ECHO_N "checking for --with-universal-archs... $ECHO_C" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001937
1938# Check whether --with-universal-archs was given.
1939if test "${with_universal_archs+set}" = set; then
1940 withval=$with_universal_archs;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001941 { echo "$as_me:$LINENO: result: $withval" >&5
1942echo "${ECHO_T}$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001943 UNIVERSAL_ARCHS="$withval"
1944
1945else
1946
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001947 { echo "$as_me:$LINENO: result: 32-bit" >&5
1948echo "${ECHO_T}32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001949
1950fi
1951
1952
1953
1954
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001955
1956# Check whether --with-framework-name was given.
1957if test "${with_framework_name+set}" = set; then
1958 withval=$with_framework_name;
1959 PYTHONFRAMEWORK=${withval}
1960 PYTHONFRAMEWORKDIR=${withval}.framework
1961 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
1962
1963else
1964
1965 PYTHONFRAMEWORK=Python
1966 PYTHONFRAMEWORKDIR=Python.framework
1967 PYTHONFRAMEWORKIDENTIFIER=org.python.python
1968
1969fi
1970
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001971# Check whether --enable-framework was given.
Thomas Wouters477c8d52006-05-27 19:21:47 +00001972if test "${enable_framework+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001973 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00001974 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001975 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001976 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001977 esac
1978 case $enableval in
1979 no)
1980 PYTHONFRAMEWORK=
1981 PYTHONFRAMEWORKDIR=no-framework
1982 PYTHONFRAMEWORKPREFIX=
1983 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00001984 FRAMEWORKINSTALLFIRST=
1985 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00001986 FRAMEWORKALTINSTALLFIRST=
1987 FRAMEWORKALTINSTALLLAST=
1988 if test "x${prefix}" = "xNONE"; then
1989 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1990 else
1991 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1992 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001993 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001994 ;;
1995 *)
1996 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001997 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00001998 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00001999 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002000 if test "$UNIVERSAL_ARCHS" = "all"
2001 then
2002 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkinstallunixtools4way"
Ronald Oussorene3918352009-03-30 18:00:28 +00002003 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkaltinstallunixtools4way"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002004 else
Ronald Oussorene3918352009-03-30 18:00:28 +00002005 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002006 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
2007 fi
2008
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002009 if test "x${prefix}" = "xNONE" ; then
2010 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2011 else
2012 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2013 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002014 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00002015
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002016 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00002017 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002018 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002019
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002020 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002021
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002022 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2023
2024 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2025
Jack Jansene578a632001-08-15 01:27:14 +00002026 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002027
Guido van Rossum563e7081996-09-10 18:20:48 +00002028else
Martin v. Löwis11437992002-04-12 09:54:03 +00002029
Jack Jansene578a632001-08-15 01:27:14 +00002030 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002031 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002032 PYTHONFRAMEWORKPREFIX=
2033 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002034 FRAMEWORKINSTALLFIRST=
2035 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002036 FRAMEWORKALTINSTALLFIRST=
2037 FRAMEWORKALTINSTALLLAST=
2038 if test "x${prefix}" = "xNONE" ; then
2039 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2040 else
2041 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2042 fi
Jack Jansene578a632001-08-15 01:27:14 +00002043 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002044
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002045 if test "$UNIVERSAL_ARCHS" = "all"
2046 then
2047 FRAMEWORKINSTALLLAST=update4wayuniversal
2048 FRAMEWORKALTINSTALLLAST=update4wayuniversal
2049 fi
2050
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002051fi
2052
Thomas Wouters477c8d52006-05-27 19:21:47 +00002053
2054
Michael W. Hudson54241132001-12-07 15:38:26 +00002055
2056
2057
2058
Jack Jansene578a632001-08-15 01:27:14 +00002059
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002060
2061
2062
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002063
Jack Jansene578a632001-08-15 01:27:14 +00002064##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00002065## AC_HELP_STRING(--with-dyld,
2066## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00002067##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002068# Set name for machine-dependent library files
2069
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002070{ echo "$as_me:$LINENO: checking MACHDEP" >&5
2071echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002072if test -z "$MACHDEP"
2073then
Guido van Rossum563e7081996-09-10 18:20:48 +00002074 ac_sys_system=`uname -s`
Benjamin Petersona8332062009-09-11 22:36:27 +00002075 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002076 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002077 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002078 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002079 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002080 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002081 ac_md_system=`echo $ac_sys_system |
2082 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2083 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002084 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002085 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002086
Guido van Rossum07397971997-04-29 21:49:50 +00002087 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002088 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002089 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00002090 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002091 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002092 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002093 esac
2094fi
Guido van Rossum91922671997-10-09 20:24:13 +00002095
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002096# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2097# disable features if it is defined, without any means to access these
2098# features as extensions. For these systems, we skip the definition of
2099# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2100# some feature, make sure there is no alternative way to access this
2101# feature. Also, when using wildcards, make sure you have verified the
2102# need for not defining _XOPEN_SOURCE on all systems matching the
2103# wildcard, and that the wildcard does not include future systems
2104# (which may remove their limitations).
2105case $ac_sys_system/$ac_sys_release in
2106 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2107 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002108 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Benjamin Petersonde9c8692008-07-01 18:23:09 +00002109 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00002110 define_xopen_source=no
2111 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2112 # also defined. This can be overridden by defining _BSD_SOURCE
2113 # As this has a different meaning on Linux, only define it on OpenBSD
2114
2115cat >>confdefs.h <<\_ACEOF
2116#define _BSD_SOURCE 1
2117_ACEOF
2118
2119 ;;
Martin v. Löwisf6594222010-02-15 08:37:47 +00002120 OpenBSD/4.[4])
2121 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2122 # also defined. This can be overridden by defining _BSD_SOURCE
2123 # As this has a different meaning on Linux, only define it on OpenBSD
2124
2125cat >>confdefs.h <<\_ACEOF
2126#define _BSD_SOURCE 1
2127_ACEOF
2128
2129 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00002130 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
2131 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
2132 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00002133 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 +00002134 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00002135 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
2136 # of union __?sigval. Reported by Stuart Bishop.
2137 SunOS/5.6)
2138 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002139 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
2140 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00002141 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00002142 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002143 define_xopen_source=no;;
2144 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002145 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002146 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002147 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00002148 # On FreeBSD 4, the math functions C89 does not cover are never defined
2149 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
2150 FreeBSD/4.*)
2151 define_xopen_source=no;;
2152 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
2153 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
2154 # identifies itself as Darwin/7.*
2155 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2156 # disables platform specific features beyond repair.
2157 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2158 # has no effect, don't bother defining them
2159 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00002160 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002161 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
2162 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
2163 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00002164 AIX/4)
2165 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002166 AIX/5)
2167 if test `uname -r` -eq 1; then
2168 define_xopen_source=no
2169 fi
2170 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00002171 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
2172 # defining NI_NUMERICHOST.
2173 QNX/6.3.2)
2174 define_xopen_source=no
2175 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002176
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002177esac
2178
2179if test $define_xopen_source = yes
2180then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002181 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
2182 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00002183 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
2184 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00002185 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00002186 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00002187
2188cat >>confdefs.h <<\_ACEOF
2189#define _XOPEN_SOURCE 500
2190_ACEOF
2191
2192 ;;
2193 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002194
2195cat >>confdefs.h <<\_ACEOF
2196#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002197_ACEOF
2198
Skip Montanarof0d5f792004-08-15 14:08:23 +00002199 ;;
2200 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002201
2202 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
2203 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
2204 # several APIs are not declared. Since this is also needed in some
2205 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00002206 # except for Solaris 10, where it must not be defined,
2207 # as it implies XPG4.2
2208 case $ac_sys_system/$ac_sys_release in
2209 SunOS/5.10)
2210 ;;
2211 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002212
2213cat >>confdefs.h <<\_ACEOF
2214#define _XOPEN_SOURCE_EXTENDED 1
2215_ACEOF
2216
Martin v. Löwis7dece662005-11-26 11:38:24 +00002217 ;;
2218 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002219
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002220
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002221cat >>confdefs.h <<\_ACEOF
2222#define _POSIX_C_SOURCE 200112L
2223_ACEOF
2224
2225
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002226fi
2227
Guido van Rossum91922671997-10-09 20:24:13 +00002228#
2229# SGI compilers allow the specification of the both the ABI and the
2230# ISA on the command line. Depending on the values of these switches,
2231# different and often incompatable code will be generated.
2232#
2233# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
2234# thus supply support for various ABI/ISA combinations. The MACHDEP
2235# variable is also adjusted.
2236#
2237
2238if test ! -z "$SGI_ABI"
2239then
2240 CC="cc $SGI_ABI"
2241 LDFLAGS="$SGI_ABI $LDFLAGS"
2242 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
2243fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002244{ echo "$as_me:$LINENO: result: $MACHDEP" >&5
2245echo "${ECHO_T}$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002246
Jack Jansen6b08a402004-06-03 12:41:45 +00002247# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
2248# it may influence the way we can build extensions, so distutils
2249# needs to check it
2250
Thomas Wouters477c8d52006-05-27 19:21:47 +00002251
Jack Jansen6b08a402004-06-03 12:41:45 +00002252CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002253EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00002254
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002255{ echo "$as_me:$LINENO: checking machine type as reported by uname -m" >&5
2256echo $ECHO_N "checking machine type as reported by uname -m... $ECHO_C" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00002257ac_sys_machine=`uname -m`
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002258{ echo "$as_me:$LINENO: result: $ac_sys_machine" >&5
2259echo "${ECHO_T}$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00002260
Guido van Rossum627b2d71993-12-24 10:39:16 +00002261# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00002262
2263# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
2264# for debug/optimization stuff. BASECFLAGS is for flags that are required
2265# just to get things to compile and link. Users are free to override OPT
2266# when running configure or make. The build should not break if they do.
2267# BASECFLAGS should generally not be messed with, however.
2268
2269# XXX shouldn't some/most/all of this code be merged with the stuff later
2270# on that fiddles with OPT and BASECFLAGS?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002271{ echo "$as_me:$LINENO: checking for --without-gcc" >&5
2272echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002273
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002274# Check whether --with-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002275if test "${with_gcc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002276 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002277 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00002278 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00002279 without_gcc=yes;;
2280 yes) CC=gcc
2281 without_gcc=no;;
2282 *) CC=$withval
2283 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002284 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00002285else
Martin v. Löwis11437992002-04-12 09:54:03 +00002286
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002287 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002288 AIX*) CC=cc_r
2289 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00002290 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00002291 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002292fi
2293
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002294{ echo "$as_me:$LINENO: result: $without_gcc" >&5
2295echo "${ECHO_T}$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002296
Guido van Rossum8b131c51995-03-09 14:10:13 +00002297# If the user switches compilers, we can't believe the cache
2298if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
2299then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002300 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002301(it is also a good idea to do 'make clean' before compiling)" >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002302echo "$as_me: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002303(it is also a good idea to do 'make clean' before compiling)" >&2;}
2304 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00002305fi
2306
Martin v. Löwis11437992002-04-12 09:54:03 +00002307ac_ext=c
2308ac_cpp='$CPP $CPPFLAGS'
2309ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2310ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2311ac_compiler_gnu=$ac_cv_c_compiler_gnu
2312if test -n "$ac_tool_prefix"; then
2313 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2314set dummy ${ac_tool_prefix}gcc; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002315{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2316echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002317if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002318 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002319else
2320 if test -n "$CC"; then
2321 ac_cv_prog_CC="$CC" # Let the user override the test.
2322else
Martin v. Löwis11437992002-04-12 09:54:03 +00002323as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2324for as_dir in $PATH
2325do
2326 IFS=$as_save_IFS
2327 test -z "$as_dir" && as_dir=.
2328 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002329 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 +00002330 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002331 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002332 break 2
2333 fi
2334done
2335done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002336IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002337
Jack Jansendd19cf82001-12-06 22:36:17 +00002338fi
2339fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002340CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00002341if test -n "$CC"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002342 { echo "$as_me:$LINENO: result: $CC" >&5
2343echo "${ECHO_T}$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002344else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002345 { echo "$as_me:$LINENO: result: no" >&5
2346echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002347fi
2348
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002349
Martin v. Löwis11437992002-04-12 09:54:03 +00002350fi
2351if test -z "$ac_cv_prog_CC"; then
2352 ac_ct_CC=$CC
2353 # Extract the first word of "gcc", so it can be a program name with args.
2354set dummy gcc; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002355{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2356echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002357if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002358 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002359else
2360 if test -n "$ac_ct_CC"; then
2361 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2362else
2363as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2364for as_dir in $PATH
2365do
2366 IFS=$as_save_IFS
2367 test -z "$as_dir" && as_dir=.
2368 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002369 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 +00002370 ac_cv_prog_ac_ct_CC="gcc"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002371 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002372 break 2
2373 fi
2374done
2375done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002376IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002377
2378fi
2379fi
2380ac_ct_CC=$ac_cv_prog_ac_ct_CC
2381if test -n "$ac_ct_CC"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002382 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2383echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002384else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002385 { echo "$as_me:$LINENO: result: no" >&5
2386echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002387fi
2388
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002389 if test "x$ac_ct_CC" = x; then
2390 CC=""
2391 else
2392 case $cross_compiling:$ac_tool_warned in
2393yes:)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002394{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2395whose name does not start with the host triplet. If you think this
2396configuration is useful to you, please write to autoconf@gnu.org." >&5
2397echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2398whose name does not start with the host triplet. If you think this
2399configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002400ac_tool_warned=yes ;;
2401esac
2402 CC=$ac_ct_CC
2403 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002404else
2405 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002406fi
2407
Jack Jansendd19cf82001-12-06 22:36:17 +00002408if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002409 if test -n "$ac_tool_prefix"; then
2410 # 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 +00002411set dummy ${ac_tool_prefix}cc; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002412{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2413echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002414if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002415 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002416else
2417 if test -n "$CC"; then
2418 ac_cv_prog_CC="$CC" # Let the user override the test.
2419else
Martin v. Löwis11437992002-04-12 09:54:03 +00002420as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2421for as_dir in $PATH
2422do
2423 IFS=$as_save_IFS
2424 test -z "$as_dir" && as_dir=.
2425 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002426 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 +00002427 ac_cv_prog_CC="${ac_tool_prefix}cc"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002428 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002429 break 2
2430 fi
2431done
2432done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002433IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002434
2435fi
2436fi
2437CC=$ac_cv_prog_CC
2438if test -n "$CC"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002439 { echo "$as_me:$LINENO: result: $CC" >&5
2440echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002441else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002442 { echo "$as_me:$LINENO: result: no" >&5
2443echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002444fi
2445
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002446
Martin v. Löwis11437992002-04-12 09:54:03 +00002447 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002448fi
2449if test -z "$CC"; then
2450 # Extract the first word of "cc", so it can be a program name with args.
2451set dummy cc; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002452{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2453echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002454if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002455 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002456else
2457 if test -n "$CC"; then
2458 ac_cv_prog_CC="$CC" # Let the user override the test.
2459else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002460 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002461as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2462for as_dir in $PATH
2463do
2464 IFS=$as_save_IFS
2465 test -z "$as_dir" && as_dir=.
2466 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002467 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 +00002468 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2469 ac_prog_rejected=yes
2470 continue
2471 fi
2472 ac_cv_prog_CC="cc"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002473 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002474 break 2
2475 fi
2476done
2477done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002478IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002479
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002480if test $ac_prog_rejected = yes; then
2481 # We found a bogon in the path, so make sure we never use it.
2482 set dummy $ac_cv_prog_CC
2483 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002484 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002485 # We chose a different compiler from the bogus one.
2486 # However, it has the same basename, so the bogon will be chosen
2487 # first if we set CC to just the basename; use the full file name.
2488 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002489 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002490 fi
2491fi
2492fi
2493fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002494CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002495if test -n "$CC"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002496 { echo "$as_me:$LINENO: result: $CC" >&5
2497echo "${ECHO_T}$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002498else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002499 { echo "$as_me:$LINENO: result: no" >&5
2500echo "${ECHO_T}no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002501fi
2502
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002503
Martin v. Löwis11437992002-04-12 09:54:03 +00002504fi
2505if test -z "$CC"; then
2506 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002507 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002508 do
2509 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2510set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002511{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2512echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002513if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002514 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002515else
2516 if test -n "$CC"; then
2517 ac_cv_prog_CC="$CC" # Let the user override the test.
2518else
Martin v. Löwis11437992002-04-12 09:54:03 +00002519as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2520for as_dir in $PATH
2521do
2522 IFS=$as_save_IFS
2523 test -z "$as_dir" && as_dir=.
2524 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002525 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 +00002526 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002527 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002528 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002529 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002530done
2531done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002532IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002533
2534fi
2535fi
2536CC=$ac_cv_prog_CC
2537if test -n "$CC"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002538 { echo "$as_me:$LINENO: result: $CC" >&5
2539echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002540else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002541 { echo "$as_me:$LINENO: result: no" >&5
2542echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002543fi
2544
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002545
Martin v. Löwis11437992002-04-12 09:54:03 +00002546 test -n "$CC" && break
2547 done
2548fi
2549if test -z "$CC"; then
2550 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002551 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002552do
2553 # Extract the first word of "$ac_prog", so it can be a program name with args.
2554set dummy $ac_prog; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002555{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2556echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002557if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002558 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002559else
2560 if test -n "$ac_ct_CC"; then
2561 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2562else
2563as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2564for as_dir in $PATH
2565do
2566 IFS=$as_save_IFS
2567 test -z "$as_dir" && as_dir=.
2568 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002569 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 +00002570 ac_cv_prog_ac_ct_CC="$ac_prog"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002571 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002572 break 2
2573 fi
2574done
2575done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002576IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00002577
Martin v. Löwis11437992002-04-12 09:54:03 +00002578fi
2579fi
2580ac_ct_CC=$ac_cv_prog_ac_ct_CC
2581if test -n "$ac_ct_CC"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002582 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2583echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002584else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002585 { echo "$as_me:$LINENO: result: no" >&5
2586echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002587fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002588
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002589
Martin v. Löwis11437992002-04-12 09:54:03 +00002590 test -n "$ac_ct_CC" && break
2591done
Michael W. Hudson54241132001-12-07 15:38:26 +00002592
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002593 if test "x$ac_ct_CC" = x; then
2594 CC=""
2595 else
2596 case $cross_compiling:$ac_tool_warned in
2597yes:)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002598{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2599whose name does not start with the host triplet. If you think this
2600configuration is useful to you, please write to autoconf@gnu.org." >&5
2601echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2602whose name does not start with the host triplet. If you think this
2603configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002604ac_tool_warned=yes ;;
2605esac
2606 CC=$ac_ct_CC
2607 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002608fi
2609
2610fi
2611
2612
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002613test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002614See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002615echo "$as_me: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002616See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002617 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002618
2619# Provide some information about the compiler.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002620echo "$as_me:$LINENO: checking for C compiler version" >&5
2621ac_compiler=`set X $ac_compile; echo $2`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002622{ (ac_try="$ac_compiler --version >&5"
2623case "(($ac_try" in
2624 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2625 *) ac_try_echo=$ac_try;;
2626esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002627eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002628 (eval "$ac_compiler --version >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002629 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002631 (exit $ac_status); }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002632{ (ac_try="$ac_compiler -v >&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 -v >&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); }
2652
2653cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002654/* confdefs.h. */
2655_ACEOF
2656cat confdefs.h >>conftest.$ac_ext
2657cat >>conftest.$ac_ext <<_ACEOF
2658/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002659
Martin v. Löwis11437992002-04-12 09:54:03 +00002660int
2661main ()
2662{
2663
2664 ;
2665 return 0;
2666}
2667_ACEOF
2668ac_clean_files_save=$ac_clean_files
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002669ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002670# Try to create an executable without -o first, disregard a.out.
2671# It will help us diagnose broken compilers, and finding out an intuition
2672# of exeext.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002673{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2674echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
2675ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2676#
2677# List of possible output files, starting from the most likely.
2678# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2679# only as a last resort. b.out is created by i960 compilers.
2680ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2681#
2682# The IRIX 6 linker writes into existing files which may not be
2683# executable, retaining their permissions. Remove them first so a
2684# subsequent execution test works.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002685ac_rmfiles=
2686for ac_file in $ac_files
2687do
2688 case $ac_file in
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002689 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002690 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2691 esac
2692done
2693rm -f $ac_rmfiles
2694
2695if { (ac_try="$ac_link_default"
2696case "(($ac_try" in
2697 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2698 *) ac_try_echo=$ac_try;;
2699esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002700eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002701 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002702 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002704 (exit $ac_status); }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002705 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2706# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2707# in a Makefile. We should not override ac_cv_exeext if it was cached,
2708# so that the user can short-circuit this test for compilers unknown to
2709# Autoconf.
2710for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00002711do
2712 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002713 case $ac_file in
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002714 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002715 ;;
2716 [ab].out )
2717 # We found the default executable, but exeext='' is most
2718 # certainly right.
2719 break;;
2720 *.* )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002721 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2722 then :; else
2723 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2724 fi
2725 # We set ac_cv_exeext here because the later test for it is not
2726 # safe: cross compilers may not add the suffix if given an `-o'
2727 # argument, so we may need to know it at that point already.
2728 # Even if this section looks crufty: it has the advantage of
2729 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002730 break;;
2731 * )
2732 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002733 esac
2734done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002735test "$ac_cv_exeext" = no && ac_cv_exeext=
2736
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002737else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002738 ac_file=''
2739fi
2740
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002741{ echo "$as_me:$LINENO: result: $ac_file" >&5
2742echo "${ECHO_T}$ac_file" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002743if test -z "$ac_file"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002744 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002745sed 's/^/| /' conftest.$ac_ext >&5
2746
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002747{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002748See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002749echo "$as_me: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002750See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002751 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002752fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002753
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002754ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002755
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002756# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002757# the compiler is broken, or we cross compile.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002758{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2759echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002760# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2761# If not cross compiling, check that we can run a simple program.
2762if test "$cross_compiling" != yes; then
2763 if { ac_try='./$ac_file'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002764 { (case "(($ac_try" in
2765 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2766 *) ac_try_echo=$ac_try;;
2767esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002768eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002769 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002770 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002772 (exit $ac_status); }; }; then
2773 cross_compiling=no
2774 else
2775 if test "$cross_compiling" = maybe; then
2776 cross_compiling=yes
2777 else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002778 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002779If you meant to cross compile, use \`--host'.
2780See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002781echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002782If you meant to cross compile, use \`--host'.
2783See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002784 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002785 fi
2786 fi
2787fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002788{ echo "$as_me:$LINENO: result: yes" >&5
2789echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002790
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002791rm -f a.out a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002792ac_clean_files=$ac_clean_files_save
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002793# Check that the compiler produces executables we can run. If not, either
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002794# the compiler is broken, or we cross compile.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002795{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2796echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2797{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2798echo "${ECHO_T}$cross_compiling" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00002799
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002800{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2801echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002802if { (ac_try="$ac_link"
2803case "(($ac_try" in
2804 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2805 *) ac_try_echo=$ac_try;;
2806esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002807eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002808 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002809 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002811 (exit $ac_status); }; then
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002812 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2813# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2814# work properly (i.e., refer to `conftest.exe'), while it won't with
2815# `rm'.
2816for ac_file in conftest.exe conftest conftest.*; do
2817 test -f "$ac_file" || continue
2818 case $ac_file in
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002819 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002820 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2821 break;;
2822 * ) break;;
2823 esac
2824done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002825else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002826 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002827See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002828echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002829See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002830 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002831fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002832
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002833rm -f conftest$ac_cv_exeext
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002834{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2835echo "${ECHO_T}$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002836
2837rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002838EXEEXT=$ac_cv_exeext
2839ac_exeext=$EXEEXT
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002840{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
2841echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002842if test "${ac_cv_objext+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002843 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002844else
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002845 cat >conftest.$ac_ext <<_ACEOF
2846/* confdefs.h. */
2847_ACEOF
2848cat confdefs.h >>conftest.$ac_ext
2849cat >>conftest.$ac_ext <<_ACEOF
2850/* end confdefs.h. */
2851
2852int
2853main ()
2854{
2855
2856 ;
2857 return 0;
2858}
2859_ACEOF
2860rm -f conftest.o conftest.obj
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002861if { (ac_try="$ac_compile"
2862case "(($ac_try" in
2863 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2864 *) ac_try_echo=$ac_try;;
2865esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002866eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002867 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002868 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002869 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002870 (exit $ac_status); }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002871 for ac_file in conftest.o conftest.obj conftest.*; do
2872 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00002873 case $ac_file in
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002874 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002875 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2876 break;;
2877 esac
2878done
2879else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002880 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002881sed 's/^/| /' conftest.$ac_ext >&5
2882
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002883{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002884See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002885echo "$as_me: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002886See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002887 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002888fi
2889
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002890rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002891fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002892{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2893echo "${ECHO_T}$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002894OBJEXT=$ac_cv_objext
2895ac_objext=$OBJEXT
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002896{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2897echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002898if test "${ac_cv_c_compiler_gnu+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002899 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002900else
2901 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002902/* confdefs.h. */
2903_ACEOF
2904cat confdefs.h >>conftest.$ac_ext
2905cat >>conftest.$ac_ext <<_ACEOF
2906/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002907
Martin v. Löwis11437992002-04-12 09:54:03 +00002908int
2909main ()
2910{
2911#ifndef __GNUC__
2912 choke me
2913#endif
2914
2915 ;
2916 return 0;
2917}
2918_ACEOF
2919rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002920if { (ac_try="$ac_compile"
2921case "(($ac_try" in
2922 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2923 *) ac_try_echo=$ac_try;;
2924esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002925eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002926 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002927 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002928 grep -v '^ *+' conftest.er1 >conftest.err
2929 rm -f conftest.er1
2930 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002932 (exit $ac_status); } && {
2933 test -z "$ac_c_werror_flag" ||
2934 test ! -s conftest.err
2935 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002936 ac_compiler_gnu=yes
2937else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002938 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002939sed 's/^/| /' conftest.$ac_ext >&5
2940
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002941 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002942fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002943
2944rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002945ac_cv_c_compiler_gnu=$ac_compiler_gnu
2946
2947fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002948{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2949echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
2950GCC=`test $ac_compiler_gnu = yes && echo yes`
Martin v. Löwis11437992002-04-12 09:54:03 +00002951ac_test_CFLAGS=${CFLAGS+set}
2952ac_save_CFLAGS=$CFLAGS
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002953{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2954echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002955if test "${ac_cv_prog_cc_g+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002956 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002957else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002958 ac_save_c_werror_flag=$ac_c_werror_flag
2959 ac_c_werror_flag=yes
2960 ac_cv_prog_cc_g=no
2961 CFLAGS="-g"
2962 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002963/* confdefs.h. */
2964_ACEOF
2965cat confdefs.h >>conftest.$ac_ext
2966cat >>conftest.$ac_ext <<_ACEOF
2967/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002968
Martin v. Löwis11437992002-04-12 09:54:03 +00002969int
2970main ()
2971{
2972
2973 ;
2974 return 0;
2975}
2976_ACEOF
2977rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002978if { (ac_try="$ac_compile"
2979case "(($ac_try" in
2980 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2981 *) ac_try_echo=$ac_try;;
2982esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002983eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002984 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002985 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002986 grep -v '^ *+' conftest.er1 >conftest.err
2987 rm -f conftest.er1
2988 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002990 (exit $ac_status); } && {
2991 test -z "$ac_c_werror_flag" ||
2992 test ! -s conftest.err
2993 } && test -s conftest.$ac_objext; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002994 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002995else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002996 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002997sed 's/^/| /' conftest.$ac_ext >&5
2998
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002999 CFLAGS=""
3000 cat >conftest.$ac_ext <<_ACEOF
3001/* confdefs.h. */
3002_ACEOF
3003cat confdefs.h >>conftest.$ac_ext
3004cat >>conftest.$ac_ext <<_ACEOF
3005/* end confdefs.h. */
3006
3007int
3008main ()
3009{
3010
3011 ;
3012 return 0;
3013}
3014_ACEOF
3015rm -f conftest.$ac_objext
3016if { (ac_try="$ac_compile"
3017case "(($ac_try" in
3018 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3019 *) ac_try_echo=$ac_try;;
3020esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003021eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003022 (eval "$ac_compile") 2>conftest.er1
3023 ac_status=$?
3024 grep -v '^ *+' conftest.er1 >conftest.err
3025 rm -f conftest.er1
3026 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003028 (exit $ac_status); } && {
3029 test -z "$ac_c_werror_flag" ||
3030 test ! -s conftest.err
3031 } && test -s conftest.$ac_objext; then
3032 :
3033else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003034 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003035sed 's/^/| /' conftest.$ac_ext >&5
3036
3037 ac_c_werror_flag=$ac_save_c_werror_flag
3038 CFLAGS="-g"
3039 cat >conftest.$ac_ext <<_ACEOF
3040/* confdefs.h. */
3041_ACEOF
3042cat confdefs.h >>conftest.$ac_ext
3043cat >>conftest.$ac_ext <<_ACEOF
3044/* end confdefs.h. */
3045
3046int
3047main ()
3048{
3049
3050 ;
3051 return 0;
3052}
3053_ACEOF
3054rm -f conftest.$ac_objext
3055if { (ac_try="$ac_compile"
3056case "(($ac_try" in
3057 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3058 *) ac_try_echo=$ac_try;;
3059esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003060eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003061 (eval "$ac_compile") 2>conftest.er1
3062 ac_status=$?
3063 grep -v '^ *+' conftest.er1 >conftest.err
3064 rm -f conftest.er1
3065 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003066 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003067 (exit $ac_status); } && {
3068 test -z "$ac_c_werror_flag" ||
3069 test ! -s conftest.err
3070 } && test -s conftest.$ac_objext; then
3071 ac_cv_prog_cc_g=yes
3072else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003073 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003074sed 's/^/| /' conftest.$ac_ext >&5
3075
3076
Guido van Rossum627b2d71993-12-24 10:39:16 +00003077fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003078
3079rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003080fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003081
3082rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3083fi
3084
3085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3086 ac_c_werror_flag=$ac_save_c_werror_flag
3087fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003088{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3089echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003090if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003091 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003092elif test $ac_cv_prog_cc_g = yes; then
3093 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003094 CFLAGS="-g -O2"
3095 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003096 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003097 fi
3098else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003099 if test "$GCC" = yes; then
3100 CFLAGS="-O2"
3101 else
3102 CFLAGS=
3103 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003104fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003105{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3106echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003107if test "${ac_cv_prog_cc_c89+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003108 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003109else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003110 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003111ac_save_CC=$CC
3112cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003113/* confdefs.h. */
3114_ACEOF
3115cat confdefs.h >>conftest.$ac_ext
3116cat >>conftest.$ac_ext <<_ACEOF
3117/* end confdefs.h. */
3118#include <stdarg.h>
3119#include <stdio.h>
3120#include <sys/types.h>
3121#include <sys/stat.h>
3122/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3123struct buf { int x; };
3124FILE * (*rcsopen) (struct buf *, struct stat *, int);
3125static char *e (p, i)
3126 char **p;
3127 int i;
3128{
3129 return p[i];
3130}
3131static char *f (char * (*g) (char **, int), char **p, ...)
3132{
3133 char *s;
3134 va_list v;
3135 va_start (v,p);
3136 s = g (p, va_arg (v,int));
3137 va_end (v);
3138 return s;
3139}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003140
3141/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3142 function prototypes and stuff, but not '\xHH' hex character constants.
3143 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003144 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003145 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3146 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003147 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003148int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3149
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003150/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3151 inside strings and character constants. */
3152#define FOO(x) 'x'
3153int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3154
Skip Montanaro6dead952003-09-25 14:50:04 +00003155int test (int i, double x);
3156struct s1 {int (*f) (int a);};
3157struct s2 {int (*f) (double a);};
3158int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3159int argc;
3160char **argv;
3161int
3162main ()
3163{
3164return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3165 ;
3166 return 0;
3167}
3168_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003169for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3170 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003171do
3172 CC="$ac_save_CC $ac_arg"
3173 rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003174if { (ac_try="$ac_compile"
3175case "(($ac_try" in
3176 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3177 *) ac_try_echo=$ac_try;;
3178esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003179eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003180 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00003181 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003182 grep -v '^ *+' conftest.er1 >conftest.err
3183 rm -f conftest.er1
3184 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003186 (exit $ac_status); } && {
3187 test -z "$ac_c_werror_flag" ||
3188 test ! -s conftest.err
3189 } && test -s conftest.$ac_objext; then
3190 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003191else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003192 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003193sed 's/^/| /' conftest.$ac_ext >&5
3194
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003195
Skip Montanaro6dead952003-09-25 14:50:04 +00003196fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003197
3198rm -f core conftest.err conftest.$ac_objext
3199 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003200done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003201rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003202CC=$ac_save_CC
3203
3204fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003205# AC_CACHE_VAL
3206case "x$ac_cv_prog_cc_c89" in
3207 x)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003208 { echo "$as_me:$LINENO: result: none needed" >&5
3209echo "${ECHO_T}none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003210 xno)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003211 { echo "$as_me:$LINENO: result: unsupported" >&5
3212echo "${ECHO_T}unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003213 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003214 CC="$CC $ac_cv_prog_cc_c89"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003215 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3216echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003217esac
3218
Skip Montanaro6dead952003-09-25 14:50:04 +00003219
Martin v. Löwis11437992002-04-12 09:54:03 +00003220ac_ext=c
3221ac_cpp='$CPP $CPPFLAGS'
3222ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3223ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3224ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003225
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003226
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003227
3228
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003229{ echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
3230echo $ECHO_N "checking for --with-cxx-main=<compiler>... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003231
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003232# Check whether --with-cxx_main was given.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003233if test "${with_cxx_main+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003234 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003235
3236 case $withval in
3237 no) with_cxx_main=no
3238 MAINCC='$(CC)';;
3239 yes) with_cxx_main=yes
3240 MAINCC='$(CXX)';;
3241 *) with_cxx_main=yes
3242 MAINCC=$withval
3243 if test -z "$CXX"
3244 then
3245 CXX=$withval
3246 fi;;
3247 esac
3248else
3249
3250 with_cxx_main=no
3251 MAINCC='$(CC)'
3252
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003253fi
3254
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003255{ echo "$as_me:$LINENO: result: $with_cxx_main" >&5
3256echo "${ECHO_T}$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003257
3258preset_cxx="$CXX"
3259if test -z "$CXX"
3260then
3261 case "$CC" in
3262 gcc) # Extract the first word of "g++", so it can be a program name with args.
3263set dummy g++; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003264{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3265echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003266if test "${ac_cv_path_CXX+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003267 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003268else
3269 case $CXX in
3270 [\\/]* | ?:[\\/]*)
3271 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3272 ;;
3273 *)
3274 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3275for as_dir in notfound
3276do
3277 IFS=$as_save_IFS
3278 test -z "$as_dir" && as_dir=.
3279 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003280 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 +00003281 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003282 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003283 break 2
3284 fi
3285done
3286done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003287IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003288
3289 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
3290 ;;
3291esac
3292fi
3293CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003294if test -n "$CXX"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003295 { echo "$as_me:$LINENO: result: $CXX" >&5
3296echo "${ECHO_T}$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003297else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003298 { echo "$as_me:$LINENO: result: no" >&5
3299echo "${ECHO_T}no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003300fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003301
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003302 ;;
3303 cc) # Extract the first word of "c++", so it can be a program name with args.
3304set dummy c++; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003305{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3306echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003307if test "${ac_cv_path_CXX+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003308 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003309else
3310 case $CXX in
3311 [\\/]* | ?:[\\/]*)
3312 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3313 ;;
3314 *)
3315 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3316for as_dir in notfound
3317do
3318 IFS=$as_save_IFS
3319 test -z "$as_dir" && as_dir=.
3320 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003321 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 +00003322 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003323 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003324 break 2
3325 fi
3326done
3327done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003328IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003329
3330 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
3331 ;;
3332esac
3333fi
3334CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003335if test -n "$CXX"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003336 { echo "$as_me:$LINENO: result: $CXX" >&5
3337echo "${ECHO_T}$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003338else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003339 { echo "$as_me:$LINENO: result: no" >&5
3340echo "${ECHO_T}no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003341fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003342
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003343 ;;
3344 esac
3345 if test "$CXX" = "notfound"
3346 then
3347 CXX=""
3348 fi
3349fi
3350if test -z "$CXX"
3351then
3352 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
3353do
3354 # Extract the first word of "$ac_prog", so it can be a program name with args.
3355set dummy $ac_prog; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003356{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3357echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003358if test "${ac_cv_prog_CXX+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003359 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003360else
3361 if test -n "$CXX"; then
3362 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3363else
3364as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3365for as_dir in $PATH
3366do
3367 IFS=$as_save_IFS
3368 test -z "$as_dir" && as_dir=.
3369 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003370 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 +00003371 ac_cv_prog_CXX="$ac_prog"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003372 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003373 break 2
3374 fi
3375done
3376done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003377IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003378
3379fi
3380fi
3381CXX=$ac_cv_prog_CXX
3382if test -n "$CXX"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003383 { echo "$as_me:$LINENO: result: $CXX" >&5
3384echo "${ECHO_T}$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003385else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003386 { echo "$as_me:$LINENO: result: no" >&5
3387echo "${ECHO_T}no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003388fi
3389
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003390
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003391 test -n "$CXX" && break
3392done
3393test -n "$CXX" || CXX="notfound"
3394
3395 if test "$CXX" = "notfound"
3396 then
3397 CXX=""
3398 fi
3399fi
3400if test "$preset_cxx" != "$CXX"
3401then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003402 { echo "$as_me:$LINENO: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003403
3404 By default, distutils will build C++ extension modules with \"$CXX\".
3405 If this is not intended, then set CXX on the configure command line.
3406 " >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003407echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003408
3409 By default, distutils will build C++ extension modules with \"$CXX\".
3410 If this is not intended, then set CXX on the configure command line.
3411 " >&2;}
3412fi
3413
3414
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003415# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00003416
3417ac_ext=c
3418ac_cpp='$CPP $CPPFLAGS'
3419ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3420ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3421ac_compiler_gnu=$ac_cv_c_compiler_gnu
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003422{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3423echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003424# On Suns, sometimes $CPP names a directory.
3425if test -n "$CPP" && test -d "$CPP"; then
3426 CPP=
3427fi
3428if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003429 if test "${ac_cv_prog_CPP+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003430 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003431else
Martin v. Löwis11437992002-04-12 09:54:03 +00003432 # Double quotes because CPP needs to be expanded
3433 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3434 do
3435 ac_preproc_ok=false
3436for ac_c_preproc_warn_flag in '' yes
3437do
3438 # Use a header file that comes with gcc, so configuring glibc
3439 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003440 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3441 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003442 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00003443 # not just through cpp. "Syntax error" is here to catch this case.
3444 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003445/* confdefs.h. */
3446_ACEOF
3447cat confdefs.h >>conftest.$ac_ext
3448cat >>conftest.$ac_ext <<_ACEOF
3449/* end confdefs.h. */
3450#ifdef __STDC__
3451# include <limits.h>
3452#else
3453# include <assert.h>
3454#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003455 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003456_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003457if { (ac_try="$ac_cpp conftest.$ac_ext"
3458case "(($ac_try" in
3459 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3460 *) ac_try_echo=$ac_try;;
3461esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003462eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003463 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003464 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003465 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003466 rm -f conftest.er1
3467 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003469 (exit $ac_status); } >/dev/null && {
3470 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3471 test ! -s conftest.err
3472 }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003473 :
3474else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003475 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003476sed 's/^/| /' conftest.$ac_ext >&5
3477
Martin v. Löwis11437992002-04-12 09:54:03 +00003478 # Broken: fails on valid input.
3479continue
Jack Jansendd19cf82001-12-06 22:36:17 +00003480fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003481
Martin v. Löwis11437992002-04-12 09:54:03 +00003482rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00003483
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003484 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003485 # can be detected and how.
3486 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003487/* confdefs.h. */
3488_ACEOF
3489cat confdefs.h >>conftest.$ac_ext
3490cat >>conftest.$ac_ext <<_ACEOF
3491/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003492#include <ac_nonexistent.h>
3493_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003494if { (ac_try="$ac_cpp conftest.$ac_ext"
3495case "(($ac_try" in
3496 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3497 *) ac_try_echo=$ac_try;;
3498esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003499eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003500 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003501 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003502 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003503 rm -f conftest.er1
3504 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003506 (exit $ac_status); } >/dev/null && {
3507 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3508 test ! -s conftest.err
3509 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003510 # Broken: success on invalid input.
3511continue
3512else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003513 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003514sed 's/^/| /' conftest.$ac_ext >&5
3515
Martin v. Löwis11437992002-04-12 09:54:03 +00003516 # Passes both tests.
3517ac_preproc_ok=:
3518break
3519fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003520
Martin v. Löwis11437992002-04-12 09:54:03 +00003521rm -f conftest.err conftest.$ac_ext
3522
3523done
3524# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3525rm -f conftest.err conftest.$ac_ext
3526if $ac_preproc_ok; then
3527 break
3528fi
3529
3530 done
3531 ac_cv_prog_CPP=$CPP
3532
3533fi
3534 CPP=$ac_cv_prog_CPP
3535else
3536 ac_cv_prog_CPP=$CPP
3537fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003538{ echo "$as_me:$LINENO: result: $CPP" >&5
3539echo "${ECHO_T}$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003540ac_preproc_ok=false
3541for ac_c_preproc_warn_flag in '' yes
3542do
3543 # Use a header file that comes with gcc, so configuring glibc
3544 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003545 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3546 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003547 # On the NeXT, cc -E runs the code through the compiler's parser,
3548 # not just through cpp. "Syntax error" is here to catch this case.
3549 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003550/* confdefs.h. */
3551_ACEOF
3552cat confdefs.h >>conftest.$ac_ext
3553cat >>conftest.$ac_ext <<_ACEOF
3554/* end confdefs.h. */
3555#ifdef __STDC__
3556# include <limits.h>
3557#else
3558# include <assert.h>
3559#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003560 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003561_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003562if { (ac_try="$ac_cpp conftest.$ac_ext"
3563case "(($ac_try" in
3564 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3565 *) ac_try_echo=$ac_try;;
3566esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003567eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003568 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003569 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003570 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003571 rm -f conftest.er1
3572 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003574 (exit $ac_status); } >/dev/null && {
3575 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3576 test ! -s conftest.err
3577 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003578 :
3579else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003580 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003581sed 's/^/| /' conftest.$ac_ext >&5
3582
Martin v. Löwis11437992002-04-12 09:54:03 +00003583 # Broken: fails on valid input.
3584continue
3585fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003586
Martin v. Löwis11437992002-04-12 09:54:03 +00003587rm -f conftest.err conftest.$ac_ext
3588
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003589 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003590 # can be detected and how.
3591 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003592/* confdefs.h. */
3593_ACEOF
3594cat confdefs.h >>conftest.$ac_ext
3595cat >>conftest.$ac_ext <<_ACEOF
3596/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003597#include <ac_nonexistent.h>
3598_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003599if { (ac_try="$ac_cpp conftest.$ac_ext"
3600case "(($ac_try" in
3601 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3602 *) ac_try_echo=$ac_try;;
3603esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003604eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003605 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003606 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003607 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003608 rm -f conftest.er1
3609 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003611 (exit $ac_status); } >/dev/null && {
3612 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3613 test ! -s conftest.err
3614 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003615 # Broken: success on invalid input.
3616continue
3617else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003618 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003619sed 's/^/| /' conftest.$ac_ext >&5
3620
Martin v. Löwis11437992002-04-12 09:54:03 +00003621 # Passes both tests.
3622ac_preproc_ok=:
3623break
3624fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003625
Martin v. Löwis11437992002-04-12 09:54:03 +00003626rm -f conftest.err conftest.$ac_ext
3627
3628done
3629# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3630rm -f conftest.err conftest.$ac_ext
3631if $ac_preproc_ok; then
3632 :
3633else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003634 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003635See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003636echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003637See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003638 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003639fi
3640
3641ac_ext=c
3642ac_cpp='$CPP $CPPFLAGS'
3643ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3644ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3645ac_compiler_gnu=$ac_cv_c_compiler_gnu
3646
3647
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003648{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3649echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003650if test "${ac_cv_path_GREP+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003651 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003652else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003653 # Extract the first word of "grep ggrep" to use in msg output
3654if test -z "$GREP"; then
3655set dummy grep ggrep; ac_prog_name=$2
3656if test "${ac_cv_path_GREP+set}" = set; then
3657 echo $ECHO_N "(cached) $ECHO_C" >&6
3658else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003659 ac_path_GREP_found=false
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003660# Loop through the user's path and test for each of PROGNAME-LIST
3661as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003662for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3663do
3664 IFS=$as_save_IFS
3665 test -z "$as_dir" && as_dir=.
3666 for ac_prog in grep ggrep; do
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003667 for ac_exec_ext in '' $ac_executable_extensions; do
3668 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3669 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3670 # Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003671 # Check for GNU $ac_path_GREP
3672case `"$ac_path_GREP" --version 2>&1` in
3673*GNU*)
3674 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3675*)
3676 ac_count=0
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003677 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003678 while :
3679 do
3680 cat "conftest.in" "conftest.in" >"conftest.tmp"
3681 mv "conftest.tmp" "conftest.in"
3682 cp "conftest.in" "conftest.nl"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003683 echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003684 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3685 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3686 ac_count=`expr $ac_count + 1`
3687 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3688 # Best one so far, save it but keep looking for a better one
3689 ac_cv_path_GREP="$ac_path_GREP"
3690 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00003691 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003692 # 10*(2^10) chars as input seems more than enough
3693 test $ac_count -gt 10 && break
3694 done
3695 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3696esac
3697
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003698
3699 $ac_path_GREP_found && break 3
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003700 done
3701done
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003702
3703done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003704IFS=$as_save_IFS
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003705
3706
3707fi
3708
3709GREP="$ac_cv_path_GREP"
3710if test -z "$GREP"; then
3711 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3712echo "$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 +00003713 { (exit 1); exit 1; }; }
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003714fi
3715
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003716else
3717 ac_cv_path_GREP=$GREP
3718fi
3719
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003720
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003721fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003722{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3723echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003724 GREP="$ac_cv_path_GREP"
3725
3726
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003727{ echo "$as_me:$LINENO: checking for egrep" >&5
3728echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003729if test "${ac_cv_path_EGREP+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003730 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003731else
3732 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3733 then ac_cv_path_EGREP="$GREP -E"
3734 else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003735 # Extract the first word of "egrep" to use in msg output
3736if test -z "$EGREP"; then
3737set dummy egrep; ac_prog_name=$2
3738if test "${ac_cv_path_EGREP+set}" = set; then
3739 echo $ECHO_N "(cached) $ECHO_C" >&6
3740else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003741 ac_path_EGREP_found=false
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003742# Loop through the user's path and test for each of PROGNAME-LIST
3743as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003744for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3745do
3746 IFS=$as_save_IFS
3747 test -z "$as_dir" && as_dir=.
3748 for ac_prog in egrep; do
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003749 for ac_exec_ext in '' $ac_executable_extensions; do
3750 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3751 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3752 # Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003753 # Check for GNU $ac_path_EGREP
3754case `"$ac_path_EGREP" --version 2>&1` in
3755*GNU*)
3756 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3757*)
3758 ac_count=0
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003759 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003760 while :
3761 do
3762 cat "conftest.in" "conftest.in" >"conftest.tmp"
3763 mv "conftest.tmp" "conftest.in"
3764 cp "conftest.in" "conftest.nl"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003765 echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003766 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3767 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3768 ac_count=`expr $ac_count + 1`
3769 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3770 # Best one so far, save it but keep looking for a better one
3771 ac_cv_path_EGREP="$ac_path_EGREP"
3772 ac_path_EGREP_max=$ac_count
3773 fi
3774 # 10*(2^10) chars as input seems more than enough
3775 test $ac_count -gt 10 && break
3776 done
3777 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3778esac
3779
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003780
3781 $ac_path_EGREP_found && break 3
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003782 done
3783done
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003784
3785done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003786IFS=$as_save_IFS
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003787
3788
3789fi
3790
3791EGREP="$ac_cv_path_EGREP"
3792if test -z "$EGREP"; then
3793 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3794echo "$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 +00003795 { (exit 1); exit 1; }; }
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003796fi
3797
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003798else
3799 ac_cv_path_EGREP=$EGREP
3800fi
3801
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003802
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003803 fi
3804fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003805{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3806echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003807 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00003808
3809
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003810
3811{ echo "$as_me:$LINENO: checking for AIX" >&5
3812echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
3813cat >conftest.$ac_ext <<_ACEOF
Benjamin Petersona8332062009-09-11 22:36:27 +00003814/* confdefs.h. */
3815_ACEOF
3816cat confdefs.h >>conftest.$ac_ext
3817cat >>conftest.$ac_ext <<_ACEOF
3818/* end confdefs.h. */
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003819#ifdef _AIX
3820 yes
Benjamin Petersona8332062009-09-11 22:36:27 +00003821#endif
3822
Benjamin Petersona8332062009-09-11 22:36:27 +00003823_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003824if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3825 $EGREP "yes" >/dev/null 2>&1; then
3826 { echo "$as_me:$LINENO: result: yes" >&5
3827echo "${ECHO_T}yes" >&6; }
Benjamin Petersona8332062009-09-11 22:36:27 +00003828cat >>confdefs.h <<\_ACEOF
Antoine Pitrou20327222009-05-24 20:39:11 +00003829#define _ALL_SOURCE 1
3830_ACEOF
3831
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003832else
3833 { echo "$as_me:$LINENO: result: no" >&5
3834echo "${ECHO_T}no" >&6; }
3835fi
Martin v. Löwisf6594222010-02-15 08:37:47 +00003836rm -f conftest*
Antoine Pitrou20327222009-05-24 20:39:11 +00003837
3838
3839
3840# Check for unsupported systems
3841case $ac_sys_system/$ac_sys_release in
3842atheos*|Linux*/1*)
3843 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3844 echo See README for details.
3845 exit 1;;
3846esac
3847
3848
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003849{ echo "$as_me:$LINENO: checking for --with-suffix" >&5
3850echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003851
3852# Check whether --with-suffix was given.
3853if test "${with_suffix+set}" = set; then
3854 withval=$with_suffix;
3855 case $withval in
3856 no) EXEEXT=;;
3857 yes) EXEEXT=.exe;;
3858 *) EXEEXT=$withval;;
3859 esac
3860fi
3861
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003862{ echo "$as_me:$LINENO: result: $EXEEXT" >&5
3863echo "${ECHO_T}$EXEEXT" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003864
3865# Test whether we're running on a non-case-sensitive system, in which
3866# case we give a warning if no ext is given
3867
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003868{ echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3869echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003870if test ! -d CaseSensitiveTestDir; then
3871mkdir CaseSensitiveTestDir
3872fi
3873
3874if test -d casesensitivetestdir
3875then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003876 { echo "$as_me:$LINENO: result: yes" >&5
3877echo "${ECHO_T}yes" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003878 BUILDEXEEXT=.exe
3879else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003880 { echo "$as_me:$LINENO: result: no" >&5
3881echo "${ECHO_T}no" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003882 BUILDEXEEXT=$EXEEXT
3883fi
3884rmdir CaseSensitiveTestDir
3885
3886case $MACHDEP in
3887bsdos*)
3888 case $CC in
3889 gcc) CC="$CC -D_HAVE_BSDI";;
3890 esac;;
3891esac
3892
3893case $ac_sys_system in
3894hp*|HP*)
3895 case $CC in
3896 cc|*/cc) CC="$CC -Ae";;
3897 esac;;
Antoine Pitrou20327222009-05-24 20:39:11 +00003898SunOS*)
3899 # Some functions have a prototype only with that define, e.g. confstr
3900
3901cat >>confdefs.h <<\_ACEOF
3902#define __EXTENSIONS__ 1
3903_ACEOF
3904
3905 ;;
3906esac
3907
3908
3909
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003910{ echo "$as_me:$LINENO: checking LIBRARY" >&5
3911echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003912if test -z "$LIBRARY"
3913then
3914 LIBRARY='libpython$(VERSION).a'
3915fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003916{ echo "$as_me:$LINENO: result: $LIBRARY" >&5
3917echo "${ECHO_T}$LIBRARY" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003918
3919# LDLIBRARY is the name of the library to link against (as opposed to the
3920# name of the library into which to insert object files). BLDLIBRARY is also
3921# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3922# is blank as the main program is not linked directly against LDLIBRARY.
3923# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3924# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3925# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3926# DLLLIBRARY is the shared (i.e., DLL) library.
3927#
3928# RUNSHARED is used to run shared python without installed libraries
3929#
3930# INSTSONAME is the name of the shared library that will be use to install
3931# on the system - some systems like version suffix, others don't
3932
3933
3934
3935
3936
3937
3938LDLIBRARY="$LIBRARY"
3939BLDLIBRARY='$(LDLIBRARY)'
3940INSTSONAME='$(LDLIBRARY)'
3941DLLLIBRARY=''
3942LDLIBRARYDIR=''
3943RUNSHARED=''
3944
3945# LINKCC is the command that links the python executable -- default is $(CC).
3946# If CXX is set, and if it is needed to link a main function that was
3947# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3948# python might then depend on the C++ runtime
3949# This is altered for AIX in order to build the export list before
3950# linking.
3951
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003952{ echo "$as_me:$LINENO: checking LINKCC" >&5
3953echo $ECHO_N "checking LINKCC... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003954if test -z "$LINKCC"
3955then
3956 LINKCC='$(PURIFY) $(MAINCC)'
3957 case $ac_sys_system in
3958 AIX*)
3959 exp_extra="\"\""
3960 if test $ac_sys_release -ge 5 -o \
3961 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3962 exp_extra="."
3963 fi
3964 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Antoine Pitrou20327222009-05-24 20:39:11 +00003965 QNX*)
3966 # qcc must be used because the other compilers do not
3967 # support -N.
3968 LINKCC=qcc;;
3969 esac
3970fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003971{ echo "$as_me:$LINENO: result: $LINKCC" >&5
3972echo "${ECHO_T}$LINKCC" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003973
3974# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
3975# make sure we default having it set to "no": this is used by
3976# distutils.unixccompiler to know if it should add --enable-new-dtags
3977# to linker command lines, and failing to detect GNU ld simply results
3978# in the same bahaviour as before.
3979
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003980{ echo "$as_me:$LINENO: checking for GNU ld" >&5
3981echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003982ac_prog=ld
3983if test "$GCC" = yes; then
3984 ac_prog=`$CC -print-prog-name=ld`
3985fi
3986case `"$ac_prog" -V 2>&1 < /dev/null` in
3987 *GNU*)
3988 GNULD=yes;;
3989 *)
3990 GNULD=no;;
3991esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003992{ echo "$as_me:$LINENO: result: $GNULD" >&5
3993echo "${ECHO_T}$GNULD" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003994
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003995{ echo "$as_me:$LINENO: checking for --enable-shared" >&5
3996echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003997# Check whether --enable-shared was given.
3998if test "${enable_shared+set}" = set; then
3999 enableval=$enable_shared;
4000fi
4001
4002
4003if test -z "$enable_shared"
4004then
4005 case $ac_sys_system in
4006 CYGWIN* | atheos*)
4007 enable_shared="yes";;
4008 *)
4009 enable_shared="no";;
4010 esac
4011fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004012{ echo "$as_me:$LINENO: result: $enable_shared" >&5
4013echo "${ECHO_T}$enable_shared" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004014
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004015{ echo "$as_me:$LINENO: checking for --enable-profiling" >&5
4016echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004017# Check whether --enable-profiling was given.
4018if test "${enable_profiling+set}" = set; then
4019 enableval=$enable_profiling; ac_save_cc="$CC"
4020 CC="$CC -pg"
4021 if test "$cross_compiling" = yes; then
4022 ac_enable_profiling="no"
4023else
4024 cat >conftest.$ac_ext <<_ACEOF
4025/* confdefs.h. */
4026_ACEOF
4027cat confdefs.h >>conftest.$ac_ext
4028cat >>conftest.$ac_ext <<_ACEOF
4029/* end confdefs.h. */
4030int main() { return 0; }
4031_ACEOF
4032rm -f conftest$ac_exeext
4033if { (ac_try="$ac_link"
4034case "(($ac_try" in
4035 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4036 *) ac_try_echo=$ac_try;;
4037esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004038eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004039 (eval "$ac_link") 2>&5
4040 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004042 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4043 { (case "(($ac_try" in
4044 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4045 *) ac_try_echo=$ac_try;;
4046esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004047eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004048 (eval "$ac_try") 2>&5
4049 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004051 (exit $ac_status); }; }; then
4052 ac_enable_profiling="yes"
4053else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004054 echo "$as_me: program exited with status $ac_status" >&5
4055echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004056sed 's/^/| /' conftest.$ac_ext >&5
4057
4058( exit $ac_status )
4059ac_enable_profiling="no"
4060fi
Antoine Pitrou20327222009-05-24 20:39:11 +00004061rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4062fi
4063
4064
4065 CC="$ac_save_cc"
4066fi
4067
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004068{ echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
4069echo "${ECHO_T}$ac_enable_profiling" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004070
4071case "$ac_enable_profiling" in
4072 "yes")
4073 BASECFLAGS="-pg $BASECFLAGS"
4074 LDFLAGS="-pg $LDFLAGS"
4075 ;;
4076esac
4077
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004078{ echo "$as_me:$LINENO: checking LDLIBRARY" >&5
4079echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004080
4081# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4082# library that we build, but we do not want to link against it (we
4083# will find it with a -framework option). For this reason there is an
4084# extra variable BLDLIBRARY against which Python and the extension
4085# modules are linked, BLDLIBRARY. This is normally the same as
4086# LDLIBRARY, but empty for MacOSX framework builds.
4087if test "$enable_framework"
4088then
4089 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4090 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4091 BLDLIBRARY=''
4092else
4093 BLDLIBRARY='$(LDLIBRARY)'
4094fi
4095
4096# Other platforms follow
4097if test $enable_shared = "yes"; then
4098
4099cat >>confdefs.h <<\_ACEOF
4100#define Py_ENABLE_SHARED 1
4101_ACEOF
4102
4103 case $ac_sys_system in
4104 CYGWIN*)
4105 LDLIBRARY='libpython$(VERSION).dll.a'
4106 DLLLIBRARY='libpython$(VERSION).dll'
4107 ;;
4108 SunOS*)
4109 LDLIBRARY='libpython$(VERSION).so'
4110 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
4111 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4112 INSTSONAME="$LDLIBRARY".$SOVERSION
4113 ;;
4114 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
4115 LDLIBRARY='libpython$(VERSION).so'
4116 BLDLIBRARY='-L. -lpython$(VERSION)'
4117 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4118 case $ac_sys_system in
4119 FreeBSD*)
4120 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4121 ;;
4122 esac
4123 INSTSONAME="$LDLIBRARY".$SOVERSION
4124 ;;
4125 hp*|HP*)
4126 case `uname -m` in
4127 ia64)
4128 LDLIBRARY='libpython$(VERSION).so'
4129 ;;
4130 *)
4131 LDLIBRARY='libpython$(VERSION).sl'
4132 ;;
4133 esac
4134 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
4135 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4136 ;;
4137 OSF*)
4138 LDLIBRARY='libpython$(VERSION).so'
4139 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
4140 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4141 ;;
4142 atheos*)
4143 LDLIBRARY='libpython$(VERSION).so'
4144 BLDLIBRARY='-L. -lpython$(VERSION)'
4145 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
4146 ;;
4147 Darwin*)
4148 LDLIBRARY='libpython$(VERSION).dylib'
4149 BLDLIBRARY='-L. -lpython$(VERSION)'
4150 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4151 ;;
4152
4153 esac
4154else # shared is disabled
4155 case $ac_sys_system in
4156 CYGWIN*)
4157 BLDLIBRARY='$(LIBRARY)'
4158 LDLIBRARY='libpython$(VERSION).dll.a'
4159 ;;
4160 esac
4161fi
4162
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004163{ echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
4164echo "${ECHO_T}$LDLIBRARY" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004165
4166if test -n "$ac_tool_prefix"; then
4167 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4168set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004169{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4170echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004171if test "${ac_cv_prog_RANLIB+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004172 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00004173else
4174 if test -n "$RANLIB"; then
4175 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4176else
4177as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4178for as_dir in $PATH
4179do
4180 IFS=$as_save_IFS
4181 test -z "$as_dir" && as_dir=.
4182 for ac_exec_ext in '' $ac_executable_extensions; do
4183 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4184 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004185 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004186 break 2
4187 fi
4188done
4189done
4190IFS=$as_save_IFS
4191
4192fi
4193fi
4194RANLIB=$ac_cv_prog_RANLIB
4195if test -n "$RANLIB"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004196 { echo "$as_me:$LINENO: result: $RANLIB" >&5
4197echo "${ECHO_T}$RANLIB" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004198else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004199 { echo "$as_me:$LINENO: result: no" >&5
4200echo "${ECHO_T}no" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004201fi
4202
4203
4204fi
4205if test -z "$ac_cv_prog_RANLIB"; then
4206 ac_ct_RANLIB=$RANLIB
4207 # Extract the first word of "ranlib", so it can be a program name with args.
4208set dummy ranlib; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004209{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4210echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004211if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004212 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00004213else
4214 if test -n "$ac_ct_RANLIB"; then
4215 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4216else
4217as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4218for as_dir in $PATH
4219do
4220 IFS=$as_save_IFS
4221 test -z "$as_dir" && as_dir=.
4222 for ac_exec_ext in '' $ac_executable_extensions; do
4223 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4224 ac_cv_prog_ac_ct_RANLIB="ranlib"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004225 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004226 break 2
4227 fi
4228done
4229done
4230IFS=$as_save_IFS
4231
4232fi
4233fi
4234ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4235if test -n "$ac_ct_RANLIB"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004236 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4237echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004238else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004239 { echo "$as_me:$LINENO: result: no" >&5
4240echo "${ECHO_T}no" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004241fi
4242
4243 if test "x$ac_ct_RANLIB" = x; then
4244 RANLIB=":"
4245 else
4246 case $cross_compiling:$ac_tool_warned in
4247yes:)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004248{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
4249whose name does not start with the host triplet. If you think this
4250configuration is useful to you, please write to autoconf@gnu.org." >&5
4251echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
4252whose name does not start with the host triplet. If you think this
4253configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Antoine Pitrou20327222009-05-24 20:39:11 +00004254ac_tool_warned=yes ;;
4255esac
4256 RANLIB=$ac_ct_RANLIB
4257 fi
4258else
4259 RANLIB="$ac_cv_prog_RANLIB"
4260fi
4261
4262
4263for ac_prog in ar aal
4264do
4265 # Extract the first word of "$ac_prog", so it can be a program name with args.
4266set dummy $ac_prog; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004267{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4268echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004269if test "${ac_cv_prog_AR+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004270 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00004271else
4272 if test -n "$AR"; then
4273 ac_cv_prog_AR="$AR" # Let the user override the test.
4274else
4275as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4276for as_dir in $PATH
4277do
4278 IFS=$as_save_IFS
4279 test -z "$as_dir" && as_dir=.
4280 for ac_exec_ext in '' $ac_executable_extensions; do
4281 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4282 ac_cv_prog_AR="$ac_prog"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004283 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004284 break 2
4285 fi
4286done
4287done
4288IFS=$as_save_IFS
4289
4290fi
4291fi
4292AR=$ac_cv_prog_AR
4293if test -n "$AR"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004294 { echo "$as_me:$LINENO: result: $AR" >&5
4295echo "${ECHO_T}$AR" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004296else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004297 { echo "$as_me:$LINENO: result: no" >&5
4298echo "${ECHO_T}no" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004299fi
4300
4301
4302 test -n "$AR" && break
4303done
4304test -n "$AR" || AR="ar"
4305
4306
4307# tweak ARFLAGS only if the user didn't set it on the command line
4308
4309if test -z "$ARFLAGS"
4310then
4311 ARFLAGS="rc"
4312fi
4313
4314
4315# Extract the first word of "svnversion", so it can be a program name with args.
4316set dummy svnversion; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004317{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4318echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004319if test "${ac_cv_prog_SVNVERSION+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004320 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00004321else
4322 if test -n "$SVNVERSION"; then
4323 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
4324else
4325as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4326for as_dir in $PATH
4327do
4328 IFS=$as_save_IFS
4329 test -z "$as_dir" && as_dir=.
4330 for ac_exec_ext in '' $ac_executable_extensions; do
4331 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4332 ac_cv_prog_SVNVERSION="found"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004333 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004334 break 2
4335 fi
4336done
4337done
4338IFS=$as_save_IFS
4339
4340 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
4341fi
4342fi
4343SVNVERSION=$ac_cv_prog_SVNVERSION
4344if test -n "$SVNVERSION"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004345 { echo "$as_me:$LINENO: result: $SVNVERSION" >&5
4346echo "${ECHO_T}$SVNVERSION" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004347else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004348 { echo "$as_me:$LINENO: result: no" >&5
4349echo "${ECHO_T}no" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004350fi
4351
4352
4353if test $SVNVERSION = found
4354then
4355 SVNVERSION="svnversion \$(srcdir)"
4356else
4357 SVNVERSION="echo Unversioned directory"
4358fi
4359
4360case $MACHDEP in
4361bsdos*|hp*|HP*)
4362 # install -d does not work on BSDI or HP-UX
4363 if test -z "$INSTALL"
4364 then
4365 INSTALL="${srcdir}/install-sh -c"
4366 fi
4367esac
4368ac_aux_dir=
4369for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4370 if test -f "$ac_dir/install-sh"; then
4371 ac_aux_dir=$ac_dir
4372 ac_install_sh="$ac_aux_dir/install-sh -c"
4373 break
4374 elif test -f "$ac_dir/install.sh"; then
4375 ac_aux_dir=$ac_dir
4376 ac_install_sh="$ac_aux_dir/install.sh -c"
4377 break
4378 elif test -f "$ac_dir/shtool"; then
4379 ac_aux_dir=$ac_dir
4380 ac_install_sh="$ac_aux_dir/shtool install -c"
4381 break
4382 fi
4383done
4384if test -z "$ac_aux_dir"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004385 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
4386echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
Antoine Pitrou20327222009-05-24 20:39:11 +00004387 { (exit 1); exit 1; }; }
4388fi
4389
4390# These three variables are undocumented and unsupported,
4391# and are intended to be withdrawn in a future Autoconf release.
4392# They can cause serious problems if a builder's source tree is in a directory
4393# whose full name contains unusual characters.
4394ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4395ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4396ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4397
4398
4399# Find a good install program. We prefer a C program (faster),
4400# so one script is as good as another. But avoid the broken or
4401# incompatible versions:
4402# SysV /etc/install, /usr/sbin/install
4403# SunOS /usr/etc/install
4404# IRIX /sbin/install
4405# AIX /bin/install
4406# AmigaOS /C/install, which installs bootblocks on floppy discs
4407# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4408# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4409# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4410# OS/2's system install, which has a completely different semantic
4411# ./install, which can be erroneously created by make from ./install.sh.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004412{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4413echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004414if test -z "$INSTALL"; then
4415if test "${ac_cv_path_install+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004416 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00004417else
4418 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4419for as_dir in $PATH
4420do
4421 IFS=$as_save_IFS
4422 test -z "$as_dir" && as_dir=.
4423 # Account for people who put trailing slashes in PATH elements.
4424case $as_dir/ in
4425 ./ | .// | /cC/* | \
4426 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4427 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
4428 /usr/ucb/* ) ;;
4429 *)
4430 # OSF1 and SCO ODT 3.0 have their own names for install.
4431 # Don't use installbsd from OSF since it installs stuff as root
4432 # by default.
4433 for ac_prog in ginstall scoinst install; do
4434 for ac_exec_ext in '' $ac_executable_extensions; do
4435 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
4436 if test $ac_prog = install &&
4437 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4438 # AIX install. It has an incompatible calling convention.
4439 :
4440 elif test $ac_prog = install &&
4441 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4442 # program-specific install script used by HP pwplus--don't use.
4443 :
4444 else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004445 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4446 break 3
Antoine Pitrou20327222009-05-24 20:39:11 +00004447 fi
4448 fi
4449 done
4450 done
4451 ;;
4452esac
Antoine Pitrou20327222009-05-24 20:39:11 +00004453done
4454IFS=$as_save_IFS
4455
Antoine Pitrou20327222009-05-24 20:39:11 +00004456
4457fi
4458 if test "${ac_cv_path_install+set}" = set; then
4459 INSTALL=$ac_cv_path_install
4460 else
4461 # As a last resort, use the slow shell script. Don't cache a
4462 # value for INSTALL within a source directory, because that will
4463 # break other packages using the cache if that directory is
4464 # removed, or if the value is a relative name.
4465 INSTALL=$ac_install_sh
4466 fi
4467fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004468{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4469echo "${ECHO_T}$INSTALL" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004470
4471# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4472# It thinks the first close brace ends the variable substitution.
4473test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4474
4475test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4476
4477test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4478
4479
4480# Not every filesystem supports hard links
4481
4482if test -z "$LN" ; then
4483 case $ac_sys_system in
4484 CYGWIN*) LN="ln -s";;
4485 atheos*) LN="ln -s";;
4486 *) LN=ln;;
4487 esac
4488fi
4489
4490# Check for --with-pydebug
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004491{ echo "$as_me:$LINENO: checking for --with-pydebug" >&5
4492echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004493
4494# Check whether --with-pydebug was given.
4495if test "${with_pydebug+set}" = set; then
4496 withval=$with_pydebug;
4497if test "$withval" != no
4498then
4499
4500cat >>confdefs.h <<\_ACEOF
4501#define Py_DEBUG 1
4502_ACEOF
4503
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004504 { echo "$as_me:$LINENO: result: yes" >&5
4505echo "${ECHO_T}yes" >&6; };
Antoine Pitrou20327222009-05-24 20:39:11 +00004506 Py_DEBUG='true'
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004507else { echo "$as_me:$LINENO: result: no" >&5
4508echo "${ECHO_T}no" >&6; }; Py_DEBUG='false'
Antoine Pitrou20327222009-05-24 20:39:11 +00004509fi
4510else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004511 { echo "$as_me:$LINENO: result: no" >&5
4512echo "${ECHO_T}no" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004513fi
4514
4515
4516# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
4517# merged with this chunk of code?
4518
4519# Optimizer/debugger flags
4520# ------------------------
4521# (The following bit of code is complicated enough - please keep things
4522# indented properly. Just pretend you're editing Python code. ;-)
4523
4524# There are two parallel sets of case statements below, one that checks to
4525# see if OPT was set and one that does BASECFLAGS setting based upon
4526# compiler and platform. BASECFLAGS tweaks need to be made even if the
4527# user set OPT.
4528
4529# tweak OPT based on compiler and platform, only if the user didn't set
4530# it on the command line
4531
4532if test -z "$OPT"
4533then
4534 case $GCC in
4535 yes)
4536 if test "$CC" != 'g++' ; then
4537 STRICT_PROTO="-Wstrict-prototypes"
4538 fi
4539 # For gcc 4.x we need to use -fwrapv so lets check if its supported
4540 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
4541 WRAP="-fwrapv"
4542 fi
4543 case $ac_cv_prog_cc_g in
4544 yes)
4545 if test "$Py_DEBUG" = 'true' ; then
4546 # Optimization messes up debuggers, so turn it off for
4547 # debug builds.
4548 OPT="-g -Wall $STRICT_PROTO"
4549 else
4550 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
4551 fi
4552 ;;
4553 *)
4554 OPT="-O3 -Wall $STRICT_PROTO"
4555 ;;
4556 esac
4557 case $ac_sys_system in
4558 SCO_SV*) OPT="$OPT -m486 -DSCO5"
4559 ;;
4560 esac
4561 ;;
4562
4563 *)
4564 OPT="-O"
4565 ;;
4566 esac
Antoine Pitrou20327222009-05-24 20:39:11 +00004567fi
4568
4569
4570
4571# The -arch flags for universal builds on OSX
4572UNIVERSAL_ARCH_FLAGS=
4573
4574
4575# tweak BASECFLAGS based on compiler and platform
4576case $GCC in
4577yes)
4578 # Python violates C99 rules, by casting between incompatible
4579 # pointer types. GCC may generate bad code as a result of that,
4580 # so use -fno-strict-aliasing if supported.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004581 { echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
4582echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004583 ac_save_cc="$CC"
4584 CC="$CC -fno-strict-aliasing"
4585 if test "$cross_compiling" = yes; then
4586 ac_cv_no_strict_aliasing_ok=no
4587else
4588 cat >conftest.$ac_ext <<_ACEOF
4589/* confdefs.h. */
4590_ACEOF
4591cat confdefs.h >>conftest.$ac_ext
4592cat >>conftest.$ac_ext <<_ACEOF
4593/* end confdefs.h. */
4594int main() { return 0; }
4595_ACEOF
4596rm -f conftest$ac_exeext
4597if { (ac_try="$ac_link"
4598case "(($ac_try" in
4599 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4600 *) ac_try_echo=$ac_try;;
4601esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004602eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004603 (eval "$ac_link") 2>&5
4604 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004606 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4607 { (case "(($ac_try" in
4608 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4609 *) ac_try_echo=$ac_try;;
4610esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004611eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004612 (eval "$ac_try") 2>&5
4613 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004614 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004615 (exit $ac_status); }; }; then
4616 ac_cv_no_strict_aliasing_ok=yes
4617else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004618 echo "$as_me: program exited with status $ac_status" >&5
4619echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004620sed 's/^/| /' conftest.$ac_ext >&5
4621
4622( exit $ac_status )
4623ac_cv_no_strict_aliasing_ok=no
4624fi
Antoine Pitrou20327222009-05-24 20:39:11 +00004625rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4626fi
4627
4628
4629 CC="$ac_save_cc"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004630 { echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
4631echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004632 if test $ac_cv_no_strict_aliasing_ok = yes
4633 then
4634 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
4635 fi
4636
4637 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
4638 # support. Without this, treatment of subnormals doesn't follow
4639 # the standard.
4640 case $ac_sys_machine in
4641 alpha*)
4642 BASECFLAGS="$BASECFLAGS -mieee"
4643 ;;
4644 esac
4645
4646 case $ac_sys_system in
4647 SCO_SV*)
4648 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
4649 ;;
4650 # is there any other compiler on Darwin besides gcc?
4651 Darwin*)
4652 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
4653 # used to be here, but non-Apple gcc doesn't accept them.
4654
4655
4656 if test "${enable_universalsdk}"; then
4657 UNIVERSAL_ARCH_FLAGS=""
4658 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
4659 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
4660 ARCH_RUN_32BIT=""
4661
4662 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
4663 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussorend45ff2c2009-09-06 11:11:04 +00004664 ARCH_RUN_32BIT="true"
Antoine Pitrou20327222009-05-24 20:39:11 +00004665
4666 elif test "$UNIVERSAL_ARCHS" = "all" ; then
4667 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussorenc8c89c42010-02-11 13:24:45 +00004668 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Antoine Pitrou20327222009-05-24 20:39:11 +00004669
Ronald Oussoren856624d2009-09-08 07:13:53 +00004670 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
4671 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussorenc8c89c42010-02-11 13:24:45 +00004672 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren856624d2009-09-08 07:13:53 +00004673
4674 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
4675 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussorenc8c89c42010-02-11 13:24:45 +00004676 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren856624d2009-09-08 07:13:53 +00004677
Antoine Pitrou20327222009-05-24 20:39:11 +00004678 else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004679 { { echo "$as_me:$LINENO: error: proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" >&5
4680echo "$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 +00004681 { (exit 1); exit 1; }; }
4682
4683 fi
4684
4685
4686 BASECFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
4687 tgt=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4688 if test "${UNIVERSALSDK}" != "/" -a "${tgt}" '>' '10.4' ; then
4689 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
4690 fi
4691 fi
4692
4693 # Calculate the right deployment target for this build.
4694 #
4695 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4696 if test ${cur_target} '>' 10.2; then
4697 cur_target=10.3
Ronald Oussorend45ff2c2009-09-06 11:11:04 +00004698 if test ${enable_universalsdk}; then
4699 if test "${UNIVERSAL_ARCHS}" = "all"; then
4700 # Ensure that the default platform for a
4701 # 4-way universal build is OSX 10.5,
4702 # that's the first OS release where
4703 # 4-way builds make sense.
4704 cur_target='10.5'
Ronald Oussoren856624d2009-09-08 07:13:53 +00004705
4706 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
4707 cur_target='10.5'
4708
4709 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
4710 cur_target='10.5'
4711
4712 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
4713 cur_target='10.5'
Ronald Oussorend45ff2c2009-09-06 11:11:04 +00004714 fi
4715 else
Ronald Oussoren175a8842010-02-11 13:40:06 +00004716 if test `/usr/bin/arch` = "i386"; then
Ronald Oussorend45ff2c2009-09-06 11:11:04 +00004717 # On Intel macs default to a deployment
4718 # target of 10.4, that's the first OSX
4719 # release with Intel support.
4720 cur_target="10.4"
4721 fi
4722 fi
Antoine Pitrou20327222009-05-24 20:39:11 +00004723 fi
4724 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
4725
4726 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
4727 # environment with a value that is the same as what we'll use
4728 # in the Makefile to ensure that we'll get the same compiler
4729 # environment during configure and build time.
4730 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
4731 export MACOSX_DEPLOYMENT_TARGET
4732 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
4733
4734 ;;
4735 OSF*)
4736 BASECFLAGS="$BASECFLAGS -mieee"
4737 ;;
4738 esac
4739 ;;
4740
4741*)
4742 case $ac_sys_system in
4743 OpenUNIX*|UnixWare*)
4744 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
4745 ;;
4746 OSF*)
4747 BASECFLAGS="$BASECFLAGS -ieee -std"
4748 ;;
4749 SCO_SV*)
4750 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
4751 ;;
4752 esac
4753 ;;
4754esac
4755
4756if test "$Py_DEBUG" = 'true'; then
4757 :
4758else
4759 OPT="-DNDEBUG $OPT"
4760fi
4761
4762if test "$ac_arch_flags"
4763then
4764 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
4765fi
4766
4767# disable check for icc since it seems to pass, but generates a warning
4768if test "$CC" = icc
4769then
4770 ac_cv_opt_olimit_ok=no
4771fi
4772
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004773{ echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
4774echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004775if test "${ac_cv_opt_olimit_ok+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004776 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00004777else
4778 ac_save_cc="$CC"
4779CC="$CC -OPT:Olimit=0"
4780if test "$cross_compiling" = yes; then
4781 ac_cv_opt_olimit_ok=no
4782else
4783 cat >conftest.$ac_ext <<_ACEOF
4784/* confdefs.h. */
4785_ACEOF
4786cat confdefs.h >>conftest.$ac_ext
4787cat >>conftest.$ac_ext <<_ACEOF
4788/* end confdefs.h. */
4789int main() { return 0; }
4790_ACEOF
4791rm -f conftest$ac_exeext
4792if { (ac_try="$ac_link"
4793case "(($ac_try" in
4794 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4795 *) ac_try_echo=$ac_try;;
4796esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004797eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004798 (eval "$ac_link") 2>&5
4799 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004801 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4802 { (case "(($ac_try" in
4803 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4804 *) ac_try_echo=$ac_try;;
4805esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004806eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004807 (eval "$ac_try") 2>&5
4808 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004810 (exit $ac_status); }; }; then
4811 ac_cv_opt_olimit_ok=yes
4812else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004813 echo "$as_me: program exited with status $ac_status" >&5
4814echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004815sed 's/^/| /' conftest.$ac_ext >&5
4816
4817( exit $ac_status )
4818ac_cv_opt_olimit_ok=no
4819fi
Antoine Pitrou20327222009-05-24 20:39:11 +00004820rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4821fi
4822
4823
4824CC="$ac_save_cc"
4825fi
4826
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004827{ echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
4828echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004829if test $ac_cv_opt_olimit_ok = yes; then
4830 case $ac_sys_system in
4831 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
4832 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
4833 # environment?
4834 Darwin*)
4835 ;;
4836 *)
4837 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
4838 ;;
4839 esac
4840else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004841 { echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
4842echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004843 if test "${ac_cv_olimit_ok+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004844 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00004845else
4846 ac_save_cc="$CC"
4847 CC="$CC -Olimit 1500"
4848 if test "$cross_compiling" = yes; then
4849 ac_cv_olimit_ok=no
4850else
4851 cat >conftest.$ac_ext <<_ACEOF
4852/* confdefs.h. */
4853_ACEOF
4854cat confdefs.h >>conftest.$ac_ext
4855cat >>conftest.$ac_ext <<_ACEOF
4856/* end confdefs.h. */
4857int main() { return 0; }
4858_ACEOF
4859rm -f conftest$ac_exeext
4860if { (ac_try="$ac_link"
4861case "(($ac_try" in
4862 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4863 *) ac_try_echo=$ac_try;;
4864esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004865eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004866 (eval "$ac_link") 2>&5
4867 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004869 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4870 { (case "(($ac_try" in
4871 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4872 *) ac_try_echo=$ac_try;;
4873esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004874eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004875 (eval "$ac_try") 2>&5
4876 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004877 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004878 (exit $ac_status); }; }; then
4879 ac_cv_olimit_ok=yes
4880else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004881 echo "$as_me: program exited with status $ac_status" >&5
4882echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004883sed 's/^/| /' conftest.$ac_ext >&5
4884
4885( exit $ac_status )
4886ac_cv_olimit_ok=no
4887fi
Antoine Pitrou20327222009-05-24 20:39:11 +00004888rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4889fi
4890
4891
4892 CC="$ac_save_cc"
4893fi
4894
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004895 { echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4896echo "${ECHO_T}$ac_cv_olimit_ok" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004897 if test $ac_cv_olimit_ok = yes; then
4898 BASECFLAGS="$BASECFLAGS -Olimit 1500"
4899 fi
4900fi
4901
4902# Check whether GCC supports PyArg_ParseTuple format
4903if test "$GCC" = "yes"
4904then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004905 { echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
4906echo $ECHO_N "checking whether gcc supports ParseTuple __format__... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004907 save_CFLAGS=$CFLAGS
4908 CFLAGS="$CFLAGS -Werror"
4909 cat >conftest.$ac_ext <<_ACEOF
4910/* confdefs.h. */
4911_ACEOF
4912cat confdefs.h >>conftest.$ac_ext
4913cat >>conftest.$ac_ext <<_ACEOF
4914/* end confdefs.h. */
4915
4916 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
4917
4918int
4919main ()
4920{
4921
4922 ;
4923 return 0;
4924}
4925_ACEOF
4926rm -f conftest.$ac_objext
4927if { (ac_try="$ac_compile"
4928case "(($ac_try" in
4929 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4930 *) ac_try_echo=$ac_try;;
4931esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004932eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004933 (eval "$ac_compile") 2>conftest.er1
4934 ac_status=$?
4935 grep -v '^ *+' conftest.er1 >conftest.err
4936 rm -f conftest.er1
4937 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004938 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004939 (exit $ac_status); } && {
4940 test -z "$ac_c_werror_flag" ||
4941 test ! -s conftest.err
4942 } && test -s conftest.$ac_objext; then
4943
4944cat >>confdefs.h <<\_ACEOF
4945#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
4946_ACEOF
4947
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004948 { echo "$as_me:$LINENO: result: yes" >&5
4949echo "${ECHO_T}yes" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004950else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004951 echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004952sed 's/^/| /' conftest.$ac_ext >&5
4953
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004954 { echo "$as_me:$LINENO: result: no" >&5
4955echo "${ECHO_T}no" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004956
4957fi
4958
4959rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4960 CFLAGS=$save_CFLAGS
4961fi
4962
4963# On some compilers, pthreads are available without further options
4964# (e.g. MacOS X). On some of these systems, the compiler will not
4965# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
4966# So we have to see first whether pthreads are available without
4967# options before we can check whether -Kpthread improves anything.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004968{ echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
4969echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004970if test "${ac_cv_pthread_is_default+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004971 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00004972else
4973 if test "$cross_compiling" = yes; then
4974 ac_cv_pthread_is_default=no
4975else
4976 cat >conftest.$ac_ext <<_ACEOF
4977/* confdefs.h. */
4978_ACEOF
4979cat confdefs.h >>conftest.$ac_ext
4980cat >>conftest.$ac_ext <<_ACEOF
4981/* end confdefs.h. */
4982
4983#include <pthread.h>
4984
4985void* routine(void* p){return NULL;}
4986
4987int main(){
4988 pthread_t p;
4989 if(pthread_create(&p,NULL,routine,NULL)!=0)
4990 return 1;
4991 (void)pthread_detach(p);
4992 return 0;
4993}
4994
4995_ACEOF
4996rm -f conftest$ac_exeext
4997if { (ac_try="$ac_link"
4998case "(($ac_try" in
4999 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5000 *) ac_try_echo=$ac_try;;
5001esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005002eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005003 (eval "$ac_link") 2>&5
5004 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005006 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5007 { (case "(($ac_try" in
5008 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5009 *) ac_try_echo=$ac_try;;
5010esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005011eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005012 (eval "$ac_try") 2>&5
5013 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005014 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005015 (exit $ac_status); }; }; then
5016
5017 ac_cv_pthread_is_default=yes
5018 ac_cv_kthread=no
5019 ac_cv_pthread=no
5020
5021else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005022 echo "$as_me: program exited with status $ac_status" >&5
5023echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005024sed 's/^/| /' conftest.$ac_ext >&5
5025
5026( exit $ac_status )
5027ac_cv_pthread_is_default=no
5028fi
Antoine Pitrou20327222009-05-24 20:39:11 +00005029rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5030fi
5031
5032
5033
5034fi
5035
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005036{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
5037echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005038
5039
5040if test $ac_cv_pthread_is_default = yes
5041then
5042 ac_cv_kpthread=no
5043else
5044# -Kpthread, if available, provides the right #defines
5045# and linker options to make pthread_create available
5046# Some compilers won't report that they do not support -Kpthread,
5047# so we need to run a program to see whether it really made the
5048# function available.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005049{ echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
5050echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005051if test "${ac_cv_kpthread+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005052 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00005053else
5054 ac_save_cc="$CC"
5055CC="$CC -Kpthread"
5056if test "$cross_compiling" = yes; then
5057 ac_cv_kpthread=no
5058else
5059 cat >conftest.$ac_ext <<_ACEOF
5060/* confdefs.h. */
5061_ACEOF
5062cat confdefs.h >>conftest.$ac_ext
5063cat >>conftest.$ac_ext <<_ACEOF
5064/* end confdefs.h. */
5065
5066#include <pthread.h>
5067
5068void* routine(void* p){return NULL;}
5069
5070int main(){
5071 pthread_t p;
5072 if(pthread_create(&p,NULL,routine,NULL)!=0)
5073 return 1;
5074 (void)pthread_detach(p);
5075 return 0;
5076}
5077
5078_ACEOF
5079rm -f conftest$ac_exeext
5080if { (ac_try="$ac_link"
5081case "(($ac_try" in
5082 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5083 *) ac_try_echo=$ac_try;;
5084esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005085eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005086 (eval "$ac_link") 2>&5
5087 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005089 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5090 { (case "(($ac_try" in
5091 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5092 *) ac_try_echo=$ac_try;;
5093esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005094eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005095 (eval "$ac_try") 2>&5
5096 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005097 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005098 (exit $ac_status); }; }; then
5099 ac_cv_kpthread=yes
5100else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005101 echo "$as_me: program exited with status $ac_status" >&5
5102echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005103sed 's/^/| /' conftest.$ac_ext >&5
5104
5105( exit $ac_status )
5106ac_cv_kpthread=no
5107fi
Antoine Pitrou20327222009-05-24 20:39:11 +00005108rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5109fi
5110
5111
5112CC="$ac_save_cc"
5113fi
5114
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005115{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
5116echo "${ECHO_T}$ac_cv_kpthread" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005117fi
5118
5119if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5120then
5121# -Kthread, if available, provides the right #defines
5122# and linker options to make pthread_create available
5123# Some compilers won't report that they do not support -Kthread,
5124# so we need to run a program to see whether it really made the
5125# function available.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005126{ echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
5127echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005128if test "${ac_cv_kthread+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005129 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00005130else
5131 ac_save_cc="$CC"
5132CC="$CC -Kthread"
5133if test "$cross_compiling" = yes; then
5134 ac_cv_kthread=no
5135else
5136 cat >conftest.$ac_ext <<_ACEOF
5137/* confdefs.h. */
5138_ACEOF
5139cat confdefs.h >>conftest.$ac_ext
5140cat >>conftest.$ac_ext <<_ACEOF
5141/* end confdefs.h. */
5142
5143#include <pthread.h>
5144
5145void* routine(void* p){return NULL;}
5146
5147int main(){
5148 pthread_t p;
5149 if(pthread_create(&p,NULL,routine,NULL)!=0)
5150 return 1;
5151 (void)pthread_detach(p);
5152 return 0;
5153}
5154
5155_ACEOF
5156rm -f conftest$ac_exeext
5157if { (ac_try="$ac_link"
5158case "(($ac_try" in
5159 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5160 *) ac_try_echo=$ac_try;;
5161esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005162eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005163 (eval "$ac_link") 2>&5
5164 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005166 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5167 { (case "(($ac_try" in
5168 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5169 *) ac_try_echo=$ac_try;;
5170esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005171eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005172 (eval "$ac_try") 2>&5
5173 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005175 (exit $ac_status); }; }; then
5176 ac_cv_kthread=yes
5177else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005178 echo "$as_me: program exited with status $ac_status" >&5
5179echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005180sed 's/^/| /' conftest.$ac_ext >&5
5181
5182( exit $ac_status )
5183ac_cv_kthread=no
5184fi
Antoine Pitrou20327222009-05-24 20:39:11 +00005185rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5186fi
5187
5188
5189CC="$ac_save_cc"
5190fi
5191
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005192{ echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
5193echo "${ECHO_T}$ac_cv_kthread" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005194fi
5195
5196if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5197then
5198# -pthread, if available, provides the right #defines
5199# and linker options to make pthread_create available
5200# Some compilers won't report that they do not support -pthread,
5201# so we need to run a program to see whether it really made the
5202# function available.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005203{ echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
5204echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005205if test "${ac_cv_thread+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005206 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00005207else
5208 ac_save_cc="$CC"
5209CC="$CC -pthread"
5210if test "$cross_compiling" = yes; then
5211 ac_cv_pthread=no
5212else
5213 cat >conftest.$ac_ext <<_ACEOF
5214/* confdefs.h. */
5215_ACEOF
5216cat confdefs.h >>conftest.$ac_ext
5217cat >>conftest.$ac_ext <<_ACEOF
5218/* end confdefs.h. */
5219
5220#include <pthread.h>
5221
5222void* routine(void* p){return NULL;}
5223
5224int main(){
5225 pthread_t p;
5226 if(pthread_create(&p,NULL,routine,NULL)!=0)
5227 return 1;
5228 (void)pthread_detach(p);
5229 return 0;
5230}
5231
5232_ACEOF
5233rm -f conftest$ac_exeext
5234if { (ac_try="$ac_link"
5235case "(($ac_try" in
5236 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5237 *) ac_try_echo=$ac_try;;
5238esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005239eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005240 (eval "$ac_link") 2>&5
5241 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005242 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005243 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5244 { (case "(($ac_try" in
5245 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5246 *) ac_try_echo=$ac_try;;
5247esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005248eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005249 (eval "$ac_try") 2>&5
5250 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005251 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005252 (exit $ac_status); }; }; then
5253 ac_cv_pthread=yes
5254else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005255 echo "$as_me: program exited with status $ac_status" >&5
5256echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005257sed 's/^/| /' conftest.$ac_ext >&5
5258
5259( exit $ac_status )
5260ac_cv_pthread=no
5261fi
Antoine Pitrou20327222009-05-24 20:39:11 +00005262rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5263fi
5264
5265
5266CC="$ac_save_cc"
5267fi
5268
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005269{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5270echo "${ECHO_T}$ac_cv_pthread" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005271fi
5272
5273# If we have set a CC compiler flag for thread support then
5274# check if it works for CXX, too.
5275ac_cv_cxx_thread=no
5276if test ! -z "$CXX"
5277then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005278{ echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5279echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005280ac_save_cxx="$CXX"
5281
5282if test "$ac_cv_kpthread" = "yes"
5283then
5284 CXX="$CXX -Kpthread"
5285 ac_cv_cxx_thread=yes
5286elif test "$ac_cv_kthread" = "yes"
5287then
5288 CXX="$CXX -Kthread"
5289 ac_cv_cxx_thread=yes
5290elif test "$ac_cv_pthread" = "yes"
5291then
5292 CXX="$CXX -pthread"
5293 ac_cv_cxx_thread=yes
5294fi
5295
5296if test $ac_cv_cxx_thread = yes
5297then
5298 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5299 $CXX -c conftest.$ac_ext 2>&5
5300 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5301 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5302 then
5303 ac_cv_cxx_thread=yes
5304 else
5305 ac_cv_cxx_thread=no
5306 fi
5307 rm -fr conftest*
5308fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005309{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5310echo "${ECHO_T}$ac_cv_cxx_thread" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005311fi
5312CXX="$ac_save_cxx"
5313
5314
5315# checks for header files
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005316{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5317echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005318if test "${ac_cv_header_stdc+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005319 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00005320else
5321 cat >conftest.$ac_ext <<_ACEOF
5322/* confdefs.h. */
5323_ACEOF
5324cat confdefs.h >>conftest.$ac_ext
5325cat >>conftest.$ac_ext <<_ACEOF
5326/* end confdefs.h. */
5327#include <stdlib.h>
5328#include <stdarg.h>
5329#include <string.h>
5330#include <float.h>
5331
5332int
5333main ()
5334{
5335
5336 ;
5337 return 0;
5338}
5339_ACEOF
5340rm -f conftest.$ac_objext
5341if { (ac_try="$ac_compile"
5342case "(($ac_try" in
5343 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5344 *) ac_try_echo=$ac_try;;
5345esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005346eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005347 (eval "$ac_compile") 2>conftest.er1
5348 ac_status=$?
5349 grep -v '^ *+' conftest.er1 >conftest.err
5350 rm -f conftest.er1
5351 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005353 (exit $ac_status); } && {
5354 test -z "$ac_c_werror_flag" ||
5355 test ! -s conftest.err
5356 } && test -s conftest.$ac_objext; then
5357 ac_cv_header_stdc=yes
5358else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005359 echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005360sed 's/^/| /' conftest.$ac_ext >&5
5361
5362 ac_cv_header_stdc=no
5363fi
5364
5365rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5366
5367if test $ac_cv_header_stdc = yes; then
5368 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5369 cat >conftest.$ac_ext <<_ACEOF
5370/* confdefs.h. */
5371_ACEOF
5372cat confdefs.h >>conftest.$ac_ext
5373cat >>conftest.$ac_ext <<_ACEOF
5374/* end confdefs.h. */
5375#include <string.h>
5376
5377_ACEOF
5378if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5379 $EGREP "memchr" >/dev/null 2>&1; then
5380 :
5381else
5382 ac_cv_header_stdc=no
5383fi
Martin v. Löwisf6594222010-02-15 08:37:47 +00005384rm -f conftest*
Antoine Pitrou20327222009-05-24 20:39:11 +00005385
5386fi
5387
5388if test $ac_cv_header_stdc = yes; then
5389 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5390 cat >conftest.$ac_ext <<_ACEOF
5391/* confdefs.h. */
5392_ACEOF
5393cat confdefs.h >>conftest.$ac_ext
5394cat >>conftest.$ac_ext <<_ACEOF
5395/* end confdefs.h. */
5396#include <stdlib.h>
5397
5398_ACEOF
5399if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5400 $EGREP "free" >/dev/null 2>&1; then
5401 :
5402else
5403 ac_cv_header_stdc=no
5404fi
Martin v. Löwisf6594222010-02-15 08:37:47 +00005405rm -f conftest*
Antoine Pitrou20327222009-05-24 20:39:11 +00005406
5407fi
5408
5409if test $ac_cv_header_stdc = yes; then
5410 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5411 if test "$cross_compiling" = yes; then
5412 :
5413else
5414 cat >conftest.$ac_ext <<_ACEOF
5415/* confdefs.h. */
5416_ACEOF
5417cat confdefs.h >>conftest.$ac_ext
5418cat >>conftest.$ac_ext <<_ACEOF
5419/* end confdefs.h. */
5420#include <ctype.h>
5421#include <stdlib.h>
5422#if ((' ' & 0x0FF) == 0x020)
5423# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5424# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5425#else
5426# define ISLOWER(c) \
5427 (('a' <= (c) && (c) <= 'i') \
5428 || ('j' <= (c) && (c) <= 'r') \
5429 || ('s' <= (c) && (c) <= 'z'))
5430# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5431#endif
5432
5433#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5434int
5435main ()
5436{
5437 int i;
5438 for (i = 0; i < 256; i++)
5439 if (XOR (islower (i), ISLOWER (i))
5440 || toupper (i) != TOUPPER (i))
5441 return 2;
5442 return 0;
5443}
5444_ACEOF
5445rm -f conftest$ac_exeext
5446if { (ac_try="$ac_link"
5447case "(($ac_try" in
5448 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5449 *) ac_try_echo=$ac_try;;
5450esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005451eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005452 (eval "$ac_link") 2>&5
5453 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005454 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005455 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5456 { (case "(($ac_try" in
5457 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5458 *) ac_try_echo=$ac_try;;
5459esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005460eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005461 (eval "$ac_try") 2>&5
5462 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005464 (exit $ac_status); }; }; then
5465 :
5466else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005467 echo "$as_me: program exited with status $ac_status" >&5
5468echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005469sed 's/^/| /' conftest.$ac_ext >&5
5470
5471( exit $ac_status )
5472ac_cv_header_stdc=no
5473fi
Antoine Pitrou20327222009-05-24 20:39:11 +00005474rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5475fi
5476
5477
5478fi
5479fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005480{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5481echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005482if test $ac_cv_header_stdc = yes; then
5483
5484cat >>confdefs.h <<\_ACEOF
5485#define STDC_HEADERS 1
5486_ACEOF
5487
5488fi
5489
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005490# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5501 inttypes.h stdint.h unistd.h
5502do
5503as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5504{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5505echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5506if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5507 echo $ECHO_N "(cached) $ECHO_C" >&6
5508else
5509 cat >conftest.$ac_ext <<_ACEOF
5510/* confdefs.h. */
5511_ACEOF
5512cat confdefs.h >>conftest.$ac_ext
5513cat >>conftest.$ac_ext <<_ACEOF
5514/* end confdefs.h. */
5515$ac_includes_default
5516
5517#include <$ac_header>
5518_ACEOF
5519rm -f conftest.$ac_objext
5520if { (ac_try="$ac_compile"
5521case "(($ac_try" in
5522 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5523 *) ac_try_echo=$ac_try;;
5524esac
5525eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5526 (eval "$ac_compile") 2>conftest.er1
5527 ac_status=$?
5528 grep -v '^ *+' conftest.er1 >conftest.err
5529 rm -f conftest.er1
5530 cat conftest.err >&5
5531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5532 (exit $ac_status); } && {
5533 test -z "$ac_c_werror_flag" ||
5534 test ! -s conftest.err
5535 } && test -s conftest.$ac_objext; then
5536 eval "$as_ac_Header=yes"
5537else
5538 echo "$as_me: failed program was:" >&5
5539sed 's/^/| /' conftest.$ac_ext >&5
5540
5541 eval "$as_ac_Header=no"
5542fi
5543
5544rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5545fi
5546ac_res=`eval echo '${'$as_ac_Header'}'`
5547 { echo "$as_me:$LINENO: result: $ac_res" >&5
5548echo "${ECHO_T}$ac_res" >&6; }
5549if test `eval echo '${'$as_ac_Header'}'` = yes; then
5550 cat >>confdefs.h <<_ACEOF
5551#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5552_ACEOF
5553
5554fi
5555
5556done
5557
5558
Antoine Pitrou20327222009-05-24 20:39:11 +00005559
Martin v. Löwis11437992002-04-12 09:54:03 +00005560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
Anthony Baxter8a560de2004-10-13 15:30:56 +00005595
Martin v. Löwisc3001752005-01-23 09:27:24 +00005596
Martin v. Löwis11017b12006-01-14 18:12:57 +00005597
Thomas Wouters477c8d52006-05-27 19:21:47 +00005598
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005599
5600
5601
5602
5603
5604
5605
5606
Thomas Wouters89f507f2006-12-13 04:49:30 +00005607
Christian Heimes043d6f62008-01-07 17:19:16 +00005608
Christian Heimes4fbc72b2008-03-22 00:47:35 +00005609
5610
Christian Heimesbbe741d2008-03-28 10:53:29 +00005611
Benjamin Petersonde9c8692008-07-01 18:23:09 +00005612
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005613for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5614fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00005615ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00005616shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005617unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00005618sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
5619sys/lock.h sys/mkdev.h sys/modem.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005620sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Benjamin Petersonde9c8692008-07-01 18:23:09 +00005621sys/termio.h sys/time.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005622sys/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 +00005623sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimes043d6f62008-01-07 17:19:16 +00005624bluetooth/bluetooth.h linux/tipc.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00005625do
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005626as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005627if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005628 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5629echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005630if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005631 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005632fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005633ac_res=`eval echo '${'$as_ac_Header'}'`
5634 { echo "$as_me:$LINENO: result: $ac_res" >&5
5635echo "${ECHO_T}$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005636else
Martin v. Löwis11437992002-04-12 09:54:03 +00005637 # Is the header compilable?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005638{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5639echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005640cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005641/* confdefs.h. */
5642_ACEOF
5643cat confdefs.h >>conftest.$ac_ext
5644cat >>conftest.$ac_ext <<_ACEOF
5645/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005646$ac_includes_default
5647#include <$ac_header>
5648_ACEOF
5649rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005650if { (ac_try="$ac_compile"
5651case "(($ac_try" in
5652 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5653 *) ac_try_echo=$ac_try;;
5654esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005655eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005656 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005657 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005658 grep -v '^ *+' conftest.er1 >conftest.err
5659 rm -f conftest.er1
5660 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005662 (exit $ac_status); } && {
5663 test -z "$ac_c_werror_flag" ||
5664 test ! -s conftest.err
5665 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005666 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00005667else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005668 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005669sed 's/^/| /' conftest.$ac_ext >&5
5670
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005671 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005672fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005673
5674rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005675{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5676echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005677
5678# Is the header present?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005679{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5680echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005681cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005682/* confdefs.h. */
5683_ACEOF
5684cat confdefs.h >>conftest.$ac_ext
5685cat >>conftest.$ac_ext <<_ACEOF
5686/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005687#include <$ac_header>
5688_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005689if { (ac_try="$ac_cpp conftest.$ac_ext"
5690case "(($ac_try" in
5691 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5692 *) ac_try_echo=$ac_try;;
5693esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005694eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005695 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005696 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005697 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00005698 rm -f conftest.er1
5699 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005701 (exit $ac_status); } >/dev/null && {
5702 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5703 test ! -s conftest.err
5704 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005705 ac_header_preproc=yes
5706else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005707 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005708sed 's/^/| /' conftest.$ac_ext >&5
5709
Martin v. Löwis11437992002-04-12 09:54:03 +00005710 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00005711fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005712
Martin v. Löwis11437992002-04-12 09:54:03 +00005713rm -f conftest.err conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005714{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5715echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005716
5717# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005718case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5719 yes:no: )
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005720 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5721echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
5722 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5723echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005724 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005725 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005726 no:yes:* )
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005727 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5728echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
5729 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5730echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5731 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5732echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5733 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5734echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
5735 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5736echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5737 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5738echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005739 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00005740## -------------------------------------- ##
5741## Report this to http://bugs.python.org/ ##
5742## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005743_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005744 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005745 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00005746esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005747{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5748echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005749if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005750 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005751else
Skip Montanarof0d5f792004-08-15 14:08:23 +00005752 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005753fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005754ac_res=`eval echo '${'$as_ac_Header'}'`
5755 { echo "$as_me:$LINENO: result: $ac_res" >&5
5756echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005757
5758fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005759if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005760 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005761#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005762_ACEOF
5763
5764fi
5765
Guido van Rossum627b2d71993-12-24 10:39:16 +00005766done
5767
Martin v. Löwis11437992002-04-12 09:54:03 +00005768
5769
5770
5771
5772
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005773ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005774for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005775 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
5776{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5777echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005778if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005779 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005780else
Martin v. Löwis11437992002-04-12 09:54:03 +00005781 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005782/* confdefs.h. */
5783_ACEOF
5784cat confdefs.h >>conftest.$ac_ext
5785cat >>conftest.$ac_ext <<_ACEOF
5786/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005787#include <sys/types.h>
5788#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00005789
Martin v. Löwis11437992002-04-12 09:54:03 +00005790int
5791main ()
5792{
5793if ((DIR *) 0)
5794return 0;
5795 ;
5796 return 0;
5797}
5798_ACEOF
5799rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005800if { (ac_try="$ac_compile"
5801case "(($ac_try" in
5802 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5803 *) ac_try_echo=$ac_try;;
5804esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005805eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005806 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005807 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005808 grep -v '^ *+' conftest.er1 >conftest.err
5809 rm -f conftest.er1
5810 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005812 (exit $ac_status); } && {
5813 test -z "$ac_c_werror_flag" ||
5814 test ! -s conftest.err
5815 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005816 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00005817else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005818 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005819sed 's/^/| /' conftest.$ac_ext >&5
5820
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005821 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005822fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005823
5824rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005825fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005826ac_res=`eval echo '${'$as_ac_Header'}'`
5827 { echo "$as_me:$LINENO: result: $ac_res" >&5
5828echo "${ECHO_T}$ac_res" >&6; }
5829if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005830 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005831#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005832_ACEOF
5833
5834ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00005835fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005836
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005837done
5838# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5839if test $ac_header_dirent = dirent.h; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005840 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5841echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005842if test "${ac_cv_search_opendir+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005843 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005844else
Martin v. Löwis11437992002-04-12 09:54:03 +00005845 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005846cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005847/* confdefs.h. */
5848_ACEOF
5849cat confdefs.h >>conftest.$ac_ext
5850cat >>conftest.$ac_ext <<_ACEOF
5851/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005852
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005853/* Override any GCC internal prototype to avoid an error.
5854 Use char because int might match the return type of a GCC
5855 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005856#ifdef __cplusplus
5857extern "C"
5858#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005859char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005860int
5861main ()
5862{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005863return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005864 ;
5865 return 0;
5866}
5867_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005868for ac_lib in '' dir; do
5869 if test -z "$ac_lib"; then
5870 ac_res="none required"
5871 else
5872 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005873 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005874 fi
5875 rm -f conftest.$ac_objext conftest$ac_exeext
5876if { (ac_try="$ac_link"
5877case "(($ac_try" in
5878 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5879 *) ac_try_echo=$ac_try;;
5880esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005881eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005882 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005883 ac_status=$?
5884 grep -v '^ *+' conftest.er1 >conftest.err
5885 rm -f conftest.er1
5886 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005888 (exit $ac_status); } && {
5889 test -z "$ac_c_werror_flag" ||
5890 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005891 } && test -s conftest$ac_exeext &&
5892 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005893 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00005894else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005895 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005896sed 's/^/| /' conftest.$ac_ext >&5
5897
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005898
Thomas Wouters477c8d52006-05-27 19:21:47 +00005899fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005900
5901rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5902 conftest$ac_exeext
5903 if test "${ac_cv_search_opendir+set}" = set; then
5904 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005905fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005906done
5907if test "${ac_cv_search_opendir+set}" = set; then
5908 :
5909else
5910 ac_cv_search_opendir=no
5911fi
5912rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005913LIBS=$ac_func_search_save_LIBS
5914fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005915{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5916echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005917ac_res=$ac_cv_search_opendir
5918if test "$ac_res" != no; then
5919 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005920
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005921fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005922
Michael W. Hudson54241132001-12-07 15:38:26 +00005923else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005924 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5925echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005926if test "${ac_cv_search_opendir+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005927 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005928else
5929 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005930cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005931/* confdefs.h. */
5932_ACEOF
5933cat confdefs.h >>conftest.$ac_ext
5934cat >>conftest.$ac_ext <<_ACEOF
5935/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005936
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005937/* Override any GCC internal prototype to avoid an error.
5938 Use char because int might match the return type of a GCC
5939 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005940#ifdef __cplusplus
5941extern "C"
5942#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005943char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005944int
5945main ()
5946{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005947return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005948 ;
5949 return 0;
5950}
5951_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005952for ac_lib in '' x; do
5953 if test -z "$ac_lib"; then
5954 ac_res="none required"
5955 else
5956 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005957 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005958 fi
5959 rm -f conftest.$ac_objext conftest$ac_exeext
5960if { (ac_try="$ac_link"
5961case "(($ac_try" in
5962 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5963 *) ac_try_echo=$ac_try;;
5964esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005965eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005966 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005967 ac_status=$?
5968 grep -v '^ *+' conftest.er1 >conftest.err
5969 rm -f conftest.er1
5970 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005971 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005972 (exit $ac_status); } && {
5973 test -z "$ac_c_werror_flag" ||
5974 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005975 } && test -s conftest$ac_exeext &&
5976 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005977 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00005978else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005979 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005980sed 's/^/| /' conftest.$ac_ext >&5
5981
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005982
Thomas Wouters477c8d52006-05-27 19:21:47 +00005983fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005984
5985rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5986 conftest$ac_exeext
5987 if test "${ac_cv_search_opendir+set}" = set; then
5988 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005989fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005990done
5991if test "${ac_cv_search_opendir+set}" = set; then
5992 :
5993else
5994 ac_cv_search_opendir=no
5995fi
5996rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005997LIBS=$ac_func_search_save_LIBS
5998fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005999{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
6000echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006001ac_res=$ac_cv_search_opendir
6002if test "$ac_res" != no; then
6003 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006004
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006005fi
6006
6007fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006008
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006009{ echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
6010echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006011if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006012 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006013else
6014 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006015/* confdefs.h. */
6016_ACEOF
6017cat confdefs.h >>conftest.$ac_ext
6018cat >>conftest.$ac_ext <<_ACEOF
6019/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006020#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006021int
6022main ()
6023{
6024return makedev(0, 0);
6025 ;
6026 return 0;
6027}
6028_ACEOF
6029rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006030if { (ac_try="$ac_link"
6031case "(($ac_try" in
6032 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6033 *) ac_try_echo=$ac_try;;
6034esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006035eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006036 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006037 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006038 grep -v '^ *+' conftest.er1 >conftest.err
6039 rm -f conftest.er1
6040 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006042 (exit $ac_status); } && {
6043 test -z "$ac_c_werror_flag" ||
6044 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006045 } && test -s conftest$ac_exeext &&
6046 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006047 ac_cv_header_sys_types_h_makedev=yes
6048else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006049 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006050sed 's/^/| /' conftest.$ac_ext >&5
6051
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006052 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006053fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006054
6055rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006056 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006057
6058fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006059{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
6060echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006061
6062if test $ac_cv_header_sys_types_h_makedev = no; then
6063if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006064 { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6065echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006066if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006067 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006068fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006069{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6070echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006071else
6072 # Is the header compilable?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006073{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
6074echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006075cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006076/* confdefs.h. */
6077_ACEOF
6078cat confdefs.h >>conftest.$ac_ext
6079cat >>conftest.$ac_ext <<_ACEOF
6080/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006081$ac_includes_default
6082#include <sys/mkdev.h>
6083_ACEOF
6084rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006085if { (ac_try="$ac_compile"
6086case "(($ac_try" in
6087 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6088 *) ac_try_echo=$ac_try;;
6089esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006090eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006091 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006092 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006093 grep -v '^ *+' conftest.er1 >conftest.err
6094 rm -f conftest.er1
6095 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006097 (exit $ac_status); } && {
6098 test -z "$ac_c_werror_flag" ||
6099 test ! -s conftest.err
6100 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006101 ac_header_compiler=yes
6102else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006103 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006104sed 's/^/| /' conftest.$ac_ext >&5
6105
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006106 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006107fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006108
6109rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006110{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6111echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006112
6113# Is the header present?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006114{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
6115echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006116cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006117/* confdefs.h. */
6118_ACEOF
6119cat confdefs.h >>conftest.$ac_ext
6120cat >>conftest.$ac_ext <<_ACEOF
6121/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006122#include <sys/mkdev.h>
6123_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006124if { (ac_try="$ac_cpp conftest.$ac_ext"
6125case "(($ac_try" in
6126 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6127 *) ac_try_echo=$ac_try;;
6128esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006129eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006130 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006131 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006132 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006133 rm -f conftest.er1
6134 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006136 (exit $ac_status); } >/dev/null && {
6137 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6138 test ! -s conftest.err
6139 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006140 ac_header_preproc=yes
6141else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006142 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006143sed 's/^/| /' conftest.$ac_ext >&5
6144
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006145 ac_header_preproc=no
6146fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006147
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006148rm -f conftest.err conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006149{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6150echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006151
6152# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006153case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6154 yes:no: )
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006155 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
6156echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6157 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
6158echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006159 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006160 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006161 no:yes:* )
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006162 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
6163echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
6164 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
6165echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
6166 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
6167echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
6168 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
6169echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
6170 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
6171echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
6172 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
6173echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006174 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00006175## -------------------------------------- ##
6176## Report this to http://bugs.python.org/ ##
6177## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006178_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006179 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006180 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006181esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006182{ echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6183echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006184if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006185 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006186else
6187 ac_cv_header_sys_mkdev_h=$ac_header_preproc
6188fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006189{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6190echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006191
6192fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006193if test $ac_cv_header_sys_mkdev_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006194
6195cat >>confdefs.h <<\_ACEOF
6196#define MAJOR_IN_MKDEV 1
6197_ACEOF
6198
6199fi
6200
6201
6202
6203 if test $ac_cv_header_sys_mkdev_h = no; then
6204 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006205 { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6206echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006207if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006208 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006209fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006210{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6211echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006212else
6213 # Is the header compilable?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006214{ echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6215echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006216cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006217/* confdefs.h. */
6218_ACEOF
6219cat confdefs.h >>conftest.$ac_ext
6220cat >>conftest.$ac_ext <<_ACEOF
6221/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006222$ac_includes_default
6223#include <sys/sysmacros.h>
6224_ACEOF
6225rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006226if { (ac_try="$ac_compile"
6227case "(($ac_try" in
6228 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6229 *) ac_try_echo=$ac_try;;
6230esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006231eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006232 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006233 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006234 grep -v '^ *+' conftest.er1 >conftest.err
6235 rm -f conftest.er1
6236 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006238 (exit $ac_status); } && {
6239 test -z "$ac_c_werror_flag" ||
6240 test ! -s conftest.err
6241 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006242 ac_header_compiler=yes
6243else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006244 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006245sed 's/^/| /' conftest.$ac_ext >&5
6246
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006247 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006248fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006249
6250rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006251{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6252echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006253
6254# Is the header present?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006255{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6256echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006257cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006258/* confdefs.h. */
6259_ACEOF
6260cat confdefs.h >>conftest.$ac_ext
6261cat >>conftest.$ac_ext <<_ACEOF
6262/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006263#include <sys/sysmacros.h>
6264_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006265if { (ac_try="$ac_cpp conftest.$ac_ext"
6266case "(($ac_try" in
6267 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6268 *) ac_try_echo=$ac_try;;
6269esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006270eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006271 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006272 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006273 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006274 rm -f conftest.er1
6275 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006277 (exit $ac_status); } >/dev/null && {
6278 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6279 test ! -s conftest.err
6280 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006281 ac_header_preproc=yes
6282else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006283 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006284sed 's/^/| /' conftest.$ac_ext >&5
6285
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006286 ac_header_preproc=no
6287fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006288
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006289rm -f conftest.err conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006290{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6291echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006292
6293# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006294case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6295 yes:no: )
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006296 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6297echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6298 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6299echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006300 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006301 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006302 no:yes:* )
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006303 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6304echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
6305 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6306echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6307 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6308echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6309 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6310echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
6311 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6312echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
6313 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6314echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006315 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00006316## -------------------------------------- ##
6317## Report this to http://bugs.python.org/ ##
6318## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006319_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006320 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006321 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006322esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006323{ echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6324echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006325if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006326 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006327else
6328 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6329fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006330{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6331echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006332
6333fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006334if test $ac_cv_header_sys_sysmacros_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006335
6336cat >>confdefs.h <<\_ACEOF
6337#define MAJOR_IN_SYSMACROS 1
6338_ACEOF
6339
6340fi
6341
6342
6343 fi
6344fi
6345
Michael W. Hudson54241132001-12-07 15:38:26 +00006346
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006347# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006348
6349for ac_header in term.h
6350do
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006351as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6352{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6353echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006354if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006355 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006356else
6357 cat >conftest.$ac_ext <<_ACEOF
6358/* confdefs.h. */
6359_ACEOF
6360cat confdefs.h >>conftest.$ac_ext
6361cat >>conftest.$ac_ext <<_ACEOF
6362/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006363
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006364#ifdef HAVE_CURSES_H
6365#include <curses.h>
6366#endif
6367
6368
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006369#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006370_ACEOF
6371rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006372if { (ac_try="$ac_compile"
6373case "(($ac_try" in
6374 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6375 *) ac_try_echo=$ac_try;;
6376esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006377eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006378 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006379 ac_status=$?
6380 grep -v '^ *+' conftest.er1 >conftest.err
6381 rm -f conftest.er1
6382 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006383 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006384 (exit $ac_status); } && {
6385 test -z "$ac_c_werror_flag" ||
6386 test ! -s conftest.err
6387 } && test -s conftest.$ac_objext; then
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006388 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006389else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006390 echo "$as_me: failed program was:" >&5
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006391sed 's/^/| /' conftest.$ac_ext >&5
6392
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006393 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006394fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006395
6396rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006397fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006398ac_res=`eval echo '${'$as_ac_Header'}'`
6399 { echo "$as_me:$LINENO: result: $ac_res" >&5
6400echo "${ECHO_T}$ac_res" >&6; }
6401if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006402 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006403#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006404_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006405
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006406fi
6407
6408done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006409
6410
Martin v. Löwis11017b12006-01-14 18:12:57 +00006411# On Linux, netlink.h requires asm/types.h
6412
6413for ac_header in linux/netlink.h
6414do
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006415as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6416{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6417echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006418if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006419 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11017b12006-01-14 18:12:57 +00006420else
6421 cat >conftest.$ac_ext <<_ACEOF
6422/* confdefs.h. */
6423_ACEOF
6424cat confdefs.h >>conftest.$ac_ext
6425cat >>conftest.$ac_ext <<_ACEOF
6426/* end confdefs.h. */
6427
6428#ifdef HAVE_ASM_TYPES_H
6429#include <asm/types.h>
6430#endif
6431#ifdef HAVE_SYS_SOCKET_H
6432#include <sys/socket.h>
6433#endif
6434
6435
6436#include <$ac_header>
6437_ACEOF
6438rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006439if { (ac_try="$ac_compile"
6440case "(($ac_try" in
6441 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6442 *) ac_try_echo=$ac_try;;
6443esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006444eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006445 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006446 ac_status=$?
6447 grep -v '^ *+' conftest.er1 >conftest.err
6448 rm -f conftest.er1
6449 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006451 (exit $ac_status); } && {
6452 test -z "$ac_c_werror_flag" ||
6453 test ! -s conftest.err
6454 } && test -s conftest.$ac_objext; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006455 eval "$as_ac_Header=yes"
6456else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006457 echo "$as_me: failed program was:" >&5
Martin v. Löwis11017b12006-01-14 18:12:57 +00006458sed 's/^/| /' conftest.$ac_ext >&5
6459
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006460 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00006461fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006462
6463rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00006464fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006465ac_res=`eval echo '${'$as_ac_Header'}'`
6466 { echo "$as_me:$LINENO: result: $ac_res" >&5
6467echo "${ECHO_T}$ac_res" >&6; }
6468if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006469 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006470#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006471_ACEOF
6472
6473fi
6474
6475done
6476
6477
Guido van Rossum627b2d71993-12-24 10:39:16 +00006478# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006479was_it_defined=no
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006480{ echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
6481echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006482cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006483/* confdefs.h. */
6484_ACEOF
6485cat confdefs.h >>conftest.$ac_ext
6486cat >>conftest.$ac_ext <<_ACEOF
6487/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006488#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006489
6490_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006491if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006492 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006493 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006494else
Martin v. Löwis11437992002-04-12 09:54:03 +00006495
6496
6497cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006498#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00006499_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006500
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006501
Guido van Rossum627b2d71993-12-24 10:39:16 +00006502fi
Martin v. Löwisf6594222010-02-15 08:37:47 +00006503rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006504
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006505{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
6506echo "${ECHO_T}$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006507
Neal Norwitz11690112002-07-30 01:08:28 +00006508# Check whether using makedev requires defining _OSF_SOURCE
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006509{ echo "$as_me:$LINENO: checking for makedev" >&5
6510echo $ECHO_N "checking for makedev... $ECHO_C" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006511cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006512/* confdefs.h. */
6513_ACEOF
6514cat confdefs.h >>conftest.$ac_ext
6515cat >>conftest.$ac_ext <<_ACEOF
6516/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006517#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006518int
6519main ()
6520{
6521 makedev(0, 0)
6522 ;
6523 return 0;
6524}
6525_ACEOF
6526rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006527if { (ac_try="$ac_link"
6528case "(($ac_try" in
6529 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6530 *) ac_try_echo=$ac_try;;
6531esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006532eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006533 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006534 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006535 grep -v '^ *+' conftest.er1 >conftest.err
6536 rm -f conftest.er1
6537 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006539 (exit $ac_status); } && {
6540 test -z "$ac_c_werror_flag" ||
6541 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006542 } && test -s conftest$ac_exeext &&
6543 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006544 ac_cv_has_makedev=yes
6545else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006546 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006547sed 's/^/| /' conftest.$ac_ext >&5
6548
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006549 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006550fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006551
6552rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006553 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006554if test "$ac_cv_has_makedev" = "no"; then
6555 # we didn't link, try if _OSF_SOURCE will allow us to link
6556 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006557/* confdefs.h. */
6558_ACEOF
6559cat confdefs.h >>conftest.$ac_ext
6560cat >>conftest.$ac_ext <<_ACEOF
6561/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006562
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006563#define _OSF_SOURCE 1
6564#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006565
Neal Norwitz11690112002-07-30 01:08:28 +00006566int
6567main ()
6568{
6569 makedev(0, 0)
6570 ;
6571 return 0;
6572}
6573_ACEOF
6574rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006575if { (ac_try="$ac_link"
6576case "(($ac_try" in
6577 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6578 *) ac_try_echo=$ac_try;;
6579esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006580eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006581 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006582 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006583 grep -v '^ *+' conftest.er1 >conftest.err
6584 rm -f conftest.er1
6585 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006587 (exit $ac_status); } && {
6588 test -z "$ac_c_werror_flag" ||
6589 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006590 } && test -s conftest$ac_exeext &&
6591 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006592 ac_cv_has_makedev=yes
6593else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006594 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006595sed 's/^/| /' conftest.$ac_ext >&5
6596
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006597 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006598fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006599
6600rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006601 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006602 if test "$ac_cv_has_makedev" = "yes"; then
6603
6604cat >>confdefs.h <<\_ACEOF
6605#define _OSF_SOURCE 1
6606_ACEOF
6607
6608 fi
6609fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006610{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
6611echo "${ECHO_T}$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006612if test "$ac_cv_has_makedev" = "yes"; then
6613
6614cat >>confdefs.h <<\_ACEOF
6615#define HAVE_MAKEDEV 1
6616_ACEOF
6617
6618fi
6619
Martin v. Löwis399a6892002-10-04 10:22:02 +00006620# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6621# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6622# defined, but the compiler does not support pragma redefine_extname,
6623# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6624# structures (such as rlimit64) without declaring them. As a
6625# work-around, disable LFS on such configurations
6626
6627use_lfs=yes
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006628{ echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
6629echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006630cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006631/* confdefs.h. */
6632_ACEOF
6633cat confdefs.h >>conftest.$ac_ext
6634cat >>conftest.$ac_ext <<_ACEOF
6635/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006636
6637#define _LARGEFILE_SOURCE 1
6638#define _FILE_OFFSET_BITS 64
6639#include <sys/resource.h>
6640
Martin v. Löwis399a6892002-10-04 10:22:02 +00006641int
6642main ()
6643{
6644struct rlimit foo;
6645 ;
6646 return 0;
6647}
6648_ACEOF
6649rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006650if { (ac_try="$ac_compile"
6651case "(($ac_try" in
6652 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6653 *) ac_try_echo=$ac_try;;
6654esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006655eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006656 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00006657 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006658 grep -v '^ *+' conftest.er1 >conftest.err
6659 rm -f conftest.er1
6660 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006662 (exit $ac_status); } && {
6663 test -z "$ac_c_werror_flag" ||
6664 test ! -s conftest.err
6665 } && test -s conftest.$ac_objext; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00006666 sol_lfs_bug=no
6667else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006668 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006669sed 's/^/| /' conftest.$ac_ext >&5
6670
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006671 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006672fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006673
6674rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006675{ echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
6676echo "${ECHO_T}$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006677if test "$sol_lfs_bug" = "yes"; then
6678 use_lfs=no
6679fi
6680
6681if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006682# Two defines needed to enable largefile support on various platforms
6683# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006684
Martin v. Löwis11437992002-04-12 09:54:03 +00006685cat >>confdefs.h <<\_ACEOF
6686#define _LARGEFILE_SOURCE 1
6687_ACEOF
6688
6689
6690cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006691#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00006692_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006693
Martin v. Löwis399a6892002-10-04 10:22:02 +00006694fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006695
Guido van Rossum84e7b241996-08-19 21:59:00 +00006696# Add some code to confdefs.h so that the test for off_t works on SCO
6697cat >> confdefs.h <<\EOF
6698#if defined(SCO_DS)
6699#undef _OFF_T
6700#endif
6701EOF
6702
Guido van Rossumef2255b2000-03-10 22:30:29 +00006703# Type availability checks
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006704{ echo "$as_me:$LINENO: checking for mode_t" >&5
6705echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006706if test "${ac_cv_type_mode_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006707 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006708else
Benjamin Petersona8332062009-09-11 22:36:27 +00006709 cat >conftest.$ac_ext <<_ACEOF
6710/* confdefs.h. */
6711_ACEOF
6712cat confdefs.h >>conftest.$ac_ext
6713cat >>conftest.$ac_ext <<_ACEOF
6714/* end confdefs.h. */
6715$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006716typedef mode_t ac__type_new_;
Benjamin Petersona8332062009-09-11 22:36:27 +00006717int
6718main ()
6719{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006720if ((ac__type_new_ *) 0)
6721 return 0;
6722if (sizeof (ac__type_new_))
6723 return 0;
Benjamin Petersona8332062009-09-11 22:36:27 +00006724 ;
6725 return 0;
6726}
6727_ACEOF
6728rm -f conftest.$ac_objext
6729if { (ac_try="$ac_compile"
6730case "(($ac_try" in
6731 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6732 *) ac_try_echo=$ac_try;;
6733esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006734eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00006735 (eval "$ac_compile") 2>conftest.er1
6736 ac_status=$?
6737 grep -v '^ *+' conftest.er1 >conftest.err
6738 rm -f conftest.er1
6739 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00006741 (exit $ac_status); } && {
6742 test -z "$ac_c_werror_flag" ||
6743 test ! -s conftest.err
6744 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006745 ac_cv_type_mode_t=yes
Jack Jansendd19cf82001-12-06 22:36:17 +00006746else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006747 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006748sed 's/^/| /' conftest.$ac_ext >&5
6749
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006750 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00006751fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006752
6753rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006754fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006755{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
6756echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
6757if test $ac_cv_type_mode_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006758 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006759else
Martin v. Löwis11437992002-04-12 09:54:03 +00006760
6761cat >>confdefs.h <<_ACEOF
6762#define mode_t int
6763_ACEOF
6764
6765fi
6766
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006767{ echo "$as_me:$LINENO: checking for off_t" >&5
6768echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006769if test "${ac_cv_type_off_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006770 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006771else
Benjamin Petersona8332062009-09-11 22:36:27 +00006772 cat >conftest.$ac_ext <<_ACEOF
6773/* confdefs.h. */
6774_ACEOF
6775cat confdefs.h >>conftest.$ac_ext
6776cat >>conftest.$ac_ext <<_ACEOF
6777/* end confdefs.h. */
6778$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006779typedef off_t ac__type_new_;
Benjamin Petersona8332062009-09-11 22:36:27 +00006780int
6781main ()
6782{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006783if ((ac__type_new_ *) 0)
6784 return 0;
6785if (sizeof (ac__type_new_))
6786 return 0;
Benjamin Petersona8332062009-09-11 22:36:27 +00006787 ;
6788 return 0;
6789}
6790_ACEOF
6791rm -f conftest.$ac_objext
6792if { (ac_try="$ac_compile"
6793case "(($ac_try" in
6794 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6795 *) ac_try_echo=$ac_try;;
6796esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006797eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00006798 (eval "$ac_compile") 2>conftest.er1
6799 ac_status=$?
6800 grep -v '^ *+' conftest.er1 >conftest.err
6801 rm -f conftest.er1
6802 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00006804 (exit $ac_status); } && {
6805 test -z "$ac_c_werror_flag" ||
6806 test ! -s conftest.err
6807 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006808 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006809else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006810 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006811sed 's/^/| /' conftest.$ac_ext >&5
6812
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006813 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006814fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006815
6816rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006817fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006818{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6819echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
6820if test $ac_cv_type_off_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006821 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006822else
Martin v. Löwis11437992002-04-12 09:54:03 +00006823
6824cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006825#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006826_ACEOF
6827
6828fi
6829
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006830{ echo "$as_me:$LINENO: checking for pid_t" >&5
6831echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006832if test "${ac_cv_type_pid_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006833 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006834else
Benjamin Petersona8332062009-09-11 22:36:27 +00006835 cat >conftest.$ac_ext <<_ACEOF
6836/* confdefs.h. */
6837_ACEOF
6838cat confdefs.h >>conftest.$ac_ext
6839cat >>conftest.$ac_ext <<_ACEOF
6840/* end confdefs.h. */
6841$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006842typedef pid_t ac__type_new_;
Benjamin Petersona8332062009-09-11 22:36:27 +00006843int
6844main ()
6845{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006846if ((ac__type_new_ *) 0)
6847 return 0;
6848if (sizeof (ac__type_new_))
6849 return 0;
Benjamin Petersona8332062009-09-11 22:36:27 +00006850 ;
6851 return 0;
6852}
6853_ACEOF
6854rm -f conftest.$ac_objext
6855if { (ac_try="$ac_compile"
6856case "(($ac_try" in
6857 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6858 *) ac_try_echo=$ac_try;;
6859esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006860eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00006861 (eval "$ac_compile") 2>conftest.er1
6862 ac_status=$?
6863 grep -v '^ *+' conftest.er1 >conftest.err
6864 rm -f conftest.er1
6865 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00006867 (exit $ac_status); } && {
6868 test -z "$ac_c_werror_flag" ||
6869 test ! -s conftest.err
6870 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006871 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006872else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006873 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006874sed 's/^/| /' conftest.$ac_ext >&5
6875
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006876 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006877fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006878
6879rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006880fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006881{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
6882echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
6883if test $ac_cv_type_pid_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006884 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006885else
Martin v. Löwis11437992002-04-12 09:54:03 +00006886
6887cat >>confdefs.h <<_ACEOF
6888#define pid_t int
6889_ACEOF
6890
6891fi
6892
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006893{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
6894echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006895if test "${ac_cv_type_signal+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006896 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006897else
6898 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006899/* confdefs.h. */
6900_ACEOF
6901cat confdefs.h >>conftest.$ac_ext
6902cat >>conftest.$ac_ext <<_ACEOF
6903/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00006904#include <sys/types.h>
6905#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006906
Martin v. Löwis11437992002-04-12 09:54:03 +00006907int
6908main ()
6909{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006910return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00006911 ;
6912 return 0;
6913}
6914_ACEOF
6915rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006916if { (ac_try="$ac_compile"
6917case "(($ac_try" in
6918 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6919 *) ac_try_echo=$ac_try;;
6920esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006921eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006922 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006923 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006924 grep -v '^ *+' conftest.er1 >conftest.err
6925 rm -f conftest.er1
6926 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006928 (exit $ac_status); } && {
6929 test -z "$ac_c_werror_flag" ||
6930 test ! -s conftest.err
6931 } && test -s conftest.$ac_objext; then
6932 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00006933else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006934 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006935sed 's/^/| /' conftest.$ac_ext >&5
6936
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006937 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00006938fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006939
6940rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006941fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006942{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
6943echo "${ECHO_T}$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006944
Martin v. Löwis11437992002-04-12 09:54:03 +00006945cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006946#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00006947_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006948
Michael W. Hudson54241132001-12-07 15:38:26 +00006949
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006950{ echo "$as_me:$LINENO: checking for size_t" >&5
6951echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006952if test "${ac_cv_type_size_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006953 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006954else
Benjamin Petersona8332062009-09-11 22:36:27 +00006955 cat >conftest.$ac_ext <<_ACEOF
6956/* confdefs.h. */
6957_ACEOF
6958cat confdefs.h >>conftest.$ac_ext
6959cat >>conftest.$ac_ext <<_ACEOF
6960/* end confdefs.h. */
6961$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006962typedef size_t ac__type_new_;
Benjamin Petersona8332062009-09-11 22:36:27 +00006963int
6964main ()
6965{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006966if ((ac__type_new_ *) 0)
6967 return 0;
6968if (sizeof (ac__type_new_))
6969 return 0;
Benjamin Petersona8332062009-09-11 22:36:27 +00006970 ;
6971 return 0;
6972}
6973_ACEOF
6974rm -f conftest.$ac_objext
6975if { (ac_try="$ac_compile"
6976case "(($ac_try" in
6977 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6978 *) ac_try_echo=$ac_try;;
6979esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006980eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00006981 (eval "$ac_compile") 2>conftest.er1
6982 ac_status=$?
6983 grep -v '^ *+' conftest.er1 >conftest.err
6984 rm -f conftest.er1
6985 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00006987 (exit $ac_status); } && {
6988 test -z "$ac_c_werror_flag" ||
6989 test ! -s conftest.err
6990 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006991 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006992else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006993 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006994sed 's/^/| /' conftest.$ac_ext >&5
6995
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006996 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006997fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006998
6999rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007000fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007001{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
7002echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
7003if test $ac_cv_type_size_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007004 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007005else
Martin v. Löwis11437992002-04-12 09:54:03 +00007006
7007cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007008#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007009_ACEOF
7010
7011fi
7012
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007013{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
7014echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007015if test "${ac_cv_type_uid_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007016 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007017else
7018 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007019/* confdefs.h. */
7020_ACEOF
7021cat confdefs.h >>conftest.$ac_ext
7022cat >>conftest.$ac_ext <<_ACEOF
7023/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007024#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007025
7026_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007027if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00007028 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007029 ac_cv_type_uid_t=yes
7030else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007031 ac_cv_type_uid_t=no
7032fi
Martin v. Löwisf6594222010-02-15 08:37:47 +00007033rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007034
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007035fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007036{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
7037echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007038if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007039
Martin v. Löwis11437992002-04-12 09:54:03 +00007040cat >>confdefs.h <<\_ACEOF
7041#define uid_t int
7042_ACEOF
7043
7044
7045cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007046#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00007047_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007048
7049fi
7050
Mark Dickinsonbd792642009-03-18 20:06:12 +00007051
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007052 { echo "$as_me:$LINENO: checking for uint32_t" >&5
7053echo $ECHO_N "checking for uint32_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007054if test "${ac_cv_c_uint32_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007055 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007056else
7057 ac_cv_c_uint32_t=no
7058 for ac_type in 'uint32_t' 'unsigned int' 'unsigned long int' \
7059 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7060 cat >conftest.$ac_ext <<_ACEOF
7061/* confdefs.h. */
7062_ACEOF
7063cat confdefs.h >>conftest.$ac_ext
7064cat >>conftest.$ac_ext <<_ACEOF
7065/* end confdefs.h. */
7066$ac_includes_default
7067int
7068main ()
7069{
7070static int test_array [1 - 2 * !(($ac_type) -1 >> (32 - 1) == 1)];
7071test_array [0] = 0
7072
7073 ;
7074 return 0;
7075}
7076_ACEOF
7077rm -f conftest.$ac_objext
7078if { (ac_try="$ac_compile"
7079case "(($ac_try" in
7080 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7081 *) ac_try_echo=$ac_try;;
7082esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007083eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007084 (eval "$ac_compile") 2>conftest.er1
7085 ac_status=$?
7086 grep -v '^ *+' conftest.er1 >conftest.err
7087 rm -f conftest.er1
7088 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007089 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007090 (exit $ac_status); } && {
7091 test -z "$ac_c_werror_flag" ||
7092 test ! -s conftest.err
7093 } && test -s conftest.$ac_objext; then
7094 case $ac_type in
7095 uint32_t) ac_cv_c_uint32_t=yes ;;
7096 *) ac_cv_c_uint32_t=$ac_type ;;
7097esac
7098
7099else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007100 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007101sed 's/^/| /' conftest.$ac_ext >&5
7102
7103
7104fi
7105
7106rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7107 test "$ac_cv_c_uint32_t" != no && break
7108 done
7109fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007110{ echo "$as_me:$LINENO: result: $ac_cv_c_uint32_t" >&5
7111echo "${ECHO_T}$ac_cv_c_uint32_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007112 case $ac_cv_c_uint32_t in #(
7113 no|yes) ;; #(
7114 *)
7115
7116cat >>confdefs.h <<\_ACEOF
7117#define _UINT32_T 1
7118_ACEOF
7119
7120
7121cat >>confdefs.h <<_ACEOF
7122#define uint32_t $ac_cv_c_uint32_t
7123_ACEOF
7124;;
7125 esac
7126
7127
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007128 { echo "$as_me:$LINENO: checking for uint64_t" >&5
7129echo $ECHO_N "checking for uint64_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007130if test "${ac_cv_c_uint64_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007131 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007132else
7133 ac_cv_c_uint64_t=no
7134 for ac_type in 'uint64_t' 'unsigned int' 'unsigned long int' \
7135 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7136 cat >conftest.$ac_ext <<_ACEOF
7137/* confdefs.h. */
7138_ACEOF
7139cat confdefs.h >>conftest.$ac_ext
7140cat >>conftest.$ac_ext <<_ACEOF
7141/* end confdefs.h. */
7142$ac_includes_default
7143int
7144main ()
7145{
7146static int test_array [1 - 2 * !(($ac_type) -1 >> (64 - 1) == 1)];
7147test_array [0] = 0
7148
7149 ;
7150 return 0;
7151}
7152_ACEOF
7153rm -f conftest.$ac_objext
7154if { (ac_try="$ac_compile"
7155case "(($ac_try" in
7156 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7157 *) ac_try_echo=$ac_try;;
7158esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007159eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007160 (eval "$ac_compile") 2>conftest.er1
7161 ac_status=$?
7162 grep -v '^ *+' conftest.er1 >conftest.err
7163 rm -f conftest.er1
7164 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007166 (exit $ac_status); } && {
7167 test -z "$ac_c_werror_flag" ||
7168 test ! -s conftest.err
7169 } && test -s conftest.$ac_objext; then
7170 case $ac_type in
7171 uint64_t) ac_cv_c_uint64_t=yes ;;
7172 *) ac_cv_c_uint64_t=$ac_type ;;
7173esac
7174
7175else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007176 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007177sed 's/^/| /' conftest.$ac_ext >&5
7178
7179
7180fi
7181
7182rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7183 test "$ac_cv_c_uint64_t" != no && break
7184 done
7185fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007186{ echo "$as_me:$LINENO: result: $ac_cv_c_uint64_t" >&5
7187echo "${ECHO_T}$ac_cv_c_uint64_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007188 case $ac_cv_c_uint64_t in #(
7189 no|yes) ;; #(
7190 *)
7191
7192cat >>confdefs.h <<\_ACEOF
7193#define _UINT64_T 1
7194_ACEOF
7195
7196
7197cat >>confdefs.h <<_ACEOF
7198#define uint64_t $ac_cv_c_uint64_t
7199_ACEOF
7200;;
7201 esac
7202
7203
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007204 { echo "$as_me:$LINENO: checking for int32_t" >&5
7205echo $ECHO_N "checking for int32_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007206if test "${ac_cv_c_int32_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007207 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007208else
7209 ac_cv_c_int32_t=no
7210 for ac_type in 'int32_t' 'int' 'long int' \
7211 'long long int' 'short int' 'signed char'; do
7212 cat >conftest.$ac_ext <<_ACEOF
7213/* confdefs.h. */
7214_ACEOF
7215cat confdefs.h >>conftest.$ac_ext
7216cat >>conftest.$ac_ext <<_ACEOF
7217/* end confdefs.h. */
7218$ac_includes_default
7219int
7220main ()
7221{
7222static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1))];
7223test_array [0] = 0
7224
7225 ;
7226 return 0;
7227}
7228_ACEOF
7229rm -f conftest.$ac_objext
7230if { (ac_try="$ac_compile"
7231case "(($ac_try" in
7232 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7233 *) ac_try_echo=$ac_try;;
7234esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007235eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007236 (eval "$ac_compile") 2>conftest.er1
7237 ac_status=$?
7238 grep -v '^ *+' conftest.er1 >conftest.err
7239 rm -f conftest.er1
7240 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007242 (exit $ac_status); } && {
7243 test -z "$ac_c_werror_flag" ||
7244 test ! -s conftest.err
7245 } && test -s conftest.$ac_objext; then
7246 cat >conftest.$ac_ext <<_ACEOF
7247/* confdefs.h. */
7248_ACEOF
7249cat confdefs.h >>conftest.$ac_ext
7250cat >>conftest.$ac_ext <<_ACEOF
7251/* end confdefs.h. */
7252$ac_includes_default
7253int
7254main ()
7255{
7256static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007257 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 2))];
Mark Dickinsonbd792642009-03-18 20:06:12 +00007258test_array [0] = 0
7259
7260 ;
7261 return 0;
7262}
7263_ACEOF
7264rm -f conftest.$ac_objext
7265if { (ac_try="$ac_compile"
7266case "(($ac_try" in
7267 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7268 *) ac_try_echo=$ac_try;;
7269esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007270eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007271 (eval "$ac_compile") 2>conftest.er1
7272 ac_status=$?
7273 grep -v '^ *+' conftest.er1 >conftest.err
7274 rm -f conftest.er1
7275 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007277 (exit $ac_status); } && {
7278 test -z "$ac_c_werror_flag" ||
7279 test ! -s conftest.err
7280 } && test -s conftest.$ac_objext; then
7281 :
7282else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007283 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007284sed 's/^/| /' conftest.$ac_ext >&5
7285
7286 case $ac_type in
7287 int32_t) ac_cv_c_int32_t=yes ;;
7288 *) ac_cv_c_int32_t=$ac_type ;;
7289esac
7290
7291fi
7292
7293rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7294else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007295 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007296sed 's/^/| /' conftest.$ac_ext >&5
7297
7298
7299fi
7300
7301rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7302 test "$ac_cv_c_int32_t" != no && break
7303 done
7304fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007305{ echo "$as_me:$LINENO: result: $ac_cv_c_int32_t" >&5
7306echo "${ECHO_T}$ac_cv_c_int32_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007307 case $ac_cv_c_int32_t in #(
7308 no|yes) ;; #(
7309 *)
7310
7311cat >>confdefs.h <<_ACEOF
7312#define int32_t $ac_cv_c_int32_t
7313_ACEOF
7314;;
7315 esac
7316
7317
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007318 { echo "$as_me:$LINENO: checking for int64_t" >&5
7319echo $ECHO_N "checking for int64_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007320if test "${ac_cv_c_int64_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007321 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007322else
7323 ac_cv_c_int64_t=no
7324 for ac_type in 'int64_t' 'int' 'long int' \
7325 'long long int' 'short int' 'signed char'; do
7326 cat >conftest.$ac_ext <<_ACEOF
7327/* confdefs.h. */
7328_ACEOF
7329cat confdefs.h >>conftest.$ac_ext
7330cat >>conftest.$ac_ext <<_ACEOF
7331/* end confdefs.h. */
7332$ac_includes_default
7333int
7334main ()
7335{
7336static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1))];
7337test_array [0] = 0
7338
7339 ;
7340 return 0;
7341}
7342_ACEOF
7343rm -f conftest.$ac_objext
7344if { (ac_try="$ac_compile"
7345case "(($ac_try" in
7346 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7347 *) ac_try_echo=$ac_try;;
7348esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007349eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007350 (eval "$ac_compile") 2>conftest.er1
7351 ac_status=$?
7352 grep -v '^ *+' conftest.er1 >conftest.err
7353 rm -f conftest.er1
7354 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007356 (exit $ac_status); } && {
7357 test -z "$ac_c_werror_flag" ||
7358 test ! -s conftest.err
7359 } && test -s conftest.$ac_objext; then
7360 cat >conftest.$ac_ext <<_ACEOF
7361/* confdefs.h. */
7362_ACEOF
7363cat confdefs.h >>conftest.$ac_ext
7364cat >>conftest.$ac_ext <<_ACEOF
7365/* end confdefs.h. */
7366$ac_includes_default
7367int
7368main ()
7369{
7370static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007371 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 2))];
Mark Dickinsonbd792642009-03-18 20:06:12 +00007372test_array [0] = 0
7373
7374 ;
7375 return 0;
7376}
7377_ACEOF
7378rm -f conftest.$ac_objext
7379if { (ac_try="$ac_compile"
7380case "(($ac_try" in
7381 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7382 *) ac_try_echo=$ac_try;;
7383esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007384eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007385 (eval "$ac_compile") 2>conftest.er1
7386 ac_status=$?
7387 grep -v '^ *+' conftest.er1 >conftest.err
7388 rm -f conftest.er1
7389 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007390 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007391 (exit $ac_status); } && {
7392 test -z "$ac_c_werror_flag" ||
7393 test ! -s conftest.err
7394 } && test -s conftest.$ac_objext; then
7395 :
7396else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007397 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007398sed 's/^/| /' conftest.$ac_ext >&5
7399
7400 case $ac_type in
7401 int64_t) ac_cv_c_int64_t=yes ;;
7402 *) ac_cv_c_int64_t=$ac_type ;;
7403esac
7404
7405fi
7406
7407rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7408else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007409 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007410sed 's/^/| /' conftest.$ac_ext >&5
7411
7412
7413fi
7414
7415rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7416 test "$ac_cv_c_int64_t" != no && break
7417 done
7418fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007419{ echo "$as_me:$LINENO: result: $ac_cv_c_int64_t" >&5
7420echo "${ECHO_T}$ac_cv_c_int64_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007421 case $ac_cv_c_int64_t in #(
7422 no|yes) ;; #(
7423 *)
7424
7425cat >>confdefs.h <<_ACEOF
7426#define int64_t $ac_cv_c_int64_t
7427_ACEOF
7428;;
7429 esac
7430
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007431{ echo "$as_me:$LINENO: checking for ssize_t" >&5
7432echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00007433if test "${ac_cv_type_ssize_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007434 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007435else
Benjamin Petersona8332062009-09-11 22:36:27 +00007436 cat >conftest.$ac_ext <<_ACEOF
7437/* confdefs.h. */
7438_ACEOF
7439cat confdefs.h >>conftest.$ac_ext
7440cat >>conftest.$ac_ext <<_ACEOF
7441/* end confdefs.h. */
7442$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007443typedef ssize_t ac__type_new_;
Benjamin Petersona8332062009-09-11 22:36:27 +00007444int
7445main ()
7446{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007447if ((ac__type_new_ *) 0)
7448 return 0;
7449if (sizeof (ac__type_new_))
7450 return 0;
Benjamin Petersona8332062009-09-11 22:36:27 +00007451 ;
7452 return 0;
7453}
7454_ACEOF
7455rm -f conftest.$ac_objext
7456if { (ac_try="$ac_compile"
7457case "(($ac_try" in
7458 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7459 *) ac_try_echo=$ac_try;;
7460esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007461eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00007462 (eval "$ac_compile") 2>conftest.er1
7463 ac_status=$?
7464 grep -v '^ *+' conftest.er1 >conftest.err
7465 rm -f conftest.er1
7466 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00007468 (exit $ac_status); } && {
7469 test -z "$ac_c_werror_flag" ||
7470 test ! -s conftest.err
7471 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007472 ac_cv_type_ssize_t=yes
Martin v. Löwis18e16552006-02-15 17:27:45 +00007473else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007474 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +00007475sed 's/^/| /' conftest.$ac_ext >&5
7476
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007477 ac_cv_type_ssize_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00007478fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007479
7480rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00007481fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007482{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
7483echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
7484if test $ac_cv_type_ssize_t = yes; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00007485
7486cat >>confdefs.h <<\_ACEOF
7487#define HAVE_SSIZE_T 1
7488_ACEOF
7489
7490fi
7491
Jack Jansendd19cf82001-12-06 22:36:17 +00007492
Michael W. Hudson54241132001-12-07 15:38:26 +00007493# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007494# ANSI C requires sizeof(char) == 1, so no need to check it
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007495{ echo "$as_me:$LINENO: checking for int" >&5
7496echo $ECHO_N "checking for int... $ECHO_C" >&6; }
7497if test "${ac_cv_type_int+set}" = set; then
7498 echo $ECHO_N "(cached) $ECHO_C" >&6
7499else
7500 cat >conftest.$ac_ext <<_ACEOF
7501/* confdefs.h. */
7502_ACEOF
7503cat confdefs.h >>conftest.$ac_ext
7504cat >>conftest.$ac_ext <<_ACEOF
7505/* end confdefs.h. */
7506$ac_includes_default
7507typedef int ac__type_new_;
7508int
7509main ()
7510{
7511if ((ac__type_new_ *) 0)
7512 return 0;
7513if (sizeof (ac__type_new_))
7514 return 0;
7515 ;
7516 return 0;
7517}
7518_ACEOF
7519rm -f conftest.$ac_objext
7520if { (ac_try="$ac_compile"
7521case "(($ac_try" in
7522 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7523 *) ac_try_echo=$ac_try;;
7524esac
7525eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7526 (eval "$ac_compile") 2>conftest.er1
7527 ac_status=$?
7528 grep -v '^ *+' conftest.er1 >conftest.err
7529 rm -f conftest.er1
7530 cat conftest.err >&5
7531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7532 (exit $ac_status); } && {
7533 test -z "$ac_c_werror_flag" ||
7534 test ! -s conftest.err
7535 } && test -s conftest.$ac_objext; then
7536 ac_cv_type_int=yes
7537else
7538 echo "$as_me: failed program was:" >&5
7539sed 's/^/| /' conftest.$ac_ext >&5
7540
7541 ac_cv_type_int=no
7542fi
7543
7544rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7545fi
7546{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
7547echo "${ECHO_T}$ac_cv_type_int" >&6; }
7548
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007549# The cast to long int works around a bug in the HP C Compiler
7550# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7551# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7552# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007553{ echo "$as_me:$LINENO: checking size of int" >&5
7554echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007555if test "${ac_cv_sizeof_int+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007556 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007557else
Martin v. Löwis11437992002-04-12 09:54:03 +00007558 if test "$cross_compiling" = yes; then
7559 # Depending upon the size, compute the lo and hi bounds.
7560cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007561/* confdefs.h. */
7562_ACEOF
7563cat confdefs.h >>conftest.$ac_ext
7564cat >>conftest.$ac_ext <<_ACEOF
7565/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007566$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007567 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007568int
7569main ()
7570{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007571static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007572test_array [0] = 0
7573
7574 ;
7575 return 0;
7576}
7577_ACEOF
7578rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007579if { (ac_try="$ac_compile"
7580case "(($ac_try" in
7581 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7582 *) ac_try_echo=$ac_try;;
7583esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007584eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007585 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007586 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007587 grep -v '^ *+' conftest.er1 >conftest.err
7588 rm -f conftest.er1
7589 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007591 (exit $ac_status); } && {
7592 test -z "$ac_c_werror_flag" ||
7593 test ! -s conftest.err
7594 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007595 ac_lo=0 ac_mid=0
7596 while :; do
7597 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007598/* confdefs.h. */
7599_ACEOF
7600cat confdefs.h >>conftest.$ac_ext
7601cat >>conftest.$ac_ext <<_ACEOF
7602/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007603$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007604 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007605int
7606main ()
7607{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007608static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007609test_array [0] = 0
7610
7611 ;
7612 return 0;
7613}
7614_ACEOF
7615rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007616if { (ac_try="$ac_compile"
7617case "(($ac_try" in
7618 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7619 *) ac_try_echo=$ac_try;;
7620esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007621eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007622 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007623 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007624 grep -v '^ *+' conftest.er1 >conftest.err
7625 rm -f conftest.er1
7626 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007628 (exit $ac_status); } && {
7629 test -z "$ac_c_werror_flag" ||
7630 test ! -s conftest.err
7631 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007632 ac_hi=$ac_mid; break
7633else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007634 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007635sed 's/^/| /' conftest.$ac_ext >&5
7636
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007637 ac_lo=`expr $ac_mid + 1`
7638 if test $ac_lo -le $ac_mid; then
7639 ac_lo= ac_hi=
7640 break
7641 fi
7642 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007643fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007644
7645rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007646 done
7647else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007648 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007649sed 's/^/| /' conftest.$ac_ext >&5
7650
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007651 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007652/* confdefs.h. */
7653_ACEOF
7654cat confdefs.h >>conftest.$ac_ext
7655cat >>conftest.$ac_ext <<_ACEOF
7656/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007657$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007658 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007659int
7660main ()
7661{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007662static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007663test_array [0] = 0
7664
7665 ;
7666 return 0;
7667}
7668_ACEOF
7669rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007670if { (ac_try="$ac_compile"
7671case "(($ac_try" in
7672 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7673 *) ac_try_echo=$ac_try;;
7674esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007675eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007676 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007677 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007678 grep -v '^ *+' conftest.er1 >conftest.err
7679 rm -f conftest.er1
7680 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007682 (exit $ac_status); } && {
7683 test -z "$ac_c_werror_flag" ||
7684 test ! -s conftest.err
7685 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007686 ac_hi=-1 ac_mid=-1
7687 while :; do
7688 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007689/* confdefs.h. */
7690_ACEOF
7691cat confdefs.h >>conftest.$ac_ext
7692cat >>conftest.$ac_ext <<_ACEOF
7693/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007694$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007695 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007696int
7697main ()
7698{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007699static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007700test_array [0] = 0
7701
7702 ;
7703 return 0;
7704}
7705_ACEOF
7706rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007707if { (ac_try="$ac_compile"
7708case "(($ac_try" in
7709 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7710 *) ac_try_echo=$ac_try;;
7711esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007712eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007713 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007714 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007715 grep -v '^ *+' conftest.er1 >conftest.err
7716 rm -f conftest.er1
7717 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007719 (exit $ac_status); } && {
7720 test -z "$ac_c_werror_flag" ||
7721 test ! -s conftest.err
7722 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007723 ac_lo=$ac_mid; break
7724else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007725 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007726sed 's/^/| /' conftest.$ac_ext >&5
7727
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007728 ac_hi=`expr '(' $ac_mid ')' - 1`
7729 if test $ac_mid -le $ac_hi; then
7730 ac_lo= ac_hi=
7731 break
7732 fi
7733 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007734fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007735
7736rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007737 done
7738else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007739 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007740sed 's/^/| /' conftest.$ac_ext >&5
7741
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007742 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007743fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007744
7745rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007746fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007747
7748rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007749# Binary search between lo and hi bounds.
7750while test "x$ac_lo" != "x$ac_hi"; do
7751 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7752 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007753/* confdefs.h. */
7754_ACEOF
7755cat confdefs.h >>conftest.$ac_ext
7756cat >>conftest.$ac_ext <<_ACEOF
7757/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007758$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007759 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007760int
7761main ()
7762{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007763static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007764test_array [0] = 0
7765
7766 ;
7767 return 0;
7768}
7769_ACEOF
7770rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007771if { (ac_try="$ac_compile"
7772case "(($ac_try" in
7773 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7774 *) ac_try_echo=$ac_try;;
7775esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007776eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007777 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007778 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007779 grep -v '^ *+' conftest.er1 >conftest.err
7780 rm -f conftest.er1
7781 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007783 (exit $ac_status); } && {
7784 test -z "$ac_c_werror_flag" ||
7785 test ! -s conftest.err
7786 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007787 ac_hi=$ac_mid
7788else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007789 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007790sed 's/^/| /' conftest.$ac_ext >&5
7791
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007792 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007793fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007794
7795rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007796done
7797case $ac_lo in
7798?*) ac_cv_sizeof_int=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007799'') if test "$ac_cv_type_int" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007800 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007801See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007802echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007803See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007804 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007805 else
7806 ac_cv_sizeof_int=0
7807 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007808esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007809else
Martin v. Löwis11437992002-04-12 09:54:03 +00007810 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007811/* confdefs.h. */
7812_ACEOF
7813cat confdefs.h >>conftest.$ac_ext
7814cat >>conftest.$ac_ext <<_ACEOF
7815/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007816$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007817 typedef int ac__type_sizeof_;
7818static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7819static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007820#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007821#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007822int
7823main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007824{
Martin v. Löwis11437992002-04-12 09:54:03 +00007825
7826 FILE *f = fopen ("conftest.val", "w");
7827 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007828 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007829 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007830 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007831 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007832 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007833 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007834 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007835 }
7836 else
7837 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007838 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007839 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007840 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007841 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007842 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007843 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007844
7845 ;
7846 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007847}
Martin v. Löwis11437992002-04-12 09:54:03 +00007848_ACEOF
7849rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007850if { (ac_try="$ac_link"
7851case "(($ac_try" in
7852 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7853 *) ac_try_echo=$ac_try;;
7854esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007855eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007856 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007857 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007859 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007860 { (case "(($ac_try" in
7861 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7862 *) ac_try_echo=$ac_try;;
7863esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007864eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007865 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007866 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007868 (exit $ac_status); }; }; then
7869 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007870else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007871 echo "$as_me: program exited with status $ac_status" >&5
7872echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007873sed 's/^/| /' conftest.$ac_ext >&5
7874
Martin v. Löwis11437992002-04-12 09:54:03 +00007875( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007876if test "$ac_cv_type_int" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007877 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007878See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007879echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007880See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007881 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007882 else
7883 ac_cv_sizeof_int=0
7884 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007885fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007886rm -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 +00007887fi
7888rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007889fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007890{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
7891echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007892
7893
7894
Martin v. Löwis11437992002-04-12 09:54:03 +00007895cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007896#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007897_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007898
7899
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007900{ echo "$as_me:$LINENO: checking for long" >&5
7901echo $ECHO_N "checking for long... $ECHO_C" >&6; }
7902if test "${ac_cv_type_long+set}" = set; then
7903 echo $ECHO_N "(cached) $ECHO_C" >&6
7904else
7905 cat >conftest.$ac_ext <<_ACEOF
7906/* confdefs.h. */
7907_ACEOF
7908cat confdefs.h >>conftest.$ac_ext
7909cat >>conftest.$ac_ext <<_ACEOF
7910/* end confdefs.h. */
7911$ac_includes_default
7912typedef long ac__type_new_;
7913int
7914main ()
7915{
7916if ((ac__type_new_ *) 0)
7917 return 0;
7918if (sizeof (ac__type_new_))
7919 return 0;
7920 ;
7921 return 0;
7922}
7923_ACEOF
7924rm -f conftest.$ac_objext
7925if { (ac_try="$ac_compile"
7926case "(($ac_try" in
7927 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7928 *) ac_try_echo=$ac_try;;
7929esac
7930eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7931 (eval "$ac_compile") 2>conftest.er1
7932 ac_status=$?
7933 grep -v '^ *+' conftest.er1 >conftest.err
7934 rm -f conftest.er1
7935 cat conftest.err >&5
7936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7937 (exit $ac_status); } && {
7938 test -z "$ac_c_werror_flag" ||
7939 test ! -s conftest.err
7940 } && test -s conftest.$ac_objext; then
7941 ac_cv_type_long=yes
7942else
7943 echo "$as_me: failed program was:" >&5
7944sed 's/^/| /' conftest.$ac_ext >&5
7945
7946 ac_cv_type_long=no
7947fi
7948
7949rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7950fi
7951{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
7952echo "${ECHO_T}$ac_cv_type_long" >&6; }
7953
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007954# The cast to long int works around a bug in the HP C Compiler
7955# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7956# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7957# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007958{ echo "$as_me:$LINENO: checking size of long" >&5
7959echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007960if test "${ac_cv_sizeof_long+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007961 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007962else
Martin v. Löwis11437992002-04-12 09:54:03 +00007963 if test "$cross_compiling" = yes; then
7964 # Depending upon the size, compute the lo and hi bounds.
7965cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007966/* confdefs.h. */
7967_ACEOF
7968cat confdefs.h >>conftest.$ac_ext
7969cat >>conftest.$ac_ext <<_ACEOF
7970/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007971$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007972 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007973int
7974main ()
7975{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007976static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007977test_array [0] = 0
7978
7979 ;
7980 return 0;
7981}
7982_ACEOF
7983rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007984if { (ac_try="$ac_compile"
7985case "(($ac_try" in
7986 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7987 *) ac_try_echo=$ac_try;;
7988esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007989eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007990 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007991 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007992 grep -v '^ *+' conftest.er1 >conftest.err
7993 rm -f conftest.er1
7994 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007996 (exit $ac_status); } && {
7997 test -z "$ac_c_werror_flag" ||
7998 test ! -s conftest.err
7999 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008000 ac_lo=0 ac_mid=0
8001 while :; do
8002 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008003/* confdefs.h. */
8004_ACEOF
8005cat confdefs.h >>conftest.$ac_ext
8006cat >>conftest.$ac_ext <<_ACEOF
8007/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008008$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008009 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008010int
8011main ()
8012{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008013static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008014test_array [0] = 0
8015
8016 ;
8017 return 0;
8018}
8019_ACEOF
8020rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008021if { (ac_try="$ac_compile"
8022case "(($ac_try" in
8023 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8024 *) ac_try_echo=$ac_try;;
8025esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008026eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008027 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008028 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008029 grep -v '^ *+' conftest.er1 >conftest.err
8030 rm -f conftest.er1
8031 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008033 (exit $ac_status); } && {
8034 test -z "$ac_c_werror_flag" ||
8035 test ! -s conftest.err
8036 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008037 ac_hi=$ac_mid; break
8038else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008039 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008040sed 's/^/| /' conftest.$ac_ext >&5
8041
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008042 ac_lo=`expr $ac_mid + 1`
8043 if test $ac_lo -le $ac_mid; then
8044 ac_lo= ac_hi=
8045 break
8046 fi
8047 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008048fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008049
8050rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008051 done
8052else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008053 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008054sed 's/^/| /' conftest.$ac_ext >&5
8055
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008056 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008057/* confdefs.h. */
8058_ACEOF
8059cat confdefs.h >>conftest.$ac_ext
8060cat >>conftest.$ac_ext <<_ACEOF
8061/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008062$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008063 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008064int
8065main ()
8066{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008067static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008068test_array [0] = 0
8069
8070 ;
8071 return 0;
8072}
8073_ACEOF
8074rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008075if { (ac_try="$ac_compile"
8076case "(($ac_try" in
8077 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8078 *) ac_try_echo=$ac_try;;
8079esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008080eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008081 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008082 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008083 grep -v '^ *+' conftest.er1 >conftest.err
8084 rm -f conftest.er1
8085 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008087 (exit $ac_status); } && {
8088 test -z "$ac_c_werror_flag" ||
8089 test ! -s conftest.err
8090 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008091 ac_hi=-1 ac_mid=-1
8092 while :; do
8093 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008094/* confdefs.h. */
8095_ACEOF
8096cat confdefs.h >>conftest.$ac_ext
8097cat >>conftest.$ac_ext <<_ACEOF
8098/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008099$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008100 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008101int
8102main ()
8103{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008104static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008105test_array [0] = 0
8106
8107 ;
8108 return 0;
8109}
8110_ACEOF
8111rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008112if { (ac_try="$ac_compile"
8113case "(($ac_try" in
8114 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8115 *) ac_try_echo=$ac_try;;
8116esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008117eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008118 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008119 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008120 grep -v '^ *+' conftest.er1 >conftest.err
8121 rm -f conftest.er1
8122 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008124 (exit $ac_status); } && {
8125 test -z "$ac_c_werror_flag" ||
8126 test ! -s conftest.err
8127 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008128 ac_lo=$ac_mid; break
8129else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008130 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008131sed 's/^/| /' conftest.$ac_ext >&5
8132
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008133 ac_hi=`expr '(' $ac_mid ')' - 1`
8134 if test $ac_mid -le $ac_hi; then
8135 ac_lo= ac_hi=
8136 break
8137 fi
8138 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008139fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008140
8141rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008142 done
8143else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008144 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008145sed 's/^/| /' conftest.$ac_ext >&5
8146
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008147 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008148fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008149
8150rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008151fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008152
8153rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008154# Binary search between lo and hi bounds.
8155while test "x$ac_lo" != "x$ac_hi"; do
8156 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8157 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008158/* confdefs.h. */
8159_ACEOF
8160cat confdefs.h >>conftest.$ac_ext
8161cat >>conftest.$ac_ext <<_ACEOF
8162/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008163$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008164 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008165int
8166main ()
8167{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008168static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008169test_array [0] = 0
8170
8171 ;
8172 return 0;
8173}
8174_ACEOF
8175rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008176if { (ac_try="$ac_compile"
8177case "(($ac_try" in
8178 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8179 *) ac_try_echo=$ac_try;;
8180esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008181eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008182 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008183 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008184 grep -v '^ *+' conftest.er1 >conftest.err
8185 rm -f conftest.er1
8186 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008188 (exit $ac_status); } && {
8189 test -z "$ac_c_werror_flag" ||
8190 test ! -s conftest.err
8191 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008192 ac_hi=$ac_mid
8193else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008194 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008195sed 's/^/| /' conftest.$ac_ext >&5
8196
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008197 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008198fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008199
8200rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008201done
8202case $ac_lo in
8203?*) ac_cv_sizeof_long=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008204'') if test "$ac_cv_type_long" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008205 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008206See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008207echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008208See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008209 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008210 else
8211 ac_cv_sizeof_long=0
8212 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008213esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008214else
Martin v. Löwis11437992002-04-12 09:54:03 +00008215 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008216/* confdefs.h. */
8217_ACEOF
8218cat confdefs.h >>conftest.$ac_ext
8219cat >>conftest.$ac_ext <<_ACEOF
8220/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008221$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008222 typedef long ac__type_sizeof_;
8223static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8224static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008225#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008226#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008227int
8228main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008229{
Martin v. Löwis11437992002-04-12 09:54:03 +00008230
8231 FILE *f = fopen ("conftest.val", "w");
8232 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008233 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008234 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008235 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008236 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008237 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008238 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008239 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008240 }
8241 else
8242 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008243 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008244 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008245 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008246 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008247 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008248 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008249
8250 ;
8251 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008252}
Martin v. Löwis11437992002-04-12 09:54:03 +00008253_ACEOF
8254rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008255if { (ac_try="$ac_link"
8256case "(($ac_try" in
8257 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8258 *) ac_try_echo=$ac_try;;
8259esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008260eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008261 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008262 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008264 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008265 { (case "(($ac_try" in
8266 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8267 *) ac_try_echo=$ac_try;;
8268esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008269eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008270 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008271 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008273 (exit $ac_status); }; }; then
8274 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008275else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008276 echo "$as_me: program exited with status $ac_status" >&5
8277echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008278sed 's/^/| /' conftest.$ac_ext >&5
8279
Martin v. Löwis11437992002-04-12 09:54:03 +00008280( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008281if test "$ac_cv_type_long" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008282 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008283See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008284echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008285See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008286 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008287 else
8288 ac_cv_sizeof_long=0
8289 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008290fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008291rm -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 +00008292fi
8293rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008294fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008295{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
8296echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008297
8298
8299
Martin v. Löwis11437992002-04-12 09:54:03 +00008300cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008301#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008302_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008303
8304
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008305{ echo "$as_me:$LINENO: checking for void *" >&5
8306echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
8307if test "${ac_cv_type_void_p+set}" = set; then
8308 echo $ECHO_N "(cached) $ECHO_C" >&6
8309else
8310 cat >conftest.$ac_ext <<_ACEOF
8311/* confdefs.h. */
8312_ACEOF
8313cat confdefs.h >>conftest.$ac_ext
8314cat >>conftest.$ac_ext <<_ACEOF
8315/* end confdefs.h. */
8316$ac_includes_default
8317typedef void * ac__type_new_;
8318int
8319main ()
8320{
8321if ((ac__type_new_ *) 0)
8322 return 0;
8323if (sizeof (ac__type_new_))
8324 return 0;
8325 ;
8326 return 0;
8327}
8328_ACEOF
8329rm -f conftest.$ac_objext
8330if { (ac_try="$ac_compile"
8331case "(($ac_try" in
8332 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8333 *) ac_try_echo=$ac_try;;
8334esac
8335eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8336 (eval "$ac_compile") 2>conftest.er1
8337 ac_status=$?
8338 grep -v '^ *+' conftest.er1 >conftest.err
8339 rm -f conftest.er1
8340 cat conftest.err >&5
8341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8342 (exit $ac_status); } && {
8343 test -z "$ac_c_werror_flag" ||
8344 test ! -s conftest.err
8345 } && test -s conftest.$ac_objext; then
8346 ac_cv_type_void_p=yes
8347else
8348 echo "$as_me: failed program was:" >&5
8349sed 's/^/| /' conftest.$ac_ext >&5
8350
8351 ac_cv_type_void_p=no
8352fi
8353
8354rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8355fi
8356{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
8357echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
8358
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008359# The cast to long int works around a bug in the HP C Compiler
8360# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8361# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8362# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008363{ echo "$as_me:$LINENO: checking size of void *" >&5
8364echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008365if test "${ac_cv_sizeof_void_p+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008366 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008367else
Martin v. Löwis11437992002-04-12 09:54:03 +00008368 if test "$cross_compiling" = yes; then
8369 # Depending upon the size, compute the lo and hi bounds.
8370cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008371/* confdefs.h. */
8372_ACEOF
8373cat confdefs.h >>conftest.$ac_ext
8374cat >>conftest.$ac_ext <<_ACEOF
8375/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008376$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008377 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008378int
8379main ()
8380{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008381static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008382test_array [0] = 0
8383
8384 ;
8385 return 0;
8386}
8387_ACEOF
8388rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008389if { (ac_try="$ac_compile"
8390case "(($ac_try" in
8391 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8392 *) ac_try_echo=$ac_try;;
8393esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008394eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008395 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008396 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008397 grep -v '^ *+' conftest.er1 >conftest.err
8398 rm -f conftest.er1
8399 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008401 (exit $ac_status); } && {
8402 test -z "$ac_c_werror_flag" ||
8403 test ! -s conftest.err
8404 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008405 ac_lo=0 ac_mid=0
8406 while :; do
8407 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008408/* confdefs.h. */
8409_ACEOF
8410cat confdefs.h >>conftest.$ac_ext
8411cat >>conftest.$ac_ext <<_ACEOF
8412/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008413$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008414 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008415int
8416main ()
8417{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008418static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008419test_array [0] = 0
8420
8421 ;
8422 return 0;
8423}
8424_ACEOF
8425rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008426if { (ac_try="$ac_compile"
8427case "(($ac_try" in
8428 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8429 *) ac_try_echo=$ac_try;;
8430esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008431eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008432 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008433 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008434 grep -v '^ *+' conftest.er1 >conftest.err
8435 rm -f conftest.er1
8436 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008437 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008438 (exit $ac_status); } && {
8439 test -z "$ac_c_werror_flag" ||
8440 test ! -s conftest.err
8441 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008442 ac_hi=$ac_mid; break
8443else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008444 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008445sed 's/^/| /' conftest.$ac_ext >&5
8446
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008447 ac_lo=`expr $ac_mid + 1`
8448 if test $ac_lo -le $ac_mid; then
8449 ac_lo= ac_hi=
8450 break
8451 fi
8452 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008453fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008454
8455rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008456 done
8457else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008458 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008459sed 's/^/| /' conftest.$ac_ext >&5
8460
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008461 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008462/* confdefs.h. */
8463_ACEOF
8464cat confdefs.h >>conftest.$ac_ext
8465cat >>conftest.$ac_ext <<_ACEOF
8466/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008467$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008468 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008469int
8470main ()
8471{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008472static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008473test_array [0] = 0
8474
8475 ;
8476 return 0;
8477}
8478_ACEOF
8479rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008480if { (ac_try="$ac_compile"
8481case "(($ac_try" in
8482 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8483 *) ac_try_echo=$ac_try;;
8484esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008485eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008486 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008487 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008488 grep -v '^ *+' conftest.er1 >conftest.err
8489 rm -f conftest.er1
8490 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008492 (exit $ac_status); } && {
8493 test -z "$ac_c_werror_flag" ||
8494 test ! -s conftest.err
8495 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008496 ac_hi=-1 ac_mid=-1
8497 while :; do
8498 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008499/* confdefs.h. */
8500_ACEOF
8501cat confdefs.h >>conftest.$ac_ext
8502cat >>conftest.$ac_ext <<_ACEOF
8503/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008504$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008505 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008506int
8507main ()
8508{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008509static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008510test_array [0] = 0
8511
8512 ;
8513 return 0;
8514}
8515_ACEOF
8516rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008517if { (ac_try="$ac_compile"
8518case "(($ac_try" in
8519 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8520 *) ac_try_echo=$ac_try;;
8521esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008522eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008523 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008524 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008525 grep -v '^ *+' conftest.er1 >conftest.err
8526 rm -f conftest.er1
8527 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008529 (exit $ac_status); } && {
8530 test -z "$ac_c_werror_flag" ||
8531 test ! -s conftest.err
8532 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008533 ac_lo=$ac_mid; break
8534else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008535 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008536sed 's/^/| /' conftest.$ac_ext >&5
8537
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008538 ac_hi=`expr '(' $ac_mid ')' - 1`
8539 if test $ac_mid -le $ac_hi; then
8540 ac_lo= ac_hi=
8541 break
8542 fi
8543 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008544fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008545
8546rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008547 done
8548else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008549 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008550sed 's/^/| /' conftest.$ac_ext >&5
8551
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008552 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008553fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008554
8555rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008556fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008557
8558rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008559# Binary search between lo and hi bounds.
8560while test "x$ac_lo" != "x$ac_hi"; do
8561 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8562 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008563/* confdefs.h. */
8564_ACEOF
8565cat confdefs.h >>conftest.$ac_ext
8566cat >>conftest.$ac_ext <<_ACEOF
8567/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008568$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008569 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008570int
8571main ()
8572{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008573static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008574test_array [0] = 0
8575
8576 ;
8577 return 0;
8578}
8579_ACEOF
8580rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008581if { (ac_try="$ac_compile"
8582case "(($ac_try" in
8583 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8584 *) ac_try_echo=$ac_try;;
8585esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008586eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008587 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008588 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008589 grep -v '^ *+' conftest.er1 >conftest.err
8590 rm -f conftest.er1
8591 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008593 (exit $ac_status); } && {
8594 test -z "$ac_c_werror_flag" ||
8595 test ! -s conftest.err
8596 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008597 ac_hi=$ac_mid
8598else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008599 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008600sed 's/^/| /' conftest.$ac_ext >&5
8601
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008602 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008603fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008604
8605rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008606done
8607case $ac_lo in
8608?*) ac_cv_sizeof_void_p=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008609'') if test "$ac_cv_type_void_p" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008610 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008611See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008612echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008613See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008614 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008615 else
8616 ac_cv_sizeof_void_p=0
8617 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008618esac
Guido van Rossumad678af1998-10-02 14:42:15 +00008619else
Martin v. Löwis11437992002-04-12 09:54:03 +00008620 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008621/* confdefs.h. */
8622_ACEOF
8623cat confdefs.h >>conftest.$ac_ext
8624cat >>conftest.$ac_ext <<_ACEOF
8625/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008626$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008627 typedef void * ac__type_sizeof_;
8628static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8629static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008630#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008631#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008632int
8633main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00008634{
Martin v. Löwis11437992002-04-12 09:54:03 +00008635
8636 FILE *f = fopen ("conftest.val", "w");
8637 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008638 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008639 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008640 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008641 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008642 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008643 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008644 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008645 }
8646 else
8647 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008648 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008649 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008650 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008651 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008652 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008653 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008654
8655 ;
8656 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00008657}
Martin v. Löwis11437992002-04-12 09:54:03 +00008658_ACEOF
8659rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008660if { (ac_try="$ac_link"
8661case "(($ac_try" in
8662 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8663 *) ac_try_echo=$ac_try;;
8664esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008665eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008666 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008667 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008669 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008670 { (case "(($ac_try" in
8671 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8672 *) ac_try_echo=$ac_try;;
8673esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008674eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008675 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008676 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008678 (exit $ac_status); }; }; then
8679 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00008680else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008681 echo "$as_me: program exited with status $ac_status" >&5
8682echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008683sed 's/^/| /' conftest.$ac_ext >&5
8684
Martin v. Löwis11437992002-04-12 09:54:03 +00008685( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008686if test "$ac_cv_type_void_p" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008687 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008688See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008689echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008690See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008691 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008692 else
8693 ac_cv_sizeof_void_p=0
8694 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008695fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008696rm -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 +00008697fi
8698rm -f conftest.val
Guido van Rossumad678af1998-10-02 14:42:15 +00008699fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008700{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
8701echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008702
8703
8704
Martin v. Löwis11437992002-04-12 09:54:03 +00008705cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008706#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008707_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008708
8709
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008710{ echo "$as_me:$LINENO: checking for short" >&5
8711echo $ECHO_N "checking for short... $ECHO_C" >&6; }
8712if test "${ac_cv_type_short+set}" = set; then
8713 echo $ECHO_N "(cached) $ECHO_C" >&6
8714else
8715 cat >conftest.$ac_ext <<_ACEOF
8716/* confdefs.h. */
8717_ACEOF
8718cat confdefs.h >>conftest.$ac_ext
8719cat >>conftest.$ac_ext <<_ACEOF
8720/* end confdefs.h. */
8721$ac_includes_default
8722typedef short ac__type_new_;
8723int
8724main ()
8725{
8726if ((ac__type_new_ *) 0)
8727 return 0;
8728if (sizeof (ac__type_new_))
8729 return 0;
8730 ;
8731 return 0;
8732}
8733_ACEOF
8734rm -f conftest.$ac_objext
8735if { (ac_try="$ac_compile"
8736case "(($ac_try" in
8737 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8738 *) ac_try_echo=$ac_try;;
8739esac
8740eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8741 (eval "$ac_compile") 2>conftest.er1
8742 ac_status=$?
8743 grep -v '^ *+' conftest.er1 >conftest.err
8744 rm -f conftest.er1
8745 cat conftest.err >&5
8746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8747 (exit $ac_status); } && {
8748 test -z "$ac_c_werror_flag" ||
8749 test ! -s conftest.err
8750 } && test -s conftest.$ac_objext; then
8751 ac_cv_type_short=yes
8752else
8753 echo "$as_me: failed program was:" >&5
8754sed 's/^/| /' conftest.$ac_ext >&5
8755
8756 ac_cv_type_short=no
8757fi
8758
8759rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8760fi
8761{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
8762echo "${ECHO_T}$ac_cv_type_short" >&6; }
8763
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008764# The cast to long int works around a bug in the HP C Compiler
8765# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8766# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8767# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008768{ echo "$as_me:$LINENO: checking size of short" >&5
8769echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008770if test "${ac_cv_sizeof_short+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008771 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008772else
Martin v. Löwis11437992002-04-12 09:54:03 +00008773 if test "$cross_compiling" = yes; then
8774 # Depending upon the size, compute the lo and hi bounds.
8775cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008776/* confdefs.h. */
8777_ACEOF
8778cat confdefs.h >>conftest.$ac_ext
8779cat >>conftest.$ac_ext <<_ACEOF
8780/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008781$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008782 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008783int
8784main ()
8785{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008786static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008787test_array [0] = 0
8788
8789 ;
8790 return 0;
8791}
8792_ACEOF
8793rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008794if { (ac_try="$ac_compile"
8795case "(($ac_try" in
8796 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8797 *) ac_try_echo=$ac_try;;
8798esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008799eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008800 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008801 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008802 grep -v '^ *+' conftest.er1 >conftest.err
8803 rm -f conftest.er1
8804 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008806 (exit $ac_status); } && {
8807 test -z "$ac_c_werror_flag" ||
8808 test ! -s conftest.err
8809 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008810 ac_lo=0 ac_mid=0
8811 while :; do
8812 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008813/* confdefs.h. */
8814_ACEOF
8815cat confdefs.h >>conftest.$ac_ext
8816cat >>conftest.$ac_ext <<_ACEOF
8817/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008818$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008819 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008820int
8821main ()
8822{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008823static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008824test_array [0] = 0
8825
8826 ;
8827 return 0;
8828}
8829_ACEOF
8830rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008831if { (ac_try="$ac_compile"
8832case "(($ac_try" in
8833 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8834 *) ac_try_echo=$ac_try;;
8835esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008836eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008837 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008838 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008839 grep -v '^ *+' conftest.er1 >conftest.err
8840 rm -f conftest.er1
8841 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008843 (exit $ac_status); } && {
8844 test -z "$ac_c_werror_flag" ||
8845 test ! -s conftest.err
8846 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008847 ac_hi=$ac_mid; break
8848else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008849 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008850sed 's/^/| /' conftest.$ac_ext >&5
8851
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008852 ac_lo=`expr $ac_mid + 1`
8853 if test $ac_lo -le $ac_mid; then
8854 ac_lo= ac_hi=
8855 break
8856 fi
8857 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008858fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008859
8860rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008861 done
8862else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008863 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008864sed 's/^/| /' conftest.$ac_ext >&5
8865
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008866 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008867/* confdefs.h. */
8868_ACEOF
8869cat confdefs.h >>conftest.$ac_ext
8870cat >>conftest.$ac_ext <<_ACEOF
8871/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008872$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008873 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008874int
8875main ()
8876{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008877static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008878test_array [0] = 0
8879
8880 ;
8881 return 0;
8882}
8883_ACEOF
8884rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008885if { (ac_try="$ac_compile"
8886case "(($ac_try" in
8887 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8888 *) ac_try_echo=$ac_try;;
8889esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008890eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008891 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008892 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008893 grep -v '^ *+' conftest.er1 >conftest.err
8894 rm -f conftest.er1
8895 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008897 (exit $ac_status); } && {
8898 test -z "$ac_c_werror_flag" ||
8899 test ! -s conftest.err
8900 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008901 ac_hi=-1 ac_mid=-1
8902 while :; do
8903 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008904/* confdefs.h. */
8905_ACEOF
8906cat confdefs.h >>conftest.$ac_ext
8907cat >>conftest.$ac_ext <<_ACEOF
8908/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008909$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008910 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008911int
8912main ()
8913{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008914static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008915test_array [0] = 0
8916
8917 ;
8918 return 0;
8919}
8920_ACEOF
8921rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008922if { (ac_try="$ac_compile"
8923case "(($ac_try" in
8924 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8925 *) ac_try_echo=$ac_try;;
8926esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008927eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008928 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008929 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008930 grep -v '^ *+' conftest.er1 >conftest.err
8931 rm -f conftest.er1
8932 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008934 (exit $ac_status); } && {
8935 test -z "$ac_c_werror_flag" ||
8936 test ! -s conftest.err
8937 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008938 ac_lo=$ac_mid; break
8939else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008940 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008941sed 's/^/| /' conftest.$ac_ext >&5
8942
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008943 ac_hi=`expr '(' $ac_mid ')' - 1`
8944 if test $ac_mid -le $ac_hi; then
8945 ac_lo= ac_hi=
8946 break
8947 fi
8948 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008949fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008950
8951rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008952 done
8953else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008954 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008955sed 's/^/| /' conftest.$ac_ext >&5
8956
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008957 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008958fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008959
8960rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008961fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008962
8963rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008964# Binary search between lo and hi bounds.
8965while test "x$ac_lo" != "x$ac_hi"; do
8966 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8967 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008968/* confdefs.h. */
8969_ACEOF
8970cat confdefs.h >>conftest.$ac_ext
8971cat >>conftest.$ac_ext <<_ACEOF
8972/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008973$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008974 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008975int
8976main ()
8977{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008978static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008979test_array [0] = 0
8980
8981 ;
8982 return 0;
8983}
8984_ACEOF
8985rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008986if { (ac_try="$ac_compile"
8987case "(($ac_try" in
8988 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8989 *) ac_try_echo=$ac_try;;
8990esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008991eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008992 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008993 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008994 grep -v '^ *+' conftest.er1 >conftest.err
8995 rm -f conftest.er1
8996 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008998 (exit $ac_status); } && {
8999 test -z "$ac_c_werror_flag" ||
9000 test ! -s conftest.err
9001 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009002 ac_hi=$ac_mid
9003else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009004 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009005sed 's/^/| /' conftest.$ac_ext >&5
9006
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009007 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009008fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009009
9010rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009011done
9012case $ac_lo in
9013?*) ac_cv_sizeof_short=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009014'') if test "$ac_cv_type_short" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009015 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009016See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009017echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009018See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009019 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009020 else
9021 ac_cv_sizeof_short=0
9022 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009023esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009024else
Martin v. Löwis11437992002-04-12 09:54:03 +00009025 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009026/* confdefs.h. */
9027_ACEOF
9028cat confdefs.h >>conftest.$ac_ext
9029cat >>conftest.$ac_ext <<_ACEOF
9030/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009031$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009032 typedef short ac__type_sizeof_;
9033static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9034static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009035#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009036#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009037int
9038main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009039{
Martin v. Löwis11437992002-04-12 09:54:03 +00009040
9041 FILE *f = fopen ("conftest.val", "w");
9042 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009043 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009044 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009045 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009046 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009047 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009048 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009049 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009050 }
9051 else
9052 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009053 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009054 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009055 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009056 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009057 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009058 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009059
9060 ;
9061 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009062}
Martin v. Löwis11437992002-04-12 09:54:03 +00009063_ACEOF
9064rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009065if { (ac_try="$ac_link"
9066case "(($ac_try" in
9067 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9068 *) ac_try_echo=$ac_try;;
9069esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009070eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009071 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009072 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009074 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009075 { (case "(($ac_try" in
9076 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9077 *) ac_try_echo=$ac_try;;
9078esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009079eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009080 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009081 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009083 (exit $ac_status); }; }; then
9084 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009085else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009086 echo "$as_me: program exited with status $ac_status" >&5
9087echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009088sed 's/^/| /' conftest.$ac_ext >&5
9089
Martin v. Löwis11437992002-04-12 09:54:03 +00009090( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009091if test "$ac_cv_type_short" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009092 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009093See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009094echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009095See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009096 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009097 else
9098 ac_cv_sizeof_short=0
9099 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009100fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009101rm -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 +00009102fi
9103rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009104fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009105{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
9106echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009107
9108
9109
Martin v. Löwis11437992002-04-12 09:54:03 +00009110cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009111#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00009112_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009113
9114
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009115{ echo "$as_me:$LINENO: checking for float" >&5
9116echo $ECHO_N "checking for float... $ECHO_C" >&6; }
9117if test "${ac_cv_type_float+set}" = set; then
9118 echo $ECHO_N "(cached) $ECHO_C" >&6
9119else
9120 cat >conftest.$ac_ext <<_ACEOF
9121/* confdefs.h. */
9122_ACEOF
9123cat confdefs.h >>conftest.$ac_ext
9124cat >>conftest.$ac_ext <<_ACEOF
9125/* end confdefs.h. */
9126$ac_includes_default
9127typedef float ac__type_new_;
9128int
9129main ()
9130{
9131if ((ac__type_new_ *) 0)
9132 return 0;
9133if (sizeof (ac__type_new_))
9134 return 0;
9135 ;
9136 return 0;
9137}
9138_ACEOF
9139rm -f conftest.$ac_objext
9140if { (ac_try="$ac_compile"
9141case "(($ac_try" in
9142 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9143 *) ac_try_echo=$ac_try;;
9144esac
9145eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9146 (eval "$ac_compile") 2>conftest.er1
9147 ac_status=$?
9148 grep -v '^ *+' conftest.er1 >conftest.err
9149 rm -f conftest.er1
9150 cat conftest.err >&5
9151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9152 (exit $ac_status); } && {
9153 test -z "$ac_c_werror_flag" ||
9154 test ! -s conftest.err
9155 } && test -s conftest.$ac_objext; then
9156 ac_cv_type_float=yes
9157else
9158 echo "$as_me: failed program was:" >&5
9159sed 's/^/| /' conftest.$ac_ext >&5
9160
9161 ac_cv_type_float=no
9162fi
9163
9164rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9165fi
9166{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
9167echo "${ECHO_T}$ac_cv_type_float" >&6; }
9168
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009169# The cast to long int works around a bug in the HP C Compiler
9170# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9171# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9172# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009173{ echo "$as_me:$LINENO: checking size of float" >&5
9174echo $ECHO_N "checking size of float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009175if test "${ac_cv_sizeof_float+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009176 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009177else
Martin v. Löwis11437992002-04-12 09:54:03 +00009178 if test "$cross_compiling" = yes; then
9179 # Depending upon the size, compute the lo and hi bounds.
9180cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009181/* confdefs.h. */
9182_ACEOF
9183cat confdefs.h >>conftest.$ac_ext
9184cat >>conftest.$ac_ext <<_ACEOF
9185/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009186$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009187 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009188int
9189main ()
9190{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009191static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009192test_array [0] = 0
9193
9194 ;
9195 return 0;
9196}
9197_ACEOF
9198rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009199if { (ac_try="$ac_compile"
9200case "(($ac_try" in
9201 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9202 *) ac_try_echo=$ac_try;;
9203esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009204eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009205 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009206 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009207 grep -v '^ *+' conftest.er1 >conftest.err
9208 rm -f conftest.er1
9209 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009211 (exit $ac_status); } && {
9212 test -z "$ac_c_werror_flag" ||
9213 test ! -s conftest.err
9214 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009215 ac_lo=0 ac_mid=0
9216 while :; do
9217 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009218/* confdefs.h. */
9219_ACEOF
9220cat confdefs.h >>conftest.$ac_ext
9221cat >>conftest.$ac_ext <<_ACEOF
9222/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009223$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009224 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009225int
9226main ()
9227{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009228static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009229test_array [0] = 0
9230
9231 ;
9232 return 0;
9233}
9234_ACEOF
9235rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009236if { (ac_try="$ac_compile"
9237case "(($ac_try" in
9238 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9239 *) ac_try_echo=$ac_try;;
9240esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009241eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009242 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009243 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009244 grep -v '^ *+' conftest.er1 >conftest.err
9245 rm -f conftest.er1
9246 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009248 (exit $ac_status); } && {
9249 test -z "$ac_c_werror_flag" ||
9250 test ! -s conftest.err
9251 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009252 ac_hi=$ac_mid; break
9253else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009254 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009255sed 's/^/| /' conftest.$ac_ext >&5
9256
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009257 ac_lo=`expr $ac_mid + 1`
9258 if test $ac_lo -le $ac_mid; then
9259 ac_lo= ac_hi=
9260 break
9261 fi
9262 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009263fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009264
9265rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009266 done
9267else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009268 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009269sed 's/^/| /' conftest.$ac_ext >&5
9270
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009271 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009272/* confdefs.h. */
9273_ACEOF
9274cat confdefs.h >>conftest.$ac_ext
9275cat >>conftest.$ac_ext <<_ACEOF
9276/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009277$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009278 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009279int
9280main ()
9281{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009282static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009283test_array [0] = 0
9284
9285 ;
9286 return 0;
9287}
9288_ACEOF
9289rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009290if { (ac_try="$ac_compile"
9291case "(($ac_try" in
9292 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9293 *) ac_try_echo=$ac_try;;
9294esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009295eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009296 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009297 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009298 grep -v '^ *+' conftest.er1 >conftest.err
9299 rm -f conftest.er1
9300 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009302 (exit $ac_status); } && {
9303 test -z "$ac_c_werror_flag" ||
9304 test ! -s conftest.err
9305 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009306 ac_hi=-1 ac_mid=-1
9307 while :; do
9308 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009309/* confdefs.h. */
9310_ACEOF
9311cat confdefs.h >>conftest.$ac_ext
9312cat >>conftest.$ac_ext <<_ACEOF
9313/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009314$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009315 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009316int
9317main ()
9318{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009319static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009320test_array [0] = 0
9321
9322 ;
9323 return 0;
9324}
9325_ACEOF
9326rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009327if { (ac_try="$ac_compile"
9328case "(($ac_try" in
9329 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9330 *) ac_try_echo=$ac_try;;
9331esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009332eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009333 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009334 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009335 grep -v '^ *+' conftest.er1 >conftest.err
9336 rm -f conftest.er1
9337 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009339 (exit $ac_status); } && {
9340 test -z "$ac_c_werror_flag" ||
9341 test ! -s conftest.err
9342 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009343 ac_lo=$ac_mid; break
9344else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009345 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009346sed 's/^/| /' conftest.$ac_ext >&5
9347
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009348 ac_hi=`expr '(' $ac_mid ')' - 1`
9349 if test $ac_mid -le $ac_hi; then
9350 ac_lo= ac_hi=
9351 break
9352 fi
9353 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009354fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009355
9356rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009357 done
9358else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009359 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009360sed 's/^/| /' conftest.$ac_ext >&5
9361
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009362 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009363fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009364
9365rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009366fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009367
9368rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009369# Binary search between lo and hi bounds.
9370while test "x$ac_lo" != "x$ac_hi"; do
9371 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9372 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009373/* confdefs.h. */
9374_ACEOF
9375cat confdefs.h >>conftest.$ac_ext
9376cat >>conftest.$ac_ext <<_ACEOF
9377/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009378$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009379 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009380int
9381main ()
9382{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009383static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009384test_array [0] = 0
9385
9386 ;
9387 return 0;
9388}
9389_ACEOF
9390rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009391if { (ac_try="$ac_compile"
9392case "(($ac_try" in
9393 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9394 *) ac_try_echo=$ac_try;;
9395esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009396eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009397 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009398 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009399 grep -v '^ *+' conftest.er1 >conftest.err
9400 rm -f conftest.er1
9401 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009403 (exit $ac_status); } && {
9404 test -z "$ac_c_werror_flag" ||
9405 test ! -s conftest.err
9406 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009407 ac_hi=$ac_mid
9408else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009409 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009410sed 's/^/| /' conftest.$ac_ext >&5
9411
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009412 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009413fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009414
9415rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009416done
9417case $ac_lo in
9418?*) ac_cv_sizeof_float=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009419'') if test "$ac_cv_type_float" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009420 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009421See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009422echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009423See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009424 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009425 else
9426 ac_cv_sizeof_float=0
9427 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009428esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009429else
Martin v. Löwis11437992002-04-12 09:54:03 +00009430 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009431/* confdefs.h. */
9432_ACEOF
9433cat confdefs.h >>conftest.$ac_ext
9434cat >>conftest.$ac_ext <<_ACEOF
9435/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009436$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009437 typedef float ac__type_sizeof_;
9438static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9439static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009440#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009441#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009442int
9443main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009444{
Martin v. Löwis11437992002-04-12 09:54:03 +00009445
9446 FILE *f = fopen ("conftest.val", "w");
9447 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009448 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009449 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009450 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009451 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009452 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009453 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009454 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009455 }
9456 else
9457 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009458 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009459 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009460 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009461 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009462 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009463 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009464
9465 ;
9466 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009467}
Martin v. Löwis11437992002-04-12 09:54:03 +00009468_ACEOF
9469rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009470if { (ac_try="$ac_link"
9471case "(($ac_try" in
9472 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9473 *) ac_try_echo=$ac_try;;
9474esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009475eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009476 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009477 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009478 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009479 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009480 { (case "(($ac_try" in
9481 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9482 *) ac_try_echo=$ac_try;;
9483esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009484eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009485 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009486 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009488 (exit $ac_status); }; }; then
9489 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009490else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009491 echo "$as_me: program exited with status $ac_status" >&5
9492echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009493sed 's/^/| /' conftest.$ac_ext >&5
9494
Martin v. Löwis11437992002-04-12 09:54:03 +00009495( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009496if test "$ac_cv_type_float" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009497 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009498See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009499echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009500See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009501 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009502 else
9503 ac_cv_sizeof_float=0
9504 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009505fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009506rm -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 +00009507fi
9508rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009509fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009510{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
9511echo "${ECHO_T}$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009512
9513
9514
Martin v. Löwis11437992002-04-12 09:54:03 +00009515cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009516#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00009517_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009518
9519
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009520{ echo "$as_me:$LINENO: checking for double" >&5
9521echo $ECHO_N "checking for double... $ECHO_C" >&6; }
9522if test "${ac_cv_type_double+set}" = set; then
9523 echo $ECHO_N "(cached) $ECHO_C" >&6
9524else
9525 cat >conftest.$ac_ext <<_ACEOF
9526/* confdefs.h. */
9527_ACEOF
9528cat confdefs.h >>conftest.$ac_ext
9529cat >>conftest.$ac_ext <<_ACEOF
9530/* end confdefs.h. */
9531$ac_includes_default
9532typedef double ac__type_new_;
9533int
9534main ()
9535{
9536if ((ac__type_new_ *) 0)
9537 return 0;
9538if (sizeof (ac__type_new_))
9539 return 0;
9540 ;
9541 return 0;
9542}
9543_ACEOF
9544rm -f conftest.$ac_objext
9545if { (ac_try="$ac_compile"
9546case "(($ac_try" in
9547 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9548 *) ac_try_echo=$ac_try;;
9549esac
9550eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9551 (eval "$ac_compile") 2>conftest.er1
9552 ac_status=$?
9553 grep -v '^ *+' conftest.er1 >conftest.err
9554 rm -f conftest.er1
9555 cat conftest.err >&5
9556 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9557 (exit $ac_status); } && {
9558 test -z "$ac_c_werror_flag" ||
9559 test ! -s conftest.err
9560 } && test -s conftest.$ac_objext; then
9561 ac_cv_type_double=yes
9562else
9563 echo "$as_me: failed program was:" >&5
9564sed 's/^/| /' conftest.$ac_ext >&5
9565
9566 ac_cv_type_double=no
9567fi
9568
9569rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9570fi
9571{ echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
9572echo "${ECHO_T}$ac_cv_type_double" >&6; }
9573
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009574# The cast to long int works around a bug in the HP C Compiler
9575# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9576# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9577# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009578{ echo "$as_me:$LINENO: checking size of double" >&5
9579echo $ECHO_N "checking size of double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009580if test "${ac_cv_sizeof_double+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009581 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009582else
Martin v. Löwis11437992002-04-12 09:54:03 +00009583 if test "$cross_compiling" = yes; then
9584 # Depending upon the size, compute the lo and hi bounds.
9585cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009586/* confdefs.h. */
9587_ACEOF
9588cat confdefs.h >>conftest.$ac_ext
9589cat >>conftest.$ac_ext <<_ACEOF
9590/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009591$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009592 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009593int
9594main ()
9595{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009596static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009597test_array [0] = 0
9598
9599 ;
9600 return 0;
9601}
9602_ACEOF
9603rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009604if { (ac_try="$ac_compile"
9605case "(($ac_try" in
9606 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9607 *) ac_try_echo=$ac_try;;
9608esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009609eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009610 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009611 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009612 grep -v '^ *+' conftest.er1 >conftest.err
9613 rm -f conftest.er1
9614 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009616 (exit $ac_status); } && {
9617 test -z "$ac_c_werror_flag" ||
9618 test ! -s conftest.err
9619 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009620 ac_lo=0 ac_mid=0
9621 while :; do
9622 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009623/* confdefs.h. */
9624_ACEOF
9625cat confdefs.h >>conftest.$ac_ext
9626cat >>conftest.$ac_ext <<_ACEOF
9627/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009628$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009629 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009630int
9631main ()
9632{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009633static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009634test_array [0] = 0
9635
9636 ;
9637 return 0;
9638}
9639_ACEOF
9640rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009641if { (ac_try="$ac_compile"
9642case "(($ac_try" in
9643 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9644 *) ac_try_echo=$ac_try;;
9645esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009646eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009647 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009648 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009649 grep -v '^ *+' conftest.er1 >conftest.err
9650 rm -f conftest.er1
9651 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009653 (exit $ac_status); } && {
9654 test -z "$ac_c_werror_flag" ||
9655 test ! -s conftest.err
9656 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009657 ac_hi=$ac_mid; break
9658else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009659 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009660sed 's/^/| /' conftest.$ac_ext >&5
9661
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009662 ac_lo=`expr $ac_mid + 1`
9663 if test $ac_lo -le $ac_mid; then
9664 ac_lo= ac_hi=
9665 break
9666 fi
9667 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009668fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009669
9670rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009671 done
9672else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009673 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009674sed 's/^/| /' conftest.$ac_ext >&5
9675
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009676 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009677/* confdefs.h. */
9678_ACEOF
9679cat confdefs.h >>conftest.$ac_ext
9680cat >>conftest.$ac_ext <<_ACEOF
9681/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009682$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009683 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009684int
9685main ()
9686{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009687static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009688test_array [0] = 0
9689
9690 ;
9691 return 0;
9692}
9693_ACEOF
9694rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009695if { (ac_try="$ac_compile"
9696case "(($ac_try" in
9697 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9698 *) ac_try_echo=$ac_try;;
9699esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009700eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009701 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009702 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009703 grep -v '^ *+' conftest.er1 >conftest.err
9704 rm -f conftest.er1
9705 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009707 (exit $ac_status); } && {
9708 test -z "$ac_c_werror_flag" ||
9709 test ! -s conftest.err
9710 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009711 ac_hi=-1 ac_mid=-1
9712 while :; do
9713 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009714/* confdefs.h. */
9715_ACEOF
9716cat confdefs.h >>conftest.$ac_ext
9717cat >>conftest.$ac_ext <<_ACEOF
9718/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009719$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009720 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009721int
9722main ()
9723{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009724static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009725test_array [0] = 0
9726
9727 ;
9728 return 0;
9729}
9730_ACEOF
9731rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009732if { (ac_try="$ac_compile"
9733case "(($ac_try" in
9734 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9735 *) ac_try_echo=$ac_try;;
9736esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009737eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009738 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009739 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009740 grep -v '^ *+' conftest.er1 >conftest.err
9741 rm -f conftest.er1
9742 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009744 (exit $ac_status); } && {
9745 test -z "$ac_c_werror_flag" ||
9746 test ! -s conftest.err
9747 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009748 ac_lo=$ac_mid; break
9749else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009750 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009751sed 's/^/| /' conftest.$ac_ext >&5
9752
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009753 ac_hi=`expr '(' $ac_mid ')' - 1`
9754 if test $ac_mid -le $ac_hi; then
9755 ac_lo= ac_hi=
9756 break
9757 fi
9758 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009759fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009760
9761rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009762 done
9763else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009764 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009765sed 's/^/| /' conftest.$ac_ext >&5
9766
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009767 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009768fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009769
9770rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009771fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009772
9773rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009774# Binary search between lo and hi bounds.
9775while test "x$ac_lo" != "x$ac_hi"; do
9776 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9777 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009778/* confdefs.h. */
9779_ACEOF
9780cat confdefs.h >>conftest.$ac_ext
9781cat >>conftest.$ac_ext <<_ACEOF
9782/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009783$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009784 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009785int
9786main ()
9787{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009788static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009789test_array [0] = 0
9790
9791 ;
9792 return 0;
9793}
9794_ACEOF
9795rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009796if { (ac_try="$ac_compile"
9797case "(($ac_try" in
9798 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9799 *) ac_try_echo=$ac_try;;
9800esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009801eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009802 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009803 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009804 grep -v '^ *+' conftest.er1 >conftest.err
9805 rm -f conftest.er1
9806 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009808 (exit $ac_status); } && {
9809 test -z "$ac_c_werror_flag" ||
9810 test ! -s conftest.err
9811 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009812 ac_hi=$ac_mid
9813else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009814 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009815sed 's/^/| /' conftest.$ac_ext >&5
9816
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009817 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009818fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009819
9820rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009821done
9822case $ac_lo in
9823?*) ac_cv_sizeof_double=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009824'') if test "$ac_cv_type_double" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009825 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009826See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009827echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009828See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009829 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009830 else
9831 ac_cv_sizeof_double=0
9832 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009833esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009834else
Martin v. Löwis11437992002-04-12 09:54:03 +00009835 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009836/* confdefs.h. */
9837_ACEOF
9838cat confdefs.h >>conftest.$ac_ext
9839cat >>conftest.$ac_ext <<_ACEOF
9840/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009841$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009842 typedef double ac__type_sizeof_;
9843static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9844static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009845#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009846#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009847int
9848main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009849{
Martin v. Löwis11437992002-04-12 09:54:03 +00009850
9851 FILE *f = fopen ("conftest.val", "w");
9852 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009853 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009854 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009855 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009856 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009857 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009858 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009859 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009860 }
9861 else
9862 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009863 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009864 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009865 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009866 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009867 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009868 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009869
9870 ;
9871 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009872}
Martin v. Löwis11437992002-04-12 09:54:03 +00009873_ACEOF
9874rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009875if { (ac_try="$ac_link"
9876case "(($ac_try" in
9877 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9878 *) ac_try_echo=$ac_try;;
9879esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009880eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009881 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009882 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009883 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009884 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009885 { (case "(($ac_try" in
9886 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9887 *) ac_try_echo=$ac_try;;
9888esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009889eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009890 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009891 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009893 (exit $ac_status); }; }; then
9894 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009895else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009896 echo "$as_me: program exited with status $ac_status" >&5
9897echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009898sed 's/^/| /' conftest.$ac_ext >&5
9899
Martin v. Löwis11437992002-04-12 09:54:03 +00009900( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009901if test "$ac_cv_type_double" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009902 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009903See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009904echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009905See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009906 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009907 else
9908 ac_cv_sizeof_double=0
9909 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009910fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009911rm -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 +00009912fi
9913rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009914fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009915{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
9916echo "${ECHO_T}$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009917
9918
9919
Martin v. Löwis11437992002-04-12 09:54:03 +00009920cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009921#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00009922_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009923
9924
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009925{ echo "$as_me:$LINENO: checking for fpos_t" >&5
9926echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6; }
9927if test "${ac_cv_type_fpos_t+set}" = set; then
9928 echo $ECHO_N "(cached) $ECHO_C" >&6
9929else
9930 cat >conftest.$ac_ext <<_ACEOF
9931/* confdefs.h. */
9932_ACEOF
9933cat confdefs.h >>conftest.$ac_ext
9934cat >>conftest.$ac_ext <<_ACEOF
9935/* end confdefs.h. */
9936$ac_includes_default
9937typedef fpos_t ac__type_new_;
9938int
9939main ()
9940{
9941if ((ac__type_new_ *) 0)
9942 return 0;
9943if (sizeof (ac__type_new_))
9944 return 0;
9945 ;
9946 return 0;
9947}
9948_ACEOF
9949rm -f conftest.$ac_objext
9950if { (ac_try="$ac_compile"
9951case "(($ac_try" in
9952 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9953 *) ac_try_echo=$ac_try;;
9954esac
9955eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9956 (eval "$ac_compile") 2>conftest.er1
9957 ac_status=$?
9958 grep -v '^ *+' conftest.er1 >conftest.err
9959 rm -f conftest.er1
9960 cat conftest.err >&5
9961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9962 (exit $ac_status); } && {
9963 test -z "$ac_c_werror_flag" ||
9964 test ! -s conftest.err
9965 } && test -s conftest.$ac_objext; then
9966 ac_cv_type_fpos_t=yes
9967else
9968 echo "$as_me: failed program was:" >&5
9969sed 's/^/| /' conftest.$ac_ext >&5
9970
9971 ac_cv_type_fpos_t=no
9972fi
9973
9974rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9975fi
9976{ echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
9977echo "${ECHO_T}$ac_cv_type_fpos_t" >&6; }
9978
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009979# The cast to long int works around a bug in the HP C Compiler
9980# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9981# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9982# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009983{ echo "$as_me:$LINENO: checking size of fpos_t" >&5
9984echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009985if test "${ac_cv_sizeof_fpos_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009986 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009987else
Martin v. Löwis11437992002-04-12 09:54:03 +00009988 if test "$cross_compiling" = yes; then
9989 # Depending upon the size, compute the lo and hi bounds.
9990cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009991/* confdefs.h. */
9992_ACEOF
9993cat confdefs.h >>conftest.$ac_ext
9994cat >>conftest.$ac_ext <<_ACEOF
9995/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009996$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009997 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009998int
9999main ()
10000{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010001static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010002test_array [0] = 0
10003
10004 ;
10005 return 0;
10006}
10007_ACEOF
10008rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010009if { (ac_try="$ac_compile"
10010case "(($ac_try" in
10011 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10012 *) ac_try_echo=$ac_try;;
10013esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010014eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010015 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010016 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010017 grep -v '^ *+' conftest.er1 >conftest.err
10018 rm -f conftest.er1
10019 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010020 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010021 (exit $ac_status); } && {
10022 test -z "$ac_c_werror_flag" ||
10023 test ! -s conftest.err
10024 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010025 ac_lo=0 ac_mid=0
10026 while :; do
10027 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010028/* confdefs.h. */
10029_ACEOF
10030cat confdefs.h >>conftest.$ac_ext
10031cat >>conftest.$ac_ext <<_ACEOF
10032/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010033$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010034 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010035int
10036main ()
10037{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010038static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010039test_array [0] = 0
10040
10041 ;
10042 return 0;
10043}
10044_ACEOF
10045rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010046if { (ac_try="$ac_compile"
10047case "(($ac_try" in
10048 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10049 *) ac_try_echo=$ac_try;;
10050esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010051eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010052 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010053 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010054 grep -v '^ *+' conftest.er1 >conftest.err
10055 rm -f conftest.er1
10056 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010058 (exit $ac_status); } && {
10059 test -z "$ac_c_werror_flag" ||
10060 test ! -s conftest.err
10061 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010062 ac_hi=$ac_mid; break
10063else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010064 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010065sed 's/^/| /' conftest.$ac_ext >&5
10066
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010067 ac_lo=`expr $ac_mid + 1`
10068 if test $ac_lo -le $ac_mid; then
10069 ac_lo= ac_hi=
10070 break
10071 fi
10072 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010073fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010074
10075rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010076 done
10077else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010078 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010079sed 's/^/| /' conftest.$ac_ext >&5
10080
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010081 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010082/* confdefs.h. */
10083_ACEOF
10084cat confdefs.h >>conftest.$ac_ext
10085cat >>conftest.$ac_ext <<_ACEOF
10086/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010087$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010088 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010089int
10090main ()
10091{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010092static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010093test_array [0] = 0
10094
10095 ;
10096 return 0;
10097}
10098_ACEOF
10099rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010100if { (ac_try="$ac_compile"
10101case "(($ac_try" in
10102 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10103 *) ac_try_echo=$ac_try;;
10104esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010105eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010106 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010107 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010108 grep -v '^ *+' conftest.er1 >conftest.err
10109 rm -f conftest.er1
10110 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010112 (exit $ac_status); } && {
10113 test -z "$ac_c_werror_flag" ||
10114 test ! -s conftest.err
10115 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010116 ac_hi=-1 ac_mid=-1
10117 while :; do
10118 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010119/* confdefs.h. */
10120_ACEOF
10121cat confdefs.h >>conftest.$ac_ext
10122cat >>conftest.$ac_ext <<_ACEOF
10123/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010124$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010125 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010126int
10127main ()
10128{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010129static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010130test_array [0] = 0
10131
10132 ;
10133 return 0;
10134}
10135_ACEOF
10136rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010137if { (ac_try="$ac_compile"
10138case "(($ac_try" in
10139 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10140 *) ac_try_echo=$ac_try;;
10141esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010142eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010143 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010144 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010145 grep -v '^ *+' conftest.er1 >conftest.err
10146 rm -f conftest.er1
10147 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010149 (exit $ac_status); } && {
10150 test -z "$ac_c_werror_flag" ||
10151 test ! -s conftest.err
10152 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010153 ac_lo=$ac_mid; break
10154else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010155 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010156sed 's/^/| /' conftest.$ac_ext >&5
10157
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010158 ac_hi=`expr '(' $ac_mid ')' - 1`
10159 if test $ac_mid -le $ac_hi; then
10160 ac_lo= ac_hi=
10161 break
10162 fi
10163 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010164fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010165
10166rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010167 done
10168else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010169 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010170sed 's/^/| /' conftest.$ac_ext >&5
10171
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010172 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010173fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010174
10175rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010176fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010177
10178rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010179# Binary search between lo and hi bounds.
10180while test "x$ac_lo" != "x$ac_hi"; do
10181 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10182 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010183/* confdefs.h. */
10184_ACEOF
10185cat confdefs.h >>conftest.$ac_ext
10186cat >>conftest.$ac_ext <<_ACEOF
10187/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010188$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010189 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010190int
10191main ()
10192{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010193static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010194test_array [0] = 0
10195
10196 ;
10197 return 0;
10198}
10199_ACEOF
10200rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010201if { (ac_try="$ac_compile"
10202case "(($ac_try" in
10203 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10204 *) ac_try_echo=$ac_try;;
10205esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010206eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010207 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010208 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010209 grep -v '^ *+' conftest.er1 >conftest.err
10210 rm -f conftest.er1
10211 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010213 (exit $ac_status); } && {
10214 test -z "$ac_c_werror_flag" ||
10215 test ! -s conftest.err
10216 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010217 ac_hi=$ac_mid
10218else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010219 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010220sed 's/^/| /' conftest.$ac_ext >&5
10221
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010222 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010223fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010224
10225rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010226done
10227case $ac_lo in
10228?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010229'') if test "$ac_cv_type_fpos_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010230 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010231See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010232echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010233See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010234 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010235 else
10236 ac_cv_sizeof_fpos_t=0
10237 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010238esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010239else
Martin v. Löwis11437992002-04-12 09:54:03 +000010240 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010241/* confdefs.h. */
10242_ACEOF
10243cat confdefs.h >>conftest.$ac_ext
10244cat >>conftest.$ac_ext <<_ACEOF
10245/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010246$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010247 typedef fpos_t ac__type_sizeof_;
10248static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10249static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010250#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010251#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010252int
10253main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010254{
Martin v. Löwis11437992002-04-12 09:54:03 +000010255
10256 FILE *f = fopen ("conftest.val", "w");
10257 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010258 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010259 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010260 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010261 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010262 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010263 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010264 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010265 }
10266 else
10267 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010268 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010269 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010270 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010271 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010272 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010273 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010274
10275 ;
10276 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010277}
Martin v. Löwis11437992002-04-12 09:54:03 +000010278_ACEOF
10279rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010280if { (ac_try="$ac_link"
10281case "(($ac_try" in
10282 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10283 *) ac_try_echo=$ac_try;;
10284esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010285eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010286 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010287 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010288 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010289 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010290 { (case "(($ac_try" in
10291 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10292 *) ac_try_echo=$ac_try;;
10293esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010294eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010295 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010296 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010298 (exit $ac_status); }; }; then
10299 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010300else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010301 echo "$as_me: program exited with status $ac_status" >&5
10302echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010303sed 's/^/| /' conftest.$ac_ext >&5
10304
Martin v. Löwis11437992002-04-12 09:54:03 +000010305( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010306if test "$ac_cv_type_fpos_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010307 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010308See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010309echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010310See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010311 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010312 else
10313 ac_cv_sizeof_fpos_t=0
10314 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010315fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010316rm -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 +000010317fi
10318rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010319fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010320{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
10321echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010322
10323
10324
Martin v. Löwis11437992002-04-12 09:54:03 +000010325cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010326#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010327_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010328
Michael W. Hudson54241132001-12-07 15:38:26 +000010329
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010330{ echo "$as_me:$LINENO: checking for size_t" >&5
10331echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
10332if test "${ac_cv_type_size_t+set}" = set; then
10333 echo $ECHO_N "(cached) $ECHO_C" >&6
10334else
10335 cat >conftest.$ac_ext <<_ACEOF
10336/* confdefs.h. */
10337_ACEOF
10338cat confdefs.h >>conftest.$ac_ext
10339cat >>conftest.$ac_ext <<_ACEOF
10340/* end confdefs.h. */
10341$ac_includes_default
10342typedef size_t ac__type_new_;
10343int
10344main ()
10345{
10346if ((ac__type_new_ *) 0)
10347 return 0;
10348if (sizeof (ac__type_new_))
10349 return 0;
10350 ;
10351 return 0;
10352}
10353_ACEOF
10354rm -f conftest.$ac_objext
10355if { (ac_try="$ac_compile"
10356case "(($ac_try" in
10357 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10358 *) ac_try_echo=$ac_try;;
10359esac
10360eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10361 (eval "$ac_compile") 2>conftest.er1
10362 ac_status=$?
10363 grep -v '^ *+' conftest.er1 >conftest.err
10364 rm -f conftest.er1
10365 cat conftest.err >&5
10366 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10367 (exit $ac_status); } && {
10368 test -z "$ac_c_werror_flag" ||
10369 test ! -s conftest.err
10370 } && test -s conftest.$ac_objext; then
10371 ac_cv_type_size_t=yes
10372else
10373 echo "$as_me: failed program was:" >&5
10374sed 's/^/| /' conftest.$ac_ext >&5
10375
10376 ac_cv_type_size_t=no
10377fi
10378
10379rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10380fi
10381{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
10382echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
10383
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010384# The cast to long int works around a bug in the HP C Compiler
10385# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10386# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10387# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010388{ echo "$as_me:$LINENO: checking size of size_t" >&5
10389echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010390if test "${ac_cv_sizeof_size_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010391 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +000010392else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010393 if test "$cross_compiling" = yes; then
10394 # Depending upon the size, compute the lo and hi bounds.
10395cat >conftest.$ac_ext <<_ACEOF
10396/* confdefs.h. */
10397_ACEOF
10398cat confdefs.h >>conftest.$ac_ext
10399cat >>conftest.$ac_ext <<_ACEOF
10400/* end confdefs.h. */
10401$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010402 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010403int
10404main ()
10405{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010406static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010407test_array [0] = 0
10408
10409 ;
10410 return 0;
10411}
10412_ACEOF
10413rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010414if { (ac_try="$ac_compile"
10415case "(($ac_try" in
10416 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10417 *) ac_try_echo=$ac_try;;
10418esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010419eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010420 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010421 ac_status=$?
10422 grep -v '^ *+' conftest.er1 >conftest.err
10423 rm -f conftest.er1
10424 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010426 (exit $ac_status); } && {
10427 test -z "$ac_c_werror_flag" ||
10428 test ! -s conftest.err
10429 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010430 ac_lo=0 ac_mid=0
10431 while :; do
10432 cat >conftest.$ac_ext <<_ACEOF
10433/* confdefs.h. */
10434_ACEOF
10435cat confdefs.h >>conftest.$ac_ext
10436cat >>conftest.$ac_ext <<_ACEOF
10437/* end confdefs.h. */
10438$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010439 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010440int
10441main ()
10442{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010443static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010444test_array [0] = 0
10445
10446 ;
10447 return 0;
10448}
10449_ACEOF
10450rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010451if { (ac_try="$ac_compile"
10452case "(($ac_try" in
10453 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10454 *) ac_try_echo=$ac_try;;
10455esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010456eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010457 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010458 ac_status=$?
10459 grep -v '^ *+' conftest.er1 >conftest.err
10460 rm -f conftest.er1
10461 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010463 (exit $ac_status); } && {
10464 test -z "$ac_c_werror_flag" ||
10465 test ! -s conftest.err
10466 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010467 ac_hi=$ac_mid; break
10468else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010469 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010470sed 's/^/| /' conftest.$ac_ext >&5
10471
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010472 ac_lo=`expr $ac_mid + 1`
10473 if test $ac_lo -le $ac_mid; then
10474 ac_lo= ac_hi=
10475 break
10476 fi
10477 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010478fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010479
10480rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010481 done
10482else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010483 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010484sed 's/^/| /' conftest.$ac_ext >&5
10485
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010486 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +000010487/* confdefs.h. */
10488_ACEOF
10489cat confdefs.h >>conftest.$ac_ext
10490cat >>conftest.$ac_ext <<_ACEOF
10491/* end confdefs.h. */
10492$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010493 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010494int
10495main ()
10496{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010497static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010498test_array [0] = 0
10499
10500 ;
10501 return 0;
10502}
10503_ACEOF
10504rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010505if { (ac_try="$ac_compile"
10506case "(($ac_try" in
10507 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10508 *) ac_try_echo=$ac_try;;
10509esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010510eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010511 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010512 ac_status=$?
10513 grep -v '^ *+' conftest.er1 >conftest.err
10514 rm -f conftest.er1
10515 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010517 (exit $ac_status); } && {
10518 test -z "$ac_c_werror_flag" ||
10519 test ! -s conftest.err
10520 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010521 ac_hi=-1 ac_mid=-1
10522 while :; do
10523 cat >conftest.$ac_ext <<_ACEOF
10524/* confdefs.h. */
10525_ACEOF
10526cat confdefs.h >>conftest.$ac_ext
10527cat >>conftest.$ac_ext <<_ACEOF
10528/* end confdefs.h. */
10529$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010530 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010531int
10532main ()
10533{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010534static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010535test_array [0] = 0
10536
10537 ;
10538 return 0;
10539}
10540_ACEOF
10541rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010542if { (ac_try="$ac_compile"
10543case "(($ac_try" in
10544 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10545 *) ac_try_echo=$ac_try;;
10546esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010547eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010548 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010549 ac_status=$?
10550 grep -v '^ *+' conftest.er1 >conftest.err
10551 rm -f conftest.er1
10552 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010554 (exit $ac_status); } && {
10555 test -z "$ac_c_werror_flag" ||
10556 test ! -s conftest.err
10557 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010558 ac_lo=$ac_mid; break
10559else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010560 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010561sed 's/^/| /' conftest.$ac_ext >&5
10562
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010563 ac_hi=`expr '(' $ac_mid ')' - 1`
10564 if test $ac_mid -le $ac_hi; then
10565 ac_lo= ac_hi=
10566 break
10567 fi
10568 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010569fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010570
10571rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010572 done
10573else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010574 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010575sed 's/^/| /' conftest.$ac_ext >&5
10576
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010577 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +000010578fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010579
10580rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010581fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010582
10583rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010584# Binary search between lo and hi bounds.
10585while test "x$ac_lo" != "x$ac_hi"; do
10586 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10587 cat >conftest.$ac_ext <<_ACEOF
10588/* confdefs.h. */
10589_ACEOF
10590cat confdefs.h >>conftest.$ac_ext
10591cat >>conftest.$ac_ext <<_ACEOF
10592/* end confdefs.h. */
10593$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010594 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010595int
10596main ()
10597{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010598static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010599test_array [0] = 0
10600
10601 ;
10602 return 0;
10603}
10604_ACEOF
10605rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010606if { (ac_try="$ac_compile"
10607case "(($ac_try" in
10608 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10609 *) ac_try_echo=$ac_try;;
10610esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010611eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010612 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010613 ac_status=$?
10614 grep -v '^ *+' conftest.er1 >conftest.err
10615 rm -f conftest.er1
10616 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010618 (exit $ac_status); } && {
10619 test -z "$ac_c_werror_flag" ||
10620 test ! -s conftest.err
10621 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010622 ac_hi=$ac_mid
10623else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010624 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010625sed 's/^/| /' conftest.$ac_ext >&5
10626
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010627 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010628fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010629
10630rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010631done
10632case $ac_lo in
10633?*) ac_cv_sizeof_size_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010634'') if test "$ac_cv_type_size_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010635 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010636See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010637echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010638See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010639 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010640 else
10641 ac_cv_sizeof_size_t=0
10642 fi ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010643esac
10644else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010645 cat >conftest.$ac_ext <<_ACEOF
10646/* confdefs.h. */
10647_ACEOF
10648cat confdefs.h >>conftest.$ac_ext
10649cat >>conftest.$ac_ext <<_ACEOF
10650/* end confdefs.h. */
10651$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010652 typedef size_t ac__type_sizeof_;
10653static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10654static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010655#include <stdio.h>
10656#include <stdlib.h>
10657int
10658main ()
10659{
10660
10661 FILE *f = fopen ("conftest.val", "w");
10662 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010663 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010664 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010665 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010666 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010667 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010668 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010669 fprintf (f, "%ld\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010670 }
10671 else
10672 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010673 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010674 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010675 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010676 fprintf (f, "%lu\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010677 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010678 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010679
10680 ;
10681 return 0;
10682}
10683_ACEOF
10684rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010685if { (ac_try="$ac_link"
10686case "(($ac_try" in
10687 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10688 *) ac_try_echo=$ac_try;;
10689esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010690eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010691 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010692 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010694 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010695 { (case "(($ac_try" in
10696 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10697 *) ac_try_echo=$ac_try;;
10698esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010699eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010700 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010701 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010703 (exit $ac_status); }; }; then
10704 ac_cv_sizeof_size_t=`cat conftest.val`
10705else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010706 echo "$as_me: program exited with status $ac_status" >&5
10707echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010708sed 's/^/| /' conftest.$ac_ext >&5
10709
10710( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010711if test "$ac_cv_type_size_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010712 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010713See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010714echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010715See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010716 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010717 else
10718 ac_cv_sizeof_size_t=0
10719 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +000010720fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010721rm -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 +000010722fi
10723rm -f conftest.val
Martin v. Löwis18e16552006-02-15 17:27:45 +000010724fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010725{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
10726echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010727
10728
10729
Martin v. Löwis18e16552006-02-15 17:27:45 +000010730cat >>confdefs.h <<_ACEOF
10731#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
10732_ACEOF
10733
10734
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010735{ echo "$as_me:$LINENO: checking for pid_t" >&5
10736echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
10737if test "${ac_cv_type_pid_t+set}" = set; then
10738 echo $ECHO_N "(cached) $ECHO_C" >&6
10739else
10740 cat >conftest.$ac_ext <<_ACEOF
10741/* confdefs.h. */
10742_ACEOF
10743cat confdefs.h >>conftest.$ac_ext
10744cat >>conftest.$ac_ext <<_ACEOF
10745/* end confdefs.h. */
10746$ac_includes_default
10747typedef pid_t ac__type_new_;
10748int
10749main ()
10750{
10751if ((ac__type_new_ *) 0)
10752 return 0;
10753if (sizeof (ac__type_new_))
10754 return 0;
10755 ;
10756 return 0;
10757}
10758_ACEOF
10759rm -f conftest.$ac_objext
10760if { (ac_try="$ac_compile"
10761case "(($ac_try" in
10762 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10763 *) ac_try_echo=$ac_try;;
10764esac
10765eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10766 (eval "$ac_compile") 2>conftest.er1
10767 ac_status=$?
10768 grep -v '^ *+' conftest.er1 >conftest.err
10769 rm -f conftest.er1
10770 cat conftest.err >&5
10771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10772 (exit $ac_status); } && {
10773 test -z "$ac_c_werror_flag" ||
10774 test ! -s conftest.err
10775 } && test -s conftest.$ac_objext; then
10776 ac_cv_type_pid_t=yes
10777else
10778 echo "$as_me: failed program was:" >&5
10779sed 's/^/| /' conftest.$ac_ext >&5
10780
10781 ac_cv_type_pid_t=no
10782fi
10783
10784rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10785fi
10786{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10787echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
10788
Christian Heimes400adb02008-02-01 08:12:03 +000010789# The cast to long int works around a bug in the HP C Compiler
10790# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10791# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10792# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010793{ echo "$as_me:$LINENO: checking size of pid_t" >&5
10794echo $ECHO_N "checking size of pid_t... $ECHO_C" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +000010795if test "${ac_cv_sizeof_pid_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010796 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes400adb02008-02-01 08:12:03 +000010797else
10798 if test "$cross_compiling" = yes; then
10799 # Depending upon the size, compute the lo and hi bounds.
10800cat >conftest.$ac_ext <<_ACEOF
10801/* confdefs.h. */
10802_ACEOF
10803cat confdefs.h >>conftest.$ac_ext
10804cat >>conftest.$ac_ext <<_ACEOF
10805/* end confdefs.h. */
10806$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010807 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010808int
10809main ()
10810{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010811static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Christian Heimes400adb02008-02-01 08:12:03 +000010812test_array [0] = 0
10813
10814 ;
10815 return 0;
10816}
10817_ACEOF
10818rm -f conftest.$ac_objext
10819if { (ac_try="$ac_compile"
10820case "(($ac_try" in
10821 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10822 *) ac_try_echo=$ac_try;;
10823esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010824eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010825 (eval "$ac_compile") 2>conftest.er1
10826 ac_status=$?
10827 grep -v '^ *+' conftest.er1 >conftest.err
10828 rm -f conftest.er1
10829 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010831 (exit $ac_status); } && {
10832 test -z "$ac_c_werror_flag" ||
10833 test ! -s conftest.err
10834 } && test -s conftest.$ac_objext; then
10835 ac_lo=0 ac_mid=0
10836 while :; do
10837 cat >conftest.$ac_ext <<_ACEOF
10838/* confdefs.h. */
10839_ACEOF
10840cat confdefs.h >>conftest.$ac_ext
10841cat >>conftest.$ac_ext <<_ACEOF
10842/* end confdefs.h. */
10843$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010844 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010845int
10846main ()
10847{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010848static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000010849test_array [0] = 0
10850
10851 ;
10852 return 0;
10853}
10854_ACEOF
10855rm -f conftest.$ac_objext
10856if { (ac_try="$ac_compile"
10857case "(($ac_try" in
10858 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10859 *) ac_try_echo=$ac_try;;
10860esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010861eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010862 (eval "$ac_compile") 2>conftest.er1
10863 ac_status=$?
10864 grep -v '^ *+' conftest.er1 >conftest.err
10865 rm -f conftest.er1
10866 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010868 (exit $ac_status); } && {
10869 test -z "$ac_c_werror_flag" ||
10870 test ! -s conftest.err
10871 } && test -s conftest.$ac_objext; then
10872 ac_hi=$ac_mid; break
10873else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010874 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010875sed 's/^/| /' conftest.$ac_ext >&5
10876
10877 ac_lo=`expr $ac_mid + 1`
10878 if test $ac_lo -le $ac_mid; then
10879 ac_lo= ac_hi=
10880 break
10881 fi
10882 ac_mid=`expr 2 '*' $ac_mid + 1`
10883fi
10884
10885rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10886 done
10887else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010888 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010889sed 's/^/| /' conftest.$ac_ext >&5
10890
10891 cat >conftest.$ac_ext <<_ACEOF
10892/* confdefs.h. */
10893_ACEOF
10894cat confdefs.h >>conftest.$ac_ext
10895cat >>conftest.$ac_ext <<_ACEOF
10896/* end confdefs.h. */
10897$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010898 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010899int
10900main ()
10901{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010902static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Christian Heimes400adb02008-02-01 08:12:03 +000010903test_array [0] = 0
10904
10905 ;
10906 return 0;
10907}
10908_ACEOF
10909rm -f conftest.$ac_objext
10910if { (ac_try="$ac_compile"
10911case "(($ac_try" in
10912 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10913 *) ac_try_echo=$ac_try;;
10914esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010915eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010916 (eval "$ac_compile") 2>conftest.er1
10917 ac_status=$?
10918 grep -v '^ *+' conftest.er1 >conftest.err
10919 rm -f conftest.er1
10920 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010922 (exit $ac_status); } && {
10923 test -z "$ac_c_werror_flag" ||
10924 test ! -s conftest.err
10925 } && test -s conftest.$ac_objext; then
10926 ac_hi=-1 ac_mid=-1
10927 while :; do
10928 cat >conftest.$ac_ext <<_ACEOF
10929/* confdefs.h. */
10930_ACEOF
10931cat confdefs.h >>conftest.$ac_ext
10932cat >>conftest.$ac_ext <<_ACEOF
10933/* end confdefs.h. */
10934$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010935 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010936int
10937main ()
10938{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010939static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000010940test_array [0] = 0
10941
10942 ;
10943 return 0;
10944}
10945_ACEOF
10946rm -f conftest.$ac_objext
10947if { (ac_try="$ac_compile"
10948case "(($ac_try" in
10949 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10950 *) ac_try_echo=$ac_try;;
10951esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010952eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010953 (eval "$ac_compile") 2>conftest.er1
10954 ac_status=$?
10955 grep -v '^ *+' conftest.er1 >conftest.err
10956 rm -f conftest.er1
10957 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010959 (exit $ac_status); } && {
10960 test -z "$ac_c_werror_flag" ||
10961 test ! -s conftest.err
10962 } && test -s conftest.$ac_objext; then
10963 ac_lo=$ac_mid; break
10964else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010965 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010966sed 's/^/| /' conftest.$ac_ext >&5
10967
10968 ac_hi=`expr '(' $ac_mid ')' - 1`
10969 if test $ac_mid -le $ac_hi; then
10970 ac_lo= ac_hi=
10971 break
10972 fi
10973 ac_mid=`expr 2 '*' $ac_mid`
10974fi
10975
10976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10977 done
10978else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010979 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010980sed 's/^/| /' conftest.$ac_ext >&5
10981
10982 ac_lo= ac_hi=
10983fi
10984
10985rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10986fi
10987
10988rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10989# Binary search between lo and hi bounds.
10990while test "x$ac_lo" != "x$ac_hi"; do
10991 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10992 cat >conftest.$ac_ext <<_ACEOF
10993/* confdefs.h. */
10994_ACEOF
10995cat confdefs.h >>conftest.$ac_ext
10996cat >>conftest.$ac_ext <<_ACEOF
10997/* end confdefs.h. */
10998$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010999 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000011000int
11001main ()
11002{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011003static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000011004test_array [0] = 0
11005
11006 ;
11007 return 0;
11008}
11009_ACEOF
11010rm -f conftest.$ac_objext
11011if { (ac_try="$ac_compile"
11012case "(($ac_try" in
11013 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11014 *) ac_try_echo=$ac_try;;
11015esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011016eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011017 (eval "$ac_compile") 2>conftest.er1
11018 ac_status=$?
11019 grep -v '^ *+' conftest.er1 >conftest.err
11020 rm -f conftest.er1
11021 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011023 (exit $ac_status); } && {
11024 test -z "$ac_c_werror_flag" ||
11025 test ! -s conftest.err
11026 } && test -s conftest.$ac_objext; then
11027 ac_hi=$ac_mid
11028else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011029 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011030sed 's/^/| /' conftest.$ac_ext >&5
11031
11032 ac_lo=`expr '(' $ac_mid ')' + 1`
11033fi
11034
11035rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11036done
11037case $ac_lo in
11038?*) ac_cv_sizeof_pid_t=$ac_lo;;
11039'') if test "$ac_cv_type_pid_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011040 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011041See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011042echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011043See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011044 { (exit 77); exit 77; }; }
Christian Heimes400adb02008-02-01 08:12:03 +000011045 else
11046 ac_cv_sizeof_pid_t=0
11047 fi ;;
11048esac
11049else
11050 cat >conftest.$ac_ext <<_ACEOF
11051/* confdefs.h. */
11052_ACEOF
11053cat confdefs.h >>conftest.$ac_ext
11054cat >>conftest.$ac_ext <<_ACEOF
11055/* end confdefs.h. */
11056$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011057 typedef pid_t ac__type_sizeof_;
11058static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11059static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Christian Heimes400adb02008-02-01 08:12:03 +000011060#include <stdio.h>
11061#include <stdlib.h>
11062int
11063main ()
11064{
11065
11066 FILE *f = fopen ("conftest.val", "w");
11067 if (! f)
11068 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011069 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Christian Heimes400adb02008-02-01 08:12:03 +000011070 {
11071 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011072 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes400adb02008-02-01 08:12:03 +000011073 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011074 fprintf (f, "%ld\n", i);
Christian Heimes400adb02008-02-01 08:12:03 +000011075 }
11076 else
11077 {
11078 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011079 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes400adb02008-02-01 08:12:03 +000011080 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011081 fprintf (f, "%lu\n", i);
Christian Heimes400adb02008-02-01 08:12:03 +000011082 }
11083 return ferror (f) || fclose (f) != 0;
11084
11085 ;
11086 return 0;
11087}
11088_ACEOF
11089rm -f conftest$ac_exeext
11090if { (ac_try="$ac_link"
11091case "(($ac_try" in
11092 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11093 *) ac_try_echo=$ac_try;;
11094esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011095eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011096 (eval "$ac_link") 2>&5
11097 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011099 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11100 { (case "(($ac_try" in
11101 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11102 *) ac_try_echo=$ac_try;;
11103esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011104eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011105 (eval "$ac_try") 2>&5
11106 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011108 (exit $ac_status); }; }; then
11109 ac_cv_sizeof_pid_t=`cat conftest.val`
11110else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011111 echo "$as_me: program exited with status $ac_status" >&5
11112echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011113sed 's/^/| /' conftest.$ac_ext >&5
11114
11115( exit $ac_status )
11116if test "$ac_cv_type_pid_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011117 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011118See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011119echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011120See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011121 { (exit 77); exit 77; }; }
Christian Heimes400adb02008-02-01 08:12:03 +000011122 else
11123 ac_cv_sizeof_pid_t=0
11124 fi
11125fi
11126rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11127fi
11128rm -f conftest.val
11129fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011130{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5
11131echo "${ECHO_T}$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +000011132
11133
11134
11135cat >>confdefs.h <<_ACEOF
11136#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
11137_ACEOF
11138
11139
Michael W. Hudson54241132001-12-07 15:38:26 +000011140
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011141{ echo "$as_me:$LINENO: checking for long long support" >&5
11142echo $ECHO_N "checking for long long support... $ECHO_C" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011143have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011144cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011145/* confdefs.h. */
11146_ACEOF
11147cat confdefs.h >>conftest.$ac_ext
11148cat >>conftest.$ac_ext <<_ACEOF
11149/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011150
Martin v. Löwis11437992002-04-12 09:54:03 +000011151int
11152main ()
11153{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011154long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011155 ;
11156 return 0;
11157}
11158_ACEOF
11159rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011160if { (ac_try="$ac_compile"
11161case "(($ac_try" in
11162 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11163 *) ac_try_echo=$ac_try;;
11164esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011165eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011166 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011167 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011168 grep -v '^ *+' conftest.er1 >conftest.err
11169 rm -f conftest.er1
11170 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011172 (exit $ac_status); } && {
11173 test -z "$ac_c_werror_flag" ||
11174 test ! -s conftest.err
11175 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011176
11177
11178cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011179#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011180_ACEOF
11181
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011182 have_long_long=yes
11183
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011184else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011185 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011186sed 's/^/| /' conftest.$ac_ext >&5
11187
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011188
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011189fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011190
11191rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011192{ echo "$as_me:$LINENO: result: $have_long_long" >&5
11193echo "${ECHO_T}$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000011194if test "$have_long_long" = yes ; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011195{ echo "$as_me:$LINENO: checking for long long" >&5
11196echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
11197if test "${ac_cv_type_long_long+set}" = set; then
11198 echo $ECHO_N "(cached) $ECHO_C" >&6
11199else
11200 cat >conftest.$ac_ext <<_ACEOF
11201/* confdefs.h. */
11202_ACEOF
11203cat confdefs.h >>conftest.$ac_ext
11204cat >>conftest.$ac_ext <<_ACEOF
11205/* end confdefs.h. */
11206$ac_includes_default
11207typedef long long ac__type_new_;
11208int
11209main ()
11210{
11211if ((ac__type_new_ *) 0)
11212 return 0;
11213if (sizeof (ac__type_new_))
11214 return 0;
11215 ;
11216 return 0;
11217}
11218_ACEOF
11219rm -f conftest.$ac_objext
11220if { (ac_try="$ac_compile"
11221case "(($ac_try" in
11222 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11223 *) ac_try_echo=$ac_try;;
11224esac
11225eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11226 (eval "$ac_compile") 2>conftest.er1
11227 ac_status=$?
11228 grep -v '^ *+' conftest.er1 >conftest.err
11229 rm -f conftest.er1
11230 cat conftest.err >&5
11231 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11232 (exit $ac_status); } && {
11233 test -z "$ac_c_werror_flag" ||
11234 test ! -s conftest.err
11235 } && test -s conftest.$ac_objext; then
11236 ac_cv_type_long_long=yes
11237else
11238 echo "$as_me: failed program was:" >&5
11239sed 's/^/| /' conftest.$ac_ext >&5
11240
11241 ac_cv_type_long_long=no
11242fi
11243
11244rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11245fi
11246{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
11247echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
11248
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011249# The cast to long int works around a bug in the HP C Compiler
11250# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11251# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11252# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011253{ echo "$as_me:$LINENO: checking size of long long" >&5
11254echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011255if test "${ac_cv_sizeof_long_long+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011256 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011257else
Martin v. Löwis11437992002-04-12 09:54:03 +000011258 if test "$cross_compiling" = yes; then
11259 # Depending upon the size, compute the lo and hi bounds.
11260cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011261/* confdefs.h. */
11262_ACEOF
11263cat confdefs.h >>conftest.$ac_ext
11264cat >>conftest.$ac_ext <<_ACEOF
11265/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011266$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011267 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011268int
11269main ()
11270{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011271static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011272test_array [0] = 0
11273
11274 ;
11275 return 0;
11276}
11277_ACEOF
11278rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011279if { (ac_try="$ac_compile"
11280case "(($ac_try" in
11281 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11282 *) ac_try_echo=$ac_try;;
11283esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011284eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011285 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011286 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011287 grep -v '^ *+' conftest.er1 >conftest.err
11288 rm -f conftest.er1
11289 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011291 (exit $ac_status); } && {
11292 test -z "$ac_c_werror_flag" ||
11293 test ! -s conftest.err
11294 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011295 ac_lo=0 ac_mid=0
11296 while :; do
11297 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011298/* confdefs.h. */
11299_ACEOF
11300cat confdefs.h >>conftest.$ac_ext
11301cat >>conftest.$ac_ext <<_ACEOF
11302/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011303$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011304 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011305int
11306main ()
11307{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011308static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011309test_array [0] = 0
11310
11311 ;
11312 return 0;
11313}
11314_ACEOF
11315rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011316if { (ac_try="$ac_compile"
11317case "(($ac_try" in
11318 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11319 *) ac_try_echo=$ac_try;;
11320esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011321eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011322 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011323 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011324 grep -v '^ *+' conftest.er1 >conftest.err
11325 rm -f conftest.er1
11326 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011328 (exit $ac_status); } && {
11329 test -z "$ac_c_werror_flag" ||
11330 test ! -s conftest.err
11331 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011332 ac_hi=$ac_mid; break
11333else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011334 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011335sed 's/^/| /' conftest.$ac_ext >&5
11336
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011337 ac_lo=`expr $ac_mid + 1`
11338 if test $ac_lo -le $ac_mid; then
11339 ac_lo= ac_hi=
11340 break
11341 fi
11342 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011343fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011344
11345rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011346 done
11347else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011348 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011349sed 's/^/| /' conftest.$ac_ext >&5
11350
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011351 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011352/* confdefs.h. */
11353_ACEOF
11354cat confdefs.h >>conftest.$ac_ext
11355cat >>conftest.$ac_ext <<_ACEOF
11356/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011357$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011358 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011359int
11360main ()
11361{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011362static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011363test_array [0] = 0
11364
11365 ;
11366 return 0;
11367}
11368_ACEOF
11369rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011370if { (ac_try="$ac_compile"
11371case "(($ac_try" in
11372 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11373 *) ac_try_echo=$ac_try;;
11374esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011375eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011376 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011377 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011378 grep -v '^ *+' conftest.er1 >conftest.err
11379 rm -f conftest.er1
11380 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011382 (exit $ac_status); } && {
11383 test -z "$ac_c_werror_flag" ||
11384 test ! -s conftest.err
11385 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011386 ac_hi=-1 ac_mid=-1
11387 while :; do
11388 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011389/* confdefs.h. */
11390_ACEOF
11391cat confdefs.h >>conftest.$ac_ext
11392cat >>conftest.$ac_ext <<_ACEOF
11393/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011394$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011395 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011396int
11397main ()
11398{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011399static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011400test_array [0] = 0
11401
11402 ;
11403 return 0;
11404}
11405_ACEOF
11406rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011407if { (ac_try="$ac_compile"
11408case "(($ac_try" in
11409 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11410 *) ac_try_echo=$ac_try;;
11411esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011412eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011413 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011414 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011415 grep -v '^ *+' conftest.er1 >conftest.err
11416 rm -f conftest.er1
11417 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011419 (exit $ac_status); } && {
11420 test -z "$ac_c_werror_flag" ||
11421 test ! -s conftest.err
11422 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011423 ac_lo=$ac_mid; break
11424else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011425 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011426sed 's/^/| /' conftest.$ac_ext >&5
11427
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011428 ac_hi=`expr '(' $ac_mid ')' - 1`
11429 if test $ac_mid -le $ac_hi; then
11430 ac_lo= ac_hi=
11431 break
11432 fi
11433 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000011434fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011435
11436rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011437 done
11438else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011439 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011440sed 's/^/| /' conftest.$ac_ext >&5
11441
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011442 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000011443fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011444
11445rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011446fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011447
11448rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011449# Binary search between lo and hi bounds.
11450while test "x$ac_lo" != "x$ac_hi"; do
11451 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11452 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011453/* confdefs.h. */
11454_ACEOF
11455cat confdefs.h >>conftest.$ac_ext
11456cat >>conftest.$ac_ext <<_ACEOF
11457/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011458$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011459 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011460int
11461main ()
11462{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011463static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011464test_array [0] = 0
11465
11466 ;
11467 return 0;
11468}
11469_ACEOF
11470rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011471if { (ac_try="$ac_compile"
11472case "(($ac_try" in
11473 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11474 *) ac_try_echo=$ac_try;;
11475esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011476eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011477 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011478 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011479 grep -v '^ *+' conftest.er1 >conftest.err
11480 rm -f conftest.er1
11481 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011483 (exit $ac_status); } && {
11484 test -z "$ac_c_werror_flag" ||
11485 test ! -s conftest.err
11486 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011487 ac_hi=$ac_mid
11488else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011489 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011490sed 's/^/| /' conftest.$ac_ext >&5
11491
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011492 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011493fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011494
11495rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011496done
11497case $ac_lo in
11498?*) ac_cv_sizeof_long_long=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011499'') if test "$ac_cv_type_long_long" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011500 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011501See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011502echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011503See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011504 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011505 else
11506 ac_cv_sizeof_long_long=0
11507 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011508esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011509else
Martin v. Löwis11437992002-04-12 09:54:03 +000011510 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011511/* confdefs.h. */
11512_ACEOF
11513cat confdefs.h >>conftest.$ac_ext
11514cat >>conftest.$ac_ext <<_ACEOF
11515/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011516$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011517 typedef long long ac__type_sizeof_;
11518static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11519static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011520#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011521#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011522int
11523main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011524{
Martin v. Löwis11437992002-04-12 09:54:03 +000011525
11526 FILE *f = fopen ("conftest.val", "w");
11527 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011528 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011529 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011530 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011531 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011532 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011533 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011534 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011535 }
11536 else
11537 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011538 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011539 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011540 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011541 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011542 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011543 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011544
11545 ;
11546 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011547}
Martin v. Löwis11437992002-04-12 09:54:03 +000011548_ACEOF
11549rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011550if { (ac_try="$ac_link"
11551case "(($ac_try" in
11552 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11553 *) ac_try_echo=$ac_try;;
11554esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011555eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011556 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011557 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011559 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011560 { (case "(($ac_try" in
11561 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11562 *) ac_try_echo=$ac_try;;
11563esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011564eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011565 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011566 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011568 (exit $ac_status); }; }; then
11569 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011570else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011571 echo "$as_me: program exited with status $ac_status" >&5
11572echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011573sed 's/^/| /' conftest.$ac_ext >&5
11574
Martin v. Löwis11437992002-04-12 09:54:03 +000011575( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011576if test "$ac_cv_type_long_long" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011577 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011578See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011579echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011580See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011581 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011582 else
11583 ac_cv_sizeof_long_long=0
11584 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011585fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011586rm -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 +000011587fi
11588rm -f conftest.val
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011589fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011590{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
11591echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011592
11593
11594
Martin v. Löwis11437992002-04-12 09:54:03 +000011595cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011596#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000011597_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011598
Michael W. Hudson54241132001-12-07 15:38:26 +000011599
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011600fi
11601
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011602{ echo "$as_me:$LINENO: checking for long double support" >&5
11603echo $ECHO_N "checking for long double support... $ECHO_C" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011604have_long_double=no
11605cat >conftest.$ac_ext <<_ACEOF
11606/* confdefs.h. */
11607_ACEOF
11608cat confdefs.h >>conftest.$ac_ext
11609cat >>conftest.$ac_ext <<_ACEOF
11610/* end confdefs.h. */
11611
11612int
11613main ()
11614{
11615long double x; x = (long double)0;
11616 ;
11617 return 0;
11618}
11619_ACEOF
11620rm -f conftest.$ac_objext
11621if { (ac_try="$ac_compile"
11622case "(($ac_try" in
11623 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11624 *) ac_try_echo=$ac_try;;
11625esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011626eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011627 (eval "$ac_compile") 2>conftest.er1
11628 ac_status=$?
11629 grep -v '^ *+' conftest.er1 >conftest.err
11630 rm -f conftest.er1
11631 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011633 (exit $ac_status); } && {
11634 test -z "$ac_c_werror_flag" ||
11635 test ! -s conftest.err
11636 } && test -s conftest.$ac_objext; then
11637
11638
11639cat >>confdefs.h <<\_ACEOF
11640#define HAVE_LONG_DOUBLE 1
11641_ACEOF
11642
11643 have_long_double=yes
11644
11645else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011646 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011647sed 's/^/| /' conftest.$ac_ext >&5
11648
11649
11650fi
11651
11652rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011653{ echo "$as_me:$LINENO: result: $have_long_double" >&5
11654echo "${ECHO_T}$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011655if test "$have_long_double" = yes ; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011656{ echo "$as_me:$LINENO: checking for long double" >&5
11657echo $ECHO_N "checking for long double... $ECHO_C" >&6; }
11658if test "${ac_cv_type_long_double+set}" = set; then
11659 echo $ECHO_N "(cached) $ECHO_C" >&6
11660else
11661 cat >conftest.$ac_ext <<_ACEOF
11662/* confdefs.h. */
11663_ACEOF
11664cat confdefs.h >>conftest.$ac_ext
11665cat >>conftest.$ac_ext <<_ACEOF
11666/* end confdefs.h. */
11667$ac_includes_default
11668typedef long double ac__type_new_;
11669int
11670main ()
11671{
11672if ((ac__type_new_ *) 0)
11673 return 0;
11674if (sizeof (ac__type_new_))
11675 return 0;
11676 ;
11677 return 0;
11678}
11679_ACEOF
11680rm -f conftest.$ac_objext
11681if { (ac_try="$ac_compile"
11682case "(($ac_try" in
11683 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11684 *) ac_try_echo=$ac_try;;
11685esac
11686eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11687 (eval "$ac_compile") 2>conftest.er1
11688 ac_status=$?
11689 grep -v '^ *+' conftest.er1 >conftest.err
11690 rm -f conftest.er1
11691 cat conftest.err >&5
11692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11693 (exit $ac_status); } && {
11694 test -z "$ac_c_werror_flag" ||
11695 test ! -s conftest.err
11696 } && test -s conftest.$ac_objext; then
11697 ac_cv_type_long_double=yes
11698else
11699 echo "$as_me: failed program was:" >&5
11700sed 's/^/| /' conftest.$ac_ext >&5
11701
11702 ac_cv_type_long_double=no
11703fi
11704
11705rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11706fi
11707{ echo "$as_me:$LINENO: result: $ac_cv_type_long_double" >&5
11708echo "${ECHO_T}$ac_cv_type_long_double" >&6; }
11709
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011710# The cast to long int works around a bug in the HP C Compiler
11711# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11712# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11713# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011714{ echo "$as_me:$LINENO: checking size of long double" >&5
11715echo $ECHO_N "checking size of long double... $ECHO_C" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011716if test "${ac_cv_sizeof_long_double+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011717 echo $ECHO_N "(cached) $ECHO_C" >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011718else
11719 if test "$cross_compiling" = yes; then
11720 # Depending upon the size, compute the lo and hi bounds.
11721cat >conftest.$ac_ext <<_ACEOF
11722/* confdefs.h. */
11723_ACEOF
11724cat confdefs.h >>conftest.$ac_ext
11725cat >>conftest.$ac_ext <<_ACEOF
11726/* end confdefs.h. */
11727$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011728 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011729int
11730main ()
11731{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011732static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011733test_array [0] = 0
11734
11735 ;
11736 return 0;
11737}
11738_ACEOF
11739rm -f conftest.$ac_objext
11740if { (ac_try="$ac_compile"
11741case "(($ac_try" in
11742 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11743 *) ac_try_echo=$ac_try;;
11744esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011745eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011746 (eval "$ac_compile") 2>conftest.er1
11747 ac_status=$?
11748 grep -v '^ *+' conftest.er1 >conftest.err
11749 rm -f conftest.er1
11750 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011752 (exit $ac_status); } && {
11753 test -z "$ac_c_werror_flag" ||
11754 test ! -s conftest.err
11755 } && test -s conftest.$ac_objext; then
11756 ac_lo=0 ac_mid=0
11757 while :; do
11758 cat >conftest.$ac_ext <<_ACEOF
11759/* confdefs.h. */
11760_ACEOF
11761cat confdefs.h >>conftest.$ac_ext
11762cat >>conftest.$ac_ext <<_ACEOF
11763/* end confdefs.h. */
11764$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011765 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011766int
11767main ()
11768{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011769static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011770test_array [0] = 0
11771
11772 ;
11773 return 0;
11774}
11775_ACEOF
11776rm -f conftest.$ac_objext
11777if { (ac_try="$ac_compile"
11778case "(($ac_try" in
11779 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11780 *) ac_try_echo=$ac_try;;
11781esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011782eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011783 (eval "$ac_compile") 2>conftest.er1
11784 ac_status=$?
11785 grep -v '^ *+' conftest.er1 >conftest.err
11786 rm -f conftest.er1
11787 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011789 (exit $ac_status); } && {
11790 test -z "$ac_c_werror_flag" ||
11791 test ! -s conftest.err
11792 } && test -s conftest.$ac_objext; then
11793 ac_hi=$ac_mid; break
11794else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011795 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011796sed 's/^/| /' conftest.$ac_ext >&5
11797
11798 ac_lo=`expr $ac_mid + 1`
11799 if test $ac_lo -le $ac_mid; then
11800 ac_lo= ac_hi=
11801 break
11802 fi
11803 ac_mid=`expr 2 '*' $ac_mid + 1`
11804fi
11805
11806rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11807 done
11808else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011809 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011810sed 's/^/| /' conftest.$ac_ext >&5
11811
11812 cat >conftest.$ac_ext <<_ACEOF
11813/* confdefs.h. */
11814_ACEOF
11815cat confdefs.h >>conftest.$ac_ext
11816cat >>conftest.$ac_ext <<_ACEOF
11817/* end confdefs.h. */
11818$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011819 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011820int
11821main ()
11822{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011823static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011824test_array [0] = 0
11825
11826 ;
11827 return 0;
11828}
11829_ACEOF
11830rm -f conftest.$ac_objext
11831if { (ac_try="$ac_compile"
11832case "(($ac_try" in
11833 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11834 *) ac_try_echo=$ac_try;;
11835esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011836eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011837 (eval "$ac_compile") 2>conftest.er1
11838 ac_status=$?
11839 grep -v '^ *+' conftest.er1 >conftest.err
11840 rm -f conftest.er1
11841 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011843 (exit $ac_status); } && {
11844 test -z "$ac_c_werror_flag" ||
11845 test ! -s conftest.err
11846 } && test -s conftest.$ac_objext; then
11847 ac_hi=-1 ac_mid=-1
11848 while :; do
11849 cat >conftest.$ac_ext <<_ACEOF
11850/* confdefs.h. */
11851_ACEOF
11852cat confdefs.h >>conftest.$ac_ext
11853cat >>conftest.$ac_ext <<_ACEOF
11854/* end confdefs.h. */
11855$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011856 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011857int
11858main ()
11859{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011860static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011861test_array [0] = 0
11862
11863 ;
11864 return 0;
11865}
11866_ACEOF
11867rm -f conftest.$ac_objext
11868if { (ac_try="$ac_compile"
11869case "(($ac_try" in
11870 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11871 *) ac_try_echo=$ac_try;;
11872esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011873eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011874 (eval "$ac_compile") 2>conftest.er1
11875 ac_status=$?
11876 grep -v '^ *+' conftest.er1 >conftest.err
11877 rm -f conftest.er1
11878 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011880 (exit $ac_status); } && {
11881 test -z "$ac_c_werror_flag" ||
11882 test ! -s conftest.err
11883 } && test -s conftest.$ac_objext; then
11884 ac_lo=$ac_mid; break
11885else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011886 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011887sed 's/^/| /' conftest.$ac_ext >&5
11888
11889 ac_hi=`expr '(' $ac_mid ')' - 1`
11890 if test $ac_mid -le $ac_hi; then
11891 ac_lo= ac_hi=
11892 break
11893 fi
11894 ac_mid=`expr 2 '*' $ac_mid`
11895fi
11896
11897rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11898 done
11899else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011900 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011901sed 's/^/| /' conftest.$ac_ext >&5
11902
11903 ac_lo= ac_hi=
11904fi
11905
11906rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11907fi
11908
11909rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11910# Binary search between lo and hi bounds.
11911while test "x$ac_lo" != "x$ac_hi"; do
11912 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11913 cat >conftest.$ac_ext <<_ACEOF
11914/* confdefs.h. */
11915_ACEOF
11916cat confdefs.h >>conftest.$ac_ext
11917cat >>conftest.$ac_ext <<_ACEOF
11918/* end confdefs.h. */
11919$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011920 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011921int
11922main ()
11923{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011924static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011925test_array [0] = 0
11926
11927 ;
11928 return 0;
11929}
11930_ACEOF
11931rm -f conftest.$ac_objext
11932if { (ac_try="$ac_compile"
11933case "(($ac_try" in
11934 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11935 *) ac_try_echo=$ac_try;;
11936esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011937eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011938 (eval "$ac_compile") 2>conftest.er1
11939 ac_status=$?
11940 grep -v '^ *+' conftest.er1 >conftest.err
11941 rm -f conftest.er1
11942 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011944 (exit $ac_status); } && {
11945 test -z "$ac_c_werror_flag" ||
11946 test ! -s conftest.err
11947 } && test -s conftest.$ac_objext; then
11948 ac_hi=$ac_mid
11949else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011950 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011951sed 's/^/| /' conftest.$ac_ext >&5
11952
11953 ac_lo=`expr '(' $ac_mid ')' + 1`
11954fi
11955
11956rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11957done
11958case $ac_lo in
11959?*) ac_cv_sizeof_long_double=$ac_lo;;
11960'') if test "$ac_cv_type_long_double" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011961 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011962See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011963echo "$as_me: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011964See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011965 { (exit 77); exit 77; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011966 else
11967 ac_cv_sizeof_long_double=0
11968 fi ;;
11969esac
11970else
11971 cat >conftest.$ac_ext <<_ACEOF
11972/* confdefs.h. */
11973_ACEOF
11974cat confdefs.h >>conftest.$ac_ext
11975cat >>conftest.$ac_ext <<_ACEOF
11976/* end confdefs.h. */
11977$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011978 typedef long double ac__type_sizeof_;
11979static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11980static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011981#include <stdio.h>
11982#include <stdlib.h>
11983int
11984main ()
11985{
11986
11987 FILE *f = fopen ("conftest.val", "w");
11988 if (! f)
11989 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011990 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011991 {
11992 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011993 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011994 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011995 fprintf (f, "%ld\n", i);
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011996 }
11997 else
11998 {
11999 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012000 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012001 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012002 fprintf (f, "%lu\n", i);
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012003 }
12004 return ferror (f) || fclose (f) != 0;
12005
12006 ;
12007 return 0;
12008}
12009_ACEOF
12010rm -f conftest$ac_exeext
12011if { (ac_try="$ac_link"
12012case "(($ac_try" in
12013 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12014 *) ac_try_echo=$ac_try;;
12015esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012016eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012017 (eval "$ac_link") 2>&5
12018 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012020 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12021 { (case "(($ac_try" in
12022 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12023 *) ac_try_echo=$ac_try;;
12024esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012025eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012026 (eval "$ac_try") 2>&5
12027 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012029 (exit $ac_status); }; }; then
12030 ac_cv_sizeof_long_double=`cat conftest.val`
12031else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012032 echo "$as_me: program exited with status $ac_status" >&5
12033echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012034sed 's/^/| /' conftest.$ac_ext >&5
12035
12036( exit $ac_status )
12037if test "$ac_cv_type_long_double" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012038 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012039See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012040echo "$as_me: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012041See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012042 { (exit 77); exit 77; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012043 else
12044 ac_cv_sizeof_long_double=0
12045 fi
12046fi
12047rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12048fi
12049rm -f conftest.val
12050fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012051{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5
12052echo "${ECHO_T}$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012053
12054
12055
12056cat >>confdefs.h <<_ACEOF
12057#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
12058_ACEOF
12059
12060
12061fi
12062
12063
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012064{ echo "$as_me:$LINENO: checking for _Bool support" >&5
12065echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012066have_c99_bool=no
12067cat >conftest.$ac_ext <<_ACEOF
12068/* confdefs.h. */
12069_ACEOF
12070cat confdefs.h >>conftest.$ac_ext
12071cat >>conftest.$ac_ext <<_ACEOF
12072/* end confdefs.h. */
12073
12074int
12075main ()
12076{
12077_Bool x; x = (_Bool)0;
12078 ;
12079 return 0;
12080}
12081_ACEOF
12082rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012083if { (ac_try="$ac_compile"
12084case "(($ac_try" in
12085 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12086 *) ac_try_echo=$ac_try;;
12087esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012088eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012089 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012090 ac_status=$?
12091 grep -v '^ *+' conftest.er1 >conftest.err
12092 rm -f conftest.er1
12093 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012095 (exit $ac_status); } && {
12096 test -z "$ac_c_werror_flag" ||
12097 test ! -s conftest.err
12098 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012099
12100
12101cat >>confdefs.h <<\_ACEOF
12102#define HAVE_C99_BOOL 1
12103_ACEOF
12104
12105 have_c99_bool=yes
12106
12107else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012108 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012109sed 's/^/| /' conftest.$ac_ext >&5
12110
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012111
Thomas Woutersb2137042007-02-01 18:02:27 +000012112fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012113
12114rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012115{ echo "$as_me:$LINENO: result: $have_c99_bool" >&5
12116echo "${ECHO_T}$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012117if test "$have_c99_bool" = yes ; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012118{ echo "$as_me:$LINENO: checking for _Bool" >&5
12119echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; }
12120if test "${ac_cv_type__Bool+set}" = set; then
12121 echo $ECHO_N "(cached) $ECHO_C" >&6
12122else
12123 cat >conftest.$ac_ext <<_ACEOF
12124/* confdefs.h. */
12125_ACEOF
12126cat confdefs.h >>conftest.$ac_ext
12127cat >>conftest.$ac_ext <<_ACEOF
12128/* end confdefs.h. */
12129$ac_includes_default
12130typedef _Bool ac__type_new_;
12131int
12132main ()
12133{
12134if ((ac__type_new_ *) 0)
12135 return 0;
12136if (sizeof (ac__type_new_))
12137 return 0;
12138 ;
12139 return 0;
12140}
12141_ACEOF
12142rm -f conftest.$ac_objext
12143if { (ac_try="$ac_compile"
12144case "(($ac_try" in
12145 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12146 *) ac_try_echo=$ac_try;;
12147esac
12148eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12149 (eval "$ac_compile") 2>conftest.er1
12150 ac_status=$?
12151 grep -v '^ *+' conftest.er1 >conftest.err
12152 rm -f conftest.er1
12153 cat conftest.err >&5
12154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12155 (exit $ac_status); } && {
12156 test -z "$ac_c_werror_flag" ||
12157 test ! -s conftest.err
12158 } && test -s conftest.$ac_objext; then
12159 ac_cv_type__Bool=yes
12160else
12161 echo "$as_me: failed program was:" >&5
12162sed 's/^/| /' conftest.$ac_ext >&5
12163
12164 ac_cv_type__Bool=no
12165fi
12166
12167rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12168fi
12169{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
12170echo "${ECHO_T}$ac_cv_type__Bool" >&6; }
12171
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012172# The cast to long int works around a bug in the HP C Compiler
12173# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12174# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12175# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012176{ echo "$as_me:$LINENO: checking size of _Bool" >&5
12177echo $ECHO_N "checking size of _Bool... $ECHO_C" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012178if test "${ac_cv_sizeof__Bool+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012179 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Woutersb2137042007-02-01 18:02:27 +000012180else
12181 if test "$cross_compiling" = yes; then
12182 # Depending upon the size, compute the lo and hi bounds.
12183cat >conftest.$ac_ext <<_ACEOF
12184/* confdefs.h. */
12185_ACEOF
12186cat confdefs.h >>conftest.$ac_ext
12187cat >>conftest.$ac_ext <<_ACEOF
12188/* end confdefs.h. */
12189$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012190 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012191int
12192main ()
12193{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012194static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012195test_array [0] = 0
12196
12197 ;
12198 return 0;
12199}
12200_ACEOF
12201rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012202if { (ac_try="$ac_compile"
12203case "(($ac_try" in
12204 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12205 *) ac_try_echo=$ac_try;;
12206esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012207eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012208 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012209 ac_status=$?
12210 grep -v '^ *+' conftest.er1 >conftest.err
12211 rm -f conftest.er1
12212 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012214 (exit $ac_status); } && {
12215 test -z "$ac_c_werror_flag" ||
12216 test ! -s conftest.err
12217 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012218 ac_lo=0 ac_mid=0
12219 while :; do
12220 cat >conftest.$ac_ext <<_ACEOF
12221/* confdefs.h. */
12222_ACEOF
12223cat confdefs.h >>conftest.$ac_ext
12224cat >>conftest.$ac_ext <<_ACEOF
12225/* end confdefs.h. */
12226$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012227 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012228int
12229main ()
12230{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012231static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012232test_array [0] = 0
12233
12234 ;
12235 return 0;
12236}
12237_ACEOF
12238rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012239if { (ac_try="$ac_compile"
12240case "(($ac_try" in
12241 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12242 *) ac_try_echo=$ac_try;;
12243esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012244eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012245 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012246 ac_status=$?
12247 grep -v '^ *+' conftest.er1 >conftest.err
12248 rm -f conftest.er1
12249 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012251 (exit $ac_status); } && {
12252 test -z "$ac_c_werror_flag" ||
12253 test ! -s conftest.err
12254 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012255 ac_hi=$ac_mid; break
12256else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012257 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012258sed 's/^/| /' conftest.$ac_ext >&5
12259
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012260 ac_lo=`expr $ac_mid + 1`
12261 if test $ac_lo -le $ac_mid; then
12262 ac_lo= ac_hi=
12263 break
12264 fi
12265 ac_mid=`expr 2 '*' $ac_mid + 1`
Thomas Woutersb2137042007-02-01 18:02:27 +000012266fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012267
12268rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012269 done
12270else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012271 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012272sed 's/^/| /' conftest.$ac_ext >&5
12273
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012274 cat >conftest.$ac_ext <<_ACEOF
Thomas Woutersb2137042007-02-01 18:02:27 +000012275/* confdefs.h. */
12276_ACEOF
12277cat confdefs.h >>conftest.$ac_ext
12278cat >>conftest.$ac_ext <<_ACEOF
12279/* end confdefs.h. */
12280$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012281 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012282int
12283main ()
12284{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012285static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012286test_array [0] = 0
12287
12288 ;
12289 return 0;
12290}
12291_ACEOF
12292rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012293if { (ac_try="$ac_compile"
12294case "(($ac_try" in
12295 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12296 *) ac_try_echo=$ac_try;;
12297esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012298eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012299 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012300 ac_status=$?
12301 grep -v '^ *+' conftest.er1 >conftest.err
12302 rm -f conftest.er1
12303 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012305 (exit $ac_status); } && {
12306 test -z "$ac_c_werror_flag" ||
12307 test ! -s conftest.err
12308 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012309 ac_hi=-1 ac_mid=-1
12310 while :; do
12311 cat >conftest.$ac_ext <<_ACEOF
12312/* confdefs.h. */
12313_ACEOF
12314cat confdefs.h >>conftest.$ac_ext
12315cat >>conftest.$ac_ext <<_ACEOF
12316/* end confdefs.h. */
12317$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012318 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012319int
12320main ()
12321{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012322static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012323test_array [0] = 0
12324
12325 ;
12326 return 0;
12327}
12328_ACEOF
12329rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012330if { (ac_try="$ac_compile"
12331case "(($ac_try" in
12332 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12333 *) ac_try_echo=$ac_try;;
12334esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012335eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012336 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012337 ac_status=$?
12338 grep -v '^ *+' conftest.er1 >conftest.err
12339 rm -f conftest.er1
12340 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012342 (exit $ac_status); } && {
12343 test -z "$ac_c_werror_flag" ||
12344 test ! -s conftest.err
12345 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012346 ac_lo=$ac_mid; break
12347else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012348 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012349sed 's/^/| /' conftest.$ac_ext >&5
12350
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012351 ac_hi=`expr '(' $ac_mid ')' - 1`
12352 if test $ac_mid -le $ac_hi; then
12353 ac_lo= ac_hi=
12354 break
12355 fi
12356 ac_mid=`expr 2 '*' $ac_mid`
Thomas Woutersb2137042007-02-01 18:02:27 +000012357fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012358
12359rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012360 done
12361else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012362 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012363sed 's/^/| /' conftest.$ac_ext >&5
12364
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012365 ac_lo= ac_hi=
Thomas Woutersb2137042007-02-01 18:02:27 +000012366fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012367
12368rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012369fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012370
12371rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012372# Binary search between lo and hi bounds.
12373while test "x$ac_lo" != "x$ac_hi"; do
12374 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12375 cat >conftest.$ac_ext <<_ACEOF
12376/* confdefs.h. */
12377_ACEOF
12378cat confdefs.h >>conftest.$ac_ext
12379cat >>conftest.$ac_ext <<_ACEOF
12380/* end confdefs.h. */
12381$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012382 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012383int
12384main ()
12385{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012386static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012387test_array [0] = 0
12388
12389 ;
12390 return 0;
12391}
12392_ACEOF
12393rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012394if { (ac_try="$ac_compile"
12395case "(($ac_try" in
12396 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12397 *) ac_try_echo=$ac_try;;
12398esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012399eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012400 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012401 ac_status=$?
12402 grep -v '^ *+' conftest.er1 >conftest.err
12403 rm -f conftest.er1
12404 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012406 (exit $ac_status); } && {
12407 test -z "$ac_c_werror_flag" ||
12408 test ! -s conftest.err
12409 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012410 ac_hi=$ac_mid
12411else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012412 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012413sed 's/^/| /' conftest.$ac_ext >&5
12414
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012415 ac_lo=`expr '(' $ac_mid ')' + 1`
Thomas Woutersb2137042007-02-01 18:02:27 +000012416fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012417
12418rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012419done
12420case $ac_lo in
12421?*) ac_cv_sizeof__Bool=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012422'') if test "$ac_cv_type__Bool" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012423 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012424See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012425echo "$as_me: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012426See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012427 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012428 else
12429 ac_cv_sizeof__Bool=0
12430 fi ;;
Thomas Woutersb2137042007-02-01 18:02:27 +000012431esac
12432else
12433 cat >conftest.$ac_ext <<_ACEOF
12434/* confdefs.h. */
12435_ACEOF
12436cat confdefs.h >>conftest.$ac_ext
12437cat >>conftest.$ac_ext <<_ACEOF
12438/* end confdefs.h. */
12439$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012440 typedef _Bool ac__type_sizeof_;
12441static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12442static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Thomas Woutersb2137042007-02-01 18:02:27 +000012443#include <stdio.h>
12444#include <stdlib.h>
12445int
12446main ()
12447{
12448
12449 FILE *f = fopen ("conftest.val", "w");
12450 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012451 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012452 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Thomas Woutersb2137042007-02-01 18:02:27 +000012453 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012454 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012455 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012456 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012457 fprintf (f, "%ld\n", i);
Thomas Woutersb2137042007-02-01 18:02:27 +000012458 }
12459 else
12460 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012461 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012462 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012463 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012464 fprintf (f, "%lu\n", i);
Thomas Woutersb2137042007-02-01 18:02:27 +000012465 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012466 return ferror (f) || fclose (f) != 0;
Thomas Woutersb2137042007-02-01 18:02:27 +000012467
12468 ;
12469 return 0;
12470}
12471_ACEOF
12472rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012473if { (ac_try="$ac_link"
12474case "(($ac_try" in
12475 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12476 *) ac_try_echo=$ac_try;;
12477esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012478eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012479 (eval "$ac_link") 2>&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012480 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012482 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012483 { (case "(($ac_try" in
12484 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12485 *) ac_try_echo=$ac_try;;
12486esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012487eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012488 (eval "$ac_try") 2>&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012489 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012491 (exit $ac_status); }; }; then
12492 ac_cv_sizeof__Bool=`cat conftest.val`
12493else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012494 echo "$as_me: program exited with status $ac_status" >&5
12495echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012496sed 's/^/| /' conftest.$ac_ext >&5
12497
12498( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012499if test "$ac_cv_type__Bool" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012500 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012501See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012502echo "$as_me: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012503See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012504 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012505 else
12506 ac_cv_sizeof__Bool=0
12507 fi
Thomas Woutersb2137042007-02-01 18:02:27 +000012508fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012509rm -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 +000012510fi
12511rm -f conftest.val
12512fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012513{ echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
12514echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012515
12516
12517
Thomas Woutersb2137042007-02-01 18:02:27 +000012518cat >>confdefs.h <<_ACEOF
12519#define SIZEOF__BOOL $ac_cv_sizeof__Bool
12520_ACEOF
12521
12522
12523fi
12524
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012525{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12526echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000012527if test "${ac_cv_type_uintptr_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012528 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters89f507f2006-12-13 04:49:30 +000012529else
12530 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012531/* confdefs.h. */
12532_ACEOF
12533cat confdefs.h >>conftest.$ac_ext
12534cat >>conftest.$ac_ext <<_ACEOF
12535/* end confdefs.h. */
Thomas Wouters89f507f2006-12-13 04:49:30 +000012536#ifdef HAVE_STDINT_H
12537 #include <stdint.h>
12538 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012539
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012540typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012541int
12542main ()
12543{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012544if ((ac__type_new_ *) 0)
12545 return 0;
12546if (sizeof (ac__type_new_))
12547 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012548 ;
12549 return 0;
12550}
12551_ACEOF
12552rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012553if { (ac_try="$ac_compile"
12554case "(($ac_try" in
12555 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12556 *) ac_try_echo=$ac_try;;
12557esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012558eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012559 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012560 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012561 grep -v '^ *+' conftest.er1 >conftest.err
12562 rm -f conftest.er1
12563 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012565 (exit $ac_status); } && {
12566 test -z "$ac_c_werror_flag" ||
12567 test ! -s conftest.err
12568 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012569 ac_cv_type_uintptr_t=yes
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012570else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012571 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012572sed 's/^/| /' conftest.$ac_ext >&5
12573
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012574 ac_cv_type_uintptr_t=no
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012575fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012576
12577rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters89f507f2006-12-13 04:49:30 +000012578fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012579{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12580echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12581if test $ac_cv_type_uintptr_t = yes; then
Thomas Wouters89f507f2006-12-13 04:49:30 +000012582
12583cat >>confdefs.h <<_ACEOF
12584#define HAVE_UINTPTR_T 1
12585_ACEOF
12586
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012587{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12588echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
12589if test "${ac_cv_type_uintptr_t+set}" = set; then
12590 echo $ECHO_N "(cached) $ECHO_C" >&6
12591else
12592 cat >conftest.$ac_ext <<_ACEOF
12593/* confdefs.h. */
12594_ACEOF
12595cat confdefs.h >>conftest.$ac_ext
12596cat >>conftest.$ac_ext <<_ACEOF
12597/* end confdefs.h. */
12598$ac_includes_default
12599typedef uintptr_t ac__type_new_;
12600int
12601main ()
12602{
12603if ((ac__type_new_ *) 0)
12604 return 0;
12605if (sizeof (ac__type_new_))
12606 return 0;
12607 ;
12608 return 0;
12609}
12610_ACEOF
12611rm -f conftest.$ac_objext
12612if { (ac_try="$ac_compile"
12613case "(($ac_try" in
12614 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12615 *) ac_try_echo=$ac_try;;
12616esac
12617eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12618 (eval "$ac_compile") 2>conftest.er1
12619 ac_status=$?
12620 grep -v '^ *+' conftest.er1 >conftest.err
12621 rm -f conftest.er1
12622 cat conftest.err >&5
12623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12624 (exit $ac_status); } && {
12625 test -z "$ac_c_werror_flag" ||
12626 test ! -s conftest.err
12627 } && test -s conftest.$ac_objext; then
12628 ac_cv_type_uintptr_t=yes
12629else
12630 echo "$as_me: failed program was:" >&5
12631sed 's/^/| /' conftest.$ac_ext >&5
12632
12633 ac_cv_type_uintptr_t=no
12634fi
12635
12636rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12637fi
12638{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12639echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12640
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012641# The cast to long int works around a bug in the HP C Compiler
12642# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12643# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12644# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012645{ echo "$as_me:$LINENO: checking size of uintptr_t" >&5
12646echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012647if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012648 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012649else
Martin v. Löwis11437992002-04-12 09:54:03 +000012650 if test "$cross_compiling" = yes; then
12651 # Depending upon the size, compute the lo and hi bounds.
12652cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012653/* confdefs.h. */
12654_ACEOF
12655cat confdefs.h >>conftest.$ac_ext
12656cat >>conftest.$ac_ext <<_ACEOF
12657/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012658$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012659 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012660int
12661main ()
12662{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012663static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012664test_array [0] = 0
12665
12666 ;
12667 return 0;
12668}
12669_ACEOF
12670rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012671if { (ac_try="$ac_compile"
12672case "(($ac_try" in
12673 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12674 *) ac_try_echo=$ac_try;;
12675esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012676eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012677 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012678 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012679 grep -v '^ *+' conftest.er1 >conftest.err
12680 rm -f conftest.er1
12681 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012682 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012683 (exit $ac_status); } && {
12684 test -z "$ac_c_werror_flag" ||
12685 test ! -s conftest.err
12686 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012687 ac_lo=0 ac_mid=0
12688 while :; do
12689 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012690/* confdefs.h. */
12691_ACEOF
12692cat confdefs.h >>conftest.$ac_ext
12693cat >>conftest.$ac_ext <<_ACEOF
12694/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012695$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012696 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012697int
12698main ()
12699{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012700static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012701test_array [0] = 0
12702
12703 ;
12704 return 0;
12705}
12706_ACEOF
12707rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012708if { (ac_try="$ac_compile"
12709case "(($ac_try" in
12710 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12711 *) ac_try_echo=$ac_try;;
12712esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012713eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012714 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012715 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012716 grep -v '^ *+' conftest.er1 >conftest.err
12717 rm -f conftest.er1
12718 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012720 (exit $ac_status); } && {
12721 test -z "$ac_c_werror_flag" ||
12722 test ! -s conftest.err
12723 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012724 ac_hi=$ac_mid; break
12725else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012726 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012727sed 's/^/| /' conftest.$ac_ext >&5
12728
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012729 ac_lo=`expr $ac_mid + 1`
12730 if test $ac_lo -le $ac_mid; then
12731 ac_lo= ac_hi=
12732 break
12733 fi
12734 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012735fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012736
12737rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012738 done
12739else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012740 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012741sed 's/^/| /' conftest.$ac_ext >&5
12742
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012743 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012744/* confdefs.h. */
12745_ACEOF
12746cat confdefs.h >>conftest.$ac_ext
12747cat >>conftest.$ac_ext <<_ACEOF
12748/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012749$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012750 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012751int
12752main ()
12753{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012754static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012755test_array [0] = 0
12756
12757 ;
12758 return 0;
12759}
12760_ACEOF
12761rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012762if { (ac_try="$ac_compile"
12763case "(($ac_try" in
12764 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12765 *) ac_try_echo=$ac_try;;
12766esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012767eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012768 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012769 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012770 grep -v '^ *+' conftest.er1 >conftest.err
12771 rm -f conftest.er1
12772 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012774 (exit $ac_status); } && {
12775 test -z "$ac_c_werror_flag" ||
12776 test ! -s conftest.err
12777 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012778 ac_hi=-1 ac_mid=-1
12779 while :; do
12780 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012781/* confdefs.h. */
12782_ACEOF
12783cat confdefs.h >>conftest.$ac_ext
12784cat >>conftest.$ac_ext <<_ACEOF
12785/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012786$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012787 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012788int
12789main ()
12790{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012791static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012792test_array [0] = 0
12793
12794 ;
12795 return 0;
12796}
12797_ACEOF
12798rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012799if { (ac_try="$ac_compile"
12800case "(($ac_try" in
12801 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12802 *) ac_try_echo=$ac_try;;
12803esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012804eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012805 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012806 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012807 grep -v '^ *+' conftest.er1 >conftest.err
12808 rm -f conftest.er1
12809 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012811 (exit $ac_status); } && {
12812 test -z "$ac_c_werror_flag" ||
12813 test ! -s conftest.err
12814 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012815 ac_lo=$ac_mid; break
12816else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012817 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012818sed 's/^/| /' conftest.$ac_ext >&5
12819
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012820 ac_hi=`expr '(' $ac_mid ')' - 1`
12821 if test $ac_mid -le $ac_hi; then
12822 ac_lo= ac_hi=
12823 break
12824 fi
12825 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000012826fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012827
12828rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012829 done
12830else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012831 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012832sed 's/^/| /' conftest.$ac_ext >&5
12833
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012834 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000012835fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012836
12837rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012838fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012839
12840rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012841# Binary search between lo and hi bounds.
12842while test "x$ac_lo" != "x$ac_hi"; do
12843 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12844 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012845/* confdefs.h. */
12846_ACEOF
12847cat confdefs.h >>conftest.$ac_ext
12848cat >>conftest.$ac_ext <<_ACEOF
12849/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012850$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012851 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012852int
12853main ()
12854{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012855static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012856test_array [0] = 0
12857
12858 ;
12859 return 0;
12860}
12861_ACEOF
12862rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012863if { (ac_try="$ac_compile"
12864case "(($ac_try" in
12865 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12866 *) ac_try_echo=$ac_try;;
12867esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012868eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012869 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012870 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012871 grep -v '^ *+' conftest.er1 >conftest.err
12872 rm -f conftest.er1
12873 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012875 (exit $ac_status); } && {
12876 test -z "$ac_c_werror_flag" ||
12877 test ! -s conftest.err
12878 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012879 ac_hi=$ac_mid
12880else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012881 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012882sed 's/^/| /' conftest.$ac_ext >&5
12883
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012884 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012885fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012886
12887rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012888done
12889case $ac_lo in
12890?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012891'') if test "$ac_cv_type_uintptr_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012892 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012893See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012894echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012895See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012896 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012897 else
12898 ac_cv_sizeof_uintptr_t=0
12899 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012900esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012901else
Martin v. Löwis11437992002-04-12 09:54:03 +000012902 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012903/* confdefs.h. */
12904_ACEOF
12905cat confdefs.h >>conftest.$ac_ext
12906cat >>conftest.$ac_ext <<_ACEOF
12907/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012908$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012909 typedef uintptr_t ac__type_sizeof_;
12910static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12911static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000012912#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012913#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012914int
12915main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012916{
Martin v. Löwis11437992002-04-12 09:54:03 +000012917
12918 FILE *f = fopen ("conftest.val", "w");
12919 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012920 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012921 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000012922 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012923 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012924 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012925 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012926 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012927 }
12928 else
12929 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012930 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012931 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012932 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012933 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012934 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012935 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012936
12937 ;
12938 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012939}
Martin v. Löwis11437992002-04-12 09:54:03 +000012940_ACEOF
12941rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012942if { (ac_try="$ac_link"
12943case "(($ac_try" in
12944 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12945 *) ac_try_echo=$ac_try;;
12946esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012947eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012948 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012949 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012951 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012952 { (case "(($ac_try" in
12953 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12954 *) ac_try_echo=$ac_try;;
12955esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012956eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012957 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012958 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012960 (exit $ac_status); }; }; then
12961 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012962else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012963 echo "$as_me: program exited with status $ac_status" >&5
12964echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012965sed 's/^/| /' conftest.$ac_ext >&5
12966
Martin v. Löwis11437992002-04-12 09:54:03 +000012967( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012968if test "$ac_cv_type_uintptr_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012969 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012970See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012971echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012972See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012973 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012974 else
12975 ac_cv_sizeof_uintptr_t=0
12976 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012977fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012978rm -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 +000012979fi
12980rm -f conftest.val
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012981fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012982{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
12983echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012984
12985
12986
Martin v. Löwis11437992002-04-12 09:54:03 +000012987cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012988#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012989_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012990
Michael W. Hudson54241132001-12-07 15:38:26 +000012991
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012992fi
12993
Thomas Wouters89f507f2006-12-13 04:49:30 +000012994
12995
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012996# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012997{ echo "$as_me:$LINENO: checking size of off_t" >&5
12998echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012999if test "${ac_cv_sizeof_off_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013000 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013001else
13002 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000013003 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013004else
Martin v. Löwis11437992002-04-12 09:54:03 +000013005 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013006/* confdefs.h. */
13007_ACEOF
13008cat confdefs.h >>conftest.$ac_ext
13009cat >>conftest.$ac_ext <<_ACEOF
13010/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013011#include <stdio.h>
13012#include <sys/types.h>
13013main()
13014{
13015 FILE *f=fopen("conftestval", "w");
13016 if (!f) exit(1);
13017 fprintf(f, "%d\n", sizeof(off_t));
13018 exit(0);
13019}
Martin v. Löwis11437992002-04-12 09:54:03 +000013020_ACEOF
13021rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013022if { (ac_try="$ac_link"
13023case "(($ac_try" in
13024 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13025 *) ac_try_echo=$ac_try;;
13026esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013027eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013028 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013029 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013031 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013032 { (case "(($ac_try" in
13033 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13034 *) ac_try_echo=$ac_try;;
13035esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013036eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013037 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013038 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013040 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013041 ac_cv_sizeof_off_t=`cat conftestval`
13042else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013043 echo "$as_me: program exited with status $ac_status" >&5
13044echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013045sed 's/^/| /' conftest.$ac_ext >&5
13046
Martin v. Löwis11437992002-04-12 09:54:03 +000013047( exit $ac_status )
13048ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013049fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013050rm -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 +000013051fi
13052
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013053
13054
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013055fi
13056
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013057{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
13058echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013059
13060cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013061#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013062_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013063
Michael W. Hudson54241132001-12-07 15:38:26 +000013064
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013065{ echo "$as_me:$LINENO: checking whether to enable large file support" >&5
13066echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6; }
Mark Dickinsonb87f0d02009-12-31 21:25:02 +000013067if test "$have_long_long" = yes
13068then
13069if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +000013070 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013071
Martin v. Löwis11437992002-04-12 09:54:03 +000013072cat >>confdefs.h <<\_ACEOF
13073#define HAVE_LARGEFILE_SUPPORT 1
13074_ACEOF
13075
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013076 { echo "$as_me:$LINENO: result: yes" >&5
13077echo "${ECHO_T}yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013078else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013079 { echo "$as_me:$LINENO: result: no" >&5
13080echo "${ECHO_T}no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013081fi
Mark Dickinsonb87f0d02009-12-31 21:25:02 +000013082else
13083 { echo "$as_me:$LINENO: result: no" >&5
13084echo "${ECHO_T}no" >&6; }
13085fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013086
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013087# AC_CHECK_SIZEOF() doesn't include <time.h>.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013088{ echo "$as_me:$LINENO: checking size of time_t" >&5
13089echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013090if test "${ac_cv_sizeof_time_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013091 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013092else
13093 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000013094 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013095else
Martin v. Löwis11437992002-04-12 09:54:03 +000013096 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013097/* confdefs.h. */
13098_ACEOF
13099cat confdefs.h >>conftest.$ac_ext
13100cat >>conftest.$ac_ext <<_ACEOF
13101/* end confdefs.h. */
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013102#include <stdio.h>
13103#include <time.h>
13104main()
13105{
13106 FILE *f=fopen("conftestval", "w");
13107 if (!f) exit(1);
13108 fprintf(f, "%d\n", sizeof(time_t));
13109 exit(0);
13110}
Martin v. Löwis11437992002-04-12 09:54:03 +000013111_ACEOF
13112rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013113if { (ac_try="$ac_link"
13114case "(($ac_try" in
13115 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13116 *) ac_try_echo=$ac_try;;
13117esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013118eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013119 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013120 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013122 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013123 { (case "(($ac_try" in
13124 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13125 *) ac_try_echo=$ac_try;;
13126esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013127eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013128 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013129 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013131 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013132 ac_cv_sizeof_time_t=`cat conftestval`
13133else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013134 echo "$as_me: program exited with status $ac_status" >&5
13135echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013136sed 's/^/| /' conftest.$ac_ext >&5
13137
Martin v. Löwis11437992002-04-12 09:54:03 +000013138( exit $ac_status )
13139ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013140fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013141rm -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 +000013142fi
13143
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013144
13145
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013146fi
13147
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013148{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
13149echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013150
13151cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013152#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013153_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013154
Michael W. Hudson54241132001-12-07 15:38:26 +000013155
13156
Trent Mick635f6fb2000-08-23 21:33:05 +000013157# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013158ac_save_cc="$CC"
13159if test "$ac_cv_kpthread" = "yes"
13160then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013161elif test "$ac_cv_kthread" = "yes"
13162then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013163elif test "$ac_cv_pthread" = "yes"
13164then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013165fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013166{ echo "$as_me:$LINENO: checking for pthread_t" >&5
13167echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013168have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013169cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013170/* confdefs.h. */
13171_ACEOF
13172cat confdefs.h >>conftest.$ac_ext
13173cat >>conftest.$ac_ext <<_ACEOF
13174/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000013175#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013176int
13177main ()
13178{
Guido van Rossum12580492000-09-24 16:47:19 +000013179pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013180 ;
13181 return 0;
13182}
13183_ACEOF
13184rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013185if { (ac_try="$ac_compile"
13186case "(($ac_try" in
13187 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13188 *) ac_try_echo=$ac_try;;
13189esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013190eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013191 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013192 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013193 grep -v '^ *+' conftest.er1 >conftest.err
13194 rm -f conftest.er1
13195 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013197 (exit $ac_status); } && {
13198 test -z "$ac_c_werror_flag" ||
13199 test ! -s conftest.err
13200 } && test -s conftest.$ac_objext; then
Trent Mick635f6fb2000-08-23 21:33:05 +000013201 have_pthread_t=yes
13202else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013203 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013204sed 's/^/| /' conftest.$ac_ext >&5
13205
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013206
Trent Mick635f6fb2000-08-23 21:33:05 +000013207fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013208
13209rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013210{ echo "$as_me:$LINENO: result: $have_pthread_t" >&5
13211echo "${ECHO_T}$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013212if test "$have_pthread_t" = yes ; then
13213 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013214 { echo "$as_me:$LINENO: checking size of pthread_t" >&5
13215echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013216 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013217 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000013218else
13219 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000013220 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +000013221else
Martin v. Löwis11437992002-04-12 09:54:03 +000013222 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013223/* confdefs.h. */
13224_ACEOF
13225cat confdefs.h >>conftest.$ac_ext
13226cat >>conftest.$ac_ext <<_ACEOF
13227/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000013228#include <stdio.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013229#include <pthread.h>
Trent Mick635f6fb2000-08-23 21:33:05 +000013230 main()
13231 {
13232 FILE *f=fopen("conftestval", "w");
13233 if (!f) exit(1);
13234 fprintf(f, "%d\n", sizeof(pthread_t));
13235 exit(0);
13236 }
Martin v. Löwis11437992002-04-12 09:54:03 +000013237_ACEOF
13238rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013239if { (ac_try="$ac_link"
13240case "(($ac_try" in
13241 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13242 *) ac_try_echo=$ac_try;;
13243esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013244eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013245 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013246 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013248 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013249 { (case "(($ac_try" in
13250 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13251 *) ac_try_echo=$ac_try;;
13252esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013253eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013254 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013255 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013257 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +000013258 ac_cv_sizeof_pthread_t=`cat conftestval`
13259else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013260 echo "$as_me: program exited with status $ac_status" >&5
13261echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013262sed 's/^/| /' conftest.$ac_ext >&5
13263
Martin v. Löwis11437992002-04-12 09:54:03 +000013264( exit $ac_status )
13265ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +000013266fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013267rm -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 +000013268fi
13269
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013270
13271
Trent Mick635f6fb2000-08-23 21:33:05 +000013272fi
13273
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013274 { echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
13275echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013276
13277cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000013278#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013279_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000013280
13281fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013282CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000013283
Michael W. Hudson54241132001-12-07 15:38:26 +000013284
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013285
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000013286
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013287case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013288 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000013289 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
13290 ;;
13291 Darwin/*)
13292 OTHER_LIBTOOL_OPT=""
13293 ;;
13294esac
13295
13296
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013297ARCH_RUN_32BIT=""
13298
Bob Ippolito7026a0a2005-03-28 23:23:47 +000013299case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013300 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +000013301 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
13302 if test "${enable_universalsdk}"; then
13303 :
13304 else
Ronald Oussoren175a8842010-02-11 13:40:06 +000013305 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +000013306 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000013307 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000013308 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000013309 Darwin/*)
Ronald Oussoren652f4de2010-02-07 11:54:03 +000013310 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +000013311 if test ${gcc_version} '<' 4.0
13312 then
13313 LIBTOOL_CRUFT="-lcc_dynamic"
13314 else
13315 LIBTOOL_CRUFT=""
13316 fi
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013317 if test "$cross_compiling" = yes; then
Ronald Oussoren856624d2009-09-08 07:13:53 +000013318 ac_osx_32bit=yes
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013319else
13320 cat >conftest.$ac_ext <<_ACEOF
13321/* confdefs.h. */
13322_ACEOF
13323cat confdefs.h >>conftest.$ac_ext
13324cat >>conftest.$ac_ext <<_ACEOF
13325/* end confdefs.h. */
Ronald Oussoren856624d2009-09-08 07:13:53 +000013326
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013327 #include <unistd.h>
13328 int main(int argc, char*argv[])
13329 {
13330 if (sizeof(long) == 4) {
13331 return 0;
13332 } else {
13333 return 1;
13334 }
Ronald Oussoren856624d2009-09-08 07:13:53 +000013335 }
13336
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013337_ACEOF
13338rm -f conftest$ac_exeext
13339if { (ac_try="$ac_link"
13340case "(($ac_try" in
13341 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13342 *) ac_try_echo=$ac_try;;
13343esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013344eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013345 (eval "$ac_link") 2>&5
13346 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013348 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13349 { (case "(($ac_try" in
13350 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13351 *) ac_try_echo=$ac_try;;
13352esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013353eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013354 (eval "$ac_try") 2>&5
13355 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013357 (exit $ac_status); }; }; then
13358 ac_osx_32bit=yes
13359else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013360 echo "$as_me: program exited with status $ac_status" >&5
13361echo "$as_me: failed program was:" >&5
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013362sed 's/^/| /' conftest.$ac_ext >&5
13363
13364( exit $ac_status )
13365ac_osx_32bit=no
13366fi
13367rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13368fi
13369
13370
13371
13372 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussoren175a8842010-02-11 13:40:06 +000013373 case `/usr/bin/arch` in
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013374 i386)
13375 MACOSX_DEFAULT_ARCH="i386"
13376 ;;
13377 ppc)
13378 MACOSX_DEFAULT_ARCH="ppc"
13379 ;;
13380 *)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013381 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
13382echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013383 { (exit 1); exit 1; }; }
13384 ;;
13385 esac
13386 else
Ronald Oussoren175a8842010-02-11 13:40:06 +000013387 case `/usr/bin/arch` in
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013388 i386)
13389 MACOSX_DEFAULT_ARCH="x86_64"
13390 ;;
13391 ppc)
13392 MACOSX_DEFAULT_ARCH="ppc64"
13393 ;;
13394 *)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013395 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
13396echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013397 { (exit 1); exit 1; }; }
13398 ;;
13399 esac
13400
13401 #ARCH_RUN_32BIT="true"
13402 fi
13403
13404 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +000013405 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000013406 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013407esac
13408
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013409{ echo "$as_me:$LINENO: checking for --enable-framework" >&5
13410echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000013411if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013412then
Skip Montanarodecc6a42003-01-01 20:07:49 +000013413 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000013414 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000013415 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013416
Martin v. Löwis11437992002-04-12 09:54:03 +000013417cat >>confdefs.h <<\_ACEOF
13418#define WITH_NEXT_FRAMEWORK 1
13419_ACEOF
13420
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013421 { echo "$as_me:$LINENO: result: yes" >&5
13422echo "${ECHO_T}yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +000013423 if test $enable_shared = "yes"
13424 then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013425 { { echo "$as_me:$LINENO: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" >&5
13426echo "$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 +000013427 { (exit 1); exit 1; }; }
13428 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013429else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013430 { echo "$as_me:$LINENO: result: no" >&5
13431echo "${ECHO_T}no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013432fi
13433
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013434{ echo "$as_me:$LINENO: checking for dyld" >&5
13435echo $ECHO_N "checking for dyld... $ECHO_C" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013436case $ac_sys_system/$ac_sys_release in
13437 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013438
Martin v. Löwis11437992002-04-12 09:54:03 +000013439cat >>confdefs.h <<\_ACEOF
13440#define WITH_DYLD 1
13441_ACEOF
13442
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013443 { echo "$as_me:$LINENO: result: always on for Darwin" >&5
13444echo "${ECHO_T}always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013445 ;;
13446 *)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013447 { echo "$as_me:$LINENO: result: no" >&5
13448echo "${ECHO_T}no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000013449 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013450esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013451
Guido van Rossum0a516c91994-09-12 10:58:40 +000013452# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000013453
Michael W. Hudson54241132001-12-07 15:38:26 +000013454
13455
13456
13457
Guido van Rossum0a516c91994-09-12 10:58:40 +000013458# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000013459# -- usually .so, .sl on HP-UX, .dll on Cygwin
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013460{ echo "$as_me:$LINENO: checking SO" >&5
13461echo $ECHO_N "checking SO... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013462if test -z "$SO"
13463then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013464 case $ac_sys_system in
Thomas Wouters477c8d52006-05-27 19:21:47 +000013465 hp*|HP*)
13466 case `uname -m` in
13467 ia64) SO=.so;;
13468 *) SO=.sl;;
13469 esac
13470 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000013471 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013472 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013473 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000013474else
13475 # this might also be a termcap variable, see #610332
13476 echo
13477 echo '====================================================================='
13478 echo '+ +'
13479 echo '+ WARNING: You have set SO in your environment. +'
13480 echo '+ Do you really mean to change the extension for shared libraries? +'
13481 echo '+ Continuing in 10 seconds to let you to ponder. +'
13482 echo '+ +'
13483 echo '====================================================================='
13484 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000013485fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013486{ echo "$as_me:$LINENO: result: $SO" >&5
13487echo "${ECHO_T}$SO" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000013488
Georg Brandlb1441c72009-01-03 22:33:39 +000013489
Thomas Wouters477c8d52006-05-27 19:21:47 +000013490cat >>confdefs.h <<_ACEOF
13491#define SHLIB_EXT "$SO"
13492_ACEOF
13493
Guido van Rossum0a516c91994-09-12 10:58:40 +000013494# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000013495# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013496# (Shared libraries in this instance are shared modules to be loaded into
13497# Python, as opposed to building Python itself as a shared library.)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013498{ echo "$as_me:$LINENO: checking LDSHARED" >&5
13499echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013500if test -z "$LDSHARED"
13501then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013502 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013503 AIX*)
13504 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000013505 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013506 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000013507 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000013508 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000013509 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +000013510 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000013511 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000013512 else LDSHARED='$(CC) -G';
Greg Ward57c9a6632000-05-26 12:22:54 +000013513 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +000013514 hp*|HP*)
13515 if test "$GCC" = "yes"
13516 then LDSHARED='$(CC) -shared'
13517 else LDSHARED='ld -b';
13518 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +000013519 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000013520 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000013521 LDSHARED='$(CC) $(LDFLAGS) -bundle'
13522 if test "$enable_framework" ; then
13523 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000013524 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
13525 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000013526 else
13527 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000013528 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000013529 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000013530 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000013531 LDSHARED='$(CC) $(LDFLAGS) -bundle'
13532 if test "$enable_framework" ; then
13533 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000013534 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
13535 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000013536 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000013537 # No framework, use the Python app as bundle-loader
13538 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000013539 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013540 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000013541 Darwin/*)
13542 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
13543 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +000013544
Benjamin Peterson14ae9592008-07-16 02:20:15 +000013545 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000013546 then
Thomas Wouters477c8d52006-05-27 19:21:47 +000013547 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +000013548 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +000013549 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000013550 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
13551 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000013552 else
13553 LDSHARED='$(CC) $(LDFLAGS) -bundle'
13554 if test "$enable_framework" ; then
13555 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000013556 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
13557 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000013558 else
13559 # No framework, use the Python app as bundle-loader
13560 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
13561 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
13562 fi
13563 fi
13564 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +000013565 Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000013566 BSD/OS*/4*) LDSHARED="gcc -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013567 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000013568 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000013569 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000013570 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000013571 else
13572 LDSHARED="ld -Bshareable ${LDFLAGS}"
13573 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013574 OpenBSD*)
13575 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
13576 then
13577 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
13578 else
13579 case `uname -r` in
13580 [01].* | 2.[0-7] | 2.[0-7].*)
13581 LDSHARED="ld -Bshareable ${LDFLAGS}"
13582 ;;
13583 *)
13584 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
13585 ;;
13586 esac
13587 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013588 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013589 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000013590 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000013591 then LDSHARED='$(CC) -shared'
13592 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000013593 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000013594 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Guido van Rossumaef734b2001-01-10 21:09:12 +000013595 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013596 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013597 *) LDSHARED="ld";;
13598 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013599fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013600{ echo "$as_me:$LINENO: result: $LDSHARED" >&5
13601echo "${ECHO_T}$LDSHARED" >&6; }
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013602BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000013603# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013604# library (module) -- this is only needed for a few systems
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013605{ echo "$as_me:$LINENO: checking CCSHARED" >&5
13606echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013607if test -z "$CCSHARED"
13608then
Guido van Rossum07397971997-04-29 21:49:50 +000013609 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000013610 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013611 then CCSHARED="-fPIC";
13612 elif test `uname -p` = sparc;
13613 then CCSHARED="-xcode=pic32";
13614 else CCSHARED="-Kpic";
13615 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000013616 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000013617 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000013618 else CCSHARED="+z";
13619 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013620 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000013621 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013622 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013623 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000013624 if test "$GCC" = "yes"
13625 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000013626 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000013627 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000013628 SCO_SV*)
13629 if test "$GCC" = "yes"
13630 then CCSHARED="-fPIC"
13631 else CCSHARED="-Kpic -belf"
13632 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013633 IRIX*/6*) case $CC in
13634 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000013635 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013636 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013637 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013638 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013639fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013640{ echo "$as_me:$LINENO: result: $CCSHARED" >&5
13641echo "${ECHO_T}$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013642# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013643# the python executable -- this is only needed for a few systems
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013644{ echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
13645echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013646if test -z "$LINKFORSHARED"
13647then
Guido van Rossum07397971997-04-29 21:49:50 +000013648 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013649 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000013650 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000013651 LINKFORSHARED="-Wl,-E -Wl,+s";;
13652# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000013653 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013654 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013655 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000013656 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +000013657 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +000013658 if test "$enable_framework"
13659 then
Jack Jansenda49e192005-01-07 13:08:22 +000013660 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000013661 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000013662 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013663 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000013664 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000013665 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013666 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000013667 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
13668 then
13669 LINKFORSHARED="-Wl,--export-dynamic"
13670 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013671 SunOS/5*) case $CC in
13672 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000013673 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000013674 then
13675 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013676 fi;;
13677 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000013678 CYGWIN*)
13679 if test $enable_shared = "no"
13680 then
13681 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
13682 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +000013683 QNX*)
13684 # -Wl,-E causes the symbols to be added to the dynamic
13685 # symbol table so that they can be found when a module
13686 # is loaded. -N 2048K causes the stack size to be set
13687 # to 2048 kilobytes so that the stack doesn't overflow
13688 # when running test_compile.py.
13689 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013690 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013691fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013692{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
13693echo "${ECHO_T}$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013694
Michael W. Hudson54241132001-12-07 15:38:26 +000013695
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000013696
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013697{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
13698echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013699if test ! "$LIBRARY" = "$LDLIBRARY"
13700then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000013701 case $ac_sys_system in
13702 CYGWIN*)
13703 # Cygwin needs CCSHARED when building extension DLLs
13704 # but not when building the interpreter DLL.
13705 CFLAGSFORSHARED='';;
13706 *)
13707 CFLAGSFORSHARED='$(CCSHARED)'
13708 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013709fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013710{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
13711echo "${ECHO_T}$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013712
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013713# SHLIBS are libraries (except -lc and -lm) to link to the python shared
13714# library (with --enable-shared).
13715# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000013716# symbols, this must be set to $(LIBS) (expanded by make). We do this even
13717# if it is not required, since it creates a dependency of the shared library
13718# to LIBS. This, in turn, means that applications linking the shared libpython
13719# don't need to link LIBS explicitly. The default should be only changed
13720# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013721
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013722{ echo "$as_me:$LINENO: checking SHLIBS" >&5
13723echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013724case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013725 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000013726 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013727esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013728{ echo "$as_me:$LINENO: result: $SHLIBS" >&5
13729echo "${ECHO_T}$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013730
13731
Guido van Rossum627b2d71993-12-24 10:39:16 +000013732# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000013733
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013734{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
13735echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013736if test "${ac_cv_lib_dl_dlopen+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013737 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013738else
Martin v. Löwis11437992002-04-12 09:54:03 +000013739 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013740LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013741cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013742/* confdefs.h. */
13743_ACEOF
13744cat confdefs.h >>conftest.$ac_ext
13745cat >>conftest.$ac_ext <<_ACEOF
13746/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013747
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013748/* Override any GCC internal prototype to avoid an error.
13749 Use char because int might match the return type of a GCC
13750 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013751#ifdef __cplusplus
13752extern "C"
13753#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013754char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013755int
13756main ()
13757{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013758return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013759 ;
13760 return 0;
13761}
13762_ACEOF
13763rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013764if { (ac_try="$ac_link"
13765case "(($ac_try" in
13766 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13767 *) ac_try_echo=$ac_try;;
13768esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013769eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013770 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013771 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013772 grep -v '^ *+' conftest.er1 >conftest.err
13773 rm -f conftest.er1
13774 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013776 (exit $ac_status); } && {
13777 test -z "$ac_c_werror_flag" ||
13778 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013779 } && test -s conftest$ac_exeext &&
13780 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013781 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013782else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013783 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013784sed 's/^/| /' conftest.$ac_ext >&5
13785
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013786 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013787fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013788
13789rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013790 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013791LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000013792fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013793{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
13794echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
13795if test $ac_cv_lib_dl_dlopen = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013796 cat >>confdefs.h <<_ACEOF
13797#define HAVE_LIBDL 1
13798_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013799
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013800 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013801
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013802fi
13803 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000013804
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013805{ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
13806echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013807if test "${ac_cv_lib_dld_shl_load+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013808 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013809else
Martin v. Löwis11437992002-04-12 09:54:03 +000013810 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013811LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013812cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013813/* confdefs.h. */
13814_ACEOF
13815cat confdefs.h >>conftest.$ac_ext
13816cat >>conftest.$ac_ext <<_ACEOF
13817/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013818
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013819/* Override any GCC internal prototype to avoid an error.
13820 Use char because int might match the return type of a GCC
13821 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013822#ifdef __cplusplus
13823extern "C"
13824#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013825char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013826int
13827main ()
13828{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013829return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013830 ;
13831 return 0;
13832}
13833_ACEOF
13834rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013835if { (ac_try="$ac_link"
13836case "(($ac_try" in
13837 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13838 *) ac_try_echo=$ac_try;;
13839esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013840eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013841 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013842 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013843 grep -v '^ *+' conftest.er1 >conftest.err
13844 rm -f conftest.er1
13845 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013847 (exit $ac_status); } && {
13848 test -z "$ac_c_werror_flag" ||
13849 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013850 } && test -s conftest$ac_exeext &&
13851 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013852 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013853else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013854 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013855sed 's/^/| /' conftest.$ac_ext >&5
13856
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013857 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013858fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013859
13860rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013861 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013862LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000013863fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013864{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
13865echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
13866if test $ac_cv_lib_dld_shl_load = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013867 cat >>confdefs.h <<_ACEOF
13868#define HAVE_LIBDLD 1
13869_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013870
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013871 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013872
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013873fi
13874 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000013875
Georg Brandlb1441c72009-01-03 22:33:39 +000013876# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +000013877if test "$with_threads" = "yes" -o -z "$with_threads"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013878 { echo "$as_me:$LINENO: checking for library containing sem_init" >&5
13879echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013880if test "${ac_cv_search_sem_init+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013881 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000013882else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013883 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000013884cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013885/* confdefs.h. */
13886_ACEOF
13887cat confdefs.h >>conftest.$ac_ext
13888cat >>conftest.$ac_ext <<_ACEOF
13889/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013890
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013891/* Override any GCC internal prototype to avoid an error.
13892 Use char because int might match the return type of a GCC
13893 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013894#ifdef __cplusplus
13895extern "C"
13896#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013897char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013898int
13899main ()
13900{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013901return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013902 ;
13903 return 0;
13904}
13905_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013906for ac_lib in '' pthread rt posix4; do
13907 if test -z "$ac_lib"; then
13908 ac_res="none required"
13909 else
13910 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013911 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013912 fi
13913 rm -f conftest.$ac_objext conftest$ac_exeext
13914if { (ac_try="$ac_link"
13915case "(($ac_try" in
13916 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13917 *) ac_try_echo=$ac_try;;
13918esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013919eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013920 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013921 ac_status=$?
13922 grep -v '^ *+' conftest.er1 >conftest.err
13923 rm -f conftest.er1
13924 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013926 (exit $ac_status); } && {
13927 test -z "$ac_c_werror_flag" ||
13928 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013929 } && test -s conftest$ac_exeext &&
13930 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013931 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +000013932else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013933 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013934sed 's/^/| /' conftest.$ac_ext >&5
13935
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013936
Thomas Wouters477c8d52006-05-27 19:21:47 +000013937fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013938
13939rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13940 conftest$ac_exeext
13941 if test "${ac_cv_search_sem_init+set}" = set; then
13942 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013943fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013944done
13945if test "${ac_cv_search_sem_init+set}" = set; then
13946 :
13947else
13948 ac_cv_search_sem_init=no
13949fi
13950rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013951LIBS=$ac_func_search_save_LIBS
13952fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013953{ echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
13954echo "${ECHO_T}$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013955ac_res=$ac_cv_search_sem_init
13956if test "$ac_res" != no; then
13957 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000013958
Martin v. Löwis41933dd2002-03-21 15:10:58 +000013959fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000013960 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000013961 # posix4 on Solaris 2.6
13962 # pthread (first!) on Linux
13963fi
13964
Martin v. Löwis19d17342003-06-14 21:03:05 +000013965# check if we need libintl for locale functions
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013966{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
13967echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000013968if test "${ac_cv_lib_intl_textdomain+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013969 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +000013970else
13971 ac_check_lib_save_LIBS=$LIBS
13972LIBS="-lintl $LIBS"
13973cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013974/* confdefs.h. */
13975_ACEOF
13976cat confdefs.h >>conftest.$ac_ext
13977cat >>conftest.$ac_ext <<_ACEOF
13978/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000013979
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013980/* Override any GCC internal prototype to avoid an error.
13981 Use char because int might match the return type of a GCC
13982 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000013983#ifdef __cplusplus
13984extern "C"
13985#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000013986char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000013987int
13988main ()
13989{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013990return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000013991 ;
13992 return 0;
13993}
13994_ACEOF
13995rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013996if { (ac_try="$ac_link"
13997case "(($ac_try" in
13998 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13999 *) ac_try_echo=$ac_try;;
14000esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014001eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014002 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000014003 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014004 grep -v '^ *+' conftest.er1 >conftest.err
14005 rm -f conftest.er1
14006 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014007 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014008 (exit $ac_status); } && {
14009 test -z "$ac_c_werror_flag" ||
14010 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014011 } && test -s conftest$ac_exeext &&
14012 $as_test_x conftest$ac_exeext; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000014013 ac_cv_lib_intl_textdomain=yes
14014else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014015 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014016sed 's/^/| /' conftest.$ac_ext >&5
14017
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014018 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000014019fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014020
14021rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014022 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000014023LIBS=$ac_check_lib_save_LIBS
14024fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014025{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
14026echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; }
14027if test $ac_cv_lib_intl_textdomain = yes; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000014028
14029cat >>confdefs.h <<\_ACEOF
14030#define WITH_LIBINTL 1
14031_ACEOF
14032
Brett Cannonc6d936e2009-06-07 20:09:53 +000014033 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +000014034fi
14035
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014036
14037# checks for system dependent C++ extensions support
14038case "$ac_sys_system" in
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014039 AIX*) { echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
14040echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014041 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014042/* confdefs.h. */
14043_ACEOF
14044cat confdefs.h >>conftest.$ac_ext
14045cat >>conftest.$ac_ext <<_ACEOF
14046/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014047#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014048int
14049main ()
14050{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014051loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000014052 ;
14053 return 0;
14054}
14055_ACEOF
14056rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014057if { (ac_try="$ac_link"
14058case "(($ac_try" in
14059 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14060 *) ac_try_echo=$ac_try;;
14061esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014062eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014063 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014064 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014065 grep -v '^ *+' conftest.er1 >conftest.err
14066 rm -f conftest.er1
14067 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014069 (exit $ac_status); } && {
14070 test -z "$ac_c_werror_flag" ||
14071 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014072 } && test -s conftest$ac_exeext &&
14073 $as_test_x conftest$ac_exeext; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014074
Martin v. Löwis11437992002-04-12 09:54:03 +000014075cat >>confdefs.h <<\_ACEOF
14076#define AIX_GENUINE_CPLUSPLUS 1
14077_ACEOF
14078
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014079 { echo "$as_me:$LINENO: result: yes" >&5
14080echo "${ECHO_T}yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014081else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014082 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014083sed 's/^/| /' conftest.$ac_ext >&5
14084
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014085 { echo "$as_me:$LINENO: result: no" >&5
14086echo "${ECHO_T}no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014087fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014088
14089rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014090 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014091 *) ;;
14092esac
14093
Guido van Rossum70c7f481998-03-26 18:44:10 +000014094# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014095{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
14096echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014097if test "${ac_cv_lib_nsl_t_open+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014098 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014099else
Martin v. Löwis11437992002-04-12 09:54:03 +000014100 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014101LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014102cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014103/* confdefs.h. */
14104_ACEOF
14105cat confdefs.h >>conftest.$ac_ext
14106cat >>conftest.$ac_ext <<_ACEOF
14107/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014108
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014109/* Override any GCC internal prototype to avoid an error.
14110 Use char because int might match the return type of a GCC
14111 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014112#ifdef __cplusplus
14113extern "C"
14114#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014115char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014116int
14117main ()
14118{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014119return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014120 ;
14121 return 0;
14122}
14123_ACEOF
14124rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014125if { (ac_try="$ac_link"
14126case "(($ac_try" in
14127 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14128 *) ac_try_echo=$ac_try;;
14129esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014130eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014131 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014132 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014133 grep -v '^ *+' conftest.er1 >conftest.err
14134 rm -f conftest.er1
14135 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014136 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014137 (exit $ac_status); } && {
14138 test -z "$ac_c_werror_flag" ||
14139 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014140 } && test -s conftest$ac_exeext &&
14141 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014142 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014143else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014144 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014145sed 's/^/| /' conftest.$ac_ext >&5
14146
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014147 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014148fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014149
14150rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014151 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014152LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014153fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014154{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
14155echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6; }
14156if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014157 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014158fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000014159 # SVR4
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014160{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
14161echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014162if test "${ac_cv_lib_socket_socket+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014163 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014164else
Martin v. Löwis11437992002-04-12 09:54:03 +000014165 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014166LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014167cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014168/* confdefs.h. */
14169_ACEOF
14170cat confdefs.h >>conftest.$ac_ext
14171cat >>conftest.$ac_ext <<_ACEOF
14172/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014173
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014174/* Override any GCC internal prototype to avoid an error.
14175 Use char because int might match the return type of a GCC
14176 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014177#ifdef __cplusplus
14178extern "C"
14179#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014180char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014181int
14182main ()
14183{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014184return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014185 ;
14186 return 0;
14187}
14188_ACEOF
14189rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014190if { (ac_try="$ac_link"
14191case "(($ac_try" in
14192 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14193 *) ac_try_echo=$ac_try;;
14194esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014195eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014196 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014197 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014198 grep -v '^ *+' conftest.er1 >conftest.err
14199 rm -f conftest.er1
14200 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014202 (exit $ac_status); } && {
14203 test -z "$ac_c_werror_flag" ||
14204 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014205 } && test -s conftest$ac_exeext &&
14206 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014207 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014208else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014209 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014210sed 's/^/| /' conftest.$ac_ext >&5
14211
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014212 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014213fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014214
14215rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014216 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014217LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014218fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014219{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
14220echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
14221if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000014222 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000014223fi
14224 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000014225
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014226{ echo "$as_me:$LINENO: checking for --with-libs" >&5
14227echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014228
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014229# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000014230if test "${with_libs+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014231 withval=$with_libs;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014232{ echo "$as_me:$LINENO: result: $withval" >&5
14233echo "${ECHO_T}$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000014234LIBS="$withval $LIBS"
14235
14236else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014237 { echo "$as_me:$LINENO: result: no" >&5
14238echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014239fi
14240
Guido van Rossum7f43da71994-08-01 12:15:30 +000014241
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014242# Check for use of the system libffi library
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014243{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
14244echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014245
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014246# Check whether --with-system_ffi was given.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014247if test "${with_system_ffi+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014248 withval=$with_system_ffi;
14249fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014250
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014251
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014252{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5
14253echo "${ECHO_T}$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014254
Matthias Klose55708cc2009-04-30 08:06:49 +000014255# Check for --with-dbmliborder
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014256{ echo "$as_me:$LINENO: checking for --with-dbmliborder" >&5
14257echo $ECHO_N "checking for --with-dbmliborder... $ECHO_C" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000014258
14259# Check whether --with-dbmliborder was given.
14260if test "${with_dbmliborder+set}" = set; then
14261 withval=$with_dbmliborder;
14262if test x$with_dbmliborder = xyes
14263then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014264{ { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
14265echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Matthias Klose55708cc2009-04-30 08:06:49 +000014266 { (exit 1); exit 1; }; }
14267else
14268 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
14269 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
14270 then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014271 { { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
14272echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Matthias Klose55708cc2009-04-30 08:06:49 +000014273 { (exit 1); exit 1; }; }
14274 fi
14275 done
14276fi
14277fi
14278
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014279{ echo "$as_me:$LINENO: result: $with_dbmliborder" >&5
14280echo "${ECHO_T}$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000014281
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000014282# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014283
14284
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014285{ echo "$as_me:$LINENO: checking for --with-signal-module" >&5
14286echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014287
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014288# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014289if test "${with_signal_module+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014290 withval=$with_signal_module;
14291fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014292
14293
14294if test -z "$with_signal_module"
14295then with_signal_module="yes"
14296fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014297{ echo "$as_me:$LINENO: result: $with_signal_module" >&5
14298echo "${ECHO_T}$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014299
14300if test "${with_signal_module}" = "yes"; then
14301 USE_SIGNAL_MODULE=""
14302 SIGNAL_OBJS=""
14303else
14304 USE_SIGNAL_MODULE="#"
14305 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
14306fi
14307
Guido van Rossum3d15bd82001-01-10 18:53:48 +000014308# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000014309
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000014310USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000014311
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014312{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
14313echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014314
Guido van Rossumec2f0731997-01-22 20:54:01 +000014315
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014316# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000014317if test "${with_dec_threads+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014318 withval=$with_dec_threads;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014319{ echo "$as_me:$LINENO: result: $withval" >&5
14320echo "${ECHO_T}$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000014321LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000014322if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000014323 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000014324fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000014325else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014326 { echo "$as_me:$LINENO: result: no" >&5
14327echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014328fi
14329
Martin v. Löwis11437992002-04-12 09:54:03 +000014330
14331# Templates for things AC_DEFINEd more than once.
14332# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000014333
14334
Martin v. Löwis11437992002-04-12 09:54:03 +000014335
14336
14337
14338
14339
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014340{ echo "$as_me:$LINENO: checking for --with-threads" >&5
14341echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014342
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014343# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000014344if test "${with_threads+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014345 withval=$with_threads;
14346fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000014347
14348
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000014349# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000014350
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014351# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014352if test "${with_thread+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014353 withval=$with_thread; with_threads=$with_thread
14354fi
14355
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000014356
14357if test -z "$with_threads"
14358then with_threads="yes"
14359fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014360{ echo "$as_me:$LINENO: result: $with_threads" >&5
14361echo "${ECHO_T}$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000014362
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014363
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000014364if test "$with_threads" = "no"
14365then
14366 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014367elif test "$ac_cv_pthread_is_default" = yes
14368then
Martin v. Löwis11437992002-04-12 09:54:03 +000014369 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014370#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014371_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014372
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014373 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000014374 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014375#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014376_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014377
14378 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000014379 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014380elif test "$ac_cv_kpthread" = "yes"
14381then
14382 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000014383 if test "$ac_cv_cxx_thread" = "yes"; then
14384 CXX="$CXX -Kpthread"
14385 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014386 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000014387#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014388_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000014389
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014390 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014391 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000014392elif test "$ac_cv_kthread" = "yes"
14393then
14394 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000014395 if test "$ac_cv_cxx_thread" = "yes"; then
14396 CXX="$CXX -Kthread"
14397 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000014398 cat >>confdefs.h <<\_ACEOF
14399#define WITH_THREAD 1
14400_ACEOF
14401
14402 posix_threads=yes
14403 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014404elif test "$ac_cv_pthread" = "yes"
14405then
14406 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000014407 if test "$ac_cv_cxx_thread" = "yes"; then
14408 CXX="$CXX -pthread"
14409 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014410 cat >>confdefs.h <<\_ACEOF
14411#define WITH_THREAD 1
14412_ACEOF
14413
14414 posix_threads=yes
14415 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014416else
14417 if test ! -z "$with_threads" -a -d "$with_threads"
14418 then LDFLAGS="$LDFLAGS -L$with_threads"
14419 fi
14420 if test ! -z "$withval" -a -d "$withval"
14421 then LDFLAGS="$LDFLAGS -L$withval"
14422 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014423
14424 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000014425 # define _POSIX_THREADS in unistd.h. Some apparently don't
14426 # (e.g. gnu pth with pthread emulation)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014427 { echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
14428echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014429 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014430/* confdefs.h. */
14431_ACEOF
14432cat confdefs.h >>conftest.$ac_ext
14433cat >>conftest.$ac_ext <<_ACEOF
14434/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000014435
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014436#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000014437#ifdef _POSIX_THREADS
14438yes
14439#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014440
14441_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014442if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000014443 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014444 unistd_defines_pthreads=yes
14445else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014446 unistd_defines_pthreads=no
14447fi
Martin v. Löwisf6594222010-02-15 08:37:47 +000014448rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014449
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014450 { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
14451echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014452
Martin v. Löwis11437992002-04-12 09:54:03 +000014453 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000014454#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014455_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000014456
Martin v. Löwis11437992002-04-12 09:54:03 +000014457 if test "${ac_cv_header_cthreads_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014458 { echo "$as_me:$LINENO: checking for cthreads.h" >&5
14459echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014460if test "${ac_cv_header_cthreads_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014461 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014462fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014463{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
14464echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014465else
Martin v. Löwis11437992002-04-12 09:54:03 +000014466 # Is the header compilable?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014467{ echo "$as_me:$LINENO: checking cthreads.h usability" >&5
14468echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014469cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014470/* confdefs.h. */
14471_ACEOF
14472cat confdefs.h >>conftest.$ac_ext
14473cat >>conftest.$ac_ext <<_ACEOF
14474/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014475$ac_includes_default
14476#include <cthreads.h>
14477_ACEOF
14478rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014479if { (ac_try="$ac_compile"
14480case "(($ac_try" in
14481 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14482 *) ac_try_echo=$ac_try;;
14483esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014484eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014485 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014486 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014487 grep -v '^ *+' conftest.er1 >conftest.err
14488 rm -f conftest.er1
14489 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014491 (exit $ac_status); } && {
14492 test -z "$ac_c_werror_flag" ||
14493 test ! -s conftest.err
14494 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014495 ac_header_compiler=yes
14496else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014497 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014498sed 's/^/| /' conftest.$ac_ext >&5
14499
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014500 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014501fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014502
14503rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014504{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14505echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014506
14507# Is the header present?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014508{ echo "$as_me:$LINENO: checking cthreads.h presence" >&5
14509echo $ECHO_N "checking cthreads.h presence... $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öwisa6e97582002-01-01 18:41:33 +000014516#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014517_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014518if { (ac_try="$ac_cpp conftest.$ac_ext"
14519case "(($ac_try" in
14520 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14521 *) ac_try_echo=$ac_try;;
14522esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014523eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014524 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014525 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014526 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000014527 rm -f conftest.er1
14528 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014530 (exit $ac_status); } >/dev/null && {
14531 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14532 test ! -s conftest.err
14533 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014534 ac_header_preproc=yes
14535else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014536 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014537sed 's/^/| /' conftest.$ac_ext >&5
14538
Martin v. Löwis11437992002-04-12 09:54:03 +000014539 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014540fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014541
Martin v. Löwis11437992002-04-12 09:54:03 +000014542rm -f conftest.err conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014543{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14544echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014545
14546# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014547case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14548 yes:no: )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014549 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
14550echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
14551 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
14552echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014553 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014554 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014555 no:yes:* )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014556 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
14557echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
14558 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
14559echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
14560 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
14561echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
14562 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
14563echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
14564 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
14565echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
14566 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
14567echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014568 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000014569## -------------------------------------- ##
14570## Report this to http://bugs.python.org/ ##
14571## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014572_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014573 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014574 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014575esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014576{ echo "$as_me:$LINENO: checking for cthreads.h" >&5
14577echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014578if test "${ac_cv_header_cthreads_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014579 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014580else
14581 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014582fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014583{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
14584echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014585
14586fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014587if test $ac_cv_header_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014588 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014589#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014590_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014591
Martin v. Löwis11437992002-04-12 09:54:03 +000014592 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014593#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014594_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014595
Martin v. Löwis11437992002-04-12 09:54:03 +000014596
14597cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014598#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014599_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014600
14601 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014602 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014603else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014604
Martin v. Löwis11437992002-04-12 09:54:03 +000014605 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014606 { echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
14607echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014608if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014609 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014610fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014611{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
14612echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014613else
Martin v. Löwis11437992002-04-12 09:54:03 +000014614 # Is the header compilable?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014615{ echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
14616echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014617cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014618/* confdefs.h. */
14619_ACEOF
14620cat confdefs.h >>conftest.$ac_ext
14621cat >>conftest.$ac_ext <<_ACEOF
14622/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014623$ac_includes_default
14624#include <mach/cthreads.h>
14625_ACEOF
14626rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014627if { (ac_try="$ac_compile"
14628case "(($ac_try" in
14629 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14630 *) ac_try_echo=$ac_try;;
14631esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014632eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014633 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014634 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014635 grep -v '^ *+' conftest.er1 >conftest.err
14636 rm -f conftest.er1
14637 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014639 (exit $ac_status); } && {
14640 test -z "$ac_c_werror_flag" ||
14641 test ! -s conftest.err
14642 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014643 ac_header_compiler=yes
14644else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014645 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014646sed 's/^/| /' conftest.$ac_ext >&5
14647
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014648 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014649fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014650
14651rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014652{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14653echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014654
14655# Is the header present?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014656{ echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
14657echo $ECHO_N "checking mach/cthreads.h presence... $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öwisa6e97582002-01-01 18:41:33 +000014664#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014665_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014666if { (ac_try="$ac_cpp conftest.$ac_ext"
14667case "(($ac_try" in
14668 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14669 *) ac_try_echo=$ac_try;;
14670esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014671eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014672 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014673 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014674 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000014675 rm -f conftest.er1
14676 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014678 (exit $ac_status); } >/dev/null && {
14679 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14680 test ! -s conftest.err
14681 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014682 ac_header_preproc=yes
14683else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014684 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014685sed 's/^/| /' conftest.$ac_ext >&5
14686
Martin v. Löwis11437992002-04-12 09:54:03 +000014687 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014688fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014689
Martin v. Löwis11437992002-04-12 09:54:03 +000014690rm -f conftest.err conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014691{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14692echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014693
14694# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014695case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14696 yes:no: )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014697 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
14698echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
14699 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
14700echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014701 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014702 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014703 no:yes:* )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014704 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
14705echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
14706 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
14707echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
14708 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
14709echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
14710 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
14711echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
14712 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
14713echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
14714 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
14715echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014716 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000014717## -------------------------------------- ##
14718## Report this to http://bugs.python.org/ ##
14719## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014720_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014721 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014722 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014723esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014724{ echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
14725echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014726if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014727 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014728else
14729 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014730fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014731{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
14732echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014733
14734fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014735if test $ac_cv_header_mach_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014736 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014737#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014738_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014739
Martin v. Löwis11437992002-04-12 09:54:03 +000014740 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014741#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014742_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014743
Martin v. Löwis11437992002-04-12 09:54:03 +000014744
14745cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014746#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014747_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014748
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014749 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014750else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014751
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014752 { echo "$as_me:$LINENO: checking for --with-pth" >&5
14753echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014754
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014755# Check whether --with-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014756if test "${with_pth+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014757 withval=$with_pth; { echo "$as_me:$LINENO: result: $withval" >&5
14758echo "${ECHO_T}$withval" >&6; }
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000014759 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014760#define WITH_THREAD 1
14761_ACEOF
14762
14763
14764cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014765#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014766_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014767
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000014768 LIBS="-lpth $LIBS"
14769 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014770else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014771 { echo "$as_me:$LINENO: result: no" >&5
14772echo "${ECHO_T}no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014773
14774 # Just looking for pthread_create in libpthread is not enough:
14775 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
14776 # So we really have to include pthread.h, and then link.
14777 _libs=$LIBS
14778 LIBS="$LIBS -lpthread"
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014779 { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
14780echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014781 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014782/* confdefs.h. */
14783_ACEOF
14784cat confdefs.h >>conftest.$ac_ext
14785cat >>conftest.$ac_ext <<_ACEOF
14786/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014787#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000014788
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014789void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000014790int
14791main ()
14792{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014793
14794pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000014795 ;
14796 return 0;
14797}
14798_ACEOF
14799rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014800if { (ac_try="$ac_link"
14801case "(($ac_try" in
14802 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14803 *) ac_try_echo=$ac_try;;
14804esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014805eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014806 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014807 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014808 grep -v '^ *+' conftest.er1 >conftest.err
14809 rm -f conftest.er1
14810 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014812 (exit $ac_status); } && {
14813 test -z "$ac_c_werror_flag" ||
14814 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014815 } && test -s conftest$ac_exeext &&
14816 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014817
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014818 { echo "$as_me:$LINENO: result: yes" >&5
14819echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014820 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000014821#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014822_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000014823
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014824 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014825 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000014826else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014827 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014828sed 's/^/| /' conftest.$ac_ext >&5
14829
Martin v. Löwis11437992002-04-12 09:54:03 +000014830
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014831 LIBS=$_libs
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014832 { echo "$as_me:$LINENO: checking for pthread_detach" >&5
14833echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014834if test "${ac_cv_func_pthread_detach+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014835 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000014836else
Martin v. Löwis11437992002-04-12 09:54:03 +000014837 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014838/* confdefs.h. */
14839_ACEOF
14840cat confdefs.h >>conftest.$ac_ext
14841cat >>conftest.$ac_ext <<_ACEOF
14842/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014843/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
14844 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14845#define pthread_detach innocuous_pthread_detach
14846
Guido van Rossumad678af1998-10-02 14:42:15 +000014847/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014848 which can conflict with char pthread_detach (); below.
14849 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014850 <limits.h> exists even on freestanding compilers. */
14851
14852#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000014853# include <limits.h>
14854#else
14855# include <assert.h>
14856#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014857
14858#undef pthread_detach
14859
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014860/* Override any GCC internal prototype to avoid an error.
14861 Use char because int might match the return type of a GCC
14862 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014863#ifdef __cplusplus
14864extern "C"
14865#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014866char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000014867/* The GNU C library defines this for functions which it implements
14868 to always fail with ENOSYS. Some functions are actually named
14869 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014870#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000014871choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000014872#endif
14873
Skip Montanaro6dead952003-09-25 14:50:04 +000014874int
14875main ()
14876{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014877return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014878 ;
14879 return 0;
14880}
14881_ACEOF
14882rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014883if { (ac_try="$ac_link"
14884case "(($ac_try" in
14885 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14886 *) ac_try_echo=$ac_try;;
14887esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014888eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014889 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014890 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014891 grep -v '^ *+' conftest.er1 >conftest.err
14892 rm -f conftest.er1
14893 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014895 (exit $ac_status); } && {
14896 test -z "$ac_c_werror_flag" ||
14897 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014898 } && test -s conftest$ac_exeext &&
14899 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014900 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000014901else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014902 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014903sed 's/^/| /' conftest.$ac_ext >&5
14904
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014905 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000014906fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014907
14908rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014909 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000014910fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014911{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
14912echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; }
14913if test $ac_cv_func_pthread_detach = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014914 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000014915#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014916_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000014917
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014918 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014919 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000014920else
Guido van Rossumad678af1998-10-02 14:42:15 +000014921
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014922 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014923 { echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
14924echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014925if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014926 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014927fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014928{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
14929echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014930else
14931 # Is the header compilable?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014932{ echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
14933echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014934cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014935/* confdefs.h. */
14936_ACEOF
14937cat confdefs.h >>conftest.$ac_ext
14938cat >>conftest.$ac_ext <<_ACEOF
14939/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014940$ac_includes_default
14941#include <atheos/threads.h>
14942_ACEOF
14943rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014944if { (ac_try="$ac_compile"
14945case "(($ac_try" in
14946 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14947 *) ac_try_echo=$ac_try;;
14948esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014949eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014950 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014951 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014952 grep -v '^ *+' conftest.er1 >conftest.err
14953 rm -f conftest.er1
14954 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014956 (exit $ac_status); } && {
14957 test -z "$ac_c_werror_flag" ||
14958 test ! -s conftest.err
14959 } && test -s conftest.$ac_objext; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014960 ac_header_compiler=yes
14961else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014962 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014963sed 's/^/| /' conftest.$ac_ext >&5
14964
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014965 ac_header_compiler=no
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014966fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014967
14968rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014969{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14970echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014971
14972# Is the header present?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014973{ echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
14974echo $ECHO_N "checking atheos/threads.h presence... $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#include <atheos/threads.h>
14982_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014983if { (ac_try="$ac_cpp conftest.$ac_ext"
14984case "(($ac_try" in
14985 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14986 *) ac_try_echo=$ac_try;;
14987esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014988eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014989 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014990 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014991 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014992 rm -f conftest.er1
14993 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014995 (exit $ac_status); } >/dev/null && {
14996 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14997 test ! -s conftest.err
14998 }; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014999 ac_header_preproc=yes
15000else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015001 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015002sed 's/^/| /' conftest.$ac_ext >&5
15003
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015004 ac_header_preproc=no
15005fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015006
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015007rm -f conftest.err conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015008{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15009echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015010
15011# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015012case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15013 yes:no: )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015014 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
15015echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15016 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
15017echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015018 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015019 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015020 no:yes:* )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015021 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
15022echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
15023 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
15024echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
15025 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
15026echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
15027 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5
15028echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;}
15029 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
15030echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
15031 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
15032echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015033 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000015034## -------------------------------------- ##
15035## Report this to http://bugs.python.org/ ##
15036## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015037_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015038 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000015039 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015040esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015041{ echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
15042echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015043if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015044 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015045else
15046 ac_cv_header_atheos_threads_h=$ac_header_preproc
15047fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015048{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
15049echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015050
15051fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015052if test $ac_cv_header_atheos_threads_h = yes; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015053 cat >>confdefs.h <<\_ACEOF
15054#define WITH_THREAD 1
15055_ACEOF
15056
15057
15058cat >>confdefs.h <<\_ACEOF
15059#define ATHEOS_THREADS 1
15060_ACEOF
15061
15062 THREADOBJ="Python/thread.o"
15063else
15064
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015065 { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
15066echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015067if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015068 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015069else
Martin v. Löwis11437992002-04-12 09:54:03 +000015070 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015071LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015072cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015073/* confdefs.h. */
15074_ACEOF
15075cat confdefs.h >>conftest.$ac_ext
15076cat >>conftest.$ac_ext <<_ACEOF
15077/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015078
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015079/* Override any GCC internal prototype to avoid an error.
15080 Use char because int might match the return type of a GCC
15081 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015082#ifdef __cplusplus
15083extern "C"
15084#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015085char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015086int
15087main ()
15088{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015089return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015090 ;
15091 return 0;
15092}
15093_ACEOF
15094rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015095if { (ac_try="$ac_link"
15096case "(($ac_try" in
15097 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15098 *) ac_try_echo=$ac_try;;
15099esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015100eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015101 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015102 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015103 grep -v '^ *+' conftest.er1 >conftest.err
15104 rm -f conftest.er1
15105 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015106 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015107 (exit $ac_status); } && {
15108 test -z "$ac_c_werror_flag" ||
15109 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015110 } && test -s conftest$ac_exeext &&
15111 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015112 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000015113else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015114 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015115sed 's/^/| /' conftest.$ac_ext >&5
15116
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015117 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000015118fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015119
15120rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015121 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015122LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000015123fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015124{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
15125echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
15126if test $ac_cv_lib_pthreads_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015127 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000015128#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015129_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000015130
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015131 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015132 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015133 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000015134else
Greg Steinadf63d62000-07-05 10:38:09 +000015135
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015136 { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
15137echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015138if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015139 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000015140else
Martin v. Löwis11437992002-04-12 09:54:03 +000015141 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000015142LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015143cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015144/* confdefs.h. */
15145_ACEOF
15146cat confdefs.h >>conftest.$ac_ext
15147cat >>conftest.$ac_ext <<_ACEOF
15148/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015149
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015150/* Override any GCC internal prototype to avoid an error.
15151 Use char because int might match the return type of a GCC
15152 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015153#ifdef __cplusplus
15154extern "C"
15155#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015156char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015157int
15158main ()
15159{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015160return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015161 ;
15162 return 0;
15163}
15164_ACEOF
15165rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015166if { (ac_try="$ac_link"
15167case "(($ac_try" in
15168 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15169 *) ac_try_echo=$ac_try;;
15170esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015171eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015172 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015173 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015174 grep -v '^ *+' conftest.er1 >conftest.err
15175 rm -f conftest.er1
15176 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015178 (exit $ac_status); } && {
15179 test -z "$ac_c_werror_flag" ||
15180 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015181 } && test -s conftest$ac_exeext &&
15182 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015183 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000015184else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015185 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015186sed 's/^/| /' conftest.$ac_ext >&5
15187
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015188 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000015189fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015190
15191rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015192 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015193LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000015194fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015195{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
15196echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
15197if test $ac_cv_lib_c_r_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015198 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000015199#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015200_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000015201
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015202 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015203 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015204 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000015205else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000015206
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015207 { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
15208echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015209if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015210 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015211else
Martin v. Löwis11437992002-04-12 09:54:03 +000015212 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015213LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015214cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015215/* confdefs.h. */
15216_ACEOF
15217cat confdefs.h >>conftest.$ac_ext
15218cat >>conftest.$ac_ext <<_ACEOF
15219/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015220
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015221/* Override any GCC internal prototype to avoid an error.
15222 Use char because int might match the return type of a GCC
15223 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015224#ifdef __cplusplus
15225extern "C"
15226#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015227char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015228int
15229main ()
15230{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015231return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015232 ;
15233 return 0;
15234}
15235_ACEOF
15236rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015237if { (ac_try="$ac_link"
15238case "(($ac_try" in
15239 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15240 *) ac_try_echo=$ac_try;;
15241esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015242eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015243 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015244 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015245 grep -v '^ *+' conftest.er1 >conftest.err
15246 rm -f conftest.er1
15247 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015248 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015249 (exit $ac_status); } && {
15250 test -z "$ac_c_werror_flag" ||
15251 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015252 } && test -s conftest$ac_exeext &&
15253 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015254 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015255else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015256 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015257sed 's/^/| /' conftest.$ac_ext >&5
15258
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015259 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015260fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015261
15262rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015263 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015264LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015265fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015266{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
15267echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; }
15268if test $ac_cv_lib_pthread___pthread_create_system = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015269 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015270#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015271_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015272
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015273 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015274 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015275 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015276else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015277
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015278 { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
15279echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015280if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015281 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000015282else
Martin v. Löwis11437992002-04-12 09:54:03 +000015283 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000015284LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015285cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015286/* confdefs.h. */
15287_ACEOF
15288cat confdefs.h >>conftest.$ac_ext
15289cat >>conftest.$ac_ext <<_ACEOF
15290/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015291
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015292/* Override any GCC internal prototype to avoid an error.
15293 Use char because int might match the return type of a GCC
15294 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015295#ifdef __cplusplus
15296extern "C"
15297#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015298char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015299int
15300main ()
15301{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015302return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015303 ;
15304 return 0;
15305}
15306_ACEOF
15307rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015308if { (ac_try="$ac_link"
15309case "(($ac_try" in
15310 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15311 *) ac_try_echo=$ac_try;;
15312esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015313eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015314 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015315 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015316 grep -v '^ *+' conftest.er1 >conftest.err
15317 rm -f conftest.er1
15318 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015320 (exit $ac_status); } && {
15321 test -z "$ac_c_werror_flag" ||
15322 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015323 } && test -s conftest$ac_exeext &&
15324 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015325 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000015326else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015327 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015328sed 's/^/| /' conftest.$ac_ext >&5
15329
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015330 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000015331fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015332
15333rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015334 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015335LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000015336fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015337{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
15338echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; }
15339if test $ac_cv_lib_cma_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015340 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000015341#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015342_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000015343
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015344 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015345 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015346 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000015347else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000015348
Martin v. Löwis130fb172001-07-19 11:00:41 +000015349 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000015350fi
15351
Guido van Rossum627b2d71993-12-24 10:39:16 +000015352
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015353fi
15354
Guido van Rossum0be3e491997-05-22 20:33:33 +000015355fi
15356
Guido van Rossum49545951997-12-02 19:28:29 +000015357fi
15358
Guido van Rossumb93a8621998-05-07 13:27:32 +000015359fi
15360
Guido van Rossum07bd90e2000-05-08 13:41:38 +000015361
Michael W. Hudson54241132001-12-07 15:38:26 +000015362fi
15363
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015364fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015365
15366rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015367 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015368fi
15369
Martin v. Löwis11437992002-04-12 09:54:03 +000015370fi
15371
15372
15373fi
15374
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015375
Michael W. Hudson54241132001-12-07 15:38:26 +000015376
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015377 { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
15378echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015379if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015380 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015381else
Martin v. Löwis11437992002-04-12 09:54:03 +000015382 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015383LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015384cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015385/* confdefs.h. */
15386_ACEOF
15387cat confdefs.h >>conftest.$ac_ext
15388cat >>conftest.$ac_ext <<_ACEOF
15389/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015390
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015391/* Override any GCC internal prototype to avoid an error.
15392 Use char because int might match the return type of a GCC
15393 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015394#ifdef __cplusplus
15395extern "C"
15396#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015397char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015398int
15399main ()
15400{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015401return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015402 ;
15403 return 0;
15404}
15405_ACEOF
15406rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015407if { (ac_try="$ac_link"
15408case "(($ac_try" in
15409 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15410 *) ac_try_echo=$ac_try;;
15411esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015412eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015413 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015414 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015415 grep -v '^ *+' conftest.er1 >conftest.err
15416 rm -f conftest.er1
15417 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015419 (exit $ac_status); } && {
15420 test -z "$ac_c_werror_flag" ||
15421 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015422 } && test -s conftest$ac_exeext &&
15423 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015424 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015425else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015426 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015427sed 's/^/| /' conftest.$ac_ext >&5
15428
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015429 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015430fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015431
15432rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015433 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015434LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015435fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015436{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
15437echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; }
15438if test $ac_cv_lib_mpc_usconfig = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015439 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015440#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015441_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015442
Martin v. Löwis130fb172001-07-19 11:00:41 +000015443 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015444 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015445 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000015446fi
15447
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015448
Neal Norwitza978ab02002-11-02 16:58:05 +000015449 if test "$posix_threads" != "yes"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015450 { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
15451echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015452if test "${ac_cv_lib_thread_thr_create+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015453 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015454else
Martin v. Löwis11437992002-04-12 09:54:03 +000015455 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015456LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015457cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015458/* confdefs.h. */
15459_ACEOF
15460cat confdefs.h >>conftest.$ac_ext
15461cat >>conftest.$ac_ext <<_ACEOF
15462/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015463
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015464/* Override any GCC internal prototype to avoid an error.
15465 Use char because int might match the return type of a GCC
15466 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015467#ifdef __cplusplus
15468extern "C"
15469#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015470char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015471int
15472main ()
15473{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015474return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015475 ;
15476 return 0;
15477}
15478_ACEOF
15479rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015480if { (ac_try="$ac_link"
15481case "(($ac_try" in
15482 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15483 *) ac_try_echo=$ac_try;;
15484esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015485eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015486 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015487 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015488 grep -v '^ *+' conftest.er1 >conftest.err
15489 rm -f conftest.er1
15490 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015492 (exit $ac_status); } && {
15493 test -z "$ac_c_werror_flag" ||
15494 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015495 } && test -s conftest$ac_exeext &&
15496 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015497 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015498else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015499 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015500sed 's/^/| /' conftest.$ac_ext >&5
15501
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015502 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015503fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015504
15505rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015506 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015507LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015508fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015509{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
15510echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
15511if test $ac_cv_lib_thread_thr_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015512 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015513#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015514_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015515
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015516 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015517 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015518 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000015519fi
15520
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015521 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015522
Martin v. Löwis130fb172001-07-19 11:00:41 +000015523 if test "$USE_THREAD_MODULE" != "#"
15524 then
15525 # If the above checks didn't disable threads, (at least) OSF1
15526 # needs this '-threads' argument during linking.
15527 case $ac_sys_system in
15528 OSF1) LDLAST=-threads;;
15529 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000015530 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015531fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015532
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015533if test "$posix_threads" = "yes"; then
15534 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015535
15536cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015537#define _POSIX_THREADS 1
15538_ACEOF
15539
15540 fi
15541
15542 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
15543 case $ac_sys_system/$ac_sys_release in
15544 SunOS/5.6)
15545cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015546#define HAVE_PTHREAD_DESTRUCTOR 1
15547_ACEOF
15548
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015549 ;;
15550 SunOS/5.8)
15551cat >>confdefs.h <<\_ACEOF
15552#define HAVE_BROKEN_POSIX_SEMAPHORES 1
15553_ACEOF
15554
15555 ;;
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000015556 AIX/5)
15557cat >>confdefs.h <<\_ACEOF
15558#define HAVE_BROKEN_POSIX_SEMAPHORES 1
15559_ACEOF
15560
15561 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015562 esac
15563
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015564 { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
15565echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015566 if test "${ac_cv_pthread_system_supported+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015567 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015568else
15569 if test "$cross_compiling" = yes; then
15570 ac_cv_pthread_system_supported=no
15571else
15572 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015573/* confdefs.h. */
15574_ACEOF
15575cat confdefs.h >>conftest.$ac_ext
15576cat >>conftest.$ac_ext <<_ACEOF
15577/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015578#include <pthread.h>
15579 void *foo(void *parm) {
15580 return NULL;
15581 }
15582 main() {
15583 pthread_attr_t attr;
15584 pthread_t id;
15585 if (pthread_attr_init(&attr)) exit(-1);
15586 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
15587 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
15588 exit(0);
15589 }
15590_ACEOF
15591rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015592if { (ac_try="$ac_link"
15593case "(($ac_try" in
15594 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15595 *) ac_try_echo=$ac_try;;
15596esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015597eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015598 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015599 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015600 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015601 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015602 { (case "(($ac_try" in
15603 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15604 *) ac_try_echo=$ac_try;;
15605esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015606eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015607 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015608 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015610 (exit $ac_status); }; }; then
15611 ac_cv_pthread_system_supported=yes
15612else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015613 echo "$as_me: program exited with status $ac_status" >&5
15614echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015615sed 's/^/| /' conftest.$ac_ext >&5
15616
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015617( exit $ac_status )
15618ac_cv_pthread_system_supported=no
15619fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015620rm -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 +000015621fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015622
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015623
15624
Guido van Rossum627b2d71993-12-24 10:39:16 +000015625fi
15626
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015627 { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
15628echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015629 if test "$ac_cv_pthread_system_supported" = "yes"; then
15630
15631cat >>confdefs.h <<\_ACEOF
15632#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
15633_ACEOF
15634
15635 fi
15636
15637for ac_func in pthread_sigmask
15638do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015639as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15640{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15641echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015642if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015643 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015644else
15645 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015646/* confdefs.h. */
15647_ACEOF
15648cat confdefs.h >>conftest.$ac_ext
15649cat >>conftest.$ac_ext <<_ACEOF
15650/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015651/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15652 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15653#define $ac_func innocuous_$ac_func
15654
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015655/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015656 which can conflict with char $ac_func (); below.
15657 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015658 <limits.h> exists even on freestanding compilers. */
15659
15660#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015661# include <limits.h>
15662#else
15663# include <assert.h>
15664#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015665
15666#undef $ac_func
15667
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015668/* Override any GCC internal prototype to avoid an error.
15669 Use char because int might match the return type of a GCC
15670 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015671#ifdef __cplusplus
15672extern "C"
15673#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015674char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015675/* The GNU C library defines this for functions which it implements
15676 to always fail with ENOSYS. Some functions are actually named
15677 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015678#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015679choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015680#endif
15681
Skip Montanaro6dead952003-09-25 14:50:04 +000015682int
15683main ()
15684{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015685return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015686 ;
15687 return 0;
15688}
15689_ACEOF
15690rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015691if { (ac_try="$ac_link"
15692case "(($ac_try" in
15693 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15694 *) ac_try_echo=$ac_try;;
15695esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015696eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015697 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015698 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015699 grep -v '^ *+' conftest.er1 >conftest.err
15700 rm -f conftest.er1
15701 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015703 (exit $ac_status); } && {
15704 test -z "$ac_c_werror_flag" ||
15705 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015706 } && test -s conftest$ac_exeext &&
15707 $as_test_x conftest$ac_exeext; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015708 eval "$as_ac_var=yes"
15709else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015710 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015711sed 's/^/| /' conftest.$ac_ext >&5
15712
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015713 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015714fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015715
15716rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015717 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015718fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015719ac_res=`eval echo '${'$as_ac_var'}'`
15720 { echo "$as_me:$LINENO: result: $ac_res" >&5
15721echo "${ECHO_T}$ac_res" >&6; }
15722if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015723 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015724#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015725_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000015726 case $ac_sys_system in
15727 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015728
Jason Tishlerfac083d2003-07-22 15:20:49 +000015729cat >>confdefs.h <<\_ACEOF
15730#define HAVE_BROKEN_PTHREAD_SIGMASK 1
15731_ACEOF
15732
15733 ;;
15734 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015735fi
15736done
15737
15738fi
15739
15740
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015741# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000015742
15743
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015744{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
15745echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015746# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015747if test "${enable_ipv6+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015748 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015749 no)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015750 { echo "$as_me:$LINENO: result: no" >&5
15751echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015752 ipv6=no
15753 ;;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015754 *) { echo "$as_me:$LINENO: result: yes" >&5
15755echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015756 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015757#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015758_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015759
15760 ipv6=yes
15761 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015762 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015763else
Martin v. Löwis11437992002-04-12 09:54:03 +000015764
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015765 if test "$cross_compiling" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015766 { echo "$as_me:$LINENO: result: no" >&5
15767echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015768 ipv6=no
15769
15770else
Martin v. Löwis11437992002-04-12 09:54:03 +000015771 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015772/* confdefs.h. */
15773_ACEOF
15774cat confdefs.h >>conftest.$ac_ext
15775cat >>conftest.$ac_ext <<_ACEOF
15776/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015777 /* AF_INET6 available check */
15778#include <sys/types.h>
15779#include <sys/socket.h>
15780main()
15781{
15782 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
15783 exit(1);
15784 else
15785 exit(0);
15786}
15787
Martin v. Löwis11437992002-04-12 09:54:03 +000015788_ACEOF
15789rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015790if { (ac_try="$ac_link"
15791case "(($ac_try" in
15792 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15793 *) ac_try_echo=$ac_try;;
15794esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015795eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015796 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015797 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015799 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015800 { (case "(($ac_try" in
15801 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15802 *) ac_try_echo=$ac_try;;
15803esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015804eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015805 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015806 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015808 (exit $ac_status); }; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015809 { echo "$as_me:$LINENO: result: yes" >&5
15810echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015811 ipv6=yes
15812else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015813 echo "$as_me: program exited with status $ac_status" >&5
15814echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015815sed 's/^/| /' conftest.$ac_ext >&5
15816
Martin v. Löwis11437992002-04-12 09:54:03 +000015817( exit $ac_status )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015818{ echo "$as_me:$LINENO: result: no" >&5
15819echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015820 ipv6=no
15821fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015822rm -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 +000015823fi
15824
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015825
15826
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015827if test "$ipv6" = "yes"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015828 { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
15829echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015830 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015831/* confdefs.h. */
15832_ACEOF
15833cat confdefs.h >>conftest.$ac_ext
15834cat >>conftest.$ac_ext <<_ACEOF
15835/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015836#include <sys/types.h>
15837#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015838int
15839main ()
15840{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015841struct sockaddr_in6 x;
15842x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000015843 ;
15844 return 0;
15845}
15846_ACEOF
15847rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015848if { (ac_try="$ac_compile"
15849case "(($ac_try" in
15850 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15851 *) ac_try_echo=$ac_try;;
15852esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015853eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015854 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015855 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015856 grep -v '^ *+' conftest.er1 >conftest.err
15857 rm -f conftest.er1
15858 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015860 (exit $ac_status); } && {
15861 test -z "$ac_c_werror_flag" ||
15862 test ! -s conftest.err
15863 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015864 { echo "$as_me:$LINENO: result: yes" >&5
15865echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015866 ipv6=yes
15867else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015868 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015869sed 's/^/| /' conftest.$ac_ext >&5
15870
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015871 { echo "$as_me:$LINENO: result: no" >&5
15872echo "${ECHO_T}no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015873 ipv6=no
15874fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015875
15876rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015877fi
15878
15879if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015880 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015881#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015882_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015883
15884fi
15885
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015886fi
15887
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015888
15889ipv6type=unknown
15890ipv6lib=none
15891ipv6trylibc=no
15892
15893if test "$ipv6" = "yes"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015894 { echo "$as_me:$LINENO: checking ipv6 stack type" >&5
15895echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000015896 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
15897 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015898 case $i in
15899 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000015900 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015901/* confdefs.h. */
15902_ACEOF
15903cat confdefs.h >>conftest.$ac_ext
15904cat >>conftest.$ac_ext <<_ACEOF
15905/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015906
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015907#include <netinet/in.h>
15908#ifdef IPV6_INRIA_VERSION
15909yes
15910#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015911_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015912if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015913 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000015914 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015915fi
Martin v. Löwisf6594222010-02-15 08:37:47 +000015916rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015917
15918 ;;
15919 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000015920 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015921/* confdefs.h. */
15922_ACEOF
15923cat confdefs.h >>conftest.$ac_ext
15924cat >>conftest.$ac_ext <<_ACEOF
15925/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015926
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015927#include <netinet/in.h>
15928#ifdef __KAME__
15929yes
15930#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015931_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015932if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015933 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015934 ipv6type=$i;
15935 ipv6lib=inet6
15936 ipv6libdir=/usr/local/v6/lib
15937 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015938fi
Martin v. Löwisf6594222010-02-15 08:37:47 +000015939rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015940
15941 ;;
15942 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000015943 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015944/* confdefs.h. */
15945_ACEOF
15946cat confdefs.h >>conftest.$ac_ext
15947cat >>conftest.$ac_ext <<_ACEOF
15948/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015949
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015950#include <features.h>
15951#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
15952yes
15953#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015954_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015955if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015956 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015957 ipv6type=$i;
15958 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015959fi
Martin v. Löwisf6594222010-02-15 08:37:47 +000015960rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015961
15962 ;;
15963 linux-inet6)
15964 if test -d /usr/inet6; then
15965 ipv6type=$i
15966 ipv6lib=inet6
15967 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000015968 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015969 fi
15970 ;;
15971 solaris)
15972 if test -f /etc/netconfig; then
15973 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
15974 ipv6type=$i
15975 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015976 fi
15977 fi
15978 ;;
15979 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000015980 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015981/* confdefs.h. */
15982_ACEOF
15983cat confdefs.h >>conftest.$ac_ext
15984cat >>conftest.$ac_ext <<_ACEOF
15985/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015986
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015987#include <sys/param.h>
15988#ifdef _TOSHIBA_INET6
15989yes
15990#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015991_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015992if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015993 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015994 ipv6type=$i;
15995 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000015996 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015997fi
Martin v. Löwisf6594222010-02-15 08:37:47 +000015998rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015999
16000 ;;
16001 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000016002 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016003/* confdefs.h. */
16004_ACEOF
16005cat confdefs.h >>conftest.$ac_ext
16006cat >>conftest.$ac_ext <<_ACEOF
16007/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016008
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016009#include </usr/local/v6/include/sys/v6config.h>
16010#ifdef __V6D__
16011yes
16012#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016013_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016014if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016015 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016016 ipv6type=$i;
16017 ipv6lib=v6;
16018 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000016019 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016020fi
Martin v. Löwisf6594222010-02-15 08:37:47 +000016021rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016022
16023 ;;
16024 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000016025 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016026/* confdefs.h. */
16027_ACEOF
16028cat confdefs.h >>conftest.$ac_ext
16029cat >>conftest.$ac_ext <<_ACEOF
16030/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016031
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016032#include <sys/param.h>
16033#ifdef _ZETA_MINAMI_INET6
16034yes
16035#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016036_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016037if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016038 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016039 ipv6type=$i;
16040 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000016041 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016042fi
Martin v. Löwisf6594222010-02-15 08:37:47 +000016043rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016044
16045 ;;
16046 esac
16047 if test "$ipv6type" != "unknown"; then
16048 break
16049 fi
16050 done
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016051 { echo "$as_me:$LINENO: result: $ipv6type" >&5
16052echo "${ECHO_T}$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016053fi
16054
16055if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
16056 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
16057 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
16058 echo "using lib$ipv6lib"
16059 else
16060 if test $ipv6trylibc = "yes"; then
16061 echo "using libc"
16062 else
16063 echo 'Fatal: no $ipv6lib library found. cannot continue.'
16064 echo "You need to fetch lib$ipv6lib.a from appropriate"
16065 echo 'ipv6 kit and compile beforehand.'
16066 exit 1
16067 fi
16068 fi
16069fi
16070
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016071{ echo "$as_me:$LINENO: checking for OSX 10.5 SDK or later" >&5
16072echo $ECHO_N "checking for OSX 10.5 SDK or later... $ECHO_C" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000016073cat >conftest.$ac_ext <<_ACEOF
16074/* confdefs.h. */
16075_ACEOF
16076cat confdefs.h >>conftest.$ac_ext
16077cat >>conftest.$ac_ext <<_ACEOF
16078/* end confdefs.h. */
16079#include <Carbon/Carbon.h>
16080int
16081main ()
16082{
16083FSIORefNum fRef = 0
16084 ;
16085 return 0;
16086}
16087_ACEOF
16088rm -f conftest.$ac_objext
16089if { (ac_try="$ac_compile"
16090case "(($ac_try" in
16091 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16092 *) ac_try_echo=$ac_try;;
16093esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016094eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000016095 (eval "$ac_compile") 2>conftest.er1
16096 ac_status=$?
16097 grep -v '^ *+' conftest.er1 >conftest.err
16098 rm -f conftest.er1
16099 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000016101 (exit $ac_status); } && {
16102 test -z "$ac_c_werror_flag" ||
16103 test ! -s conftest.err
16104 } && test -s conftest.$ac_objext; then
16105
16106cat >>confdefs.h <<\_ACEOF
16107#define HAVE_OSX105_SDK 1
16108_ACEOF
16109
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016110 { echo "$as_me:$LINENO: result: yes" >&5
16111echo "${ECHO_T}yes" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000016112else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016113 echo "$as_me: failed program was:" >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000016114sed 's/^/| /' conftest.$ac_ext >&5
16115
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016116 { echo "$as_me:$LINENO: result: no" >&5
16117echo "${ECHO_T}no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000016118
16119fi
16120
16121rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16122
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016123# Check for --with-doc-strings
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016124{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
16125echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016126
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016127# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016128if test "${with_doc_strings+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016129 withval=$with_doc_strings;
16130fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016131
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016132
16133if test -z "$with_doc_strings"
16134then with_doc_strings="yes"
16135fi
16136if test "$with_doc_strings" != "no"
16137then
16138
16139cat >>confdefs.h <<\_ACEOF
16140#define WITH_DOC_STRINGS 1
16141_ACEOF
16142
16143fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016144{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
16145echo "${ECHO_T}$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016146
Neil Schemenauera35c6882001-02-27 04:45:05 +000016147# Check for Python-specific malloc support
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016148{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
16149echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016150
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016151# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016152if test "${with_tsc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016153 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016154if test "$withval" != no
16155then
16156
16157cat >>confdefs.h <<\_ACEOF
16158#define WITH_TSC 1
16159_ACEOF
16160
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016161 { echo "$as_me:$LINENO: result: yes" >&5
16162echo "${ECHO_T}yes" >&6; }
16163else { echo "$as_me:$LINENO: result: no" >&5
16164echo "${ECHO_T}no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016165fi
16166else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016167 { echo "$as_me:$LINENO: result: no" >&5
16168echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016169fi
16170
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016171
16172# Check for Python-specific malloc support
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016173{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
16174echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016175
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016176# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000016177if test "${with_pymalloc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016178 withval=$with_pymalloc;
16179fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016180
Neil Schemenauera35c6882001-02-27 04:45:05 +000016181
Neil Schemenauer16c22972002-03-22 15:34:49 +000016182if test -z "$with_pymalloc"
16183then with_pymalloc="yes"
16184fi
16185if test "$with_pymalloc" != "no"
16186then
Martin v. Löwis11437992002-04-12 09:54:03 +000016187
16188cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000016189#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016190_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000016191
16192fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016193{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
16194echo "${ECHO_T}$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000016195
Barry Warsawef82cd72000-06-30 16:21:01 +000016196# Check for --with-wctype-functions
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016197{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
16198echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016199
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016200# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000016201if test "${with_wctype_functions+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016202 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000016203if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000016204then
16205
16206cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000016207#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016208_ACEOF
16209
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016210 { echo "$as_me:$LINENO: result: yes" >&5
16211echo "${ECHO_T}yes" >&6; }
16212else { echo "$as_me:$LINENO: result: no" >&5
16213echo "${ECHO_T}no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000016214fi
16215else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016216 { echo "$as_me:$LINENO: result: no" >&5
16217echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016218fi
16219
Barry Warsawef82cd72000-06-30 16:21:01 +000016220
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016221# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000016222
Guido van Rossum98935bf2001-09-05 19:13:16 +000016223DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000016224
Guido van Rossume97ee181999-12-20 21:27:22 +000016225# the dlopen() function means we might want to use dynload_shlib.o. some
16226# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000016227
Thomas Wouters3a584202000-08-05 23:28:51 +000016228for ac_func in dlopen
16229do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016230as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16231{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16232echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016233if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016234 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000016235else
Martin v. Löwis11437992002-04-12 09:54:03 +000016236 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016237/* confdefs.h. */
16238_ACEOF
16239cat confdefs.h >>conftest.$ac_ext
16240cat >>conftest.$ac_ext <<_ACEOF
16241/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016242/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16243 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16244#define $ac_func innocuous_$ac_func
16245
Guido van Rossume97ee181999-12-20 21:27:22 +000016246/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016247 which can conflict with char $ac_func (); below.
16248 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016249 <limits.h> exists even on freestanding compilers. */
16250
16251#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016252# include <limits.h>
16253#else
16254# include <assert.h>
16255#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016256
16257#undef $ac_func
16258
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016259/* Override any GCC internal prototype to avoid an error.
16260 Use char because int might match the return type of a GCC
16261 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016262#ifdef __cplusplus
16263extern "C"
16264#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016265char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000016266/* The GNU C library defines this for functions which it implements
16267 to always fail with ENOSYS. Some functions are actually named
16268 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016269#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000016270choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000016271#endif
16272
Skip Montanaro6dead952003-09-25 14:50:04 +000016273int
16274main ()
16275{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016276return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016277 ;
16278 return 0;
16279}
16280_ACEOF
16281rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016282if { (ac_try="$ac_link"
16283case "(($ac_try" in
16284 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16285 *) ac_try_echo=$ac_try;;
16286esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016287eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016288 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016289 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016290 grep -v '^ *+' conftest.er1 >conftest.err
16291 rm -f conftest.er1
16292 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016293 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016294 (exit $ac_status); } && {
16295 test -z "$ac_c_werror_flag" ||
16296 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016297 } && test -s conftest$ac_exeext &&
16298 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016299 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016300else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016301 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016302sed 's/^/| /' conftest.$ac_ext >&5
16303
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016304 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016305fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016306
16307rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016308 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016309fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016310ac_res=`eval echo '${'$as_ac_var'}'`
16311 { echo "$as_me:$LINENO: result: $ac_res" >&5
16312echo "${ECHO_T}$ac_res" >&6; }
16313if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016314 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016315#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016316_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016317
Guido van Rossume97ee181999-12-20 21:27:22 +000016318fi
Thomas Wouters3a584202000-08-05 23:28:51 +000016319done
Guido van Rossume97ee181999-12-20 21:27:22 +000016320
Michael W. Hudson54241132001-12-07 15:38:26 +000016321
Guido van Rossume97ee181999-12-20 21:27:22 +000016322# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
16323# loading of modules.
16324
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016325{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
16326echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000016327if test -z "$DYNLOADFILE"
16328then
16329 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000016330 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
16331 if test "$ac_cv_func_dlopen" = yes
16332 then DYNLOADFILE="dynload_shlib.o"
16333 else DYNLOADFILE="dynload_aix.o"
16334 fi
16335 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000016336 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016337 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
16338 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016339 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000016340 *)
16341 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
16342 # out any dynamic loading
16343 if test "$ac_cv_func_dlopen" = yes
16344 then DYNLOADFILE="dynload_shlib.o"
16345 else DYNLOADFILE="dynload_stub.o"
16346 fi
16347 ;;
16348 esac
16349fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016350{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
16351echo "${ECHO_T}$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000016352if test "$DYNLOADFILE" != "dynload_stub.o"
16353then
Martin v. Löwis11437992002-04-12 09:54:03 +000016354
16355cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016356#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016357_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016358
16359fi
16360
Neil Schemenauer4e425612001-06-19 15:44:15 +000016361# MACHDEP_OBJS can be set to platform-specific object files needed by Python
16362
Michael W. Hudson54241132001-12-07 15:38:26 +000016363
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016364{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
16365echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000016366if test -z "$MACHDEP_OBJS"
16367then
Jack Jansene578a632001-08-15 01:27:14 +000016368 MACHDEP_OBJS=$extra_machdep_objs
16369else
16370 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000016371fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016372{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
16373echo "${ECHO_T}MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000016374
Guido van Rossum627b2d71993-12-24 10:39:16 +000016375# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000016376
16377
16378
16379
16380
16381
16382
16383
16384
16385
16386
16387
16388
16389
16390
16391
16392
16393
16394
16395
16396
16397
16398
16399
16400
16401
16402
16403
16404
16405
16406
16407
16408
16409
16410
16411
16412
16413
16414
16415
16416
16417
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
Martin v. Löwisd6320502004-08-12 13:45:08 +000016447
Martin v. Löwisc3001752005-01-23 09:27:24 +000016448
16449
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016450
16451
Thomas Wouterscf297e42007-02-23 15:07:44 +000016452
16453
Gregory P. Smith25523d22007-09-03 16:44:55 +000016454
Christian Heimes4e30a842007-11-30 22:12:06 +000016455
Martin v. Löwis92fab752008-03-08 10:40:41 +000016456
Martin v. Löwis823725e2008-03-24 13:39:54 +000016457
16458
Benjamin Peterson965ce872009-04-05 21:24:58 +000016459
16460
16461
16462
Martin v. Löwis011e8422009-05-05 04:43:17 +000016463
Martin v. Löwis113a0852009-05-29 17:25:39 +000016464
Martin v. Löwis823725e2008-03-24 13:39:54 +000016465for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
16466 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000016467 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwisc3001752005-01-23 09:27:24 +000016468 getpriority getpwent getspnam getspent getsid getwd \
Martin v. Löwis011e8422009-05-05 04:43:17 +000016469 kill killpg lchmod lchown lstat mbrtowc mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000016470 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000016471 putenv readlink realpath \
Benjamin Peterson965ce872009-04-05 21:24:58 +000016472 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
16473 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000016474 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Gregory P. Smith25523d22007-09-03 16:44:55 +000016475 sigaction siginterrupt sigrelse strftime strlcpy \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000016476 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis113a0852009-05-29 17:25:39 +000016477 truncate uname unsetenv utimes waitpid wait3 wait4 \
16478 wcscoll wcsftime wcsxfrm _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000016479do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016480as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16481{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16482echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016483if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016484 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016485else
Martin v. Löwis11437992002-04-12 09:54:03 +000016486 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016487/* confdefs.h. */
16488_ACEOF
16489cat confdefs.h >>conftest.$ac_ext
16490cat >>conftest.$ac_ext <<_ACEOF
16491/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016492/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16493 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16494#define $ac_func innocuous_$ac_func
16495
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016496/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016497 which can conflict with char $ac_func (); below.
16498 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016499 <limits.h> exists even on freestanding compilers. */
16500
16501#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016502# include <limits.h>
16503#else
16504# include <assert.h>
16505#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016506
16507#undef $ac_func
16508
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016509/* Override any GCC internal prototype to avoid an error.
16510 Use char because int might match the return type of a GCC
16511 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016512#ifdef __cplusplus
16513extern "C"
16514#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016515char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000016516/* The GNU C library defines this for functions which it implements
16517 to always fail with ENOSYS. Some functions are actually named
16518 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016519#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000016520choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000016521#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016522
Skip Montanaro6dead952003-09-25 14:50:04 +000016523int
16524main ()
16525{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016526return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016527 ;
16528 return 0;
16529}
16530_ACEOF
16531rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016532if { (ac_try="$ac_link"
16533case "(($ac_try" in
16534 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16535 *) ac_try_echo=$ac_try;;
16536esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016537eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016538 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016539 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016540 grep -v '^ *+' conftest.er1 >conftest.err
16541 rm -f conftest.er1
16542 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016544 (exit $ac_status); } && {
16545 test -z "$ac_c_werror_flag" ||
16546 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016547 } && test -s conftest$ac_exeext &&
16548 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016549 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016550else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016551 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016552sed 's/^/| /' conftest.$ac_ext >&5
16553
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016554 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016555fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016556
16557rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016558 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016559fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016560ac_res=`eval echo '${'$as_ac_var'}'`
16561 { echo "$as_me:$LINENO: result: $ac_res" >&5
16562echo "${ECHO_T}$ac_res" >&6; }
16563if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016564 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016565#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016566_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000016567
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016568fi
16569done
16570
Michael W. Hudson54241132001-12-07 15:38:26 +000016571
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016572# For some functions, having a definition is not sufficient, since
16573# we want to take their address.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016574{ echo "$as_me:$LINENO: checking for chroot" >&5
16575echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016576cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016577/* confdefs.h. */
16578_ACEOF
16579cat confdefs.h >>conftest.$ac_ext
16580cat >>conftest.$ac_ext <<_ACEOF
16581/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016582#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016583int
16584main ()
16585{
16586void *x=chroot
16587 ;
16588 return 0;
16589}
16590_ACEOF
16591rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016592if { (ac_try="$ac_compile"
16593case "(($ac_try" in
16594 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16595 *) ac_try_echo=$ac_try;;
16596esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016597eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016598 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016599 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016600 grep -v '^ *+' conftest.er1 >conftest.err
16601 rm -f conftest.er1
16602 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016604 (exit $ac_status); } && {
16605 test -z "$ac_c_werror_flag" ||
16606 test ! -s conftest.err
16607 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016608
16609cat >>confdefs.h <<\_ACEOF
16610#define HAVE_CHROOT 1
16611_ACEOF
16612
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016613 { echo "$as_me:$LINENO: result: yes" >&5
16614echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016615else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016616 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016617sed 's/^/| /' conftest.$ac_ext >&5
16618
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016619 { echo "$as_me:$LINENO: result: no" >&5
16620echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016621
16622fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016623
16624rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016625{ echo "$as_me:$LINENO: checking for link" >&5
16626echo $ECHO_N "checking for link... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016627cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016628/* confdefs.h. */
16629_ACEOF
16630cat confdefs.h >>conftest.$ac_ext
16631cat >>conftest.$ac_ext <<_ACEOF
16632/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016633#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016634int
16635main ()
16636{
16637void *x=link
16638 ;
16639 return 0;
16640}
16641_ACEOF
16642rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016643if { (ac_try="$ac_compile"
16644case "(($ac_try" in
16645 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16646 *) ac_try_echo=$ac_try;;
16647esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016648eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016649 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016650 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016651 grep -v '^ *+' conftest.er1 >conftest.err
16652 rm -f conftest.er1
16653 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016655 (exit $ac_status); } && {
16656 test -z "$ac_c_werror_flag" ||
16657 test ! -s conftest.err
16658 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016659
16660cat >>confdefs.h <<\_ACEOF
16661#define HAVE_LINK 1
16662_ACEOF
16663
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016664 { echo "$as_me:$LINENO: result: yes" >&5
16665echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016666else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016667 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016668sed 's/^/| /' conftest.$ac_ext >&5
16669
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016670 { echo "$as_me:$LINENO: result: no" >&5
16671echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016672
16673fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016674
16675rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016676{ echo "$as_me:$LINENO: checking for symlink" >&5
16677echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016678cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016679/* confdefs.h. */
16680_ACEOF
16681cat confdefs.h >>conftest.$ac_ext
16682cat >>conftest.$ac_ext <<_ACEOF
16683/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016684#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016685int
16686main ()
16687{
16688void *x=symlink
16689 ;
16690 return 0;
16691}
16692_ACEOF
16693rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016694if { (ac_try="$ac_compile"
16695case "(($ac_try" in
16696 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16697 *) ac_try_echo=$ac_try;;
16698esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016699eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016700 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016701 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016702 grep -v '^ *+' conftest.er1 >conftest.err
16703 rm -f conftest.er1
16704 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016706 (exit $ac_status); } && {
16707 test -z "$ac_c_werror_flag" ||
16708 test ! -s conftest.err
16709 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016710
16711cat >>confdefs.h <<\_ACEOF
16712#define HAVE_SYMLINK 1
16713_ACEOF
16714
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016715 { echo "$as_me:$LINENO: result: yes" >&5
16716echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016717else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016718 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016719sed 's/^/| /' conftest.$ac_ext >&5
16720
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016721 { echo "$as_me:$LINENO: result: no" >&5
16722echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016723
16724fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016725
16726rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016727{ echo "$as_me:$LINENO: checking for fchdir" >&5
16728echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016729cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016730/* confdefs.h. */
16731_ACEOF
16732cat confdefs.h >>conftest.$ac_ext
16733cat >>conftest.$ac_ext <<_ACEOF
16734/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016735#include <unistd.h>
16736int
16737main ()
16738{
16739void *x=fchdir
16740 ;
16741 return 0;
16742}
16743_ACEOF
16744rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016745if { (ac_try="$ac_compile"
16746case "(($ac_try" in
16747 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16748 *) ac_try_echo=$ac_try;;
16749esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016750eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016751 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016752 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016753 grep -v '^ *+' conftest.er1 >conftest.err
16754 rm -f conftest.er1
16755 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016756 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016757 (exit $ac_status); } && {
16758 test -z "$ac_c_werror_flag" ||
16759 test ! -s conftest.err
16760 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016761
16762cat >>confdefs.h <<\_ACEOF
16763#define HAVE_FCHDIR 1
16764_ACEOF
16765
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016766 { echo "$as_me:$LINENO: result: yes" >&5
16767echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016768else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016769 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016770sed 's/^/| /' conftest.$ac_ext >&5
16771
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016772 { echo "$as_me:$LINENO: result: no" >&5
16773echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016774
16775fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016776
16777rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016778{ echo "$as_me:$LINENO: checking for fsync" >&5
16779echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016780cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016781/* confdefs.h. */
16782_ACEOF
16783cat confdefs.h >>conftest.$ac_ext
16784cat >>conftest.$ac_ext <<_ACEOF
16785/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016786#include <unistd.h>
16787int
16788main ()
16789{
16790void *x=fsync
16791 ;
16792 return 0;
16793}
16794_ACEOF
16795rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016796if { (ac_try="$ac_compile"
16797case "(($ac_try" in
16798 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16799 *) ac_try_echo=$ac_try;;
16800esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016801eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016802 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016803 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016804 grep -v '^ *+' conftest.er1 >conftest.err
16805 rm -f conftest.er1
16806 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016808 (exit $ac_status); } && {
16809 test -z "$ac_c_werror_flag" ||
16810 test ! -s conftest.err
16811 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016812
16813cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016814#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016815_ACEOF
16816
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016817 { echo "$as_me:$LINENO: result: yes" >&5
16818echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016819else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016820 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016821sed 's/^/| /' conftest.$ac_ext >&5
16822
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016823 { echo "$as_me:$LINENO: result: no" >&5
16824echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016825
16826fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016827
16828rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016829{ echo "$as_me:$LINENO: checking for fdatasync" >&5
16830echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016831cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016832/* confdefs.h. */
16833_ACEOF
16834cat confdefs.h >>conftest.$ac_ext
16835cat >>conftest.$ac_ext <<_ACEOF
16836/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016837#include <unistd.h>
16838int
16839main ()
16840{
16841void *x=fdatasync
16842 ;
16843 return 0;
16844}
16845_ACEOF
16846rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016847if { (ac_try="$ac_compile"
16848case "(($ac_try" in
16849 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16850 *) ac_try_echo=$ac_try;;
16851esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016852eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016853 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016854 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016855 grep -v '^ *+' conftest.er1 >conftest.err
16856 rm -f conftest.er1
16857 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016859 (exit $ac_status); } && {
16860 test -z "$ac_c_werror_flag" ||
16861 test ! -s conftest.err
16862 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016863
16864cat >>confdefs.h <<\_ACEOF
16865#define HAVE_FDATASYNC 1
16866_ACEOF
16867
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016868 { echo "$as_me:$LINENO: result: yes" >&5
16869echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016870else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016871 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016872sed 's/^/| /' conftest.$ac_ext >&5
16873
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016874 { echo "$as_me:$LINENO: result: no" >&5
16875echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016876
16877fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016878
16879rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016880{ echo "$as_me:$LINENO: checking for epoll" >&5
16881echo $ECHO_N "checking for epoll... $ECHO_C" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016882cat >conftest.$ac_ext <<_ACEOF
16883/* confdefs.h. */
16884_ACEOF
16885cat confdefs.h >>conftest.$ac_ext
16886cat >>conftest.$ac_ext <<_ACEOF
16887/* end confdefs.h. */
16888#include <sys/epoll.h>
16889int
16890main ()
16891{
16892void *x=epoll_create
16893 ;
16894 return 0;
16895}
16896_ACEOF
16897rm -f conftest.$ac_objext
16898if { (ac_try="$ac_compile"
16899case "(($ac_try" in
16900 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16901 *) ac_try_echo=$ac_try;;
16902esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016903eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016904 (eval "$ac_compile") 2>conftest.er1
16905 ac_status=$?
16906 grep -v '^ *+' conftest.er1 >conftest.err
16907 rm -f conftest.er1
16908 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016910 (exit $ac_status); } && {
16911 test -z "$ac_c_werror_flag" ||
16912 test ! -s conftest.err
16913 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016914
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016915cat >>confdefs.h <<\_ACEOF
16916#define HAVE_EPOLL 1
16917_ACEOF
16918
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016919 { echo "$as_me:$LINENO: result: yes" >&5
16920echo "${ECHO_T}yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016921else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016922 echo "$as_me: failed program was:" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016923sed 's/^/| /' conftest.$ac_ext >&5
16924
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016925 { echo "$as_me:$LINENO: result: no" >&5
16926echo "${ECHO_T}no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016927
16928fi
16929
16930rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016931{ echo "$as_me:$LINENO: checking for kqueue" >&5
16932echo $ECHO_N "checking for kqueue... $ECHO_C" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016933cat >conftest.$ac_ext <<_ACEOF
16934/* confdefs.h. */
16935_ACEOF
16936cat confdefs.h >>conftest.$ac_ext
16937cat >>conftest.$ac_ext <<_ACEOF
16938/* end confdefs.h. */
16939
16940#include <sys/types.h>
16941#include <sys/event.h>
16942
16943int
16944main ()
16945{
16946int x=kqueue()
16947 ;
16948 return 0;
16949}
16950_ACEOF
16951rm -f conftest.$ac_objext
16952if { (ac_try="$ac_compile"
16953case "(($ac_try" in
16954 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16955 *) ac_try_echo=$ac_try;;
16956esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016957eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016958 (eval "$ac_compile") 2>conftest.er1
16959 ac_status=$?
16960 grep -v '^ *+' conftest.er1 >conftest.err
16961 rm -f conftest.er1
16962 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016964 (exit $ac_status); } && {
16965 test -z "$ac_c_werror_flag" ||
16966 test ! -s conftest.err
16967 } && test -s conftest.$ac_objext; then
16968
16969cat >>confdefs.h <<\_ACEOF
16970#define HAVE_KQUEUE 1
16971_ACEOF
16972
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016973 { echo "$as_me:$LINENO: result: yes" >&5
16974echo "${ECHO_T}yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016975else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016976 echo "$as_me: failed program was:" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016977sed 's/^/| /' conftest.$ac_ext >&5
16978
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016979 { echo "$as_me:$LINENO: result: no" >&5
16980echo "${ECHO_T}no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016981
16982fi
16983
16984rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000016985# On some systems (eg. FreeBSD 5), we would find a definition of the
16986# functions ctermid_r, setgroups in the library, but no prototype
16987# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
16988# address to avoid compiler warnings and potential miscompilations
16989# because of the missing prototypes.
16990
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016991{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
16992echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016993cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016994/* confdefs.h. */
16995_ACEOF
16996cat confdefs.h >>conftest.$ac_ext
16997cat >>conftest.$ac_ext <<_ACEOF
16998/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000016999
17000#include "confdefs.h"
17001#include <stdio.h>
17002
Martin v. Löwisd5843682002-11-21 20:41:28 +000017003int
17004main ()
17005{
17006void* p = ctermid_r
17007 ;
17008 return 0;
17009}
17010_ACEOF
17011rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017012if { (ac_try="$ac_compile"
17013case "(($ac_try" in
17014 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17015 *) ac_try_echo=$ac_try;;
17016esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017017eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017018 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000017019 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017020 grep -v '^ *+' conftest.er1 >conftest.err
17021 rm -f conftest.er1
17022 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017024 (exit $ac_status); } && {
17025 test -z "$ac_c_werror_flag" ||
17026 test ! -s conftest.err
17027 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000017028
17029cat >>confdefs.h <<\_ACEOF
17030#define HAVE_CTERMID_R 1
17031_ACEOF
17032
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017033 { echo "$as_me:$LINENO: result: yes" >&5
17034echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017035else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017036 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017037sed 's/^/| /' conftest.$ac_ext >&5
17038
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017039 { echo "$as_me:$LINENO: result: no" >&5
17040echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017041
17042fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017043
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017044rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17045
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017046{ echo "$as_me:$LINENO: checking for flock" >&5
17047echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017048cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017049/* confdefs.h. */
17050_ACEOF
17051cat confdefs.h >>conftest.$ac_ext
17052cat >>conftest.$ac_ext <<_ACEOF
17053/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017054
17055#include "confdefs.h"
17056#include <sys/file.h>
17057
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017058int
17059main ()
17060{
17061void* p = flock
17062 ;
17063 return 0;
17064}
17065_ACEOF
17066rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017067if { (ac_try="$ac_compile"
17068case "(($ac_try" in
17069 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17070 *) ac_try_echo=$ac_try;;
17071esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017072eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017073 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017074 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017075 grep -v '^ *+' conftest.er1 >conftest.err
17076 rm -f conftest.er1
17077 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017079 (exit $ac_status); } && {
17080 test -z "$ac_c_werror_flag" ||
17081 test ! -s conftest.err
17082 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017083
17084cat >>confdefs.h <<\_ACEOF
17085#define HAVE_FLOCK 1
17086_ACEOF
17087
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017088 { echo "$as_me:$LINENO: result: yes" >&5
17089echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017090else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017091 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017092sed 's/^/| /' conftest.$ac_ext >&5
17093
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017094 { echo "$as_me:$LINENO: result: no" >&5
17095echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017096
17097fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017098
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017099rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17100
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017101{ echo "$as_me:$LINENO: checking for getpagesize" >&5
17102echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017103cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017104/* confdefs.h. */
17105_ACEOF
17106cat confdefs.h >>conftest.$ac_ext
17107cat >>conftest.$ac_ext <<_ACEOF
17108/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017109
17110#include "confdefs.h"
17111#include <unistd.h>
17112
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017113int
17114main ()
17115{
17116void* p = getpagesize
17117 ;
17118 return 0;
17119}
17120_ACEOF
17121rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017122if { (ac_try="$ac_compile"
17123case "(($ac_try" in
17124 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17125 *) ac_try_echo=$ac_try;;
17126esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017127eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017128 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017129 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017130 grep -v '^ *+' conftest.er1 >conftest.err
17131 rm -f conftest.er1
17132 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017134 (exit $ac_status); } && {
17135 test -z "$ac_c_werror_flag" ||
17136 test ! -s conftest.err
17137 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017138
17139cat >>confdefs.h <<\_ACEOF
17140#define HAVE_GETPAGESIZE 1
17141_ACEOF
17142
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017143 { echo "$as_me:$LINENO: result: yes" >&5
17144echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017145else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017146 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017147sed 's/^/| /' conftest.$ac_ext >&5
17148
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017149 { echo "$as_me:$LINENO: result: no" >&5
17150echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017151
17152fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017153
17154rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017155
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017156for ac_prog in true
17157do
17158 # Extract the first word of "$ac_prog", so it can be a program name with args.
17159set dummy $ac_prog; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017160{ echo "$as_me:$LINENO: checking for $ac_word" >&5
17161echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017162if test "${ac_cv_prog_TRUE+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017163 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017164else
17165 if test -n "$TRUE"; then
17166 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
17167else
17168as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17169for as_dir in $PATH
17170do
17171 IFS=$as_save_IFS
17172 test -z "$as_dir" && as_dir=.
17173 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017174 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 +000017175 ac_cv_prog_TRUE="$ac_prog"
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017176 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017177 break 2
17178 fi
17179done
17180done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017181IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017182
17183fi
17184fi
17185TRUE=$ac_cv_prog_TRUE
17186if test -n "$TRUE"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017187 { echo "$as_me:$LINENO: result: $TRUE" >&5
17188echo "${ECHO_T}$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017189else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017190 { echo "$as_me:$LINENO: result: no" >&5
17191echo "${ECHO_T}no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017192fi
17193
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017194
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017195 test -n "$TRUE" && break
17196done
17197test -n "$TRUE" || TRUE="/bin/true"
17198
17199
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017200{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
17201echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017202if test "${ac_cv_lib_c_inet_aton+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017203 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017204else
17205 ac_check_lib_save_LIBS=$LIBS
17206LIBS="-lc $LIBS"
17207cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017208/* confdefs.h. */
17209_ACEOF
17210cat confdefs.h >>conftest.$ac_ext
17211cat >>conftest.$ac_ext <<_ACEOF
17212/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017213
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017214/* Override any GCC internal prototype to avoid an error.
17215 Use char because int might match the return type of a GCC
17216 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017217#ifdef __cplusplus
17218extern "C"
17219#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017220char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017221int
17222main ()
17223{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017224return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017225 ;
17226 return 0;
17227}
17228_ACEOF
17229rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017230if { (ac_try="$ac_link"
17231case "(($ac_try" in
17232 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17233 *) ac_try_echo=$ac_try;;
17234esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017235eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017236 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017237 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017238 grep -v '^ *+' conftest.er1 >conftest.err
17239 rm -f conftest.er1
17240 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017242 (exit $ac_status); } && {
17243 test -z "$ac_c_werror_flag" ||
17244 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017245 } && test -s conftest$ac_exeext &&
17246 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017247 ac_cv_lib_c_inet_aton=yes
17248else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017249 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017250sed 's/^/| /' conftest.$ac_ext >&5
17251
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017252 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017253fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017254
17255rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017256 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017257LIBS=$ac_check_lib_save_LIBS
17258fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017259{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
17260echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
17261if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017262 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017263else
17264
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017265{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
17266echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017267if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017268 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017269else
17270 ac_check_lib_save_LIBS=$LIBS
17271LIBS="-lresolv $LIBS"
17272cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017273/* confdefs.h. */
17274_ACEOF
17275cat confdefs.h >>conftest.$ac_ext
17276cat >>conftest.$ac_ext <<_ACEOF
17277/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017278
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017279/* Override any GCC internal prototype to avoid an error.
17280 Use char because int might match the return type of a GCC
17281 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017282#ifdef __cplusplus
17283extern "C"
17284#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017285char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017286int
17287main ()
17288{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017289return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017290 ;
17291 return 0;
17292}
17293_ACEOF
17294rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017295if { (ac_try="$ac_link"
17296case "(($ac_try" in
17297 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17298 *) ac_try_echo=$ac_try;;
17299esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017300eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017301 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017302 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017303 grep -v '^ *+' conftest.er1 >conftest.err
17304 rm -f conftest.er1
17305 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017307 (exit $ac_status); } && {
17308 test -z "$ac_c_werror_flag" ||
17309 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017310 } && test -s conftest$ac_exeext &&
17311 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017312 ac_cv_lib_resolv_inet_aton=yes
17313else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017314 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017315sed 's/^/| /' conftest.$ac_ext >&5
17316
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017317 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017318fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017319
17320rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017321 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017322LIBS=$ac_check_lib_save_LIBS
17323fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017324{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
17325echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
17326if test $ac_cv_lib_resolv_inet_aton = yes; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017327 cat >>confdefs.h <<_ACEOF
17328#define HAVE_LIBRESOLV 1
17329_ACEOF
17330
17331 LIBS="-lresolv $LIBS"
17332
17333fi
17334
17335
17336fi
17337
17338
Christian Heimesd0764e22007-12-04 15:00:33 +000017339# On Tru64, chflags seems to be present, but calling it will
17340# exit Python
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017341{ echo "$as_me:$LINENO: checking for chflags" >&5
17342echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017343if test "${ac_cv_have_chflags+set}" = set; then
17344 echo $ECHO_N "(cached) $ECHO_C" >&6
17345else
17346 if test "$cross_compiling" = yes; then
17347 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000017348else
17349 cat >conftest.$ac_ext <<_ACEOF
17350/* confdefs.h. */
17351_ACEOF
17352cat confdefs.h >>conftest.$ac_ext
17353cat >>conftest.$ac_ext <<_ACEOF
17354/* end confdefs.h. */
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017355[
Christian Heimesd0764e22007-12-04 15:00:33 +000017356#include <sys/stat.h>
17357#include <unistd.h>
17358int main(int argc, char*argv[])
17359{
17360 if(chflags(argv[0], 0) != 0)
17361 return 1;
17362 return 0;
17363}
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017364]
Christian Heimesd0764e22007-12-04 15:00:33 +000017365_ACEOF
17366rm -f conftest$ac_exeext
17367if { (ac_try="$ac_link"
17368case "(($ac_try" in
17369 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17370 *) ac_try_echo=$ac_try;;
17371esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017372eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017373 (eval "$ac_link") 2>&5
17374 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017376 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17377 { (case "(($ac_try" in
17378 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17379 *) ac_try_echo=$ac_try;;
17380esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017381eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017382 (eval "$ac_try") 2>&5
17383 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017385 (exit $ac_status); }; }; then
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017386 ac_cv_have_chflags=yes
Christian Heimesd0764e22007-12-04 15:00:33 +000017387else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017388 echo "$as_me: program exited with status $ac_status" >&5
17389echo "$as_me: failed program was:" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017390sed 's/^/| /' conftest.$ac_ext >&5
17391
17392( exit $ac_status )
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017393ac_cv_have_chflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000017394fi
17395rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17396fi
17397
17398
17399
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017400fi
17401{ echo "$as_me:$LINENO: result: $ac_cv_have_chflags" >&5
17402echo "${ECHO_T}$ac_cv_have_chflags" >&6; }
17403if test "$ac_cv_have_chflags" = cross ; then
17404 { echo "$as_me:$LINENO: checking for chflags" >&5
17405echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
17406if test "${ac_cv_func_chflags+set}" = set; then
17407 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimesd0764e22007-12-04 15:00:33 +000017408else
17409 cat >conftest.$ac_ext <<_ACEOF
17410/* confdefs.h. */
17411_ACEOF
17412cat confdefs.h >>conftest.$ac_ext
17413cat >>conftest.$ac_ext <<_ACEOF
17414/* end confdefs.h. */
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017415/* Define chflags to an innocuous variant, in case <limits.h> declares chflags.
17416 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17417#define chflags innocuous_chflags
Christian Heimesd0764e22007-12-04 15:00:33 +000017418
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017419/* System header to define __stub macros and hopefully few prototypes,
17420 which can conflict with char chflags (); below.
17421 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17422 <limits.h> exists even on freestanding compilers. */
17423
17424#ifdef __STDC__
17425# include <limits.h>
17426#else
17427# include <assert.h>
17428#endif
17429
17430#undef chflags
17431
17432/* Override any GCC internal prototype to avoid an error.
17433 Use char because int might match the return type of a GCC
17434 builtin and then its argument prototype would still apply. */
17435#ifdef __cplusplus
17436extern "C"
17437#endif
17438char chflags ();
17439/* The GNU C library defines this for functions which it implements
17440 to always fail with ENOSYS. Some functions are actually named
17441 something starting with __ and the normal name is an alias. */
17442#if defined __stub_chflags || defined __stub___chflags
17443choke me
17444#endif
17445
17446int
17447main ()
17448{
17449return chflags ();
17450 ;
17451 return 0;
17452}
17453_ACEOF
17454rm -f conftest.$ac_objext conftest$ac_exeext
17455if { (ac_try="$ac_link"
17456case "(($ac_try" in
17457 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17458 *) ac_try_echo=$ac_try;;
17459esac
17460eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17461 (eval "$ac_link") 2>conftest.er1
17462 ac_status=$?
17463 grep -v '^ *+' conftest.er1 >conftest.err
17464 rm -f conftest.er1
17465 cat conftest.err >&5
17466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17467 (exit $ac_status); } && {
17468 test -z "$ac_c_werror_flag" ||
17469 test ! -s conftest.err
17470 } && test -s conftest$ac_exeext &&
17471 $as_test_x conftest$ac_exeext; then
17472 ac_cv_func_chflags=yes
17473else
17474 echo "$as_me: failed program was:" >&5
17475sed 's/^/| /' conftest.$ac_ext >&5
17476
17477 ac_cv_func_chflags=no
17478fi
17479
17480rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17481 conftest$ac_exeext conftest.$ac_ext
17482fi
17483{ echo "$as_me:$LINENO: result: $ac_cv_func_chflags" >&5
17484echo "${ECHO_T}$ac_cv_func_chflags" >&6; }
17485if test $ac_cv_func_chflags = yes; then
17486 ac_cv_have_chflags="yes"
17487else
17488 ac_cv_have_chflags="no"
17489fi
17490
17491fi
17492if test "$ac_cv_have_chflags" = yes ; then
17493
17494cat >>confdefs.h <<\_ACEOF
17495#define HAVE_CHFLAGS 1
17496_ACEOF
17497
17498fi
17499
17500{ echo "$as_me:$LINENO: checking for lchflags" >&5
17501echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
17502if test "${ac_cv_have_lchflags+set}" = set; then
17503 echo $ECHO_N "(cached) $ECHO_C" >&6
17504else
17505 if test "$cross_compiling" = yes; then
17506 ac_cv_have_lchflags=cross
17507else
17508 cat >conftest.$ac_ext <<_ACEOF
17509/* confdefs.h. */
17510_ACEOF
17511cat confdefs.h >>conftest.$ac_ext
17512cat >>conftest.$ac_ext <<_ACEOF
17513/* end confdefs.h. */
17514[
Christian Heimesd0764e22007-12-04 15:00:33 +000017515#include <sys/stat.h>
17516#include <unistd.h>
17517int main(int argc, char*argv[])
17518{
17519 if(lchflags(argv[0], 0) != 0)
17520 return 1;
17521 return 0;
17522}
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017523]
Christian Heimesd0764e22007-12-04 15:00:33 +000017524_ACEOF
17525rm -f conftest$ac_exeext
17526if { (ac_try="$ac_link"
17527case "(($ac_try" in
17528 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17529 *) ac_try_echo=$ac_try;;
17530esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017531eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017532 (eval "$ac_link") 2>&5
17533 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017535 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17536 { (case "(($ac_try" in
17537 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17538 *) ac_try_echo=$ac_try;;
17539esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017540eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017541 (eval "$ac_try") 2>&5
17542 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017544 (exit $ac_status); }; }; then
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017545 ac_cv_have_lchflags=yes
Christian Heimesd0764e22007-12-04 15:00:33 +000017546else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017547 echo "$as_me: program exited with status $ac_status" >&5
17548echo "$as_me: failed program was:" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017549sed 's/^/| /' conftest.$ac_ext >&5
17550
17551( exit $ac_status )
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017552ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000017553fi
17554rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17555fi
17556
17557
17558
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017559fi
17560{ echo "$as_me:$LINENO: result: $ac_cv_have_lchflags" >&5
17561echo "${ECHO_T}$ac_cv_have_lchflags" >&6; }
17562if test "$ac_cv_have_lchflags" = cross ; then
17563 { echo "$as_me:$LINENO: checking for lchflags" >&5
17564echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
17565if test "${ac_cv_func_lchflags+set}" = set; then
17566 echo $ECHO_N "(cached) $ECHO_C" >&6
17567else
17568 cat >conftest.$ac_ext <<_ACEOF
17569/* confdefs.h. */
17570_ACEOF
17571cat confdefs.h >>conftest.$ac_ext
17572cat >>conftest.$ac_ext <<_ACEOF
17573/* end confdefs.h. */
17574/* Define lchflags to an innocuous variant, in case <limits.h> declares lchflags.
17575 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17576#define lchflags innocuous_lchflags
17577
17578/* System header to define __stub macros and hopefully few prototypes,
17579 which can conflict with char lchflags (); below.
17580 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17581 <limits.h> exists even on freestanding compilers. */
17582
17583#ifdef __STDC__
17584# include <limits.h>
17585#else
17586# include <assert.h>
17587#endif
17588
17589#undef lchflags
17590
17591/* Override any GCC internal prototype to avoid an error.
17592 Use char because int might match the return type of a GCC
17593 builtin and then its argument prototype would still apply. */
17594#ifdef __cplusplus
17595extern "C"
17596#endif
17597char lchflags ();
17598/* The GNU C library defines this for functions which it implements
17599 to always fail with ENOSYS. Some functions are actually named
17600 something starting with __ and the normal name is an alias. */
17601#if defined __stub_lchflags || defined __stub___lchflags
17602choke me
17603#endif
17604
17605int
17606main ()
17607{
17608return lchflags ();
17609 ;
17610 return 0;
17611}
17612_ACEOF
17613rm -f conftest.$ac_objext conftest$ac_exeext
17614if { (ac_try="$ac_link"
17615case "(($ac_try" in
17616 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17617 *) ac_try_echo=$ac_try;;
17618esac
17619eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17620 (eval "$ac_link") 2>conftest.er1
17621 ac_status=$?
17622 grep -v '^ *+' conftest.er1 >conftest.err
17623 rm -f conftest.er1
17624 cat conftest.err >&5
17625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17626 (exit $ac_status); } && {
17627 test -z "$ac_c_werror_flag" ||
17628 test ! -s conftest.err
17629 } && test -s conftest$ac_exeext &&
17630 $as_test_x conftest$ac_exeext; then
17631 ac_cv_func_lchflags=yes
17632else
17633 echo "$as_me: failed program was:" >&5
17634sed 's/^/| /' conftest.$ac_ext >&5
17635
17636 ac_cv_func_lchflags=no
17637fi
17638
17639rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17640 conftest$ac_exeext conftest.$ac_ext
17641fi
17642{ echo "$as_me:$LINENO: result: $ac_cv_func_lchflags" >&5
17643echo "${ECHO_T}$ac_cv_func_lchflags" >&6; }
17644if test $ac_cv_func_lchflags = yes; then
17645 ac_cv_have_lchflags="yes"
17646else
17647 ac_cv_have_lchflags="no"
17648fi
17649
17650fi
17651if test "$ac_cv_have_lchflags" = yes ; then
17652
17653cat >>confdefs.h <<\_ACEOF
17654#define HAVE_LCHFLAGS 1
17655_ACEOF
17656
17657fi
17658
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017659case $ac_sys_system/$ac_sys_release in
17660Darwin/*)
17661 _CUR_CFLAGS="${CFLAGS}"
17662 _CUR_LDFLAGS="${LDFLAGS}"
17663 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
17664 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
17665 ;;
17666esac
17667
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017668{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
17669echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017670if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017671 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017672else
17673 ac_check_lib_save_LIBS=$LIBS
17674LIBS="-lz $LIBS"
17675cat >conftest.$ac_ext <<_ACEOF
17676/* confdefs.h. */
17677_ACEOF
17678cat confdefs.h >>conftest.$ac_ext
17679cat >>conftest.$ac_ext <<_ACEOF
17680/* end confdefs.h. */
17681
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017682/* Override any GCC internal prototype to avoid an error.
17683 Use char because int might match the return type of a GCC
17684 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017685#ifdef __cplusplus
17686extern "C"
17687#endif
17688char inflateCopy ();
17689int
17690main ()
17691{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017692return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017693 ;
17694 return 0;
17695}
17696_ACEOF
17697rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017698if { (ac_try="$ac_link"
17699case "(($ac_try" in
17700 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17701 *) ac_try_echo=$ac_try;;
17702esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017703eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017704 (eval "$ac_link") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017705 ac_status=$?
17706 grep -v '^ *+' conftest.er1 >conftest.err
17707 rm -f conftest.er1
17708 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017710 (exit $ac_status); } && {
17711 test -z "$ac_c_werror_flag" ||
17712 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017713 } && test -s conftest$ac_exeext &&
17714 $as_test_x conftest$ac_exeext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017715 ac_cv_lib_z_inflateCopy=yes
17716else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017717 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017718sed 's/^/| /' conftest.$ac_ext >&5
17719
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017720 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017721fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017722
17723rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017724 conftest$ac_exeext conftest.$ac_ext
17725LIBS=$ac_check_lib_save_LIBS
17726fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017727{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
17728echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6; }
17729if test $ac_cv_lib_z_inflateCopy = yes; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017730
17731cat >>confdefs.h <<\_ACEOF
17732#define HAVE_ZLIB_COPY 1
17733_ACEOF
17734
17735fi
17736
17737
17738case $ac_sys_system/$ac_sys_release in
17739Darwin/*)
17740 CFLAGS="${_CUR_CFLAGS}"
17741 LDFLAGS="${_CUR_LDFLAGS}"
17742 ;;
17743esac
17744
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017745{ echo "$as_me:$LINENO: checking for hstrerror" >&5
17746echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017747cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017748/* confdefs.h. */
17749_ACEOF
17750cat confdefs.h >>conftest.$ac_ext
17751cat >>conftest.$ac_ext <<_ACEOF
17752/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000017753
17754#include "confdefs.h"
17755#include <netdb.h>
17756
Martin v. Löwise9416172003-05-03 10:12:45 +000017757int
17758main ()
17759{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017760void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000017761 ;
17762 return 0;
17763}
17764_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017765rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017766if { (ac_try="$ac_link"
17767case "(($ac_try" in
17768 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17769 *) ac_try_echo=$ac_try;;
17770esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017771eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017772 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000017773 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017774 grep -v '^ *+' conftest.er1 >conftest.err
17775 rm -f conftest.er1
17776 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017778 (exit $ac_status); } && {
17779 test -z "$ac_c_werror_flag" ||
17780 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017781 } && test -s conftest$ac_exeext &&
17782 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000017783
17784cat >>confdefs.h <<\_ACEOF
17785#define HAVE_HSTRERROR 1
17786_ACEOF
17787
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017788 { echo "$as_me:$LINENO: result: yes" >&5
17789echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017790else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017791 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017792sed 's/^/| /' conftest.$ac_ext >&5
17793
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017794 { echo "$as_me:$LINENO: result: no" >&5
17795echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017796
17797fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017798
17799rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017800 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000017801
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017802{ echo "$as_me:$LINENO: checking for inet_aton" >&5
17803echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017804cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017805/* confdefs.h. */
17806_ACEOF
17807cat confdefs.h >>conftest.$ac_ext
17808cat >>conftest.$ac_ext <<_ACEOF
17809/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000017810
17811#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000017812#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000017813#include <sys/socket.h>
17814#include <netinet/in.h>
17815#include <arpa/inet.h>
17816
Martin v. Löwise9416172003-05-03 10:12:45 +000017817int
17818main ()
17819{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017820void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000017821 ;
17822 return 0;
17823}
17824_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017825rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017826if { (ac_try="$ac_link"
17827case "(($ac_try" in
17828 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17829 *) ac_try_echo=$ac_try;;
17830esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017831eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017832 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000017833 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017834 grep -v '^ *+' conftest.er1 >conftest.err
17835 rm -f conftest.er1
17836 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017838 (exit $ac_status); } && {
17839 test -z "$ac_c_werror_flag" ||
17840 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017841 } && test -s conftest$ac_exeext &&
17842 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000017843
17844cat >>confdefs.h <<\_ACEOF
17845#define HAVE_INET_ATON 1
17846_ACEOF
17847
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017848 { echo "$as_me:$LINENO: result: yes" >&5
17849echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017850else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017851 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017852sed 's/^/| /' conftest.$ac_ext >&5
17853
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017854 { echo "$as_me:$LINENO: result: no" >&5
17855echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017856
17857fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017858
17859rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017860 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000017861
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017862{ echo "$as_me:$LINENO: checking for inet_pton" >&5
17863echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017864cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017865/* confdefs.h. */
17866_ACEOF
17867cat confdefs.h >>conftest.$ac_ext
17868cat >>conftest.$ac_ext <<_ACEOF
17869/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000017870
17871#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000017872#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000017873#include <sys/socket.h>
17874#include <netinet/in.h>
17875#include <arpa/inet.h>
17876
Martin v. Löwise9416172003-05-03 10:12:45 +000017877int
17878main ()
17879{
17880void* p = inet_pton
17881 ;
17882 return 0;
17883}
17884_ACEOF
17885rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017886if { (ac_try="$ac_compile"
17887case "(($ac_try" in
17888 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17889 *) ac_try_echo=$ac_try;;
17890esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017891eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017892 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000017893 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017894 grep -v '^ *+' conftest.er1 >conftest.err
17895 rm -f conftest.er1
17896 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017898 (exit $ac_status); } && {
17899 test -z "$ac_c_werror_flag" ||
17900 test ! -s conftest.err
17901 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000017902
17903cat >>confdefs.h <<\_ACEOF
17904#define HAVE_INET_PTON 1
17905_ACEOF
17906
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017907 { echo "$as_me:$LINENO: result: yes" >&5
17908echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017909else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017910 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017911sed 's/^/| /' conftest.$ac_ext >&5
17912
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017913 { echo "$as_me:$LINENO: result: no" >&5
17914echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017915
17916fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017917
17918rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000017919
Martin v. Löwisd6640d42003-07-06 09:29:52 +000017920# On some systems, setgroups is in unistd.h, on others, in grp.h
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017921{ echo "$as_me:$LINENO: checking for setgroups" >&5
17922echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017923cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017924/* confdefs.h. */
17925_ACEOF
17926cat confdefs.h >>conftest.$ac_ext
17927cat >>conftest.$ac_ext <<_ACEOF
17928/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000017929
17930#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000017931#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000017932#ifdef HAVE_GRP_H
17933#include <grp.h>
17934#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000017935
Martin v. Löwisd5843682002-11-21 20:41:28 +000017936int
17937main ()
17938{
17939void* p = setgroups
17940 ;
17941 return 0;
17942}
17943_ACEOF
17944rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017945if { (ac_try="$ac_compile"
17946case "(($ac_try" in
17947 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17948 *) ac_try_echo=$ac_try;;
17949esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017950eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017951 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000017952 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017953 grep -v '^ *+' conftest.er1 >conftest.err
17954 rm -f conftest.er1
17955 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017957 (exit $ac_status); } && {
17958 test -z "$ac_c_werror_flag" ||
17959 test ! -s conftest.err
17960 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000017961
17962cat >>confdefs.h <<\_ACEOF
17963#define HAVE_SETGROUPS 1
17964_ACEOF
17965
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017966 { echo "$as_me:$LINENO: result: yes" >&5
17967echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017968else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017969 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017970sed 's/^/| /' conftest.$ac_ext >&5
17971
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017972 { echo "$as_me:$LINENO: result: no" >&5
17973echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017974
17975fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017976
17977rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000017978
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017979# check for openpty and forkpty
17980
Martin v. Löwis11437992002-04-12 09:54:03 +000017981
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017982for ac_func in openpty
17983do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017984as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17985{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17986echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017987if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017988 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017989else
Martin v. Löwis11437992002-04-12 09:54:03 +000017990 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017991/* confdefs.h. */
17992_ACEOF
17993cat confdefs.h >>conftest.$ac_ext
17994cat >>conftest.$ac_ext <<_ACEOF
17995/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017996/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17997 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17998#define $ac_func innocuous_$ac_func
17999
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018000/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018001 which can conflict with char $ac_func (); below.
18002 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018003 <limits.h> exists even on freestanding compilers. */
18004
18005#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018006# include <limits.h>
18007#else
18008# include <assert.h>
18009#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018010
18011#undef $ac_func
18012
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018013/* Override any GCC internal prototype to avoid an error.
18014 Use char because int might match the return type of a GCC
18015 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018016#ifdef __cplusplus
18017extern "C"
18018#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018019char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018020/* The GNU C library defines this for functions which it implements
18021 to always fail with ENOSYS. Some functions are actually named
18022 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018023#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018024choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018025#endif
18026
Skip Montanaro6dead952003-09-25 14:50:04 +000018027int
18028main ()
18029{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018030return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018031 ;
18032 return 0;
18033}
18034_ACEOF
18035rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018036if { (ac_try="$ac_link"
18037case "(($ac_try" in
18038 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18039 *) ac_try_echo=$ac_try;;
18040esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018041eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018042 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018043 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018044 grep -v '^ *+' conftest.er1 >conftest.err
18045 rm -f conftest.er1
18046 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018048 (exit $ac_status); } && {
18049 test -z "$ac_c_werror_flag" ||
18050 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018051 } && test -s conftest$ac_exeext &&
18052 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018053 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018054else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018055 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018056sed 's/^/| /' conftest.$ac_ext >&5
18057
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018058 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018059fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018060
18061rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018062 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018063fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018064ac_res=`eval echo '${'$as_ac_var'}'`
18065 { echo "$as_me:$LINENO: result: $ac_res" >&5
18066echo "${ECHO_T}$ac_res" >&6; }
18067if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018068 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018069#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018070_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018071
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018072else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018073 { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
18074echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018075if test "${ac_cv_lib_util_openpty+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018076 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000018077else
Martin v. Löwis11437992002-04-12 09:54:03 +000018078 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018079LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000018080cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018081/* confdefs.h. */
18082_ACEOF
18083cat confdefs.h >>conftest.$ac_ext
18084cat >>conftest.$ac_ext <<_ACEOF
18085/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018086
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018087/* Override any GCC internal prototype to avoid an error.
18088 Use char because int might match the return type of a GCC
18089 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018090#ifdef __cplusplus
18091extern "C"
18092#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018093char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018094int
18095main ()
18096{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018097return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018098 ;
18099 return 0;
18100}
18101_ACEOF
18102rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018103if { (ac_try="$ac_link"
18104case "(($ac_try" in
18105 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18106 *) ac_try_echo=$ac_try;;
18107esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018108eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018109 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018110 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018111 grep -v '^ *+' conftest.er1 >conftest.err
18112 rm -f conftest.er1
18113 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018114 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018115 (exit $ac_status); } && {
18116 test -z "$ac_c_werror_flag" ||
18117 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018118 } && test -s conftest$ac_exeext &&
18119 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018120 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000018121else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018122 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018123sed 's/^/| /' conftest.$ac_ext >&5
18124
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018125 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018126fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018127
18128rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018129 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018130LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018131fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018132{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
18133echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
18134if test $ac_cv_lib_util_openpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018135 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018136#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018137_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018138 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018139else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018140 { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
18141echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018142if test "${ac_cv_lib_bsd_openpty+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018143 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018144else
18145 ac_check_lib_save_LIBS=$LIBS
18146LIBS="-lbsd $LIBS"
18147cat >conftest.$ac_ext <<_ACEOF
18148/* confdefs.h. */
18149_ACEOF
18150cat confdefs.h >>conftest.$ac_ext
18151cat >>conftest.$ac_ext <<_ACEOF
18152/* end confdefs.h. */
18153
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018154/* Override any GCC internal prototype to avoid an error.
18155 Use char because int might match the return type of a GCC
18156 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018157#ifdef __cplusplus
18158extern "C"
18159#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018160char openpty ();
18161int
18162main ()
18163{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018164return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018165 ;
18166 return 0;
18167}
18168_ACEOF
18169rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018170if { (ac_try="$ac_link"
18171case "(($ac_try" in
18172 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18173 *) ac_try_echo=$ac_try;;
18174esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018175eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018176 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018177 ac_status=$?
18178 grep -v '^ *+' conftest.er1 >conftest.err
18179 rm -f conftest.er1
18180 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018182 (exit $ac_status); } && {
18183 test -z "$ac_c_werror_flag" ||
18184 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018185 } && test -s conftest$ac_exeext &&
18186 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018187 ac_cv_lib_bsd_openpty=yes
18188else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018189 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018190sed 's/^/| /' conftest.$ac_ext >&5
18191
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018192 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018193fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018194
18195rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018196 conftest$ac_exeext conftest.$ac_ext
18197LIBS=$ac_check_lib_save_LIBS
18198fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018199{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
18200echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
18201if test $ac_cv_lib_bsd_openpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018202 cat >>confdefs.h <<\_ACEOF
18203#define HAVE_OPENPTY 1
18204_ACEOF
18205 LIBS="$LIBS -lbsd"
18206fi
18207
18208
18209fi
18210
Fred Drake8cef4cf2000-06-28 16:40:38 +000018211
18212fi
18213done
18214
Martin v. Löwis11437992002-04-12 09:54:03 +000018215
Fred Drake8cef4cf2000-06-28 16:40:38 +000018216for ac_func in forkpty
18217do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018218as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18219{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18220echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018221if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018222 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000018223else
Martin v. Löwis11437992002-04-12 09:54:03 +000018224 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018225/* confdefs.h. */
18226_ACEOF
18227cat confdefs.h >>conftest.$ac_ext
18228cat >>conftest.$ac_ext <<_ACEOF
18229/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018230/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18231 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18232#define $ac_func innocuous_$ac_func
18233
Fred Drake8cef4cf2000-06-28 16:40:38 +000018234/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018235 which can conflict with char $ac_func (); below.
18236 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018237 <limits.h> exists even on freestanding compilers. */
18238
18239#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018240# include <limits.h>
18241#else
18242# include <assert.h>
18243#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018244
18245#undef $ac_func
18246
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018247/* Override any GCC internal prototype to avoid an error.
18248 Use char because int might match the return type of a GCC
18249 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018250#ifdef __cplusplus
18251extern "C"
18252#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018253char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000018254/* The GNU C library defines this for functions which it implements
18255 to always fail with ENOSYS. Some functions are actually named
18256 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018257#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000018258choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000018259#endif
18260
Skip Montanaro6dead952003-09-25 14:50:04 +000018261int
18262main ()
18263{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018264return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018265 ;
18266 return 0;
18267}
18268_ACEOF
18269rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018270if { (ac_try="$ac_link"
18271case "(($ac_try" in
18272 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18273 *) ac_try_echo=$ac_try;;
18274esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018275eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018276 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018277 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018278 grep -v '^ *+' conftest.er1 >conftest.err
18279 rm -f conftest.er1
18280 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018282 (exit $ac_status); } && {
18283 test -z "$ac_c_werror_flag" ||
18284 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018285 } && test -s conftest$ac_exeext &&
18286 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018287 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018288else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018289 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018290sed 's/^/| /' conftest.$ac_ext >&5
18291
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018292 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018293fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018294
18295rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018296 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018297fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018298ac_res=`eval echo '${'$as_ac_var'}'`
18299 { echo "$as_me:$LINENO: result: $ac_res" >&5
18300echo "${ECHO_T}$ac_res" >&6; }
18301if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018302 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018303#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018304_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018305
Fred Drake8cef4cf2000-06-28 16:40:38 +000018306else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018307 { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
18308echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018309if test "${ac_cv_lib_util_forkpty+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018310 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000018311else
Martin v. Löwis11437992002-04-12 09:54:03 +000018312 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018313LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000018314cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018315/* confdefs.h. */
18316_ACEOF
18317cat confdefs.h >>conftest.$ac_ext
18318cat >>conftest.$ac_ext <<_ACEOF
18319/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018320
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018321/* Override any GCC internal prototype to avoid an error.
18322 Use char because int might match the return type of a GCC
18323 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018324#ifdef __cplusplus
18325extern "C"
18326#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018327char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018328int
18329main ()
18330{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018331return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018332 ;
18333 return 0;
18334}
18335_ACEOF
18336rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018337if { (ac_try="$ac_link"
18338case "(($ac_try" in
18339 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18340 *) ac_try_echo=$ac_try;;
18341esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018342eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018343 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018344 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018345 grep -v '^ *+' conftest.er1 >conftest.err
18346 rm -f conftest.er1
18347 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018349 (exit $ac_status); } && {
18350 test -z "$ac_c_werror_flag" ||
18351 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018352 } && test -s conftest$ac_exeext &&
18353 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018354 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000018355else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018356 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018357sed 's/^/| /' conftest.$ac_ext >&5
18358
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018359 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018360fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018361
18362rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018363 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018364LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018365fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018366{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
18367echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
18368if test $ac_cv_lib_util_forkpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018369 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018370#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018371_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018372 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018373else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018374 { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
18375echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018376if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018377 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018378else
18379 ac_check_lib_save_LIBS=$LIBS
18380LIBS="-lbsd $LIBS"
18381cat >conftest.$ac_ext <<_ACEOF
18382/* confdefs.h. */
18383_ACEOF
18384cat confdefs.h >>conftest.$ac_ext
18385cat >>conftest.$ac_ext <<_ACEOF
18386/* end confdefs.h. */
18387
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018388/* Override any GCC internal prototype to avoid an error.
18389 Use char because int might match the return type of a GCC
18390 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018391#ifdef __cplusplus
18392extern "C"
18393#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018394char forkpty ();
18395int
18396main ()
18397{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018398return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018399 ;
18400 return 0;
18401}
18402_ACEOF
18403rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018404if { (ac_try="$ac_link"
18405case "(($ac_try" in
18406 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18407 *) ac_try_echo=$ac_try;;
18408esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018409eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018410 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018411 ac_status=$?
18412 grep -v '^ *+' conftest.er1 >conftest.err
18413 rm -f conftest.er1
18414 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018416 (exit $ac_status); } && {
18417 test -z "$ac_c_werror_flag" ||
18418 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018419 } && test -s conftest$ac_exeext &&
18420 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018421 ac_cv_lib_bsd_forkpty=yes
18422else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018423 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018424sed 's/^/| /' conftest.$ac_ext >&5
18425
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018426 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018427fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018428
18429rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018430 conftest$ac_exeext conftest.$ac_ext
18431LIBS=$ac_check_lib_save_LIBS
18432fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018433{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
18434echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
18435if test $ac_cv_lib_bsd_forkpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018436 cat >>confdefs.h <<\_ACEOF
18437#define HAVE_FORKPTY 1
18438_ACEOF
18439 LIBS="$LIBS -lbsd"
18440fi
18441
18442
18443fi
18444
Fred Drake8cef4cf2000-06-28 16:40:38 +000018445
18446fi
18447done
18448
Jack Jansendd19cf82001-12-06 22:36:17 +000018449
Christian Heimesb186d002008-03-18 15:15:01 +000018450# Stuff for expat.
18451
18452for ac_func in memmove
18453do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018454as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18455{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18456echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Christian Heimesb186d002008-03-18 15:15:01 +000018457if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018458 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimesb186d002008-03-18 15:15:01 +000018459else
18460 cat >conftest.$ac_ext <<_ACEOF
18461/* confdefs.h. */
18462_ACEOF
18463cat confdefs.h >>conftest.$ac_ext
18464cat >>conftest.$ac_ext <<_ACEOF
18465/* end confdefs.h. */
18466/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18467 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18468#define $ac_func innocuous_$ac_func
18469
18470/* System header to define __stub macros and hopefully few prototypes,
18471 which can conflict with char $ac_func (); below.
18472 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18473 <limits.h> exists even on freestanding compilers. */
18474
18475#ifdef __STDC__
18476# include <limits.h>
18477#else
18478# include <assert.h>
18479#endif
18480
18481#undef $ac_func
18482
18483/* Override any GCC internal prototype to avoid an error.
18484 Use char because int might match the return type of a GCC
18485 builtin and then its argument prototype would still apply. */
18486#ifdef __cplusplus
18487extern "C"
18488#endif
18489char $ac_func ();
18490/* The GNU C library defines this for functions which it implements
18491 to always fail with ENOSYS. Some functions are actually named
18492 something starting with __ and the normal name is an alias. */
18493#if defined __stub_$ac_func || defined __stub___$ac_func
18494choke me
18495#endif
18496
18497int
18498main ()
18499{
18500return $ac_func ();
18501 ;
18502 return 0;
18503}
18504_ACEOF
18505rm -f conftest.$ac_objext conftest$ac_exeext
18506if { (ac_try="$ac_link"
18507case "(($ac_try" in
18508 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18509 *) ac_try_echo=$ac_try;;
18510esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018511eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesb186d002008-03-18 15:15:01 +000018512 (eval "$ac_link") 2>conftest.er1
18513 ac_status=$?
18514 grep -v '^ *+' conftest.er1 >conftest.err
18515 rm -f conftest.er1
18516 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesb186d002008-03-18 15:15:01 +000018518 (exit $ac_status); } && {
18519 test -z "$ac_c_werror_flag" ||
18520 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018521 } && test -s conftest$ac_exeext &&
18522 $as_test_x conftest$ac_exeext; then
Christian Heimesb186d002008-03-18 15:15:01 +000018523 eval "$as_ac_var=yes"
18524else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018525 echo "$as_me: failed program was:" >&5
Christian Heimesb186d002008-03-18 15:15:01 +000018526sed 's/^/| /' conftest.$ac_ext >&5
18527
18528 eval "$as_ac_var=no"
18529fi
18530
18531rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18532 conftest$ac_exeext conftest.$ac_ext
18533fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018534ac_res=`eval echo '${'$as_ac_var'}'`
18535 { echo "$as_me:$LINENO: result: $ac_res" >&5
18536echo "${ECHO_T}$ac_res" >&6; }
18537if test `eval echo '${'$as_ac_var'}'` = yes; then
Christian Heimesb186d002008-03-18 15:15:01 +000018538 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018539#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimesb186d002008-03-18 15:15:01 +000018540_ACEOF
18541
18542fi
18543done
18544
18545
Michael W. Hudson54241132001-12-07 15:38:26 +000018546# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000018547
18548
18549
18550
18551
18552
Fred Drake8cef4cf2000-06-28 16:40:38 +000018553for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
18554do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018555as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18556{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18557echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018558if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018559 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018560else
Martin v. Löwis11437992002-04-12 09:54:03 +000018561 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018562/* confdefs.h. */
18563_ACEOF
18564cat confdefs.h >>conftest.$ac_ext
18565cat >>conftest.$ac_ext <<_ACEOF
18566/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018567/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18568 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18569#define $ac_func innocuous_$ac_func
18570
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018571/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018572 which can conflict with char $ac_func (); below.
18573 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018574 <limits.h> exists even on freestanding compilers. */
18575
18576#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018577# include <limits.h>
18578#else
18579# include <assert.h>
18580#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018581
18582#undef $ac_func
18583
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018584/* Override any GCC internal prototype to avoid an error.
18585 Use char because int might match the return type of a GCC
18586 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018587#ifdef __cplusplus
18588extern "C"
18589#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018590char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018591/* The GNU C library defines this for functions which it implements
18592 to always fail with ENOSYS. Some functions are actually named
18593 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018594#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018595choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018596#endif
18597
Skip Montanaro6dead952003-09-25 14:50:04 +000018598int
18599main ()
18600{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018601return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018602 ;
18603 return 0;
18604}
18605_ACEOF
18606rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018607if { (ac_try="$ac_link"
18608case "(($ac_try" in
18609 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18610 *) ac_try_echo=$ac_try;;
18611esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018612eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018613 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018614 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018615 grep -v '^ *+' conftest.er1 >conftest.err
18616 rm -f conftest.er1
18617 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018619 (exit $ac_status); } && {
18620 test -z "$ac_c_werror_flag" ||
18621 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018622 } && test -s conftest$ac_exeext &&
18623 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018624 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018625else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018626 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018627sed 's/^/| /' conftest.$ac_ext >&5
18628
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018629 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018630fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018631
18632rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018633 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018634fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018635ac_res=`eval echo '${'$as_ac_var'}'`
18636 { echo "$as_me:$LINENO: result: $ac_res" >&5
18637echo "${ECHO_T}$ac_res" >&6; }
18638if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018639 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018640#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018641_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000018642
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018643fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018644done
18645
Michael W. Hudson54241132001-12-07 15:38:26 +000018646
Martin v. Löwis11437992002-04-12 09:54:03 +000018647
18648
18649
Christian Heimesb186d002008-03-18 15:15:01 +000018650for ac_func in dup2 getcwd strdup
Thomas Wouters3a584202000-08-05 23:28:51 +000018651do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018652as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18653{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18654echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018655if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018656 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018657else
Martin v. Löwis11437992002-04-12 09:54:03 +000018658 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018659/* confdefs.h. */
18660_ACEOF
18661cat confdefs.h >>conftest.$ac_ext
18662cat >>conftest.$ac_ext <<_ACEOF
18663/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018664/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18665 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18666#define $ac_func innocuous_$ac_func
18667
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018668/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018669 which can conflict with char $ac_func (); below.
18670 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018671 <limits.h> exists even on freestanding compilers. */
18672
18673#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018674# include <limits.h>
18675#else
18676# include <assert.h>
18677#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018678
18679#undef $ac_func
18680
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018681/* Override any GCC internal prototype to avoid an error.
18682 Use char because int might match the return type of a GCC
18683 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018684#ifdef __cplusplus
18685extern "C"
18686#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018687char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000018688/* The GNU C library defines this for functions which it implements
18689 to always fail with ENOSYS. Some functions are actually named
18690 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018691#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000018692choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000018693#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018694
Skip Montanaro6dead952003-09-25 14:50:04 +000018695int
18696main ()
18697{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018698return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018699 ;
18700 return 0;
18701}
18702_ACEOF
18703rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018704if { (ac_try="$ac_link"
18705case "(($ac_try" in
18706 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18707 *) ac_try_echo=$ac_try;;
18708esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018709eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018710 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018711 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018712 grep -v '^ *+' conftest.er1 >conftest.err
18713 rm -f conftest.er1
18714 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018716 (exit $ac_status); } && {
18717 test -z "$ac_c_werror_flag" ||
18718 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018719 } && test -s conftest$ac_exeext &&
18720 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018721 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000018722else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018723 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018724sed 's/^/| /' conftest.$ac_ext >&5
18725
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018726 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000018727fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018728
18729rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018730 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000018731fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018732ac_res=`eval echo '${'$as_ac_var'}'`
18733 { echo "$as_me:$LINENO: result: $ac_res" >&5
18734echo "${ECHO_T}$ac_res" >&6; }
18735if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018736 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018737#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018738_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000018739
Martin v. Löwis1142de32002-03-29 16:28:31 +000018740else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018741 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000018742 *" $ac_func.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018743 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
18744 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000018745esac
18746
Martin v. Löwis1142de32002-03-29 16:28:31 +000018747fi
18748done
18749
18750
Martin v. Löwis11437992002-04-12 09:54:03 +000018751
Martin v. Löwis1142de32002-03-29 16:28:31 +000018752for ac_func in getpgrp
18753do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018754as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18755{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18756echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018757if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018758 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000018759else
Martin v. Löwis11437992002-04-12 09:54:03 +000018760 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018761/* confdefs.h. */
18762_ACEOF
18763cat confdefs.h >>conftest.$ac_ext
18764cat >>conftest.$ac_ext <<_ACEOF
18765/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018766/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18767 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18768#define $ac_func innocuous_$ac_func
18769
Martin v. Löwis1142de32002-03-29 16:28:31 +000018770/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018771 which can conflict with char $ac_func (); below.
18772 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018773 <limits.h> exists even on freestanding compilers. */
18774
18775#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018776# include <limits.h>
18777#else
18778# include <assert.h>
18779#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018780
18781#undef $ac_func
18782
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018783/* Override any GCC internal prototype to avoid an error.
18784 Use char because int might match the return type of a GCC
18785 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018786#ifdef __cplusplus
18787extern "C"
18788#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018789char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000018790/* The GNU C library defines this for functions which it implements
18791 to always fail with ENOSYS. Some functions are actually named
18792 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018793#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000018794choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000018795#endif
18796
Skip Montanaro6dead952003-09-25 14:50:04 +000018797int
18798main ()
18799{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018800return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018801 ;
18802 return 0;
18803}
18804_ACEOF
18805rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018806if { (ac_try="$ac_link"
18807case "(($ac_try" in
18808 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18809 *) ac_try_echo=$ac_try;;
18810esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018811eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018812 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018813 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018814 grep -v '^ *+' conftest.er1 >conftest.err
18815 rm -f conftest.er1
18816 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018818 (exit $ac_status); } && {
18819 test -z "$ac_c_werror_flag" ||
18820 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018821 } && test -s conftest$ac_exeext &&
18822 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018823 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018824else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018825 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018826sed 's/^/| /' conftest.$ac_ext >&5
18827
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018828 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018829fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018830
18831rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018832 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018833fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018834ac_res=`eval echo '${'$as_ac_var'}'`
18835 { echo "$as_me:$LINENO: result: $ac_res" >&5
18836echo "${ECHO_T}$ac_res" >&6; }
18837if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018838 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018839#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018840_ACEOF
18841 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018842/* confdefs.h. */
18843_ACEOF
18844cat confdefs.h >>conftest.$ac_ext
18845cat >>conftest.$ac_ext <<_ACEOF
18846/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018847#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018848int
18849main ()
18850{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018851getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000018852 ;
18853 return 0;
18854}
18855_ACEOF
18856rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018857if { (ac_try="$ac_compile"
18858case "(($ac_try" in
18859 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18860 *) ac_try_echo=$ac_try;;
18861esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018862eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018863 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018864 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018865 grep -v '^ *+' conftest.er1 >conftest.err
18866 rm -f conftest.er1
18867 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018869 (exit $ac_status); } && {
18870 test -z "$ac_c_werror_flag" ||
18871 test ! -s conftest.err
18872 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018873
18874cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018875#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018876_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000018877
Martin v. Löwis11437992002-04-12 09:54:03 +000018878
Guido van Rossumf78abae1997-01-21 22:02:36 +000018879else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018880 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018881sed 's/^/| /' conftest.$ac_ext >&5
18882
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018883
Guido van Rossum627b2d71993-12-24 10:39:16 +000018884fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018885
18886rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000018887
Guido van Rossum627b2d71993-12-24 10:39:16 +000018888fi
Thomas Wouters3a584202000-08-05 23:28:51 +000018889done
Guido van Rossum627b2d71993-12-24 10:39:16 +000018890
Jack Jansen150753c2003-03-29 22:07:47 +000018891
18892for ac_func in setpgrp
18893do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018894as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18895{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18896echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018897if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018898 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018899else
Martin v. Löwis11437992002-04-12 09:54:03 +000018900 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018901/* confdefs.h. */
18902_ACEOF
18903cat confdefs.h >>conftest.$ac_ext
18904cat >>conftest.$ac_ext <<_ACEOF
18905/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018906/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18907 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18908#define $ac_func innocuous_$ac_func
18909
Jack Jansen150753c2003-03-29 22:07:47 +000018910/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018911 which can conflict with char $ac_func (); below.
18912 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018913 <limits.h> exists even on freestanding compilers. */
18914
18915#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018916# include <limits.h>
18917#else
18918# include <assert.h>
18919#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018920
18921#undef $ac_func
18922
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018923/* Override any GCC internal prototype to avoid an error.
18924 Use char because int might match the return type of a GCC
18925 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000018926#ifdef __cplusplus
18927extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000018928#endif
Jack Jansen150753c2003-03-29 22:07:47 +000018929char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000018930/* The GNU C library defines this for functions which it implements
18931 to always fail with ENOSYS. Some functions are actually named
18932 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018933#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000018934choke me
Jack Jansen150753c2003-03-29 22:07:47 +000018935#endif
18936
Skip Montanaro6dead952003-09-25 14:50:04 +000018937int
18938main ()
18939{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018940return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018941 ;
18942 return 0;
18943}
18944_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000018945rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018946if { (ac_try="$ac_link"
18947case "(($ac_try" in
18948 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18949 *) ac_try_echo=$ac_try;;
18950esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018951eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018952 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018953 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018954 grep -v '^ *+' conftest.er1 >conftest.err
18955 rm -f conftest.er1
18956 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018958 (exit $ac_status); } && {
18959 test -z "$ac_c_werror_flag" ||
18960 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018961 } && test -s conftest$ac_exeext &&
18962 $as_test_x conftest$ac_exeext; then
Jack Jansen150753c2003-03-29 22:07:47 +000018963 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018964else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018965 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018966sed 's/^/| /' conftest.$ac_ext >&5
18967
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018968 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018969fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018970
18971rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018972 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018973fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018974ac_res=`eval echo '${'$as_ac_var'}'`
18975 { echo "$as_me:$LINENO: result: $ac_res" >&5
18976echo "${ECHO_T}$ac_res" >&6; }
18977if test `eval echo '${'$as_ac_var'}'` = yes; then
Jack Jansen150753c2003-03-29 22:07:47 +000018978 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018979#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Jack Jansen150753c2003-03-29 22:07:47 +000018980_ACEOF
18981 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018982/* confdefs.h. */
18983_ACEOF
18984cat confdefs.h >>conftest.$ac_ext
18985cat >>conftest.$ac_ext <<_ACEOF
18986/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000018987#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000018988int
18989main ()
18990{
18991setpgrp(0,0);
18992 ;
18993 return 0;
18994}
18995_ACEOF
18996rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018997if { (ac_try="$ac_compile"
18998case "(($ac_try" in
18999 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19000 *) ac_try_echo=$ac_try;;
19001esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019002eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019003 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000019004 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019005 grep -v '^ *+' conftest.er1 >conftest.err
19006 rm -f conftest.er1
19007 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019009 (exit $ac_status); } && {
19010 test -z "$ac_c_werror_flag" ||
19011 test ! -s conftest.err
19012 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019013
19014cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000019015#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019016_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000019017
Jack Jansen150753c2003-03-29 22:07:47 +000019018
19019else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019020 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019021sed 's/^/| /' conftest.$ac_ext >&5
19022
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019023
Guido van Rossum8eee56f1994-10-20 22:18:37 +000019024fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019025
19026rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000019027
19028fi
19029done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000019030
Martin v. Löwis11437992002-04-12 09:54:03 +000019031
Thomas Wouters3a584202000-08-05 23:28:51 +000019032for ac_func in gettimeofday
19033do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019034as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19035{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19036echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019037if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019038 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019039else
Martin v. Löwis11437992002-04-12 09:54:03 +000019040 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019041/* confdefs.h. */
19042_ACEOF
19043cat confdefs.h >>conftest.$ac_ext
19044cat >>conftest.$ac_ext <<_ACEOF
19045/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019046/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19047 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19048#define $ac_func innocuous_$ac_func
19049
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000019050/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019051 which can conflict with char $ac_func (); below.
19052 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019053 <limits.h> exists even on freestanding compilers. */
19054
19055#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019056# include <limits.h>
19057#else
19058# include <assert.h>
19059#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019060
19061#undef $ac_func
19062
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019063/* Override any GCC internal prototype to avoid an error.
19064 Use char because int might match the return type of a GCC
19065 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019066#ifdef __cplusplus
19067extern "C"
19068#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019069char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019070/* The GNU C library defines this for functions which it implements
19071 to always fail with ENOSYS. Some functions are actually named
19072 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019073#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019074choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019075#endif
19076
Skip Montanaro6dead952003-09-25 14:50:04 +000019077int
19078main ()
19079{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019080return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019081 ;
19082 return 0;
19083}
19084_ACEOF
19085rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019086if { (ac_try="$ac_link"
19087case "(($ac_try" in
19088 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19089 *) ac_try_echo=$ac_try;;
19090esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019091eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019092 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019093 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019094 grep -v '^ *+' conftest.er1 >conftest.err
19095 rm -f conftest.er1
19096 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019097 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019098 (exit $ac_status); } && {
19099 test -z "$ac_c_werror_flag" ||
19100 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019101 } && test -s conftest$ac_exeext &&
19102 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019103 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019104else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019105 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019106sed 's/^/| /' conftest.$ac_ext >&5
19107
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019108 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019109fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019110
19111rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019112 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019113fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019114ac_res=`eval echo '${'$as_ac_var'}'`
19115 { echo "$as_me:$LINENO: result: $ac_res" >&5
19116echo "${ECHO_T}$ac_res" >&6; }
19117if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019118 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019119#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019120_ACEOF
19121 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019122/* confdefs.h. */
19123_ACEOF
19124cat confdefs.h >>conftest.$ac_ext
19125cat >>conftest.$ac_ext <<_ACEOF
19126/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000019127#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019128int
19129main ()
19130{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019131gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000019132 ;
19133 return 0;
19134}
19135_ACEOF
19136rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019137if { (ac_try="$ac_compile"
19138case "(($ac_try" in
19139 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19140 *) ac_try_echo=$ac_try;;
19141esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019142eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019143 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019144 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019145 grep -v '^ *+' conftest.er1 >conftest.err
19146 rm -f conftest.er1
19147 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019149 (exit $ac_status); } && {
19150 test -z "$ac_c_werror_flag" ||
19151 test ! -s conftest.err
19152 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000019153 :
19154else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019155 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019156sed 's/^/| /' conftest.$ac_ext >&5
19157
Martin v. Löwis11437992002-04-12 09:54:03 +000019158
19159cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019160#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019161_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019162
Martin v. Löwis11437992002-04-12 09:54:03 +000019163
Guido van Rossum627b2d71993-12-24 10:39:16 +000019164fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019165
19166rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019167
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019168fi
Thomas Wouters3a584202000-08-05 23:28:51 +000019169done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019170
Michael W. Hudson54241132001-12-07 15:38:26 +000019171
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019172{ echo "$as_me:$LINENO: checking for major" >&5
19173echo $ECHO_N "checking for major... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019174cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019175/* confdefs.h. */
19176_ACEOF
19177cat confdefs.h >>conftest.$ac_ext
19178cat >>conftest.$ac_ext <<_ACEOF
19179/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019180
Neal Norwitz6eb37f02003-02-23 23:28:15 +000019181#if defined(MAJOR_IN_MKDEV)
19182#include <sys/mkdev.h>
19183#elif defined(MAJOR_IN_SYSMACROS)
19184#include <sys/sysmacros.h>
19185#else
19186#include <sys/types.h>
19187#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019188
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019189int
19190main ()
19191{
19192
19193 makedev(major(0),minor(0));
19194
19195 ;
19196 return 0;
19197}
19198_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000019199rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019200if { (ac_try="$ac_link"
19201case "(($ac_try" in
19202 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19203 *) ac_try_echo=$ac_try;;
19204esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019205eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019206 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019207 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019208 grep -v '^ *+' conftest.er1 >conftest.err
19209 rm -f conftest.er1
19210 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019212 (exit $ac_status); } && {
19213 test -z "$ac_c_werror_flag" ||
19214 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019215 } && test -s conftest$ac_exeext &&
19216 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019217
19218
19219cat >>confdefs.h <<\_ACEOF
19220#define HAVE_DEVICE_MACROS 1
19221_ACEOF
19222
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019223 { echo "$as_me:$LINENO: result: yes" >&5
19224echo "${ECHO_T}yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019225
19226else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019227 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019228sed 's/^/| /' conftest.$ac_ext >&5
19229
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019230
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019231 { echo "$as_me:$LINENO: result: no" >&5
19232echo "${ECHO_T}no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019233
19234fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019235
19236rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019237 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019238
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019239# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000019240# for [no]getaddrinfo in netdb.h.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019241{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
19242echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019243cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019244/* confdefs.h. */
19245_ACEOF
19246cat confdefs.h >>conftest.$ac_ext
19247cat >>conftest.$ac_ext <<_ACEOF
19248/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019249
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000019250#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019251#include <sys/socket.h>
19252#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000019253#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019254
Martin v. Löwis11437992002-04-12 09:54:03 +000019255int
19256main ()
19257{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019258
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019259getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019260
Martin v. Löwis11437992002-04-12 09:54:03 +000019261 ;
19262 return 0;
19263}
19264_ACEOF
19265rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019266if { (ac_try="$ac_link"
19267case "(($ac_try" in
19268 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19269 *) ac_try_echo=$ac_try;;
19270esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019271eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019272 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019273 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019274 grep -v '^ *+' conftest.er1 >conftest.err
19275 rm -f conftest.er1
19276 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019277 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019278 (exit $ac_status); } && {
19279 test -z "$ac_c_werror_flag" ||
19280 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019281 } && test -s conftest$ac_exeext &&
19282 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019283
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019284{ echo "$as_me:$LINENO: result: yes" >&5
19285echo "${ECHO_T}yes" >&6; }
19286{ echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
19287echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019288if test "$cross_compiling" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019289 { echo "$as_me:$LINENO: result: buggy" >&5
19290echo "${ECHO_T}buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019291buggygetaddrinfo=yes
19292else
Martin v. Löwis11437992002-04-12 09:54:03 +000019293 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019294/* confdefs.h. */
19295_ACEOF
19296cat confdefs.h >>conftest.$ac_ext
19297cat >>conftest.$ac_ext <<_ACEOF
19298/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019299
19300#include <sys/types.h>
19301#include <netdb.h>
19302#include <string.h>
19303#include <sys/socket.h>
19304#include <netinet/in.h>
19305
19306main()
19307{
19308 int passive, gaierr, inet4 = 0, inet6 = 0;
19309 struct addrinfo hints, *ai, *aitop;
19310 char straddr[INET6_ADDRSTRLEN], strport[16];
19311
19312 for (passive = 0; passive <= 1; passive++) {
19313 memset(&hints, 0, sizeof(hints));
19314 hints.ai_family = AF_UNSPEC;
19315 hints.ai_flags = passive ? AI_PASSIVE : 0;
19316 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000019317 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019318 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
19319 (void)gai_strerror(gaierr);
19320 goto bad;
19321 }
19322 for (ai = aitop; ai; ai = ai->ai_next) {
19323 if (ai->ai_addr == NULL ||
19324 ai->ai_addrlen == 0 ||
19325 getnameinfo(ai->ai_addr, ai->ai_addrlen,
19326 straddr, sizeof(straddr), strport, sizeof(strport),
19327 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
19328 goto bad;
19329 }
19330 switch (ai->ai_family) {
19331 case AF_INET:
19332 if (strcmp(strport, "54321") != 0) {
19333 goto bad;
19334 }
19335 if (passive) {
19336 if (strcmp(straddr, "0.0.0.0") != 0) {
19337 goto bad;
19338 }
19339 } else {
19340 if (strcmp(straddr, "127.0.0.1") != 0) {
19341 goto bad;
19342 }
19343 }
19344 inet4++;
19345 break;
19346 case AF_INET6:
19347 if (strcmp(strport, "54321") != 0) {
19348 goto bad;
19349 }
19350 if (passive) {
19351 if (strcmp(straddr, "::") != 0) {
19352 goto bad;
19353 }
19354 } else {
19355 if (strcmp(straddr, "::1") != 0) {
19356 goto bad;
19357 }
19358 }
19359 inet6++;
19360 break;
19361 case AF_UNSPEC:
19362 goto bad;
19363 break;
19364 default:
19365 /* another family support? */
19366 break;
19367 }
19368 }
19369 }
19370
19371 if (!(inet4 == 0 || inet4 == 2))
19372 goto bad;
19373 if (!(inet6 == 0 || inet6 == 2))
19374 goto bad;
19375
19376 if (aitop)
19377 freeaddrinfo(aitop);
19378 exit(0);
19379
19380 bad:
19381 if (aitop)
19382 freeaddrinfo(aitop);
19383 exit(1);
19384}
19385
Martin v. Löwis11437992002-04-12 09:54:03 +000019386_ACEOF
19387rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019388if { (ac_try="$ac_link"
19389case "(($ac_try" in
19390 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19391 *) ac_try_echo=$ac_try;;
19392esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019393eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019394 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019395 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019397 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019398 { (case "(($ac_try" in
19399 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19400 *) ac_try_echo=$ac_try;;
19401esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019402eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019403 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019404 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019406 (exit $ac_status); }; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019407 { echo "$as_me:$LINENO: result: good" >&5
19408echo "${ECHO_T}good" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019409buggygetaddrinfo=no
19410else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019411 echo "$as_me: program exited with status $ac_status" >&5
19412echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019413sed 's/^/| /' conftest.$ac_ext >&5
19414
Martin v. Löwis11437992002-04-12 09:54:03 +000019415( exit $ac_status )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019416{ echo "$as_me:$LINENO: result: buggy" >&5
19417echo "${ECHO_T}buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019418buggygetaddrinfo=yes
19419fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019420rm -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 +000019421fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019422
19423
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019424else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019425 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019426sed 's/^/| /' conftest.$ac_ext >&5
19427
Martin v. Löwis11437992002-04-12 09:54:03 +000019428
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019429{ echo "$as_me:$LINENO: result: no" >&5
19430echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019431buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019432
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019433fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019434
19435rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019436 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019437
19438if test "$buggygetaddrinfo" = "yes"; then
19439 if test "$ipv6" = "yes"; then
19440 echo 'Fatal: You must get working getaddrinfo() function.'
19441 echo ' or you can specify "--disable-ipv6"'.
19442 exit 1
19443 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019444else
Martin v. Löwis11437992002-04-12 09:54:03 +000019445
19446cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019447#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019448_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019449
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019450fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019451
Jack Jansen9a66b6d2001-08-08 13:56:14 +000019452for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019453do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019454as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19455{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19456echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019457if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019458 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019459else
Martin v. Löwis11437992002-04-12 09:54:03 +000019460 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019461/* confdefs.h. */
19462_ACEOF
19463cat confdefs.h >>conftest.$ac_ext
19464cat >>conftest.$ac_ext <<_ACEOF
19465/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019466/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19467 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19468#define $ac_func innocuous_$ac_func
19469
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019470/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019471 which can conflict with char $ac_func (); below.
19472 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019473 <limits.h> exists even on freestanding compilers. */
19474
19475#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019476# include <limits.h>
19477#else
19478# include <assert.h>
19479#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019480
19481#undef $ac_func
19482
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019483/* Override any GCC internal prototype to avoid an error.
19484 Use char because int might match the return type of a GCC
19485 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019486#ifdef __cplusplus
19487extern "C"
19488#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019489char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019490/* The GNU C library defines this for functions which it implements
19491 to always fail with ENOSYS. Some functions are actually named
19492 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019493#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019494choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019495#endif
19496
Skip Montanaro6dead952003-09-25 14:50:04 +000019497int
19498main ()
19499{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019500return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019501 ;
19502 return 0;
19503}
19504_ACEOF
19505rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019506if { (ac_try="$ac_link"
19507case "(($ac_try" in
19508 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19509 *) ac_try_echo=$ac_try;;
19510esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019511eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019512 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019513 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019514 grep -v '^ *+' conftest.er1 >conftest.err
19515 rm -f conftest.er1
19516 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019518 (exit $ac_status); } && {
19519 test -z "$ac_c_werror_flag" ||
19520 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019521 } && test -s conftest$ac_exeext &&
19522 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019523 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019524else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019525 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019526sed 's/^/| /' conftest.$ac_ext >&5
19527
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019528 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019529fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019530
19531rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019532 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019533fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019534ac_res=`eval echo '${'$as_ac_var'}'`
19535 { echo "$as_me:$LINENO: result: $ac_res" >&5
19536echo "${ECHO_T}$ac_res" >&6; }
19537if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019538 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019539#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019540_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019541
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019542fi
19543done
19544
Michael W. Hudson54241132001-12-07 15:38:26 +000019545
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019546# checks for structures
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019547{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
19548echo $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 +000019549if test "${ac_cv_header_time+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019550 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019551else
Martin v. Löwis11437992002-04-12 09:54:03 +000019552 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019553/* confdefs.h. */
19554_ACEOF
19555cat confdefs.h >>conftest.$ac_ext
19556cat >>conftest.$ac_ext <<_ACEOF
19557/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019558#include <sys/types.h>
19559#include <sys/time.h>
19560#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019561
Martin v. Löwis11437992002-04-12 09:54:03 +000019562int
19563main ()
19564{
19565if ((struct tm *) 0)
19566return 0;
19567 ;
19568 return 0;
19569}
19570_ACEOF
19571rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019572if { (ac_try="$ac_compile"
19573case "(($ac_try" in
19574 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19575 *) ac_try_echo=$ac_try;;
19576esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019577eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019578 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019579 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019580 grep -v '^ *+' conftest.er1 >conftest.err
19581 rm -f conftest.er1
19582 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019584 (exit $ac_status); } && {
19585 test -z "$ac_c_werror_flag" ||
19586 test ! -s conftest.err
19587 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019588 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000019589else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019590 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019591sed 's/^/| /' conftest.$ac_ext >&5
19592
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019593 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000019594fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019595
19596rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019597fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019598{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
19599echo "${ECHO_T}$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019600if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019601
19602cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019603#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019604_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019605
19606fi
19607
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019608{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
19609echo $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 +000019610if test "${ac_cv_struct_tm+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019611 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019612else
Martin v. Löwis11437992002-04-12 09:54:03 +000019613 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019614/* confdefs.h. */
19615_ACEOF
19616cat confdefs.h >>conftest.$ac_ext
19617cat >>conftest.$ac_ext <<_ACEOF
19618/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019619#include <sys/types.h>
19620#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019621
Martin v. Löwis11437992002-04-12 09:54:03 +000019622int
19623main ()
19624{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019625struct tm tm;
19626 int *p = &tm.tm_sec;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019627 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000019628 ;
19629 return 0;
19630}
19631_ACEOF
19632rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019633if { (ac_try="$ac_compile"
19634case "(($ac_try" in
19635 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19636 *) ac_try_echo=$ac_try;;
19637esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019638eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019639 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019640 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019641 grep -v '^ *+' conftest.er1 >conftest.err
19642 rm -f conftest.er1
19643 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019645 (exit $ac_status); } && {
19646 test -z "$ac_c_werror_flag" ||
19647 test ! -s conftest.err
19648 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019649 ac_cv_struct_tm=time.h
19650else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019651 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019652sed 's/^/| /' conftest.$ac_ext >&5
19653
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019654 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019655fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019656
19657rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019658fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019659{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
19660echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019661if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019662
19663cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019664#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019665_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019666
19667fi
19668
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019669{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
19670echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019671if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019672 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019673else
Martin v. Löwis11437992002-04-12 09:54:03 +000019674 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019675/* confdefs.h. */
19676_ACEOF
19677cat confdefs.h >>conftest.$ac_ext
19678cat >>conftest.$ac_ext <<_ACEOF
19679/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019680#include <sys/types.h>
19681#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000019682
19683
Martin v. Löwis11437992002-04-12 09:54:03 +000019684int
19685main ()
19686{
19687static struct tm ac_aggr;
19688if (ac_aggr.tm_zone)
19689return 0;
19690 ;
19691 return 0;
19692}
19693_ACEOF
19694rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019695if { (ac_try="$ac_compile"
19696case "(($ac_try" in
19697 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19698 *) ac_try_echo=$ac_try;;
19699esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019700eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019701 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019702 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019703 grep -v '^ *+' conftest.er1 >conftest.err
19704 rm -f conftest.er1
19705 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019707 (exit $ac_status); } && {
19708 test -z "$ac_c_werror_flag" ||
19709 test ! -s conftest.err
19710 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019711 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000019712else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019713 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019714sed 's/^/| /' conftest.$ac_ext >&5
19715
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019716 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019717/* confdefs.h. */
19718_ACEOF
19719cat confdefs.h >>conftest.$ac_ext
19720cat >>conftest.$ac_ext <<_ACEOF
19721/* end confdefs.h. */
19722#include <sys/types.h>
19723#include <$ac_cv_struct_tm>
19724
19725
19726int
19727main ()
19728{
19729static struct tm ac_aggr;
19730if (sizeof ac_aggr.tm_zone)
19731return 0;
19732 ;
19733 return 0;
19734}
19735_ACEOF
19736rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019737if { (ac_try="$ac_compile"
19738case "(($ac_try" in
19739 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19740 *) ac_try_echo=$ac_try;;
19741esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019742eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019743 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000019744 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019745 grep -v '^ *+' conftest.er1 >conftest.err
19746 rm -f conftest.er1
19747 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019749 (exit $ac_status); } && {
19750 test -z "$ac_c_werror_flag" ||
19751 test ! -s conftest.err
19752 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019753 ac_cv_member_struct_tm_tm_zone=yes
19754else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019755 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019756sed 's/^/| /' conftest.$ac_ext >&5
19757
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019758 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000019759fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019760
19761rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019762fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019763
19764rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000019765fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019766{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
19767echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
19768if test $ac_cv_member_struct_tm_tm_zone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019769
19770cat >>confdefs.h <<_ACEOF
19771#define HAVE_STRUCT_TM_TM_ZONE 1
19772_ACEOF
19773
19774
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019775fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000019776
Martin v. Löwis11437992002-04-12 09:54:03 +000019777if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
19778
19779cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019780#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019781_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019782
19783else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019784 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
19785echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019786if test "${ac_cv_have_decl_tzname+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019787 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019788else
19789 cat >conftest.$ac_ext <<_ACEOF
19790/* confdefs.h. */
19791_ACEOF
19792cat confdefs.h >>conftest.$ac_ext
19793cat >>conftest.$ac_ext <<_ACEOF
19794/* end confdefs.h. */
19795#include <time.h>
19796
19797int
19798main ()
19799{
19800#ifndef tzname
19801 (void) tzname;
19802#endif
19803
19804 ;
19805 return 0;
19806}
19807_ACEOF
19808rm -f conftest.$ac_objext
19809if { (ac_try="$ac_compile"
19810case "(($ac_try" in
19811 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19812 *) ac_try_echo=$ac_try;;
19813esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019814eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019815 (eval "$ac_compile") 2>conftest.er1
19816 ac_status=$?
19817 grep -v '^ *+' conftest.er1 >conftest.err
19818 rm -f conftest.er1
19819 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019821 (exit $ac_status); } && {
19822 test -z "$ac_c_werror_flag" ||
19823 test ! -s conftest.err
19824 } && test -s conftest.$ac_objext; then
19825 ac_cv_have_decl_tzname=yes
19826else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019827 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019828sed 's/^/| /' conftest.$ac_ext >&5
19829
19830 ac_cv_have_decl_tzname=no
19831fi
19832
19833rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19834fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019835{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
19836echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
19837if test $ac_cv_have_decl_tzname = yes; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019838
19839cat >>confdefs.h <<_ACEOF
19840#define HAVE_DECL_TZNAME 1
19841_ACEOF
19842
19843
19844else
19845 cat >>confdefs.h <<_ACEOF
19846#define HAVE_DECL_TZNAME 0
19847_ACEOF
19848
19849
19850fi
19851
19852
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019853 { echo "$as_me:$LINENO: checking for tzname" >&5
19854echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019855if test "${ac_cv_var_tzname+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019856 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019857else
Martin v. Löwis11437992002-04-12 09:54:03 +000019858 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019859/* confdefs.h. */
19860_ACEOF
19861cat confdefs.h >>conftest.$ac_ext
19862cat >>conftest.$ac_ext <<_ACEOF
19863/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000019864#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019865#if !HAVE_DECL_TZNAME
19866extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000019867#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019868
Martin v. Löwis11437992002-04-12 09:54:03 +000019869int
19870main ()
19871{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019872return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000019873 ;
19874 return 0;
19875}
19876_ACEOF
19877rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019878if { (ac_try="$ac_link"
19879case "(($ac_try" in
19880 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19881 *) ac_try_echo=$ac_try;;
19882esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019883eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019884 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019885 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019886 grep -v '^ *+' conftest.er1 >conftest.err
19887 rm -f conftest.er1
19888 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019890 (exit $ac_status); } && {
19891 test -z "$ac_c_werror_flag" ||
19892 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019893 } && test -s conftest$ac_exeext &&
19894 $as_test_x conftest$ac_exeext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019895 ac_cv_var_tzname=yes
19896else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019897 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019898sed 's/^/| /' conftest.$ac_ext >&5
19899
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019900 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000019901fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019902
19903rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019904 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000019905fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019906{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
19907echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019908 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019909
19910cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019911#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019912_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019913
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019914 fi
19915fi
19916
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019917{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
19918echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019919if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019920 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000019921else
19922 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019923/* confdefs.h. */
19924_ACEOF
19925cat confdefs.h >>conftest.$ac_ext
19926cat >>conftest.$ac_ext <<_ACEOF
19927/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019928$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000019929int
19930main ()
19931{
19932static struct stat ac_aggr;
19933if (ac_aggr.st_rdev)
19934return 0;
19935 ;
19936 return 0;
19937}
19938_ACEOF
19939rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019940if { (ac_try="$ac_compile"
19941case "(($ac_try" in
19942 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19943 *) ac_try_echo=$ac_try;;
19944esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019945eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019946 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019947 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019948 grep -v '^ *+' conftest.er1 >conftest.err
19949 rm -f conftest.er1
19950 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019952 (exit $ac_status); } && {
19953 test -z "$ac_c_werror_flag" ||
19954 test ! -s conftest.err
19955 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019956 ac_cv_member_struct_stat_st_rdev=yes
19957else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019958 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019959sed 's/^/| /' conftest.$ac_ext >&5
19960
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019961 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019962/* confdefs.h. */
19963_ACEOF
19964cat confdefs.h >>conftest.$ac_ext
19965cat >>conftest.$ac_ext <<_ACEOF
19966/* end confdefs.h. */
19967$ac_includes_default
19968int
19969main ()
19970{
19971static struct stat ac_aggr;
19972if (sizeof ac_aggr.st_rdev)
19973return 0;
19974 ;
19975 return 0;
19976}
19977_ACEOF
19978rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019979if { (ac_try="$ac_compile"
19980case "(($ac_try" in
19981 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19982 *) ac_try_echo=$ac_try;;
19983esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019984eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019985 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000019986 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019987 grep -v '^ *+' conftest.er1 >conftest.err
19988 rm -f conftest.er1
19989 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019991 (exit $ac_status); } && {
19992 test -z "$ac_c_werror_flag" ||
19993 test ! -s conftest.err
19994 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019995 ac_cv_member_struct_stat_st_rdev=yes
19996else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019997 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019998sed 's/^/| /' conftest.$ac_ext >&5
19999
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020000 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000020001fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020002
20003rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020004fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020005
20006rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020007fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020008{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
20009echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
20010if test $ac_cv_member_struct_stat_st_rdev = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020011
20012cat >>confdefs.h <<_ACEOF
20013#define HAVE_STRUCT_STAT_ST_RDEV 1
20014_ACEOF
20015
20016
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020017fi
20018
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020019{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
20020echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020021if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020022 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020023else
Martin v. Löwis11437992002-04-12 09:54:03 +000020024 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020025/* confdefs.h. */
20026_ACEOF
20027cat confdefs.h >>conftest.$ac_ext
20028cat >>conftest.$ac_ext <<_ACEOF
20029/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020030$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020031int
20032main ()
20033{
20034static struct stat ac_aggr;
20035if (ac_aggr.st_blksize)
20036return 0;
20037 ;
20038 return 0;
20039}
20040_ACEOF
20041rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020042if { (ac_try="$ac_compile"
20043case "(($ac_try" in
20044 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20045 *) ac_try_echo=$ac_try;;
20046esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020047eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020048 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020049 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020050 grep -v '^ *+' conftest.er1 >conftest.err
20051 rm -f conftest.er1
20052 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020054 (exit $ac_status); } && {
20055 test -z "$ac_c_werror_flag" ||
20056 test ! -s conftest.err
20057 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020058 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000020059else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020060 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020061sed 's/^/| /' conftest.$ac_ext >&5
20062
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020063 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020064/* confdefs.h. */
20065_ACEOF
20066cat confdefs.h >>conftest.$ac_ext
20067cat >>conftest.$ac_ext <<_ACEOF
20068/* end confdefs.h. */
20069$ac_includes_default
20070int
20071main ()
20072{
20073static struct stat ac_aggr;
20074if (sizeof ac_aggr.st_blksize)
20075return 0;
20076 ;
20077 return 0;
20078}
20079_ACEOF
20080rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020081if { (ac_try="$ac_compile"
20082case "(($ac_try" in
20083 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20084 *) ac_try_echo=$ac_try;;
20085esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020086eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020087 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020088 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020089 grep -v '^ *+' conftest.er1 >conftest.err
20090 rm -f conftest.er1
20091 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020093 (exit $ac_status); } && {
20094 test -z "$ac_c_werror_flag" ||
20095 test ! -s conftest.err
20096 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020097 ac_cv_member_struct_stat_st_blksize=yes
20098else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020099 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020100sed 's/^/| /' conftest.$ac_ext >&5
20101
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020102 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000020103fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020104
20105rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020106fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020107
20108rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020109fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020110{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
20111echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
20112if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000020113
Martin v. Löwis11437992002-04-12 09:54:03 +000020114cat >>confdefs.h <<_ACEOF
20115#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
20116_ACEOF
20117
20118
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020119fi
20120
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020121{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
20122echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020123if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020124 echo $ECHO_N "(cached) $ECHO_C" >&6
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020125else
20126 cat >conftest.$ac_ext <<_ACEOF
20127/* confdefs.h. */
20128_ACEOF
20129cat confdefs.h >>conftest.$ac_ext
20130cat >>conftest.$ac_ext <<_ACEOF
20131/* end confdefs.h. */
20132$ac_includes_default
20133int
20134main ()
20135{
20136static struct stat ac_aggr;
20137if (ac_aggr.st_flags)
20138return 0;
20139 ;
20140 return 0;
20141}
20142_ACEOF
20143rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020144if { (ac_try="$ac_compile"
20145case "(($ac_try" in
20146 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20147 *) ac_try_echo=$ac_try;;
20148esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020149eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020150 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020151 ac_status=$?
20152 grep -v '^ *+' conftest.er1 >conftest.err
20153 rm -f conftest.er1
20154 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020155 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020156 (exit $ac_status); } && {
20157 test -z "$ac_c_werror_flag" ||
20158 test ! -s conftest.err
20159 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020160 ac_cv_member_struct_stat_st_flags=yes
20161else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020162 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020163sed 's/^/| /' conftest.$ac_ext >&5
20164
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020165 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020166/* confdefs.h. */
20167_ACEOF
20168cat confdefs.h >>conftest.$ac_ext
20169cat >>conftest.$ac_ext <<_ACEOF
20170/* end confdefs.h. */
20171$ac_includes_default
20172int
20173main ()
20174{
20175static struct stat ac_aggr;
20176if (sizeof ac_aggr.st_flags)
20177return 0;
20178 ;
20179 return 0;
20180}
20181_ACEOF
20182rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020183if { (ac_try="$ac_compile"
20184case "(($ac_try" in
20185 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20186 *) ac_try_echo=$ac_try;;
20187esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020188eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020189 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020190 ac_status=$?
20191 grep -v '^ *+' conftest.er1 >conftest.err
20192 rm -f conftest.er1
20193 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020195 (exit $ac_status); } && {
20196 test -z "$ac_c_werror_flag" ||
20197 test ! -s conftest.err
20198 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020199 ac_cv_member_struct_stat_st_flags=yes
20200else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020201 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020202sed 's/^/| /' conftest.$ac_ext >&5
20203
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020204 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020205fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020206
20207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020208fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020209
20210rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020211fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020212{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
20213echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
20214if test $ac_cv_member_struct_stat_st_flags = yes; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020215
20216cat >>confdefs.h <<_ACEOF
20217#define HAVE_STRUCT_STAT_ST_FLAGS 1
20218_ACEOF
20219
20220
20221fi
20222
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020223{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
20224echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020225if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020226 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020227else
20228 cat >conftest.$ac_ext <<_ACEOF
20229/* confdefs.h. */
20230_ACEOF
20231cat confdefs.h >>conftest.$ac_ext
20232cat >>conftest.$ac_ext <<_ACEOF
20233/* end confdefs.h. */
20234$ac_includes_default
20235int
20236main ()
20237{
20238static struct stat ac_aggr;
20239if (ac_aggr.st_gen)
20240return 0;
20241 ;
20242 return 0;
20243}
20244_ACEOF
20245rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020246if { (ac_try="$ac_compile"
20247case "(($ac_try" in
20248 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20249 *) ac_try_echo=$ac_try;;
20250esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020251eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020252 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020253 ac_status=$?
20254 grep -v '^ *+' conftest.er1 >conftest.err
20255 rm -f conftest.er1
20256 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020258 (exit $ac_status); } && {
20259 test -z "$ac_c_werror_flag" ||
20260 test ! -s conftest.err
20261 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020262 ac_cv_member_struct_stat_st_gen=yes
20263else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020264 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020265sed 's/^/| /' conftest.$ac_ext >&5
20266
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020267 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020268/* confdefs.h. */
20269_ACEOF
20270cat confdefs.h >>conftest.$ac_ext
20271cat >>conftest.$ac_ext <<_ACEOF
20272/* end confdefs.h. */
20273$ac_includes_default
20274int
20275main ()
20276{
20277static struct stat ac_aggr;
20278if (sizeof ac_aggr.st_gen)
20279return 0;
20280 ;
20281 return 0;
20282}
20283_ACEOF
20284rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020285if { (ac_try="$ac_compile"
20286case "(($ac_try" in
20287 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20288 *) ac_try_echo=$ac_try;;
20289esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020290eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020291 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020292 ac_status=$?
20293 grep -v '^ *+' conftest.er1 >conftest.err
20294 rm -f conftest.er1
20295 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020297 (exit $ac_status); } && {
20298 test -z "$ac_c_werror_flag" ||
20299 test ! -s conftest.err
20300 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020301 ac_cv_member_struct_stat_st_gen=yes
20302else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020303 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020304sed 's/^/| /' conftest.$ac_ext >&5
20305
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020306 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020307fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020308
20309rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020310fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020311
20312rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020313fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020314{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
20315echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
20316if test $ac_cv_member_struct_stat_st_gen = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020317
20318cat >>confdefs.h <<_ACEOF
20319#define HAVE_STRUCT_STAT_ST_GEN 1
20320_ACEOF
20321
20322
20323fi
20324
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020325{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
20326echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020327if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020328 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020329else
20330 cat >conftest.$ac_ext <<_ACEOF
20331/* confdefs.h. */
20332_ACEOF
20333cat confdefs.h >>conftest.$ac_ext
20334cat >>conftest.$ac_ext <<_ACEOF
20335/* end confdefs.h. */
20336$ac_includes_default
20337int
20338main ()
20339{
20340static struct stat ac_aggr;
20341if (ac_aggr.st_birthtime)
20342return 0;
20343 ;
20344 return 0;
20345}
20346_ACEOF
20347rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020348if { (ac_try="$ac_compile"
20349case "(($ac_try" in
20350 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20351 *) ac_try_echo=$ac_try;;
20352esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020353eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020354 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020355 ac_status=$?
20356 grep -v '^ *+' conftest.er1 >conftest.err
20357 rm -f conftest.er1
20358 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020360 (exit $ac_status); } && {
20361 test -z "$ac_c_werror_flag" ||
20362 test ! -s conftest.err
20363 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020364 ac_cv_member_struct_stat_st_birthtime=yes
20365else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020366 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020367sed 's/^/| /' conftest.$ac_ext >&5
20368
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020369 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020370/* confdefs.h. */
20371_ACEOF
20372cat confdefs.h >>conftest.$ac_ext
20373cat >>conftest.$ac_ext <<_ACEOF
20374/* end confdefs.h. */
20375$ac_includes_default
20376int
20377main ()
20378{
20379static struct stat ac_aggr;
20380if (sizeof ac_aggr.st_birthtime)
20381return 0;
20382 ;
20383 return 0;
20384}
20385_ACEOF
20386rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020387if { (ac_try="$ac_compile"
20388case "(($ac_try" in
20389 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20390 *) ac_try_echo=$ac_try;;
20391esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020392eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020393 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020394 ac_status=$?
20395 grep -v '^ *+' conftest.er1 >conftest.err
20396 rm -f conftest.er1
20397 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020399 (exit $ac_status); } && {
20400 test -z "$ac_c_werror_flag" ||
20401 test ! -s conftest.err
20402 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020403 ac_cv_member_struct_stat_st_birthtime=yes
20404else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020405 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020406sed 's/^/| /' conftest.$ac_ext >&5
20407
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020408 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020409fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020410
20411rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020412fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020413
20414rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020415fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020416{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
20417echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
20418if test $ac_cv_member_struct_stat_st_birthtime = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020419
20420cat >>confdefs.h <<_ACEOF
20421#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
20422_ACEOF
20423
20424
20425fi
20426
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020427{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
20428echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020429if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020430 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020431else
Martin v. Löwis11437992002-04-12 09:54:03 +000020432 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020433/* confdefs.h. */
20434_ACEOF
20435cat confdefs.h >>conftest.$ac_ext
20436cat >>conftest.$ac_ext <<_ACEOF
20437/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020438$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020439int
20440main ()
20441{
20442static struct stat ac_aggr;
20443if (ac_aggr.st_blocks)
20444return 0;
20445 ;
20446 return 0;
20447}
20448_ACEOF
20449rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020450if { (ac_try="$ac_compile"
20451case "(($ac_try" in
20452 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20453 *) ac_try_echo=$ac_try;;
20454esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020455eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020456 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020457 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020458 grep -v '^ *+' conftest.er1 >conftest.err
20459 rm -f conftest.er1
20460 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020462 (exit $ac_status); } && {
20463 test -z "$ac_c_werror_flag" ||
20464 test ! -s conftest.err
20465 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020466 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000020467else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020468 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020469sed 's/^/| /' conftest.$ac_ext >&5
20470
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020471 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020472/* confdefs.h. */
20473_ACEOF
20474cat confdefs.h >>conftest.$ac_ext
20475cat >>conftest.$ac_ext <<_ACEOF
20476/* end confdefs.h. */
20477$ac_includes_default
20478int
20479main ()
20480{
20481static struct stat ac_aggr;
20482if (sizeof ac_aggr.st_blocks)
20483return 0;
20484 ;
20485 return 0;
20486}
20487_ACEOF
20488rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020489if { (ac_try="$ac_compile"
20490case "(($ac_try" in
20491 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20492 *) ac_try_echo=$ac_try;;
20493esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020494eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020495 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020496 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020497 grep -v '^ *+' conftest.er1 >conftest.err
20498 rm -f conftest.er1
20499 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020501 (exit $ac_status); } && {
20502 test -z "$ac_c_werror_flag" ||
20503 test ! -s conftest.err
20504 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020505 ac_cv_member_struct_stat_st_blocks=yes
20506else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020507 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020508sed 's/^/| /' conftest.$ac_ext >&5
20509
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020510 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000020511fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020512
20513rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020514fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020515
20516rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020517fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020518{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
20519echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
20520if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000020521
Martin v. Löwis11437992002-04-12 09:54:03 +000020522cat >>confdefs.h <<_ACEOF
20523#define HAVE_STRUCT_STAT_ST_BLOCKS 1
20524_ACEOF
20525
20526
20527cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020528#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020529_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020530
20531else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020532 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000020533 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020534 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
20535 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000020536esac
20537
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020538fi
20539
Michael W. Hudson54241132001-12-07 15:38:26 +000020540
Martin v. Löwis11437992002-04-12 09:54:03 +000020541
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020542{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
20543echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020544if test "${ac_cv_header_time_altzone+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020545 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020546else
Martin v. Löwis11437992002-04-12 09:54:03 +000020547 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020548/* confdefs.h. */
20549_ACEOF
20550cat confdefs.h >>conftest.$ac_ext
20551cat >>conftest.$ac_ext <<_ACEOF
20552/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020553#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020554int
20555main ()
20556{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020557return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000020558 ;
20559 return 0;
20560}
20561_ACEOF
20562rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020563if { (ac_try="$ac_compile"
20564case "(($ac_try" in
20565 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20566 *) ac_try_echo=$ac_try;;
20567esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020568eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020569 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020570 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020571 grep -v '^ *+' conftest.er1 >conftest.err
20572 rm -f conftest.er1
20573 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020575 (exit $ac_status); } && {
20576 test -z "$ac_c_werror_flag" ||
20577 test ! -s conftest.err
20578 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020579 ac_cv_header_time_altzone=yes
20580else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020581 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020582sed 's/^/| /' conftest.$ac_ext >&5
20583
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020584 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000020585fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020586
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020587rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20588fi
20589
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020590{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
20591echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020592if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020593
20594cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020595#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020596_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020597
20598fi
20599
Guido van Rossumda88dad1995-01-26 00:46:29 +000020600was_it_defined=no
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020601{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
20602echo $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 +000020603cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020604/* confdefs.h. */
20605_ACEOF
20606cat confdefs.h >>conftest.$ac_ext
20607cat >>conftest.$ac_ext <<_ACEOF
20608/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020609
20610#include <sys/types.h>
20611#include <sys/select.h>
20612#include <sys/time.h>
20613
Martin v. Löwis11437992002-04-12 09:54:03 +000020614int
20615main ()
20616{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020617;
Martin v. Löwis11437992002-04-12 09:54:03 +000020618 ;
20619 return 0;
20620}
20621_ACEOF
20622rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020623if { (ac_try="$ac_compile"
20624case "(($ac_try" in
20625 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20626 *) ac_try_echo=$ac_try;;
20627esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020628eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020629 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020630 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020631 grep -v '^ *+' conftest.er1 >conftest.err
20632 rm -f conftest.er1
20633 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020635 (exit $ac_status); } && {
20636 test -z "$ac_c_werror_flag" ||
20637 test ! -s conftest.err
20638 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020639
20640
20641cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020642#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020643_ACEOF
20644
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020645 was_it_defined=yes
20646
Guido van Rossumf78abae1997-01-21 22:02:36 +000020647else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020648 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020649sed 's/^/| /' conftest.$ac_ext >&5
20650
Thomas Wouters477c8d52006-05-27 19:21:47 +000020651
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020652fi
20653
20654rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020655{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
20656echo "${ECHO_T}$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020657
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020658{ echo "$as_me:$LINENO: checking for addrinfo" >&5
20659echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020660if test "${ac_cv_struct_addrinfo+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020661 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020662else
Martin v. Löwis11437992002-04-12 09:54:03 +000020663 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020664/* confdefs.h. */
20665_ACEOF
20666cat confdefs.h >>conftest.$ac_ext
20667cat >>conftest.$ac_ext <<_ACEOF
20668/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020669
20670# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020671int
20672main ()
20673{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020674struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000020675 ;
20676 return 0;
20677}
20678_ACEOF
20679rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020680if { (ac_try="$ac_compile"
20681case "(($ac_try" in
20682 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20683 *) ac_try_echo=$ac_try;;
20684esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020685eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020686 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020687 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020688 grep -v '^ *+' conftest.er1 >conftest.err
20689 rm -f conftest.er1
20690 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020692 (exit $ac_status); } && {
20693 test -z "$ac_c_werror_flag" ||
20694 test ! -s conftest.err
20695 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020696 ac_cv_struct_addrinfo=yes
20697else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020698 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020699sed 's/^/| /' conftest.$ac_ext >&5
20700
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020701 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020702fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020703
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020704rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20705fi
20706
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020707{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
20708echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020709if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020710
20711cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020712#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020713_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020714
20715fi
20716
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020717{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
20718echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020719if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020720 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020721else
Martin v. Löwis11437992002-04-12 09:54:03 +000020722 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020723/* confdefs.h. */
20724_ACEOF
20725cat confdefs.h >>conftest.$ac_ext
20726cat >>conftest.$ac_ext <<_ACEOF
20727/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020728
20729# include <sys/types.h>
20730# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020731int
20732main ()
20733{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020734struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000020735 ;
20736 return 0;
20737}
20738_ACEOF
20739rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020740if { (ac_try="$ac_compile"
20741case "(($ac_try" in
20742 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20743 *) ac_try_echo=$ac_try;;
20744esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020745eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020746 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020747 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020748 grep -v '^ *+' conftest.er1 >conftest.err
20749 rm -f conftest.er1
20750 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020752 (exit $ac_status); } && {
20753 test -z "$ac_c_werror_flag" ||
20754 test ! -s conftest.err
20755 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020756 ac_cv_struct_sockaddr_storage=yes
20757else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020758 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020759sed 's/^/| /' conftest.$ac_ext >&5
20760
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020761 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020762fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020763
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020764rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20765fi
20766
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020767{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
20768echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020769if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020770
20771cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020772#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020773_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020774
20775fi
20776
Guido van Rossum627b2d71993-12-24 10:39:16 +000020777# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000020778
Michael W. Hudson54241132001-12-07 15:38:26 +000020779
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020780{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
20781echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020782if test "${ac_cv_c_char_unsigned+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020783 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000020784else
Martin v. Löwis11437992002-04-12 09:54:03 +000020785 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020786/* confdefs.h. */
20787_ACEOF
20788cat confdefs.h >>conftest.$ac_ext
20789cat >>conftest.$ac_ext <<_ACEOF
20790/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020791$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020792int
20793main ()
20794{
20795static int test_array [1 - 2 * !(((char) -1) < 0)];
20796test_array [0] = 0
20797
20798 ;
20799 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000020800}
Martin v. Löwis11437992002-04-12 09:54:03 +000020801_ACEOF
20802rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020803if { (ac_try="$ac_compile"
20804case "(($ac_try" in
20805 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20806 *) ac_try_echo=$ac_try;;
20807esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020808eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020809 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020810 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020811 grep -v '^ *+' conftest.er1 >conftest.err
20812 rm -f conftest.er1
20813 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020815 (exit $ac_status); } && {
20816 test -z "$ac_c_werror_flag" ||
20817 test ! -s conftest.err
20818 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000020819 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000020820else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020821 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020822sed 's/^/| /' conftest.$ac_ext >&5
20823
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020824 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020825fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020826
20827rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020828fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020829{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
20830echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020831if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020832 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020833#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020834_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020835
20836fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000020837
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020838{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
20839echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020840if test "${ac_cv_c_const+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020841 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000020842else
20843 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020844/* confdefs.h. */
20845_ACEOF
20846cat confdefs.h >>conftest.$ac_ext
20847cat >>conftest.$ac_ext <<_ACEOF
20848/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020849
Martin v. Löwis11437992002-04-12 09:54:03 +000020850int
20851main ()
20852{
20853/* FIXME: Include the comments suggested by Paul. */
20854#ifndef __cplusplus
20855 /* Ultrix mips cc rejects this. */
20856 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020857 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000020858 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020859 char const *const *pcpcc;
20860 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000020861 /* NEC SVR4.0.2 mips cc rejects this. */
20862 struct point {int x, y;};
20863 static struct point const zero = {0,0};
20864 /* AIX XL C 1.02.0.0 rejects this.
20865 It does not let you subtract one const X* pointer from another in
20866 an arm of an if-expression whose if-part is not a constant
20867 expression */
20868 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020869 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020870 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020871 ++pcpcc;
20872 ppc = (char**) pcpcc;
20873 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000020874 { /* SCO 3.2v4 cc rejects this. */
20875 char *t;
20876 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020877
Martin v. Löwis11437992002-04-12 09:54:03 +000020878 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020879 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020880 }
20881 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
20882 int x[] = {25, 17};
20883 const int *foo = &x[0];
20884 ++foo;
20885 }
20886 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
20887 typedef const int *iptr;
20888 iptr p = 0;
20889 ++p;
20890 }
20891 { /* AIX XL C 1.02.0.0 rejects this saying
20892 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
20893 struct s { int j; const int *ap[3]; };
20894 struct s *b; b->j = 5;
20895 }
20896 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
20897 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020898 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020899 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020900 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000020901#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000020902
Martin v. Löwis11437992002-04-12 09:54:03 +000020903 ;
20904 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000020905}
Martin v. Löwis11437992002-04-12 09:54:03 +000020906_ACEOF
20907rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020908if { (ac_try="$ac_compile"
20909case "(($ac_try" in
20910 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20911 *) ac_try_echo=$ac_try;;
20912esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020913eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020914 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020915 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020916 grep -v '^ *+' conftest.er1 >conftest.err
20917 rm -f conftest.er1
20918 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020920 (exit $ac_status); } && {
20921 test -z "$ac_c_werror_flag" ||
20922 test ! -s conftest.err
20923 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020924 ac_cv_c_const=yes
20925else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020926 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020927sed 's/^/| /' conftest.$ac_ext >&5
20928
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020929 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020930fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020931
20932rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020933fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020934{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
20935echo "${ECHO_T}$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020936if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020937
20938cat >>confdefs.h <<\_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020939#define const
Martin v. Löwis11437992002-04-12 09:54:03 +000020940_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020941
20942fi
20943
Michael W. Hudson54241132001-12-07 15:38:26 +000020944
Guido van Rossumda88dad1995-01-26 00:46:29 +000020945works=no
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020946{ echo "$as_me:$LINENO: checking for working volatile" >&5
20947echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020948cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020949/* confdefs.h. */
20950_ACEOF
20951cat confdefs.h >>conftest.$ac_ext
20952cat >>conftest.$ac_ext <<_ACEOF
20953/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000020954
Martin v. Löwis11437992002-04-12 09:54:03 +000020955int
20956main ()
20957{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020958volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020959 ;
20960 return 0;
20961}
20962_ACEOF
20963rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020964if { (ac_try="$ac_compile"
20965case "(($ac_try" in
20966 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20967 *) ac_try_echo=$ac_try;;
20968esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020969eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020970 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020971 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020972 grep -v '^ *+' conftest.er1 >conftest.err
20973 rm -f conftest.er1
20974 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020975 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020976 (exit $ac_status); } && {
20977 test -z "$ac_c_werror_flag" ||
20978 test ! -s conftest.err
20979 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000020980 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000020981else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020982 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020983sed 's/^/| /' conftest.$ac_ext >&5
20984
Martin v. Löwis11437992002-04-12 09:54:03 +000020985
20986cat >>confdefs.h <<\_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020987#define volatile
Martin v. Löwis11437992002-04-12 09:54:03 +000020988_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020989
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020990
Guido van Rossum627b2d71993-12-24 10:39:16 +000020991fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020992
20993rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020994{ echo "$as_me:$LINENO: result: $works" >&5
20995echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000020996
Guido van Rossumda88dad1995-01-26 00:46:29 +000020997works=no
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020998{ echo "$as_me:$LINENO: checking for working signed char" >&5
20999echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021000cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021001/* confdefs.h. */
21002_ACEOF
21003cat confdefs.h >>conftest.$ac_ext
21004cat >>conftest.$ac_ext <<_ACEOF
21005/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000021006
Martin v. Löwis11437992002-04-12 09:54:03 +000021007int
21008main ()
21009{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021010signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000021011 ;
21012 return 0;
21013}
21014_ACEOF
21015rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021016if { (ac_try="$ac_compile"
21017case "(($ac_try" in
21018 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21019 *) ac_try_echo=$ac_try;;
21020esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021021eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021022 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021023 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021024 grep -v '^ *+' conftest.er1 >conftest.err
21025 rm -f conftest.er1
21026 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021028 (exit $ac_status); } && {
21029 test -z "$ac_c_werror_flag" ||
21030 test ! -s conftest.err
21031 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000021032 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000021033else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021034 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021035sed 's/^/| /' conftest.$ac_ext >&5
21036
Martin v. Löwis11437992002-04-12 09:54:03 +000021037
21038cat >>confdefs.h <<\_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021039#define signed
Martin v. Löwis11437992002-04-12 09:54:03 +000021040_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000021041
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021042
Guido van Rossum7f43da71994-08-01 12:15:30 +000021043fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021044
21045rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021046{ echo "$as_me:$LINENO: result: $works" >&5
21047echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021048
Guido van Rossumda88dad1995-01-26 00:46:29 +000021049have_prototypes=no
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021050{ echo "$as_me:$LINENO: checking for prototypes" >&5
21051echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021052cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021053/* confdefs.h. */
21054_ACEOF
21055cat confdefs.h >>conftest.$ac_ext
21056cat >>conftest.$ac_ext <<_ACEOF
21057/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021058int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021059int
21060main ()
21061{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021062return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000021063 ;
21064 return 0;
21065}
21066_ACEOF
21067rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021068if { (ac_try="$ac_compile"
21069case "(($ac_try" in
21070 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21071 *) ac_try_echo=$ac_try;;
21072esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021073eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021074 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021075 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021076 grep -v '^ *+' conftest.er1 >conftest.err
21077 rm -f conftest.er1
21078 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021080 (exit $ac_status); } && {
21081 test -z "$ac_c_werror_flag" ||
21082 test ! -s conftest.err
21083 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021084
21085
21086cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021087#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021088_ACEOF
21089
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021090 have_prototypes=yes
21091
Guido van Rossumf78abae1997-01-21 22:02:36 +000021092else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021093 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021094sed 's/^/| /' conftest.$ac_ext >&5
21095
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021096
Guido van Rossum7f43da71994-08-01 12:15:30 +000021097fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021098
21099rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021100{ echo "$as_me:$LINENO: result: $have_prototypes" >&5
21101echo "${ECHO_T}$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021102
Guido van Rossumda88dad1995-01-26 00:46:29 +000021103works=no
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021104{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
21105echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021106cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021107/* confdefs.h. */
21108_ACEOF
21109cat confdefs.h >>conftest.$ac_ext
21110cat >>conftest.$ac_ext <<_ACEOF
21111/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021112
21113#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000021114int foo(int x, ...) {
21115 va_list va;
21116 va_start(va, x);
21117 va_arg(va, int);
21118 va_arg(va, char *);
21119 va_arg(va, double);
21120 return 0;
21121}
Guido van Rossum7f43da71994-08-01 12:15:30 +000021122
Martin v. Löwis11437992002-04-12 09:54:03 +000021123int
21124main ()
21125{
Guido van Rossum90eea071996-08-30 20:58:57 +000021126return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000021127 ;
21128 return 0;
21129}
21130_ACEOF
21131rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021132if { (ac_try="$ac_compile"
21133case "(($ac_try" in
21134 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21135 *) ac_try_echo=$ac_try;;
21136esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021137eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021138 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021139 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021140 grep -v '^ *+' conftest.er1 >conftest.err
21141 rm -f conftest.er1
21142 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021144 (exit $ac_status); } && {
21145 test -z "$ac_c_werror_flag" ||
21146 test ! -s conftest.err
21147 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021148
21149
21150cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021151#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021152_ACEOF
21153
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021154 works=yes
21155
Guido van Rossumf78abae1997-01-21 22:02:36 +000021156else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021157 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021158sed 's/^/| /' conftest.$ac_ext >&5
21159
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021160
Guido van Rossum627b2d71993-12-24 10:39:16 +000021161fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021162
21163rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021164{ echo "$as_me:$LINENO: result: $works" >&5
21165echo "${ECHO_T}$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021166
Martin v. Löwisd6320502004-08-12 13:45:08 +000021167# check for socketpair
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021168{ echo "$as_me:$LINENO: checking for socketpair" >&5
21169echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000021170cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000021171/* confdefs.h. */
21172_ACEOF
21173cat confdefs.h >>conftest.$ac_ext
21174cat >>conftest.$ac_ext <<_ACEOF
21175/* end confdefs.h. */
21176
21177#include <sys/types.h>
21178#include <sys/socket.h>
21179
21180int
21181main ()
21182{
21183void *x=socketpair
21184 ;
21185 return 0;
21186}
21187_ACEOF
21188rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021189if { (ac_try="$ac_compile"
21190case "(($ac_try" in
21191 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21192 *) ac_try_echo=$ac_try;;
21193esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021194eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021195 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000021196 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021197 grep -v '^ *+' conftest.er1 >conftest.err
21198 rm -f conftest.er1
21199 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021201 (exit $ac_status); } && {
21202 test -z "$ac_c_werror_flag" ||
21203 test ! -s conftest.err
21204 } && test -s conftest.$ac_objext; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000021205
21206cat >>confdefs.h <<\_ACEOF
21207#define HAVE_SOCKETPAIR 1
21208_ACEOF
21209
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021210 { echo "$as_me:$LINENO: result: yes" >&5
21211echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000021212else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021213 echo "$as_me: failed program was:" >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000021214sed 's/^/| /' conftest.$ac_ext >&5
21215
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021216 { echo "$as_me:$LINENO: result: no" >&5
21217echo "${ECHO_T}no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000021218
21219fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021220
21221rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000021222
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021223# check if sockaddr has sa_len member
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021224{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
21225echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021226cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021227/* confdefs.h. */
21228_ACEOF
21229cat confdefs.h >>conftest.$ac_ext
21230cat >>conftest.$ac_ext <<_ACEOF
21231/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021232#include <sys/types.h>
21233#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021234int
21235main ()
21236{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021237struct sockaddr x;
21238x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021239 ;
21240 return 0;
21241}
21242_ACEOF
21243rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021244if { (ac_try="$ac_compile"
21245case "(($ac_try" in
21246 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21247 *) ac_try_echo=$ac_try;;
21248esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021249eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021250 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021251 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021252 grep -v '^ *+' conftest.er1 >conftest.err
21253 rm -f conftest.er1
21254 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021256 (exit $ac_status); } && {
21257 test -z "$ac_c_werror_flag" ||
21258 test ! -s conftest.err
21259 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021260 { echo "$as_me:$LINENO: result: yes" >&5
21261echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021262
21263cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021264#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021265_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021266
21267else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021268 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021269sed 's/^/| /' conftest.$ac_ext >&5
21270
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021271 { echo "$as_me:$LINENO: result: no" >&5
21272echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021273fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021274
21275rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021276
Guido van Rossumda88dad1995-01-26 00:46:29 +000021277va_list_is_array=no
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021278{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
21279echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021280cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021281/* confdefs.h. */
21282_ACEOF
21283cat confdefs.h >>conftest.$ac_ext
21284cat >>conftest.$ac_ext <<_ACEOF
21285/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021286
21287#ifdef HAVE_STDARG_PROTOTYPES
21288#include <stdarg.h>
21289#else
21290#include <varargs.h>
21291#endif
21292
Martin v. Löwis11437992002-04-12 09:54:03 +000021293int
21294main ()
21295{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021296va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000021297 ;
21298 return 0;
21299}
21300_ACEOF
21301rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021302if { (ac_try="$ac_compile"
21303case "(($ac_try" in
21304 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21305 *) ac_try_echo=$ac_try;;
21306esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021307eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021308 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021309 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021310 grep -v '^ *+' conftest.er1 >conftest.err
21311 rm -f conftest.er1
21312 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021314 (exit $ac_status); } && {
21315 test -z "$ac_c_werror_flag" ||
21316 test ! -s conftest.err
21317 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021318 :
21319else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021320 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021321sed 's/^/| /' conftest.$ac_ext >&5
21322
Martin v. Löwis11437992002-04-12 09:54:03 +000021323
21324
21325cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021326#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021327_ACEOF
21328
Guido van Rossumda88dad1995-01-26 00:46:29 +000021329 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021330
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021331fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021332
21333rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021334{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
21335echo "${ECHO_T}$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021336
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021337# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000021338
21339
21340
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021341{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
21342echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021343if test "${ac_cv_func_gethostbyname_r+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021344 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021345else
Martin v. Löwis11437992002-04-12 09:54:03 +000021346 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021347/* confdefs.h. */
21348_ACEOF
21349cat confdefs.h >>conftest.$ac_ext
21350cat >>conftest.$ac_ext <<_ACEOF
21351/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021352/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
21353 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21354#define gethostbyname_r innocuous_gethostbyname_r
21355
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021356/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021357 which can conflict with char gethostbyname_r (); below.
21358 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021359 <limits.h> exists even on freestanding compilers. */
21360
21361#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021362# include <limits.h>
21363#else
21364# include <assert.h>
21365#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021366
21367#undef gethostbyname_r
21368
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021369/* Override any GCC internal prototype to avoid an error.
21370 Use char because int might match the return type of a GCC
21371 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021372#ifdef __cplusplus
21373extern "C"
21374#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021375char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021376/* The GNU C library defines this for functions which it implements
21377 to always fail with ENOSYS. Some functions are actually named
21378 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021379#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021380choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021381#endif
21382
Skip Montanaro6dead952003-09-25 14:50:04 +000021383int
21384main ()
21385{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021386return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021387 ;
21388 return 0;
21389}
21390_ACEOF
21391rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021392if { (ac_try="$ac_link"
21393case "(($ac_try" in
21394 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21395 *) ac_try_echo=$ac_try;;
21396esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021397eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021398 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021399 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021400 grep -v '^ *+' conftest.er1 >conftest.err
21401 rm -f conftest.er1
21402 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021404 (exit $ac_status); } && {
21405 test -z "$ac_c_werror_flag" ||
21406 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021407 } && test -s conftest$ac_exeext &&
21408 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021409 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021410else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021411 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021412sed 's/^/| /' conftest.$ac_ext >&5
21413
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021414 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021415fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021416
21417rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021418 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021419fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021420{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
21421echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
21422if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021423
Martin v. Löwis11437992002-04-12 09:54:03 +000021424 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021425#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021426_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021427
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021428 { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
21429echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021430 OLD_CFLAGS=$CFLAGS
21431 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000021432 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021433/* confdefs.h. */
21434_ACEOF
21435cat confdefs.h >>conftest.$ac_ext
21436cat >>conftest.$ac_ext <<_ACEOF
21437/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021438
21439# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021440
Martin v. Löwis11437992002-04-12 09:54:03 +000021441int
21442main ()
21443{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021444
21445 char *name;
21446 struct hostent *he, *res;
21447 char buffer[2048];
21448 int buflen = 2048;
21449 int h_errnop;
21450
21451 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000021452
21453 ;
21454 return 0;
21455}
21456_ACEOF
21457rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021458if { (ac_try="$ac_compile"
21459case "(($ac_try" in
21460 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21461 *) ac_try_echo=$ac_try;;
21462esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021463eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021464 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021465 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021466 grep -v '^ *+' conftest.er1 >conftest.err
21467 rm -f conftest.er1
21468 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021470 (exit $ac_status); } && {
21471 test -z "$ac_c_werror_flag" ||
21472 test ! -s conftest.err
21473 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021474
21475 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021476#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021477_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021478
Martin v. Löwis11437992002-04-12 09:54:03 +000021479
21480cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021481#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021482_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021483
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021484 { echo "$as_me:$LINENO: result: yes" >&5
21485echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021486
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021487else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021488 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021489sed 's/^/| /' conftest.$ac_ext >&5
21490
Martin v. Löwis11437992002-04-12 09:54:03 +000021491
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021492 { echo "$as_me:$LINENO: result: no" >&5
21493echo "${ECHO_T}no" >&6; }
21494 { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
21495echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021496 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021497/* confdefs.h. */
21498_ACEOF
21499cat confdefs.h >>conftest.$ac_ext
21500cat >>conftest.$ac_ext <<_ACEOF
21501/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021502
21503# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021504
Martin v. Löwis11437992002-04-12 09:54:03 +000021505int
21506main ()
21507{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021508
21509 char *name;
21510 struct hostent *he;
21511 char buffer[2048];
21512 int buflen = 2048;
21513 int h_errnop;
21514
21515 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000021516
21517 ;
21518 return 0;
21519}
21520_ACEOF
21521rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021522if { (ac_try="$ac_compile"
21523case "(($ac_try" in
21524 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21525 *) ac_try_echo=$ac_try;;
21526esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021527eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021528 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021529 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021530 grep -v '^ *+' conftest.er1 >conftest.err
21531 rm -f conftest.er1
21532 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021534 (exit $ac_status); } && {
21535 test -z "$ac_c_werror_flag" ||
21536 test ! -s conftest.err
21537 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021538
21539 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021540#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021541_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021542
Martin v. Löwis11437992002-04-12 09:54:03 +000021543
21544cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021545#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021546_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021547
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021548 { echo "$as_me:$LINENO: result: yes" >&5
21549echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021550
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021551else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021552 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021553sed 's/^/| /' conftest.$ac_ext >&5
21554
Martin v. Löwis11437992002-04-12 09:54:03 +000021555
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021556 { echo "$as_me:$LINENO: result: no" >&5
21557echo "${ECHO_T}no" >&6; }
21558 { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
21559echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021560 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021561/* confdefs.h. */
21562_ACEOF
21563cat confdefs.h >>conftest.$ac_ext
21564cat >>conftest.$ac_ext <<_ACEOF
21565/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021566
21567# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021568
Martin v. Löwis11437992002-04-12 09:54:03 +000021569int
21570main ()
21571{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021572
21573 char *name;
21574 struct hostent *he;
21575 struct hostent_data data;
21576
21577 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000021578
21579 ;
21580 return 0;
21581}
21582_ACEOF
21583rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021584if { (ac_try="$ac_compile"
21585case "(($ac_try" in
21586 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21587 *) ac_try_echo=$ac_try;;
21588esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021589eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021590 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021591 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021592 grep -v '^ *+' conftest.er1 >conftest.err
21593 rm -f conftest.er1
21594 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021595 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021596 (exit $ac_status); } && {
21597 test -z "$ac_c_werror_flag" ||
21598 test ! -s conftest.err
21599 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021600
21601 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021602#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021603_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021604
Martin v. Löwis11437992002-04-12 09:54:03 +000021605
21606cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021607#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021608_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021609
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021610 { echo "$as_me:$LINENO: result: yes" >&5
21611echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021612
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021613else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021614 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021615sed 's/^/| /' conftest.$ac_ext >&5
21616
Martin v. Löwis11437992002-04-12 09:54:03 +000021617
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021618 { echo "$as_me:$LINENO: result: no" >&5
21619echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021620
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021621fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021622
21623rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021624
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021625fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021626
21627rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021628
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021629fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021630
21631rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021632 CFLAGS=$OLD_CFLAGS
21633
21634else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021635
Martin v. Löwis11437992002-04-12 09:54:03 +000021636
21637for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000021638do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021639as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21640{ echo "$as_me:$LINENO: checking for $ac_func" >&5
21641echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021642if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021643 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021644else
Martin v. Löwis11437992002-04-12 09:54:03 +000021645 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021646/* confdefs.h. */
21647_ACEOF
21648cat confdefs.h >>conftest.$ac_ext
21649cat >>conftest.$ac_ext <<_ACEOF
21650/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021651/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21652 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21653#define $ac_func innocuous_$ac_func
21654
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021655/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021656 which can conflict with char $ac_func (); below.
21657 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021658 <limits.h> exists even on freestanding compilers. */
21659
21660#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021661# include <limits.h>
21662#else
21663# include <assert.h>
21664#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021665
21666#undef $ac_func
21667
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021668/* Override any GCC internal prototype to avoid an error.
21669 Use char because int might match the return type of a GCC
21670 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021671#ifdef __cplusplus
21672extern "C"
21673#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021674char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021675/* The GNU C library defines this for functions which it implements
21676 to always fail with ENOSYS. Some functions are actually named
21677 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021678#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021679choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021680#endif
21681
Skip Montanaro6dead952003-09-25 14:50:04 +000021682int
21683main ()
21684{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021685return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021686 ;
21687 return 0;
21688}
21689_ACEOF
21690rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021691if { (ac_try="$ac_link"
21692case "(($ac_try" in
21693 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21694 *) ac_try_echo=$ac_try;;
21695esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021696eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021697 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021698 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021699 grep -v '^ *+' conftest.er1 >conftest.err
21700 rm -f conftest.er1
21701 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021703 (exit $ac_status); } && {
21704 test -z "$ac_c_werror_flag" ||
21705 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021706 } && test -s conftest$ac_exeext &&
21707 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021708 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000021709else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021710 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021711sed 's/^/| /' conftest.$ac_ext >&5
21712
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021713 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000021714fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021715
21716rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021717 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021718fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021719ac_res=`eval echo '${'$as_ac_var'}'`
21720 { echo "$as_me:$LINENO: result: $ac_res" >&5
21721echo "${ECHO_T}$ac_res" >&6; }
21722if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021723 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021724#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021725_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021726
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021727fi
Thomas Wouters3a584202000-08-05 23:28:51 +000021728done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021729
Michael W. Hudson54241132001-12-07 15:38:26 +000021730
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021731fi
21732
Michael W. Hudson54241132001-12-07 15:38:26 +000021733
21734
21735
21736
21737
21738
Guido van Rossum627b2d71993-12-24 10:39:16 +000021739# checks for system services
21740# (none yet)
21741
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021742# Linux requires this for correct f.p. operations
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021743{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
21744echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021745if test "${ac_cv_func___fpu_control+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021746 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021747else
Martin v. Löwis11437992002-04-12 09:54:03 +000021748 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021749/* confdefs.h. */
21750_ACEOF
21751cat confdefs.h >>conftest.$ac_ext
21752cat >>conftest.$ac_ext <<_ACEOF
21753/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021754/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
21755 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21756#define __fpu_control innocuous___fpu_control
21757
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021758/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021759 which can conflict with char __fpu_control (); below.
21760 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021761 <limits.h> exists even on freestanding compilers. */
21762
21763#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021764# include <limits.h>
21765#else
21766# include <assert.h>
21767#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021768
21769#undef __fpu_control
21770
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021771/* Override any GCC internal prototype to avoid an error.
21772 Use char because int might match the return type of a GCC
21773 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021774#ifdef __cplusplus
21775extern "C"
21776#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021777char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021778/* The GNU C library defines this for functions which it implements
21779 to always fail with ENOSYS. Some functions are actually named
21780 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021781#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021782choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021783#endif
21784
Skip Montanaro6dead952003-09-25 14:50:04 +000021785int
21786main ()
21787{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021788return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021789 ;
21790 return 0;
21791}
21792_ACEOF
21793rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021794if { (ac_try="$ac_link"
21795case "(($ac_try" in
21796 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21797 *) ac_try_echo=$ac_try;;
21798esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021799eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021800 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021801 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021802 grep -v '^ *+' conftest.er1 >conftest.err
21803 rm -f conftest.er1
21804 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021806 (exit $ac_status); } && {
21807 test -z "$ac_c_werror_flag" ||
21808 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021809 } && test -s conftest$ac_exeext &&
21810 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021811 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021812else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021813 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021814sed 's/^/| /' conftest.$ac_ext >&5
21815
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021816 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021817fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021818
21819rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021820 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021821fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021822{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
21823echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
21824if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021825 :
21826else
Martin v. Löwis11437992002-04-12 09:54:03 +000021827
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021828{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
21829echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021830if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021831 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021832else
Martin v. Löwis11437992002-04-12 09:54:03 +000021833 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000021834LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000021835cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021836/* confdefs.h. */
21837_ACEOF
21838cat confdefs.h >>conftest.$ac_ext
21839cat >>conftest.$ac_ext <<_ACEOF
21840/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021841
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021842/* Override any GCC internal prototype to avoid an error.
21843 Use char because int might match the return type of a GCC
21844 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021845#ifdef __cplusplus
21846extern "C"
21847#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021848char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021849int
21850main ()
21851{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021852return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021853 ;
21854 return 0;
21855}
21856_ACEOF
21857rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021858if { (ac_try="$ac_link"
21859case "(($ac_try" in
21860 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21861 *) ac_try_echo=$ac_try;;
21862esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021863eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021864 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021865 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021866 grep -v '^ *+' conftest.er1 >conftest.err
21867 rm -f conftest.er1
21868 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021869 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021870 (exit $ac_status); } && {
21871 test -z "$ac_c_werror_flag" ||
21872 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021873 } && test -s conftest$ac_exeext &&
21874 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021875 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000021876else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021877 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021878sed 's/^/| /' conftest.$ac_ext >&5
21879
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021880 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000021881fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021882
21883rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021884 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021885LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021886fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021887{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
21888echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
21889if test $ac_cv_lib_ieee___fpu_control = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021890 cat >>confdefs.h <<_ACEOF
21891#define HAVE_LIBIEEE 1
21892_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021893
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000021894 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021895
Guido van Rossum627b2d71993-12-24 10:39:16 +000021896fi
21897
Michael W. Hudson54241132001-12-07 15:38:26 +000021898
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021899fi
21900
Michael W. Hudson54241132001-12-07 15:38:26 +000021901
Guido van Rossum7f253911997-05-09 02:42:48 +000021902# Check for --with-fpectl
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021903{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
21904echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021905
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021906# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000021907if test "${with_fpectl+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021908 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000021909if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000021910then
21911
21912cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000021913#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021914_ACEOF
21915
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021916 { echo "$as_me:$LINENO: result: yes" >&5
21917echo "${ECHO_T}yes" >&6; }
21918else { echo "$as_me:$LINENO: result: no" >&5
21919echo "${ECHO_T}no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000021920fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000021921else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021922 { echo "$as_me:$LINENO: result: no" >&5
21923echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021924fi
21925
Guido van Rossum7f253911997-05-09 02:42:48 +000021926
Guido van Rossum7f43da71994-08-01 12:15:30 +000021927# check for --with-libm=...
21928
Guido van Rossum563e7081996-09-10 18:20:48 +000021929case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000021930Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000021931*) LIBM=-lm
21932esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021933{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
21934echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021935
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021936# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000021937if test "${with_libm+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021938 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000021939if test "$withval" = no
21940then LIBM=
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021941 { echo "$as_me:$LINENO: result: force LIBM empty" >&5
21942echo "${ECHO_T}force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000021943elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000021944then LIBM=$withval
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021945 { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
21946echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
21947else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
21948echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000021949 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021950fi
Guido van Rossum7f253911997-05-09 02:42:48 +000021951else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021952 { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
21953echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021954fi
21955
Guido van Rossum7f43da71994-08-01 12:15:30 +000021956
21957# check for --with-libc=...
21958
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021959{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
21960echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021961
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021962# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000021963if test "${with_libc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021964 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000021965if test "$withval" = no
21966then LIBC=
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021967 { echo "$as_me:$LINENO: result: force LIBC empty" >&5
21968echo "${ECHO_T}force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000021969elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000021970then LIBC=$withval
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021971 { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
21972echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
21973else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
21974echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000021975 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021976fi
Guido van Rossum7f253911997-05-09 02:42:48 +000021977else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021978 { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
21979echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021980fi
21981
Guido van Rossum7f43da71994-08-01 12:15:30 +000021982
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021983# **************************************************
21984# * Check for various properties of floating point *
21985# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000021986
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021987{ echo "$as_me:$LINENO: checking whether C doubles are little-endian IEEE 754 binary64" >&5
21988echo $ECHO_N "checking whether C doubles are little-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021989if test "${ac_cv_little_endian_double+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021990 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021991else
21992
21993if test "$cross_compiling" = yes; then
21994 ac_cv_little_endian_double=no
21995else
21996 cat >conftest.$ac_ext <<_ACEOF
21997/* confdefs.h. */
21998_ACEOF
21999cat confdefs.h >>conftest.$ac_ext
22000cat >>conftest.$ac_ext <<_ACEOF
22001/* end confdefs.h. */
22002
22003#include <string.h>
22004int main() {
22005 double x = 9006104071832581.0;
22006 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
22007 return 0;
22008 else
22009 return 1;
22010}
22011
22012_ACEOF
22013rm -f conftest$ac_exeext
22014if { (ac_try="$ac_link"
22015case "(($ac_try" in
22016 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22017 *) ac_try_echo=$ac_try;;
22018esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022019eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022020 (eval "$ac_link") 2>&5
22021 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022023 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22024 { (case "(($ac_try" in
22025 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22026 *) ac_try_echo=$ac_try;;
22027esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022028eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022029 (eval "$ac_try") 2>&5
22030 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022032 (exit $ac_status); }; }; then
22033 ac_cv_little_endian_double=yes
22034else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022035 echo "$as_me: program exited with status $ac_status" >&5
22036echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022037sed 's/^/| /' conftest.$ac_ext >&5
22038
22039( exit $ac_status )
22040ac_cv_little_endian_double=no
22041fi
22042rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22043fi
22044
22045
22046fi
22047
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022048{ echo "$as_me:$LINENO: result: $ac_cv_little_endian_double" >&5
22049echo "${ECHO_T}$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022050if test "$ac_cv_little_endian_double" = yes
22051then
22052
22053cat >>confdefs.h <<\_ACEOF
22054#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1
22055_ACEOF
22056
22057fi
22058
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022059{ echo "$as_me:$LINENO: checking whether C doubles are big-endian IEEE 754 binary64" >&5
22060echo $ECHO_N "checking whether C doubles are big-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022061if test "${ac_cv_big_endian_double+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022062 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022063else
22064
22065if test "$cross_compiling" = yes; then
22066 ac_cv_big_endian_double=no
22067else
22068 cat >conftest.$ac_ext <<_ACEOF
22069/* confdefs.h. */
22070_ACEOF
22071cat confdefs.h >>conftest.$ac_ext
22072cat >>conftest.$ac_ext <<_ACEOF
22073/* end confdefs.h. */
22074
22075#include <string.h>
22076int main() {
22077 double x = 9006104071832581.0;
22078 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
22079 return 0;
22080 else
22081 return 1;
22082}
22083
22084_ACEOF
22085rm -f conftest$ac_exeext
22086if { (ac_try="$ac_link"
22087case "(($ac_try" in
22088 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22089 *) ac_try_echo=$ac_try;;
22090esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022091eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022092 (eval "$ac_link") 2>&5
22093 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022095 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22096 { (case "(($ac_try" in
22097 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22098 *) ac_try_echo=$ac_try;;
22099esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022100eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022101 (eval "$ac_try") 2>&5
22102 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022103 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022104 (exit $ac_status); }; }; then
22105 ac_cv_big_endian_double=yes
22106else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022107 echo "$as_me: program exited with status $ac_status" >&5
22108echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022109sed 's/^/| /' conftest.$ac_ext >&5
22110
22111( exit $ac_status )
22112ac_cv_big_endian_double=no
22113fi
22114rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22115fi
22116
22117
22118fi
22119
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022120{ echo "$as_me:$LINENO: result: $ac_cv_big_endian_double" >&5
22121echo "${ECHO_T}$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022122if test "$ac_cv_big_endian_double" = yes
22123then
22124
22125cat >>confdefs.h <<\_ACEOF
22126#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1
22127_ACEOF
22128
22129fi
22130
22131# Some ARM platforms use a mixed-endian representation for doubles.
22132# While Python doesn't currently have full support for these platforms
22133# (see e.g., issue 1762561), we can at least make sure that float <-> string
22134# conversions work.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022135{ echo "$as_me:$LINENO: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
22136echo $ECHO_N "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022137if test "${ac_cv_mixed_endian_double+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022138 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022139else
22140
22141if test "$cross_compiling" = yes; then
22142 ac_cv_mixed_endian_double=no
22143else
22144 cat >conftest.$ac_ext <<_ACEOF
22145/* confdefs.h. */
22146_ACEOF
22147cat confdefs.h >>conftest.$ac_ext
22148cat >>conftest.$ac_ext <<_ACEOF
22149/* end confdefs.h. */
22150
22151#include <string.h>
22152int main() {
22153 double x = 9006104071832581.0;
22154 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
22155 return 0;
22156 else
22157 return 1;
22158}
22159
22160_ACEOF
22161rm -f conftest$ac_exeext
22162if { (ac_try="$ac_link"
22163case "(($ac_try" in
22164 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22165 *) ac_try_echo=$ac_try;;
22166esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022167eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022168 (eval "$ac_link") 2>&5
22169 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022171 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22172 { (case "(($ac_try" in
22173 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22174 *) ac_try_echo=$ac_try;;
22175esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022176eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022177 (eval "$ac_try") 2>&5
22178 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022180 (exit $ac_status); }; }; then
22181 ac_cv_mixed_endian_double=yes
22182else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022183 echo "$as_me: program exited with status $ac_status" >&5
22184echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022185sed 's/^/| /' conftest.$ac_ext >&5
22186
22187( exit $ac_status )
22188ac_cv_mixed_endian_double=no
22189fi
22190rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22191fi
22192
22193
22194fi
22195
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022196{ echo "$as_me:$LINENO: result: $ac_cv_mixed_endian_double" >&5
22197echo "${ECHO_T}$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022198if test "$ac_cv_mixed_endian_double" = yes
22199then
22200
22201cat >>confdefs.h <<\_ACEOF
22202#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1
22203_ACEOF
22204
22205fi
22206
Mark Dickinson7abf8d42009-04-18 20:17:52 +000022207# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000022208# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000022209# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000022210# rounding; this is a problem on x86, where the x87 FPU has a default
22211# rounding precision of 64 bits. For gcc/x86, we try to fix this by
22212# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022213if test "$GCC" = yes && test -n "`$CC -dM -E - </dev/null | grep i386`"
22214then
Mark Dickinson7abf8d42009-04-18 20:17:52 +000022215 # Check that it's okay to use gcc inline assembler to get and set
Mark Dickinson10683072009-04-18 21:18:19 +000022216 # x87 control word. It should be, but you never know...
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022217 { echo "$as_me:$LINENO: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
22218echo $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 +000022219 cat >conftest.$ac_ext <<_ACEOF
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022220/* confdefs.h. */
22221_ACEOF
22222cat confdefs.h >>conftest.$ac_ext
22223cat >>conftest.$ac_ext <<_ACEOF
22224/* end confdefs.h. */
22225
22226int
22227main ()
22228{
22229
Mark Dickinson7abf8d42009-04-18 20:17:52 +000022230 unsigned short cw;
22231 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
22232 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022233
22234 ;
22235 return 0;
22236}
22237_ACEOF
22238rm -f conftest.$ac_objext
22239if { (ac_try="$ac_compile"
22240case "(($ac_try" in
22241 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22242 *) ac_try_echo=$ac_try;;
22243esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022244eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022245 (eval "$ac_compile") 2>conftest.er1
22246 ac_status=$?
22247 grep -v '^ *+' conftest.er1 >conftest.err
22248 rm -f conftest.er1
22249 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022251 (exit $ac_status); } && {
22252 test -z "$ac_c_werror_flag" ||
22253 test ! -s conftest.err
22254 } && test -s conftest.$ac_objext; then
22255 have_gcc_asm_for_x87=yes
22256else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022257 echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022258sed 's/^/| /' conftest.$ac_ext >&5
22259
22260 have_gcc_asm_for_x87=no
22261fi
22262
22263rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022264 { echo "$as_me:$LINENO: result: $have_gcc_asm_for_x87" >&5
22265echo "${ECHO_T}$have_gcc_asm_for_x87" >&6; }
Mark Dickinson7abf8d42009-04-18 20:17:52 +000022266 if test "$have_gcc_asm_for_x87" = yes
22267 then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022268
22269cat >>confdefs.h <<\_ACEOF
22270#define HAVE_GCC_ASM_FOR_X87 1
22271_ACEOF
22272
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022273 fi
22274fi
Martin v. Löwis11437992002-04-12 09:54:03 +000022275
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022276# Detect whether system arithmetic is subject to x87-style double
22277# rounding issues. The result of this test has little meaning on non
22278# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
22279# mode is round-to-nearest and double rounding issues are present, and
22280# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022281{ echo "$as_me:$LINENO: checking for x87-style double rounding" >&5
22282echo $ECHO_N "checking for x87-style double rounding... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022283# $BASECFLAGS may affect the result
22284ac_save_cc="$CC"
22285CC="$CC $BASECFLAGS"
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022286if test "$cross_compiling" = yes; then
22287 ac_cv_x87_double_rounding=no
22288else
22289 cat >conftest.$ac_ext <<_ACEOF
22290/* confdefs.h. */
22291_ACEOF
22292cat confdefs.h >>conftest.$ac_ext
22293cat >>conftest.$ac_ext <<_ACEOF
22294/* end confdefs.h. */
22295
22296#include <stdlib.h>
22297#include <math.h>
22298int main() {
22299 volatile double x, y, z;
22300 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
22301 x = 0.99999999999999989; /* 1-2**-53 */
22302 y = 1./x;
22303 if (y != 1.)
22304 exit(0);
22305 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
22306 x = 1e16;
22307 y = 2.99999;
22308 z = x + y;
22309 if (z != 1e16+4.)
22310 exit(0);
22311 /* both tests show evidence of double rounding */
22312 exit(1);
22313}
22314
22315_ACEOF
22316rm -f conftest$ac_exeext
22317if { (ac_try="$ac_link"
22318case "(($ac_try" in
22319 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22320 *) ac_try_echo=$ac_try;;
22321esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022322eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022323 (eval "$ac_link") 2>&5
22324 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022325 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022326 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22327 { (case "(($ac_try" in
22328 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22329 *) ac_try_echo=$ac_try;;
22330esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022331eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022332 (eval "$ac_try") 2>&5
22333 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022335 (exit $ac_status); }; }; then
22336 ac_cv_x87_double_rounding=no
22337else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022338 echo "$as_me: program exited with status $ac_status" >&5
22339echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022340sed 's/^/| /' conftest.$ac_ext >&5
22341
22342( exit $ac_status )
22343ac_cv_x87_double_rounding=yes
22344fi
22345rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22346fi
22347
22348
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022349CC="$ac_save_cc"
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022350{ echo "$as_me:$LINENO: result: $ac_cv_x87_double_rounding" >&5
22351echo "${ECHO_T}$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022352if test "$ac_cv_x87_double_rounding" = yes
22353then
22354
22355cat >>confdefs.h <<\_ACEOF
22356#define X87_DOUBLE_ROUNDING 1
22357_ACEOF
22358
22359fi
22360
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022361# ************************************
22362# * Check for mathematical functions *
22363# ************************************
22364
22365LIBS_SAVE=$LIBS
22366LIBS="$LIBS $LIBM"
22367
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022368# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
22369# -0. on some architectures.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022370{ echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5
22371echo $ECHO_N "checking whether tanh preserves the sign of zero... $ECHO_C" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022372if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022373 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022374else
22375
22376if test "$cross_compiling" = yes; then
22377 ac_cv_tanh_preserves_zero_sign=no
22378else
22379 cat >conftest.$ac_ext <<_ACEOF
22380/* confdefs.h. */
22381_ACEOF
22382cat confdefs.h >>conftest.$ac_ext
22383cat >>conftest.$ac_ext <<_ACEOF
22384/* end confdefs.h. */
22385
22386#include <math.h>
22387#include <stdlib.h>
22388int main() {
22389 /* return 0 if either negative zeros don't exist
22390 on this platform or if negative zeros exist
22391 and tanh(-0.) == -0. */
22392 if (atan2(0., -1.) == atan2(-0., -1.) ||
22393 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
22394 else exit(1);
22395}
22396
22397_ACEOF
22398rm -f conftest$ac_exeext
22399if { (ac_try="$ac_link"
22400case "(($ac_try" in
22401 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22402 *) ac_try_echo=$ac_try;;
22403esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022404eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022405 (eval "$ac_link") 2>&5
22406 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022408 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22409 { (case "(($ac_try" in
22410 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22411 *) ac_try_echo=$ac_try;;
22412esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022413eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022414 (eval "$ac_try") 2>&5
22415 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022417 (exit $ac_status); }; }; then
22418 ac_cv_tanh_preserves_zero_sign=yes
22419else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022420 echo "$as_me: program exited with status $ac_status" >&5
22421echo "$as_me: failed program was:" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022422sed 's/^/| /' conftest.$ac_ext >&5
22423
22424( exit $ac_status )
22425ac_cv_tanh_preserves_zero_sign=no
22426fi
22427rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22428fi
22429
22430
22431fi
22432
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022433{ echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5
22434echo "${ECHO_T}$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022435if test "$ac_cv_tanh_preserves_zero_sign" = yes
22436then
22437
22438cat >>confdefs.h <<\_ACEOF
22439#define TANH_PRESERVES_ZERO_SIGN 1
22440_ACEOF
22441
22442fi
22443
22444
Guido van Rossum2b3ac691996-08-30 15:18:41 +000022445
Michael W. Hudson54241132001-12-07 15:38:26 +000022446
Christian Heimes99170a52007-12-19 02:07:34 +000022447
22448
22449
22450
22451
Mark Dickinsonf2537862009-04-18 13:58:18 +000022452
22453for ac_func in acosh asinh atanh copysign expm1 finite hypot log1p round
Christian Heimes99170a52007-12-19 02:07:34 +000022454do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022455as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
22456{ echo "$as_me:$LINENO: checking for $ac_func" >&5
22457echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Christian Heimes99170a52007-12-19 02:07:34 +000022458if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022459 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes99170a52007-12-19 02:07:34 +000022460else
22461 cat >conftest.$ac_ext <<_ACEOF
22462/* confdefs.h. */
22463_ACEOF
22464cat confdefs.h >>conftest.$ac_ext
22465cat >>conftest.$ac_ext <<_ACEOF
22466/* end confdefs.h. */
22467/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22468 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22469#define $ac_func innocuous_$ac_func
22470
22471/* System header to define __stub macros and hopefully few prototypes,
22472 which can conflict with char $ac_func (); below.
22473 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22474 <limits.h> exists even on freestanding compilers. */
22475
22476#ifdef __STDC__
22477# include <limits.h>
22478#else
22479# include <assert.h>
22480#endif
22481
22482#undef $ac_func
22483
22484/* Override any GCC internal prototype to avoid an error.
22485 Use char because int might match the return type of a GCC
22486 builtin and then its argument prototype would still apply. */
22487#ifdef __cplusplus
22488extern "C"
22489#endif
22490char $ac_func ();
22491/* The GNU C library defines this for functions which it implements
22492 to always fail with ENOSYS. Some functions are actually named
22493 something starting with __ and the normal name is an alias. */
22494#if defined __stub_$ac_func || defined __stub___$ac_func
22495choke me
22496#endif
22497
22498int
22499main ()
22500{
22501return $ac_func ();
22502 ;
22503 return 0;
22504}
22505_ACEOF
22506rm -f conftest.$ac_objext conftest$ac_exeext
22507if { (ac_try="$ac_link"
22508case "(($ac_try" in
22509 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22510 *) ac_try_echo=$ac_try;;
22511esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022512eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes99170a52007-12-19 02:07:34 +000022513 (eval "$ac_link") 2>conftest.er1
22514 ac_status=$?
22515 grep -v '^ *+' conftest.er1 >conftest.err
22516 rm -f conftest.er1
22517 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes99170a52007-12-19 02:07:34 +000022519 (exit $ac_status); } && {
22520 test -z "$ac_c_werror_flag" ||
22521 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022522 } && test -s conftest$ac_exeext &&
22523 $as_test_x conftest$ac_exeext; then
Christian Heimes99170a52007-12-19 02:07:34 +000022524 eval "$as_ac_var=yes"
22525else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022526 echo "$as_me: failed program was:" >&5
Christian Heimes99170a52007-12-19 02:07:34 +000022527sed 's/^/| /' conftest.$ac_ext >&5
22528
22529 eval "$as_ac_var=no"
22530fi
22531
22532rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
22533 conftest$ac_exeext conftest.$ac_ext
22534fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022535ac_res=`eval echo '${'$as_ac_var'}'`
22536 { echo "$as_me:$LINENO: result: $ac_res" >&5
22537echo "${ECHO_T}$ac_res" >&6; }
22538if test `eval echo '${'$as_ac_var'}'` = yes; then
Christian Heimes99170a52007-12-19 02:07:34 +000022539 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022540#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes99170a52007-12-19 02:07:34 +000022541_ACEOF
22542
22543fi
22544done
22545
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022546{ echo "$as_me:$LINENO: checking whether isinf is declared" >&5
22547echo $ECHO_N "checking whether isinf is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022548if test "${ac_cv_have_decl_isinf+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022549 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022550else
22551 cat >conftest.$ac_ext <<_ACEOF
22552/* confdefs.h. */
22553_ACEOF
22554cat confdefs.h >>conftest.$ac_ext
22555cat >>conftest.$ac_ext <<_ACEOF
22556/* end confdefs.h. */
22557#include <math.h>
22558
22559int
22560main ()
22561{
22562#ifndef isinf
22563 (void) isinf;
22564#endif
22565
22566 ;
22567 return 0;
22568}
22569_ACEOF
22570rm -f conftest.$ac_objext
22571if { (ac_try="$ac_compile"
22572case "(($ac_try" in
22573 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22574 *) ac_try_echo=$ac_try;;
22575esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022576eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022577 (eval "$ac_compile") 2>conftest.er1
22578 ac_status=$?
22579 grep -v '^ *+' conftest.er1 >conftest.err
22580 rm -f conftest.er1
22581 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022583 (exit $ac_status); } && {
22584 test -z "$ac_c_werror_flag" ||
22585 test ! -s conftest.err
22586 } && test -s conftest.$ac_objext; then
22587 ac_cv_have_decl_isinf=yes
22588else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022589 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022590sed 's/^/| /' conftest.$ac_ext >&5
22591
22592 ac_cv_have_decl_isinf=no
22593fi
22594
22595rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22596fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022597{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isinf" >&5
22598echo "${ECHO_T}$ac_cv_have_decl_isinf" >&6; }
22599if test $ac_cv_have_decl_isinf = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022600
22601cat >>confdefs.h <<_ACEOF
22602#define HAVE_DECL_ISINF 1
22603_ACEOF
22604
22605
22606else
22607 cat >>confdefs.h <<_ACEOF
22608#define HAVE_DECL_ISINF 0
22609_ACEOF
22610
22611
22612fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022613{ echo "$as_me:$LINENO: checking whether isnan is declared" >&5
22614echo $ECHO_N "checking whether isnan is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022615if test "${ac_cv_have_decl_isnan+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022616 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022617else
22618 cat >conftest.$ac_ext <<_ACEOF
22619/* confdefs.h. */
22620_ACEOF
22621cat confdefs.h >>conftest.$ac_ext
22622cat >>conftest.$ac_ext <<_ACEOF
22623/* end confdefs.h. */
22624#include <math.h>
22625
22626int
22627main ()
22628{
22629#ifndef isnan
22630 (void) isnan;
22631#endif
22632
22633 ;
22634 return 0;
22635}
22636_ACEOF
22637rm -f conftest.$ac_objext
22638if { (ac_try="$ac_compile"
22639case "(($ac_try" in
22640 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22641 *) ac_try_echo=$ac_try;;
22642esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022643eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022644 (eval "$ac_compile") 2>conftest.er1
22645 ac_status=$?
22646 grep -v '^ *+' conftest.er1 >conftest.err
22647 rm -f conftest.er1
22648 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022650 (exit $ac_status); } && {
22651 test -z "$ac_c_werror_flag" ||
22652 test ! -s conftest.err
22653 } && test -s conftest.$ac_objext; then
22654 ac_cv_have_decl_isnan=yes
22655else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022656 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022657sed 's/^/| /' conftest.$ac_ext >&5
22658
22659 ac_cv_have_decl_isnan=no
22660fi
22661
22662rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22663fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022664{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isnan" >&5
22665echo "${ECHO_T}$ac_cv_have_decl_isnan" >&6; }
22666if test $ac_cv_have_decl_isnan = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022667
22668cat >>confdefs.h <<_ACEOF
22669#define HAVE_DECL_ISNAN 1
22670_ACEOF
22671
22672
22673else
22674 cat >>confdefs.h <<_ACEOF
22675#define HAVE_DECL_ISNAN 0
22676_ACEOF
22677
22678
22679fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022680{ echo "$as_me:$LINENO: checking whether isfinite is declared" >&5
22681echo $ECHO_N "checking whether isfinite is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022682if test "${ac_cv_have_decl_isfinite+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022683 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022684else
22685 cat >conftest.$ac_ext <<_ACEOF
22686/* confdefs.h. */
22687_ACEOF
22688cat confdefs.h >>conftest.$ac_ext
22689cat >>conftest.$ac_ext <<_ACEOF
22690/* end confdefs.h. */
22691#include <math.h>
22692
22693int
22694main ()
22695{
22696#ifndef isfinite
22697 (void) isfinite;
22698#endif
22699
22700 ;
22701 return 0;
22702}
22703_ACEOF
22704rm -f conftest.$ac_objext
22705if { (ac_try="$ac_compile"
22706case "(($ac_try" in
22707 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22708 *) ac_try_echo=$ac_try;;
22709esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022710eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022711 (eval "$ac_compile") 2>conftest.er1
22712 ac_status=$?
22713 grep -v '^ *+' conftest.er1 >conftest.err
22714 rm -f conftest.er1
22715 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022717 (exit $ac_status); } && {
22718 test -z "$ac_c_werror_flag" ||
22719 test ! -s conftest.err
22720 } && test -s conftest.$ac_objext; then
22721 ac_cv_have_decl_isfinite=yes
22722else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022723 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022724sed 's/^/| /' conftest.$ac_ext >&5
22725
22726 ac_cv_have_decl_isfinite=no
22727fi
22728
22729rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22730fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022731{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isfinite" >&5
22732echo "${ECHO_T}$ac_cv_have_decl_isfinite" >&6; }
22733if test $ac_cv_have_decl_isfinite = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022734
22735cat >>confdefs.h <<_ACEOF
22736#define HAVE_DECL_ISFINITE 1
22737_ACEOF
22738
22739
22740else
22741 cat >>confdefs.h <<_ACEOF
22742#define HAVE_DECL_ISFINITE 0
22743_ACEOF
22744
22745
22746fi
22747
22748
Christian Heimes99170a52007-12-19 02:07:34 +000022749
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000022750LIBS=$LIBS_SAVE
22751
Mark Dickinson875ada42009-11-28 12:52:39 +000022752# For multiprocessing module, check that sem_open
22753# actually works. For FreeBSD versions <= 7.2,
22754# the kernel module that provides POSIX semaphores
22755# isn't loaded by default, so an attempt to call
22756# sem_open results in a 'Signal 12' error.
22757{ echo "$as_me:$LINENO: checking whether POSIX semaphores are enabled" >&5
22758echo $ECHO_N "checking whether POSIX semaphores are enabled... $ECHO_C" >&6; }
22759if test "${ac_cv_posix_semaphores_enabled+set}" = set; then
22760 echo $ECHO_N "(cached) $ECHO_C" >&6
22761else
22762 if test "$cross_compiling" = yes; then
22763 ac_cv_posix_semaphores_enabled=yes
22764else
22765 cat >conftest.$ac_ext <<_ACEOF
22766/* confdefs.h. */
22767_ACEOF
22768cat confdefs.h >>conftest.$ac_ext
22769cat >>conftest.$ac_ext <<_ACEOF
22770/* end confdefs.h. */
22771
22772#include <unistd.h>
22773#include <fcntl.h>
22774#include <stdio.h>
22775#include <semaphore.h>
22776#include <sys/stat.h>
22777
22778int main(void) {
22779 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
22780 if (a == SEM_FAILED) {
22781 perror("sem_open");
22782 return 1;
22783 }
22784 sem_close(a);
Mark Dickinson62eda4d2009-12-13 21:18:16 +000022785 sem_unlink("/autoconf");
Mark Dickinson875ada42009-11-28 12:52:39 +000022786 return 0;
22787}
22788
22789_ACEOF
22790rm -f conftest$ac_exeext
22791if { (ac_try="$ac_link"
22792case "(($ac_try" in
22793 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22794 *) ac_try_echo=$ac_try;;
22795esac
22796eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22797 (eval "$ac_link") 2>&5
22798 ac_status=$?
22799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22800 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22801 { (case "(($ac_try" in
22802 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22803 *) ac_try_echo=$ac_try;;
22804esac
22805eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22806 (eval "$ac_try") 2>&5
22807 ac_status=$?
22808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22809 (exit $ac_status); }; }; then
22810 ac_cv_posix_semaphores_enabled=yes
22811else
22812 echo "$as_me: program exited with status $ac_status" >&5
22813echo "$as_me: failed program was:" >&5
22814sed 's/^/| /' conftest.$ac_ext >&5
22815
22816( exit $ac_status )
22817ac_cv_posix_semaphores_enabled=no
22818fi
22819rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22820fi
22821
22822
22823
22824fi
22825
22826{ echo "$as_me:$LINENO: result: $ac_cv_posix_semaphores_enabled" >&5
22827echo "${ECHO_T}$ac_cv_posix_semaphores_enabled" >&6; }
22828if test $ac_cv_posix_semaphores_enabled = no
22829then
22830
22831cat >>confdefs.h <<\_ACEOF
22832#define POSIX_SEMAPHORES_NOT_ENABLED 1
22833_ACEOF
22834
22835fi
22836
Mark Dickinson10683072009-04-18 21:18:19 +000022837# Multiprocessing check for broken sem_getvalue
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022838{ echo "$as_me:$LINENO: checking for broken sem_getvalue" >&5
22839echo $ECHO_N "checking for broken sem_getvalue... $ECHO_C" >&6; }
Mark Dickinson10683072009-04-18 21:18:19 +000022840if test "$cross_compiling" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022841 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
Mark Dickinson10683072009-04-18 21:18:19 +000022842See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022843echo "$as_me: error: cannot run test program while cross compiling
Mark Dickinson10683072009-04-18 21:18:19 +000022844See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022845 { (exit 1); exit 1; }; }
Mark Dickinson10683072009-04-18 21:18:19 +000022846else
22847 cat >conftest.$ac_ext <<_ACEOF
22848/* confdefs.h. */
22849_ACEOF
22850cat confdefs.h >>conftest.$ac_ext
22851cat >>conftest.$ac_ext <<_ACEOF
22852/* end confdefs.h. */
22853
22854#include <unistd.h>
22855#include <fcntl.h>
22856#include <stdio.h>
22857#include <semaphore.h>
22858#include <sys/stat.h>
22859
22860int main(void){
Mark Dickinson62eda4d2009-12-13 21:18:16 +000022861 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000022862 int count;
22863 int res;
22864 if(a==SEM_FAILED){
22865 perror("sem_open");
22866 return 1;
22867
22868 }
22869 res = sem_getvalue(a, &count);
22870 sem_close(a);
Mark Dickinson62eda4d2009-12-13 21:18:16 +000022871 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000022872 return res==-1 ? 1 : 0;
22873}
22874
22875
22876_ACEOF
22877rm -f conftest$ac_exeext
22878if { (ac_try="$ac_link"
22879case "(($ac_try" in
22880 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22881 *) ac_try_echo=$ac_try;;
22882esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022883eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson10683072009-04-18 21:18:19 +000022884 (eval "$ac_link") 2>&5
22885 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022886 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000022887 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22888 { (case "(($ac_try" in
22889 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22890 *) ac_try_echo=$ac_try;;
22891esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022892eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson10683072009-04-18 21:18:19 +000022893 (eval "$ac_try") 2>&5
22894 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000022896 (exit $ac_status); }; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022897 { echo "$as_me:$LINENO: result: no" >&5
22898echo "${ECHO_T}no" >&6; }
Mark Dickinson10683072009-04-18 21:18:19 +000022899else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022900 echo "$as_me: program exited with status $ac_status" >&5
22901echo "$as_me: failed program was:" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000022902sed 's/^/| /' conftest.$ac_ext >&5
22903
22904( exit $ac_status )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022905{ echo "$as_me:$LINENO: result: yes" >&5
22906echo "${ECHO_T}yes" >&6; }
Mark Dickinson10683072009-04-18 21:18:19 +000022907
22908cat >>confdefs.h <<\_ACEOF
22909#define HAVE_BROKEN_SEM_GETVALUE 1
22910_ACEOF
22911
22912
22913fi
22914rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22915fi
22916
22917
22918
Mark Dickinsonbd792642009-03-18 20:06:12 +000022919# determine what size digit to use for Python's longs
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022920{ echo "$as_me:$LINENO: checking digit size for Python's longs" >&5
22921echo $ECHO_N "checking digit size for Python's longs... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000022922# Check whether --enable-big-digits was given.
22923if test "${enable_big_digits+set}" = set; then
22924 enableval=$enable_big_digits; case $enable_big_digits in
22925yes)
22926 enable_big_digits=30 ;;
22927no)
22928 enable_big_digits=15 ;;
2292915|30)
22930 ;;
22931*)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022932 { { echo "$as_me:$LINENO: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&5
22933echo "$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 +000022934 { (exit 1); exit 1; }; } ;;
22935esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022936{ echo "$as_me:$LINENO: result: $enable_big_digits" >&5
22937echo "${ECHO_T}$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000022938
22939cat >>confdefs.h <<_ACEOF
22940#define PYLONG_BITS_IN_DIGIT $enable_big_digits
22941_ACEOF
22942
22943
22944else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022945 { echo "$as_me:$LINENO: result: no value specified" >&5
22946echo "${ECHO_T}no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000022947fi
22948
22949
Guido van Rossumef2255b2000-03-10 22:30:29 +000022950# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000022951if test "${ac_cv_header_wchar_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022952 { echo "$as_me:$LINENO: checking for wchar.h" >&5
22953echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022954if test "${ac_cv_header_wchar_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022955 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000022956fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022957{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
22958echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000022959else
Martin v. Löwis11437992002-04-12 09:54:03 +000022960 # Is the header compilable?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022961{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
22962echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022963cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022964/* confdefs.h. */
22965_ACEOF
22966cat confdefs.h >>conftest.$ac_ext
22967cat >>conftest.$ac_ext <<_ACEOF
22968/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022969$ac_includes_default
22970#include <wchar.h>
22971_ACEOF
22972rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022973if { (ac_try="$ac_compile"
22974case "(($ac_try" in
22975 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22976 *) ac_try_echo=$ac_try;;
22977esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022978eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022979 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022980 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022981 grep -v '^ *+' conftest.er1 >conftest.err
22982 rm -f conftest.er1
22983 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022985 (exit $ac_status); } && {
22986 test -z "$ac_c_werror_flag" ||
22987 test ! -s conftest.err
22988 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022989 ac_header_compiler=yes
22990else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022991 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022992sed 's/^/| /' conftest.$ac_ext >&5
22993
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022994 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000022995fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022996
22997rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022998{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22999echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023000
23001# Is the header present?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023002{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
23003echo $ECHO_N "checking wchar.h presence... $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. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000023010#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023011_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023012if { (ac_try="$ac_cpp conftest.$ac_ext"
23013case "(($ac_try" in
23014 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23015 *) ac_try_echo=$ac_try;;
23016esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023017eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023018 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023019 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000023020 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000023021 rm -f conftest.er1
23022 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023024 (exit $ac_status); } >/dev/null && {
23025 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23026 test ! -s conftest.err
23027 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023028 ac_header_preproc=yes
23029else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023030 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023031sed 's/^/| /' conftest.$ac_ext >&5
23032
Martin v. Löwis11437992002-04-12 09:54:03 +000023033 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000023034fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023035
Martin v. Löwis11437992002-04-12 09:54:03 +000023036rm -f conftest.err conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023037{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
23038echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023039
23040# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023041case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
23042 yes:no: )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023043 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
23044echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
23045 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
23046echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000023047 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023048 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000023049 no:yes:* )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023050 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
23051echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
23052 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
23053echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
23054 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
23055echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
23056 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
23057echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
23058 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
23059echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
23060 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
23061echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023062 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000023063## -------------------------------------- ##
23064## Report this to http://bugs.python.org/ ##
23065## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000023066_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023067 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000023068 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000023069esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023070{ echo "$as_me:$LINENO: checking for wchar.h" >&5
23071echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023072if test "${ac_cv_header_wchar_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023073 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000023074else
23075 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000023076fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023077{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
23078echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023079
23080fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023081if test $ac_cv_header_wchar_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023082
23083
23084cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000023085#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023086_ACEOF
23087
Martin v. Löwisc45929e2002-04-06 10:10:49 +000023088 wchar_h="yes"
23089
Guido van Rossumef2255b2000-03-10 22:30:29 +000023090else
Martin v. Löwis11437992002-04-12 09:54:03 +000023091 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000023092
23093fi
23094
Michael W. Hudson54241132001-12-07 15:38:26 +000023095
Martin v. Löwis11437992002-04-12 09:54:03 +000023096
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023097# determine wchar_t size
23098if test "$wchar_h" = yes
23099then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023100 { echo "$as_me:$LINENO: checking for wchar_t" >&5
23101echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
23102if test "${ac_cv_type_wchar_t+set}" = set; then
23103 echo $ECHO_N "(cached) $ECHO_C" >&6
23104else
23105 cat >conftest.$ac_ext <<_ACEOF
23106/* confdefs.h. */
23107_ACEOF
23108cat confdefs.h >>conftest.$ac_ext
23109cat >>conftest.$ac_ext <<_ACEOF
23110/* end confdefs.h. */
23111#include <wchar.h>
23112
23113typedef wchar_t ac__type_new_;
23114int
23115main ()
23116{
23117if ((ac__type_new_ *) 0)
23118 return 0;
23119if (sizeof (ac__type_new_))
23120 return 0;
23121 ;
23122 return 0;
23123}
23124_ACEOF
23125rm -f conftest.$ac_objext
23126if { (ac_try="$ac_compile"
23127case "(($ac_try" in
23128 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23129 *) ac_try_echo=$ac_try;;
23130esac
23131eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23132 (eval "$ac_compile") 2>conftest.er1
23133 ac_status=$?
23134 grep -v '^ *+' conftest.er1 >conftest.err
23135 rm -f conftest.er1
23136 cat conftest.err >&5
23137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23138 (exit $ac_status); } && {
23139 test -z "$ac_c_werror_flag" ||
23140 test ! -s conftest.err
23141 } && test -s conftest.$ac_objext; then
23142 ac_cv_type_wchar_t=yes
23143else
23144 echo "$as_me: failed program was:" >&5
23145sed 's/^/| /' conftest.$ac_ext >&5
23146
23147 ac_cv_type_wchar_t=no
23148fi
23149
23150rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23151fi
23152{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
23153echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
23154
23155# The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023156# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
23157# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
23158# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023159{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
23160echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023161if test "${ac_cv_sizeof_wchar_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023162 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000023163else
Martin v. Löwis11437992002-04-12 09:54:03 +000023164 if test "$cross_compiling" = yes; then
23165 # Depending upon the size, compute the lo and hi bounds.
23166cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023167/* confdefs.h. */
23168_ACEOF
23169cat confdefs.h >>conftest.$ac_ext
23170cat >>conftest.$ac_ext <<_ACEOF
23171/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023172#include <wchar.h>
23173
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023174 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000023175int
23176main ()
23177{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023178static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000023179test_array [0] = 0
23180
23181 ;
23182 return 0;
23183}
23184_ACEOF
23185rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023186if { (ac_try="$ac_compile"
23187case "(($ac_try" in
23188 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23189 *) ac_try_echo=$ac_try;;
23190esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023191eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023192 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023193 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023194 grep -v '^ *+' conftest.er1 >conftest.err
23195 rm -f conftest.er1
23196 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023198 (exit $ac_status); } && {
23199 test -z "$ac_c_werror_flag" ||
23200 test ! -s conftest.err
23201 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023202 ac_lo=0 ac_mid=0
23203 while :; do
23204 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023205/* confdefs.h. */
23206_ACEOF
23207cat confdefs.h >>conftest.$ac_ext
23208cat >>conftest.$ac_ext <<_ACEOF
23209/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023210#include <wchar.h>
23211
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023212 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000023213int
23214main ()
23215{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023216static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000023217test_array [0] = 0
23218
23219 ;
23220 return 0;
23221}
23222_ACEOF
23223rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023224if { (ac_try="$ac_compile"
23225case "(($ac_try" in
23226 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23227 *) ac_try_echo=$ac_try;;
23228esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023229eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023230 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023231 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023232 grep -v '^ *+' conftest.er1 >conftest.err
23233 rm -f conftest.er1
23234 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023235 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023236 (exit $ac_status); } && {
23237 test -z "$ac_c_werror_flag" ||
23238 test ! -s conftest.err
23239 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023240 ac_hi=$ac_mid; break
23241else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023242 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023243sed 's/^/| /' conftest.$ac_ext >&5
23244
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023245 ac_lo=`expr $ac_mid + 1`
23246 if test $ac_lo -le $ac_mid; then
23247 ac_lo= ac_hi=
23248 break
23249 fi
23250 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000023251fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023252
23253rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023254 done
23255else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023256 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023257sed 's/^/| /' conftest.$ac_ext >&5
23258
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023259 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023260/* confdefs.h. */
23261_ACEOF
23262cat confdefs.h >>conftest.$ac_ext
23263cat >>conftest.$ac_ext <<_ACEOF
23264/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023265#include <wchar.h>
23266
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023267 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000023268int
23269main ()
23270{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023271static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000023272test_array [0] = 0
23273
23274 ;
23275 return 0;
23276}
23277_ACEOF
23278rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023279if { (ac_try="$ac_compile"
23280case "(($ac_try" in
23281 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23282 *) ac_try_echo=$ac_try;;
23283esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023284eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023285 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023286 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023287 grep -v '^ *+' conftest.er1 >conftest.err
23288 rm -f conftest.er1
23289 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023291 (exit $ac_status); } && {
23292 test -z "$ac_c_werror_flag" ||
23293 test ! -s conftest.err
23294 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023295 ac_hi=-1 ac_mid=-1
23296 while :; do
23297 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023298/* confdefs.h. */
23299_ACEOF
23300cat confdefs.h >>conftest.$ac_ext
23301cat >>conftest.$ac_ext <<_ACEOF
23302/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023303#include <wchar.h>
23304
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023305 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000023306int
23307main ()
23308{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023309static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000023310test_array [0] = 0
23311
23312 ;
23313 return 0;
23314}
23315_ACEOF
23316rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023317if { (ac_try="$ac_compile"
23318case "(($ac_try" in
23319 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23320 *) ac_try_echo=$ac_try;;
23321esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023322eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023323 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023324 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023325 grep -v '^ *+' conftest.er1 >conftest.err
23326 rm -f conftest.er1
23327 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023328 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023329 (exit $ac_status); } && {
23330 test -z "$ac_c_werror_flag" ||
23331 test ! -s conftest.err
23332 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023333 ac_lo=$ac_mid; break
23334else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023335 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023336sed 's/^/| /' conftest.$ac_ext >&5
23337
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023338 ac_hi=`expr '(' $ac_mid ')' - 1`
23339 if test $ac_mid -le $ac_hi; then
23340 ac_lo= ac_hi=
23341 break
23342 fi
23343 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000023344fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023345
23346rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023347 done
23348else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023349 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023350sed 's/^/| /' conftest.$ac_ext >&5
23351
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023352 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000023353fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023354
23355rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023356fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023357
23358rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023359# Binary search between lo and hi bounds.
23360while test "x$ac_lo" != "x$ac_hi"; do
23361 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
23362 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023363/* confdefs.h. */
23364_ACEOF
23365cat confdefs.h >>conftest.$ac_ext
23366cat >>conftest.$ac_ext <<_ACEOF
23367/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023368#include <wchar.h>
23369
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023370 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000023371int
23372main ()
23373{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023374static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000023375test_array [0] = 0
23376
23377 ;
23378 return 0;
23379}
23380_ACEOF
23381rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023382if { (ac_try="$ac_compile"
23383case "(($ac_try" in
23384 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23385 *) ac_try_echo=$ac_try;;
23386esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023387eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023388 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023389 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023390 grep -v '^ *+' conftest.er1 >conftest.err
23391 rm -f conftest.er1
23392 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023394 (exit $ac_status); } && {
23395 test -z "$ac_c_werror_flag" ||
23396 test ! -s conftest.err
23397 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023398 ac_hi=$ac_mid
23399else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023400 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023401sed 's/^/| /' conftest.$ac_ext >&5
23402
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023403 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000023404fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023405
23406rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023407done
23408case $ac_lo in
23409?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023410'') if test "$ac_cv_type_wchar_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023411 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000023412See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023413echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000023414See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023415 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023416 else
23417 ac_cv_sizeof_wchar_t=0
23418 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000023419esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023420else
Martin v. Löwis11437992002-04-12 09:54:03 +000023421 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023422/* confdefs.h. */
23423_ACEOF
23424cat confdefs.h >>conftest.$ac_ext
23425cat >>conftest.$ac_ext <<_ACEOF
23426/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023427#include <wchar.h>
23428
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023429 typedef wchar_t ac__type_sizeof_;
23430static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
23431static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000023432#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023433#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023434int
23435main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023436{
Martin v. Löwis11437992002-04-12 09:54:03 +000023437
23438 FILE *f = fopen ("conftest.val", "w");
23439 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023440 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023441 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000023442 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023443 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023444 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023445 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023446 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000023447 }
23448 else
23449 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023450 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023451 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023452 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023453 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000023454 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023455 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000023456
23457 ;
23458 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000023459}
Martin v. Löwis11437992002-04-12 09:54:03 +000023460_ACEOF
23461rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023462if { (ac_try="$ac_link"
23463case "(($ac_try" in
23464 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23465 *) ac_try_echo=$ac_try;;
23466esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023467eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023468 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023469 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023471 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023472 { (case "(($ac_try" in
23473 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23474 *) ac_try_echo=$ac_try;;
23475esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023476eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023477 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023478 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023480 (exit $ac_status); }; }; then
23481 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000023482else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023483 echo "$as_me: program exited with status $ac_status" >&5
23484echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023485sed 's/^/| /' conftest.$ac_ext >&5
23486
Martin v. Löwis11437992002-04-12 09:54:03 +000023487( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023488if test "$ac_cv_type_wchar_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023489 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000023490See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023491echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000023492See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023493 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023494 else
23495 ac_cv_sizeof_wchar_t=0
23496 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000023497fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023498rm -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 +000023499fi
23500rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000023501fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023502{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
23503echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023504
23505
23506
Martin v. Löwis11437992002-04-12 09:54:03 +000023507cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023508#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000023509_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023510
Michael W. Hudson54241132001-12-07 15:38:26 +000023511
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023512fi
23513
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023514{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
23515echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023516have_ucs4_tcl=no
23517cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023518/* confdefs.h. */
23519_ACEOF
23520cat confdefs.h >>conftest.$ac_ext
23521cat >>conftest.$ac_ext <<_ACEOF
23522/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023523
23524#include <tcl.h>
23525#if TCL_UTF_MAX != 6
23526# error "NOT UCS4_TCL"
23527#endif
23528int
23529main ()
23530{
23531
23532 ;
23533 return 0;
23534}
23535_ACEOF
23536rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023537if { (ac_try="$ac_compile"
23538case "(($ac_try" in
23539 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23540 *) ac_try_echo=$ac_try;;
23541esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023542eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023543 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023544 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023545 grep -v '^ *+' conftest.er1 >conftest.err
23546 rm -f conftest.er1
23547 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023549 (exit $ac_status); } && {
23550 test -z "$ac_c_werror_flag" ||
23551 test ! -s conftest.err
23552 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023553
23554
23555cat >>confdefs.h <<\_ACEOF
23556#define HAVE_UCS4_TCL 1
23557_ACEOF
23558
23559 have_ucs4_tcl=yes
23560
23561else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023562 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023563sed 's/^/| /' conftest.$ac_ext >&5
23564
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023565
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023566fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023567
23568rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023569{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
23570echo "${ECHO_T}$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023571
Skip Montanaro6dead952003-09-25 14:50:04 +000023572# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023573if test "$wchar_h" = yes
23574then
23575 # check whether wchar_t is signed or not
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023576 { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
23577echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023578 if test "${ac_cv_wchar_t_signed+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023579 echo $ECHO_N "(cached) $ECHO_C" >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023580else
23581
23582 if test "$cross_compiling" = yes; then
23583 ac_cv_wchar_t_signed=yes
23584else
23585 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023586/* confdefs.h. */
23587_ACEOF
23588cat confdefs.h >>conftest.$ac_ext
23589cat >>conftest.$ac_ext <<_ACEOF
23590/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023591
23592 #include <wchar.h>
23593 int main()
23594 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000023595 /* Success: exit code 0 */
23596 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023597 }
23598
23599_ACEOF
23600rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023601if { (ac_try="$ac_link"
23602case "(($ac_try" in
23603 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23604 *) ac_try_echo=$ac_try;;
23605esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023606eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023607 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023608 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023610 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023611 { (case "(($ac_try" in
23612 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23613 *) ac_try_echo=$ac_try;;
23614esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023615eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023616 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023617 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023619 (exit $ac_status); }; }; then
23620 ac_cv_wchar_t_signed=yes
23621else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023622 echo "$as_me: program exited with status $ac_status" >&5
23623echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023624sed 's/^/| /' conftest.$ac_ext >&5
23625
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023626( exit $ac_status )
23627ac_cv_wchar_t_signed=no
23628fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023629rm -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 +000023630fi
23631
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023632
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023633fi
23634
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023635 { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
23636echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023637fi
23638
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023639{ echo "$as_me:$LINENO: checking what type to use for str" >&5
23640echo $ECHO_N "checking what type to use for str... $ECHO_C" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000023641
23642# Check whether --with-wide-unicode was given.
23643if test "${with_wide_unicode+set}" = set; then
23644 withval=$with_wide_unicode;
23645if test "$withval" != no
23646then unicode_size="4"
23647else unicode_size="2"
23648fi
23649
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023650else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023651
Georg Brandl52d168a2008-01-07 18:10:24 +000023652case "$have_ucs4_tcl" in
23653 yes) unicode_size="4" ;;
23654 *) unicode_size="2" ;;
23655esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023656
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023657fi
23658
Martin v. Löwis0036cba2002-04-12 09:58:45 +000023659
23660
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023661
Georg Brandl52d168a2008-01-07 18:10:24 +000023662case "$unicode_size" in
23663 4) cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023664#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000023665_ACEOF
Georg Brandl52d168a2008-01-07 18:10:24 +000023666 ;;
23667 *) cat >>confdefs.h <<\_ACEOF
23668#define Py_UNICODE_SIZE 2
23669_ACEOF
23670 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023671esac
23672
Michael W. Hudson54241132001-12-07 15:38:26 +000023673
Martin v. Löwis11437992002-04-12 09:54:03 +000023674
23675
Georg Brandl52d168a2008-01-07 18:10:24 +000023676# wchar_t is only usable if it maps to an unsigned type
23677if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000023678 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000023679then
23680 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023681
Martin v. Löwis11437992002-04-12 09:54:03 +000023682cat >>confdefs.h <<\_ACEOF
23683#define HAVE_USABLE_WCHAR_T 1
23684_ACEOF
23685
Georg Brandl52d168a2008-01-07 18:10:24 +000023686 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023687#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000023688_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023689
Georg Brandl52d168a2008-01-07 18:10:24 +000023690elif test "$ac_cv_sizeof_short" = "$unicode_size"
23691then
23692 PY_UNICODE_TYPE="unsigned short"
23693 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023694#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000023695_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023696
Georg Brandl52d168a2008-01-07 18:10:24 +000023697elif test "$ac_cv_sizeof_long" = "$unicode_size"
23698then
23699 PY_UNICODE_TYPE="unsigned long"
23700 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023701#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000023702_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023703
Georg Brandl52d168a2008-01-07 18:10:24 +000023704else
23705 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023706fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023707{ echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
23708echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000023709
23710# check for endianness
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023711{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
23712echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023713if test "${ac_cv_c_bigendian+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023714 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000023715else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023716 # See if sys/param.h defines the BYTE_ORDER macro.
23717cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023718/* confdefs.h. */
23719_ACEOF
23720cat confdefs.h >>conftest.$ac_ext
23721cat >>conftest.$ac_ext <<_ACEOF
23722/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000023723#include <sys/types.h>
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023724#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000023725
Martin v. Löwis11437992002-04-12 09:54:03 +000023726int
23727main ()
23728{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023729#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
23730 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
23731 bogus endian macros
23732#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023733
23734 ;
23735 return 0;
23736}
23737_ACEOF
23738rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023739if { (ac_try="$ac_compile"
23740case "(($ac_try" in
23741 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23742 *) ac_try_echo=$ac_try;;
23743esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023744eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023745 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023746 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023747 grep -v '^ *+' conftest.er1 >conftest.err
23748 rm -f conftest.er1
23749 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023751 (exit $ac_status); } && {
23752 test -z "$ac_c_werror_flag" ||
23753 test ! -s conftest.err
23754 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000023755 # It does; now see whether it defined to BIG_ENDIAN or not.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023756cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023757/* confdefs.h. */
23758_ACEOF
23759cat confdefs.h >>conftest.$ac_ext
23760cat >>conftest.$ac_ext <<_ACEOF
23761/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000023762#include <sys/types.h>
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023763#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000023764
Martin v. Löwis11437992002-04-12 09:54:03 +000023765int
23766main ()
23767{
Guido van Rossumef2255b2000-03-10 22:30:29 +000023768#if BYTE_ORDER != BIG_ENDIAN
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023769 not big endian
23770#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023771
23772 ;
23773 return 0;
23774}
23775_ACEOF
23776rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023777if { (ac_try="$ac_compile"
23778case "(($ac_try" in
23779 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23780 *) ac_try_echo=$ac_try;;
23781esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023782eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023783 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023784 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023785 grep -v '^ *+' conftest.er1 >conftest.err
23786 rm -f conftest.er1
23787 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023789 (exit $ac_status); } && {
23790 test -z "$ac_c_werror_flag" ||
23791 test ! -s conftest.err
23792 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000023793 ac_cv_c_bigendian=yes
23794else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023795 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023796sed 's/^/| /' conftest.$ac_ext >&5
23797
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023798 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000023799fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023800
23801rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000023802else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023803 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023804sed 's/^/| /' conftest.$ac_ext >&5
23805
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023806 # It does not; compile a test program.
23807if test "$cross_compiling" = yes; then
23808 # try to guess the endianness by grepping values into an object file
23809 ac_cv_c_bigendian=unknown
23810 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023811/* confdefs.h. */
23812_ACEOF
23813cat confdefs.h >>conftest.$ac_ext
23814cat >>conftest.$ac_ext <<_ACEOF
23815/* end confdefs.h. */
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023816short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
23817short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
23818void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
23819short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
23820short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
23821void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023822int
23823main ()
23824{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023825 _ascii (); _ebcdic ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023826 ;
23827 return 0;
23828}
23829_ACEOF
23830rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023831if { (ac_try="$ac_compile"
23832case "(($ac_try" in
23833 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23834 *) ac_try_echo=$ac_try;;
23835esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023836eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023837 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023838 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023839 grep -v '^ *+' conftest.er1 >conftest.err
23840 rm -f conftest.er1
23841 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023843 (exit $ac_status); } && {
23844 test -z "$ac_c_werror_flag" ||
23845 test ! -s conftest.err
23846 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023847 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023848 ac_cv_c_bigendian=yes
Benjamin Petersona8332062009-09-11 22:36:27 +000023849fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023850if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
23851 if test "$ac_cv_c_bigendian" = unknown; then
23852 ac_cv_c_bigendian=no
23853 else
23854 # finding both strings is unlikely to happen, but who knows?
23855 ac_cv_c_bigendian=unknown
23856 fi
Benjamin Petersona8332062009-09-11 22:36:27 +000023857fi
Benjamin Petersona8332062009-09-11 22:36:27 +000023858else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023859 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023860sed 's/^/| /' conftest.$ac_ext >&5
23861
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023862
Martin v. Löwis11437992002-04-12 09:54:03 +000023863fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023864
23865rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023866else
23867 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023868/* confdefs.h. */
23869_ACEOF
23870cat confdefs.h >>conftest.$ac_ext
23871cat >>conftest.$ac_ext <<_ACEOF
23872/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023873$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000023874int
23875main ()
23876{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023877
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023878 /* Are we little or big endian? From Harbison&Steele. */
23879 union
23880 {
23881 long int l;
23882 char c[sizeof (long int)];
23883 } u;
23884 u.l = 1;
23885 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023886
23887 ;
23888 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000023889}
Martin v. Löwis11437992002-04-12 09:54:03 +000023890_ACEOF
23891rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023892if { (ac_try="$ac_link"
23893case "(($ac_try" in
23894 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23895 *) ac_try_echo=$ac_try;;
23896esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023897eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023898 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023899 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023901 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023902 { (case "(($ac_try" in
23903 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23904 *) ac_try_echo=$ac_try;;
23905esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023906eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023907 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023908 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023910 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000023911 ac_cv_c_bigendian=no
23912else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023913 echo "$as_me: program exited with status $ac_status" >&5
23914echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023915sed 's/^/| /' conftest.$ac_ext >&5
23916
Martin v. Löwis11437992002-04-12 09:54:03 +000023917( exit $ac_status )
23918ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000023919fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023920rm -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 +000023921fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023922
23923
Martin v. Löwis11437992002-04-12 09:54:03 +000023924fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023925
23926rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23927fi
23928{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
23929echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
23930case $ac_cv_c_bigendian in
23931 yes)
Benjamin Petersona8332062009-09-11 22:36:27 +000023932
23933cat >>confdefs.h <<\_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023934#define WORDS_BIGENDIAN 1
Benjamin Petersona8332062009-09-11 22:36:27 +000023935_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023936 ;;
23937 no)
23938 ;;
23939 *)
23940 { { echo "$as_me:$LINENO: error: unknown endianness
23941presetting ac_cv_c_bigendian=no (or yes) will help" >&5
23942echo "$as_me: error: unknown endianness
23943presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023944 { (exit 1); exit 1; }; } ;;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023945esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000023946
Michael W. Hudson54241132001-12-07 15:38:26 +000023947
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023948# Check whether right shifting a negative integer extends the sign bit
23949# or fills with zeros (like the Cray J90, according to Tim Peters).
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023950{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
23951echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023952if test "${ac_cv_rshift_extends_sign+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023953 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000023954else
Martin v. Löwis11437992002-04-12 09:54:03 +000023955
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023956if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000023957 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023958else
Martin v. Löwis11437992002-04-12 09:54:03 +000023959 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023960/* confdefs.h. */
23961_ACEOF
23962cat confdefs.h >>conftest.$ac_ext
23963cat >>conftest.$ac_ext <<_ACEOF
23964/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023965
23966int main()
23967{
Vladimir Marangozova6180282000-07-12 05:05:06 +000023968 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023969}
23970
Martin v. Löwis11437992002-04-12 09:54:03 +000023971_ACEOF
23972rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023973if { (ac_try="$ac_link"
23974case "(($ac_try" in
23975 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23976 *) ac_try_echo=$ac_try;;
23977esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023978eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023979 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023980 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023982 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023983 { (case "(($ac_try" in
23984 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23985 *) ac_try_echo=$ac_try;;
23986esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023987eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023988 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023989 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023991 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000023992 ac_cv_rshift_extends_sign=yes
23993else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023994 echo "$as_me: program exited with status $ac_status" >&5
23995echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023996sed 's/^/| /' conftest.$ac_ext >&5
23997
Martin v. Löwis11437992002-04-12 09:54:03 +000023998( exit $ac_status )
23999ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000024000fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024001rm -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 +000024002fi
24003
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024004
24005fi
24006
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024007{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
24008echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000024009if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024010then
Martin v. Löwis11437992002-04-12 09:54:03 +000024011
24012cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024013#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024014_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024015
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024016fi
24017
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024018# check for getc_unlocked and related locking functions
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024019{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
24020echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024021if test "${ac_cv_have_getc_unlocked+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024022 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024023else
Martin v. Löwis11437992002-04-12 09:54:03 +000024024
24025cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024026/* confdefs.h. */
24027_ACEOF
24028cat confdefs.h >>conftest.$ac_ext
24029cat >>conftest.$ac_ext <<_ACEOF
24030/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024031#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024032int
24033main ()
24034{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024035
24036 FILE *f = fopen("/dev/null", "r");
24037 flockfile(f);
24038 getc_unlocked(f);
24039 funlockfile(f);
24040
Martin v. Löwis11437992002-04-12 09:54:03 +000024041 ;
24042 return 0;
24043}
24044_ACEOF
24045rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024046if { (ac_try="$ac_link"
24047case "(($ac_try" in
24048 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24049 *) ac_try_echo=$ac_try;;
24050esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024051eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024052 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024053 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024054 grep -v '^ *+' conftest.er1 >conftest.err
24055 rm -f conftest.er1
24056 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024058 (exit $ac_status); } && {
24059 test -z "$ac_c_werror_flag" ||
24060 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024061 } && test -s conftest$ac_exeext &&
24062 $as_test_x conftest$ac_exeext; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024063 ac_cv_have_getc_unlocked=yes
24064else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024065 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024066sed 's/^/| /' conftest.$ac_ext >&5
24067
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024068 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024069fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024070
24071rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024072 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024073fi
24074
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024075{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
24076echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024077if test "$ac_cv_have_getc_unlocked" = yes
24078then
Martin v. Löwis11437992002-04-12 09:54:03 +000024079
24080cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024081#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024082_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024083
24084fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024085
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024086# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000024087# save the value of LIBS so we don't actually link Python with readline
24088LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024089
Gregory P. Smith18820942008-09-07 06:24:49 +000024090# On some systems we need to link readline to a termcap compatible
24091# library. NOTE: Keep the precedence of listed libraries synchronised
24092# with setup.py.
24093py_cv_lib_readline=no
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024094{ echo "$as_me:$LINENO: checking how to link readline libs" >&5
24095echo $ECHO_N "checking how to link readline libs... $ECHO_C" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000024096for py_libtermcap in "" ncursesw ncurses curses termcap; do
24097 if test -z "$py_libtermcap"; then
24098 READLINE_LIBS="-lreadline"
24099 else
24100 READLINE_LIBS="-lreadline -l$py_libtermcap"
24101 fi
24102 LIBS="$READLINE_LIBS $LIBS_no_readline"
24103 cat >conftest.$ac_ext <<_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024104/* confdefs.h. */
24105_ACEOF
24106cat confdefs.h >>conftest.$ac_ext
24107cat >>conftest.$ac_ext <<_ACEOF
24108/* end confdefs.h. */
24109
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024110/* Override any GCC internal prototype to avoid an error.
24111 Use char because int might match the return type of a GCC
24112 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024113#ifdef __cplusplus
24114extern "C"
24115#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024116char readline ();
24117int
24118main ()
24119{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024120return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024121 ;
24122 return 0;
24123}
24124_ACEOF
24125rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024126if { (ac_try="$ac_link"
24127case "(($ac_try" in
24128 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24129 *) ac_try_echo=$ac_try;;
24130esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024131eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024132 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024133 ac_status=$?
24134 grep -v '^ *+' conftest.er1 >conftest.err
24135 rm -f conftest.er1
24136 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024138 (exit $ac_status); } && {
24139 test -z "$ac_c_werror_flag" ||
24140 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024141 } && test -s conftest$ac_exeext &&
24142 $as_test_x conftest$ac_exeext; then
Gregory P. Smith18820942008-09-07 06:24:49 +000024143 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024144else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024145 echo "$as_me: failed program was:" >&5
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024146sed 's/^/| /' conftest.$ac_ext >&5
24147
Gregory P. Smith18820942008-09-07 06:24:49 +000024148
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024149fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024150
24151rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024152 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000024153 if test $py_cv_lib_readline = yes; then
24154 break
24155 fi
24156done
24157# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
24158#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000024159if test $py_cv_lib_readline = no; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024160 { echo "$as_me:$LINENO: result: none" >&5
24161echo "${ECHO_T}none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000024162else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024163 { echo "$as_me:$LINENO: result: $READLINE_LIBS" >&5
24164echo "${ECHO_T}$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000024165
24166cat >>confdefs.h <<\_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024167#define HAVE_LIBREADLINE 1
24168_ACEOF
24169
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024170fi
24171
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024172# check for readline 2.1
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024173{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
24174echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024175if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024176 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024177else
24178 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000024179LIBS="-lreadline $READLINE_LIBS $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024180cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024181/* confdefs.h. */
24182_ACEOF
24183cat confdefs.h >>conftest.$ac_ext
24184cat >>conftest.$ac_ext <<_ACEOF
24185/* end confdefs.h. */
24186
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024187/* Override any GCC internal prototype to avoid an error.
24188 Use char because int might match the return type of a GCC
24189 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024190#ifdef __cplusplus
24191extern "C"
24192#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024193char rl_callback_handler_install ();
24194int
24195main ()
24196{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024197return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024198 ;
24199 return 0;
24200}
24201_ACEOF
24202rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024203if { (ac_try="$ac_link"
24204case "(($ac_try" in
24205 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24206 *) ac_try_echo=$ac_try;;
24207esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024208eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024209 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024210 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024211 grep -v '^ *+' conftest.er1 >conftest.err
24212 rm -f conftest.er1
24213 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024215 (exit $ac_status); } && {
24216 test -z "$ac_c_werror_flag" ||
24217 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024218 } && test -s conftest$ac_exeext &&
24219 $as_test_x conftest$ac_exeext; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024220 ac_cv_lib_readline_rl_callback_handler_install=yes
24221else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024222 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024223sed 's/^/| /' conftest.$ac_ext >&5
24224
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024225 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024226fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024227
24228rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024229 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024230LIBS=$ac_check_lib_save_LIBS
24231fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024232{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
24233echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
24234if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024235
24236cat >>confdefs.h <<\_ACEOF
24237#define HAVE_RL_CALLBACK 1
24238_ACEOF
24239
24240fi
24241
24242
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024243# check for readline 2.2
24244cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024245/* confdefs.h. */
24246_ACEOF
24247cat confdefs.h >>conftest.$ac_ext
24248cat >>conftest.$ac_ext <<_ACEOF
24249/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024250#include <readline/readline.h>
24251_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024252if { (ac_try="$ac_cpp conftest.$ac_ext"
24253case "(($ac_try" in
24254 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24255 *) ac_try_echo=$ac_try;;
24256esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024257eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024258 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024259 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000024260 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024261 rm -f conftest.er1
24262 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024264 (exit $ac_status); } >/dev/null && {
24265 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
24266 test ! -s conftest.err
24267 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024268 have_readline=yes
24269else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024270 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024271sed 's/^/| /' conftest.$ac_ext >&5
24272
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024273 have_readline=no
24274fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024275
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024276rm -f conftest.err conftest.$ac_ext
24277if test $have_readline = yes
24278then
24279 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024280/* confdefs.h. */
24281_ACEOF
24282cat confdefs.h >>conftest.$ac_ext
24283cat >>conftest.$ac_ext <<_ACEOF
24284/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024285#include <readline/readline.h>
24286
24287_ACEOF
24288if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000024289 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024290
24291cat >>confdefs.h <<\_ACEOF
24292#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
24293_ACEOF
24294
24295fi
Martin v. Löwisf6594222010-02-15 08:37:47 +000024296rm -f conftest*
Antoine Pitrou37276002009-10-26 19:32:51 +000024297
24298 cat >conftest.$ac_ext <<_ACEOF
24299/* confdefs.h. */
24300_ACEOF
24301cat confdefs.h >>conftest.$ac_ext
24302cat >>conftest.$ac_ext <<_ACEOF
24303/* end confdefs.h. */
24304#include <readline/readline.h>
24305
24306_ACEOF
24307if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
24308 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then
24309
24310cat >>confdefs.h <<\_ACEOF
24311#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1
24312_ACEOF
24313
24314fi
Martin v. Löwisf6594222010-02-15 08:37:47 +000024315rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024316
24317fi
24318
Martin v. Löwis0daad592001-09-30 21:09:59 +000024319# check for readline 4.0
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024320{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
24321echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024322if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024323 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000024324else
Martin v. Löwis11437992002-04-12 09:54:03 +000024325 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000024326LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000024327cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024328/* confdefs.h. */
24329_ACEOF
24330cat confdefs.h >>conftest.$ac_ext
24331cat >>conftest.$ac_ext <<_ACEOF
24332/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024333
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024334/* Override any GCC internal prototype to avoid an error.
24335 Use char because int might match the return type of a GCC
24336 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024337#ifdef __cplusplus
24338extern "C"
24339#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000024340char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000024341int
24342main ()
24343{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024344return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000024345 ;
24346 return 0;
24347}
24348_ACEOF
24349rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024350if { (ac_try="$ac_link"
24351case "(($ac_try" in
24352 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24353 *) ac_try_echo=$ac_try;;
24354esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024355eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024356 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024357 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024358 grep -v '^ *+' conftest.er1 >conftest.err
24359 rm -f conftest.er1
24360 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024362 (exit $ac_status); } && {
24363 test -z "$ac_c_werror_flag" ||
24364 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024365 } && test -s conftest$ac_exeext &&
24366 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024367 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000024368else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024369 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024370sed 's/^/| /' conftest.$ac_ext >&5
24371
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024372 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000024373fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024374
24375rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024376 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024377LIBS=$ac_check_lib_save_LIBS
24378fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024379{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
24380echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
24381if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000024382
Martin v. Löwis11437992002-04-12 09:54:03 +000024383cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000024384#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024385_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000024386
Martin v. Löwis0daad592001-09-30 21:09:59 +000024387fi
24388
Michael W. Hudson54241132001-12-07 15:38:26 +000024389
Thomas Wouters89d996e2007-09-08 17:39:28 +000024390# also in 4.0
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024391{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
24392echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; }
Thomas Wouters89d996e2007-09-08 17:39:28 +000024393if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024394 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000024395else
24396 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000024397LIBS="-lreadline $READLINE_LIBS $LIBS"
Thomas Wouters89d996e2007-09-08 17:39:28 +000024398cat >conftest.$ac_ext <<_ACEOF
24399/* confdefs.h. */
24400_ACEOF
24401cat confdefs.h >>conftest.$ac_ext
24402cat >>conftest.$ac_ext <<_ACEOF
24403/* end confdefs.h. */
24404
24405/* Override any GCC internal prototype to avoid an error.
24406 Use char because int might match the return type of a GCC
24407 builtin and then its argument prototype would still apply. */
24408#ifdef __cplusplus
24409extern "C"
24410#endif
24411char rl_completion_display_matches_hook ();
24412int
24413main ()
24414{
24415return rl_completion_display_matches_hook ();
24416 ;
24417 return 0;
24418}
24419_ACEOF
24420rm -f conftest.$ac_objext conftest$ac_exeext
24421if { (ac_try="$ac_link"
24422case "(($ac_try" in
24423 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24424 *) ac_try_echo=$ac_try;;
24425esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024426eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000024427 (eval "$ac_link") 2>conftest.er1
24428 ac_status=$?
24429 grep -v '^ *+' conftest.er1 >conftest.err
24430 rm -f conftest.er1
24431 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000024433 (exit $ac_status); } && {
24434 test -z "$ac_c_werror_flag" ||
24435 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024436 } && test -s conftest$ac_exeext &&
24437 $as_test_x conftest$ac_exeext; then
Thomas Wouters89d996e2007-09-08 17:39:28 +000024438 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
24439else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024440 echo "$as_me: failed program was:" >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000024441sed 's/^/| /' conftest.$ac_ext >&5
24442
24443 ac_cv_lib_readline_rl_completion_display_matches_hook=no
24444fi
24445
24446rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
24447 conftest$ac_exeext conftest.$ac_ext
24448LIBS=$ac_check_lib_save_LIBS
24449fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024450{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
24451echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
24452if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then
Thomas Wouters89d996e2007-09-08 17:39:28 +000024453
24454cat >>confdefs.h <<\_ACEOF
24455#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
24456_ACEOF
24457
24458fi
24459
24460
Martin v. Löwis0daad592001-09-30 21:09:59 +000024461# check for readline 4.2
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024462{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
24463echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024464if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024465 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000024466else
Martin v. Löwis11437992002-04-12 09:54:03 +000024467 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000024468LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000024469cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024470/* confdefs.h. */
24471_ACEOF
24472cat confdefs.h >>conftest.$ac_ext
24473cat >>conftest.$ac_ext <<_ACEOF
24474/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024475
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024476/* Override any GCC internal prototype to avoid an error.
24477 Use char because int might match the return type of a GCC
24478 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024479#ifdef __cplusplus
24480extern "C"
24481#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000024482char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000024483int
24484main ()
24485{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024486return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000024487 ;
24488 return 0;
24489}
24490_ACEOF
24491rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024492if { (ac_try="$ac_link"
24493case "(($ac_try" in
24494 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24495 *) ac_try_echo=$ac_try;;
24496esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024497eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024498 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024499 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024500 grep -v '^ *+' conftest.er1 >conftest.err
24501 rm -f conftest.er1
24502 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024504 (exit $ac_status); } && {
24505 test -z "$ac_c_werror_flag" ||
24506 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024507 } && test -s conftest$ac_exeext &&
24508 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024509 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000024510else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024511 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024512sed 's/^/| /' conftest.$ac_ext >&5
24513
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024514 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000024515fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024516
24517rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024518 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024519LIBS=$ac_check_lib_save_LIBS
24520fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024521{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
24522echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
24523if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000024524
Martin v. Löwis11437992002-04-12 09:54:03 +000024525cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000024526#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024527_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000024528
Guido van Rossum353ae582001-07-10 16:45:32 +000024529fi
24530
Jack Jansendd19cf82001-12-06 22:36:17 +000024531
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024532# also in readline 4.2
24533cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024534/* confdefs.h. */
24535_ACEOF
24536cat confdefs.h >>conftest.$ac_ext
24537cat >>conftest.$ac_ext <<_ACEOF
24538/* end confdefs.h. */
24539#include <readline/readline.h>
24540_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024541if { (ac_try="$ac_cpp conftest.$ac_ext"
24542case "(($ac_try" in
24543 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24544 *) ac_try_echo=$ac_try;;
24545esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024546eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024547 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024548 ac_status=$?
24549 grep -v '^ *+' conftest.er1 >conftest.err
24550 rm -f conftest.er1
24551 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024553 (exit $ac_status); } >/dev/null && {
24554 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
24555 test ! -s conftest.err
24556 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024557 have_readline=yes
24558else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024559 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024560sed 's/^/| /' conftest.$ac_ext >&5
24561
24562 have_readline=no
24563fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024564
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024565rm -f conftest.err conftest.$ac_ext
24566if test $have_readline = yes
24567then
24568 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024569/* confdefs.h. */
24570_ACEOF
24571cat confdefs.h >>conftest.$ac_ext
24572cat >>conftest.$ac_ext <<_ACEOF
24573/* end confdefs.h. */
24574#include <readline/readline.h>
24575
24576_ACEOF
24577if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
24578 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
24579
24580cat >>confdefs.h <<\_ACEOF
24581#define HAVE_RL_CATCH_SIGNAL 1
24582_ACEOF
24583
24584fi
Martin v. Löwisf6594222010-02-15 08:37:47 +000024585rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024586
24587fi
24588
Martin v. Löwis82bca632006-02-10 20:49:30 +000024589# End of readline checks: restore LIBS
24590LIBS=$LIBS_no_readline
24591
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024592{ echo "$as_me:$LINENO: checking for broken nice()" >&5
24593echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024594if test "${ac_cv_broken_nice+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024595 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000024596else
Martin v. Löwis11437992002-04-12 09:54:03 +000024597
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024598if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000024599 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024600else
Martin v. Löwis11437992002-04-12 09:54:03 +000024601 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024602/* confdefs.h. */
24603_ACEOF
24604cat confdefs.h >>conftest.$ac_ext
24605cat >>conftest.$ac_ext <<_ACEOF
24606/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024607
24608int main()
24609{
24610 int val1 = nice(1);
24611 if (val1 != -1 && val1 == nice(2))
24612 exit(0);
24613 exit(1);
24614}
24615
Martin v. Löwis11437992002-04-12 09:54:03 +000024616_ACEOF
24617rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024618if { (ac_try="$ac_link"
24619case "(($ac_try" in
24620 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24621 *) ac_try_echo=$ac_try;;
24622esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024623eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024624 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024625 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024627 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024628 { (case "(($ac_try" in
24629 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24630 *) ac_try_echo=$ac_try;;
24631esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024632eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024633 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024634 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024636 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024637 ac_cv_broken_nice=yes
24638else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024639 echo "$as_me: program exited with status $ac_status" >&5
24640echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024641sed 's/^/| /' conftest.$ac_ext >&5
24642
Martin v. Löwis11437992002-04-12 09:54:03 +000024643( exit $ac_status )
24644ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024645fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024646rm -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 +000024647fi
24648
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024649
24650fi
24651
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024652{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
24653echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024654if test "$ac_cv_broken_nice" = yes
24655then
Martin v. Löwis11437992002-04-12 09:54:03 +000024656
24657cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024658#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024659_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024660
24661fi
24662
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024663{ echo "$as_me:$LINENO: checking for broken poll()" >&5
24664echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024665if test "$cross_compiling" = yes; then
24666 ac_cv_broken_poll=no
24667else
24668 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024669/* confdefs.h. */
24670_ACEOF
24671cat confdefs.h >>conftest.$ac_ext
24672cat >>conftest.$ac_ext <<_ACEOF
24673/* end confdefs.h. */
24674
24675#include <poll.h>
24676
24677int main (void)
24678 {
24679 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
24680
24681 close (42);
24682
24683 int poll_test = poll (&poll_struct, 1, 0);
24684
24685 if (poll_test < 0)
24686 {
24687 exit(0);
24688 }
24689 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
24690 {
24691 exit(0);
24692 }
24693 else
24694 {
24695 exit(1);
24696 }
24697 }
24698
24699_ACEOF
24700rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024701if { (ac_try="$ac_link"
24702case "(($ac_try" in
24703 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24704 *) ac_try_echo=$ac_try;;
24705esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024706eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024707 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024708 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024710 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024711 { (case "(($ac_try" in
24712 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24713 *) ac_try_echo=$ac_try;;
24714esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024715eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024716 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024717 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024719 (exit $ac_status); }; }; then
24720 ac_cv_broken_poll=yes
24721else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024722 echo "$as_me: program exited with status $ac_status" >&5
24723echo "$as_me: failed program was:" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024724sed 's/^/| /' conftest.$ac_ext >&5
24725
24726( exit $ac_status )
24727ac_cv_broken_poll=no
24728fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024729rm -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 +000024730fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024731
24732
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024733{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
24734echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024735if test "$ac_cv_broken_poll" = yes
24736then
24737
24738cat >>confdefs.h <<\_ACEOF
24739#define HAVE_BROKEN_POLL 1
24740_ACEOF
24741
24742fi
24743
Brett Cannon43802422005-02-10 20:48:03 +000024744# 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 +000024745# (which is not required by ISO C or UNIX spec) and/or if we support
24746# tzname[]
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024747{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
24748echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000024749if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024750 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000024751else
24752 cat >conftest.$ac_ext <<_ACEOF
24753/* confdefs.h. */
24754_ACEOF
24755cat confdefs.h >>conftest.$ac_ext
24756cat >>conftest.$ac_ext <<_ACEOF
24757/* end confdefs.h. */
24758#include <sys/types.h>
24759#include <$ac_cv_struct_tm>
24760
24761
24762int
24763main ()
24764{
24765static struct tm ac_aggr;
24766if (ac_aggr.tm_zone)
24767return 0;
24768 ;
24769 return 0;
24770}
24771_ACEOF
24772rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024773if { (ac_try="$ac_compile"
24774case "(($ac_try" in
24775 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24776 *) ac_try_echo=$ac_try;;
24777esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024778eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024779 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000024780 ac_status=$?
24781 grep -v '^ *+' conftest.er1 >conftest.err
24782 rm -f conftest.er1
24783 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024785 (exit $ac_status); } && {
24786 test -z "$ac_c_werror_flag" ||
24787 test ! -s conftest.err
24788 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000024789 ac_cv_member_struct_tm_tm_zone=yes
24790else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024791 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000024792sed 's/^/| /' conftest.$ac_ext >&5
24793
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024794 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000024795/* confdefs.h. */
24796_ACEOF
24797cat confdefs.h >>conftest.$ac_ext
24798cat >>conftest.$ac_ext <<_ACEOF
24799/* end confdefs.h. */
24800#include <sys/types.h>
24801#include <$ac_cv_struct_tm>
24802
24803
24804int
24805main ()
24806{
24807static struct tm ac_aggr;
24808if (sizeof ac_aggr.tm_zone)
24809return 0;
24810 ;
24811 return 0;
24812}
24813_ACEOF
24814rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024815if { (ac_try="$ac_compile"
24816case "(($ac_try" in
24817 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24818 *) ac_try_echo=$ac_try;;
24819esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024820eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024821 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000024822 ac_status=$?
24823 grep -v '^ *+' conftest.er1 >conftest.err
24824 rm -f conftest.er1
24825 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024827 (exit $ac_status); } && {
24828 test -z "$ac_c_werror_flag" ||
24829 test ! -s conftest.err
24830 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000024831 ac_cv_member_struct_tm_tm_zone=yes
24832else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024833 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000024834sed 's/^/| /' conftest.$ac_ext >&5
24835
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024836 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000024837fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024838
24839rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000024840fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024841
24842rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000024843fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024844{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
24845echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
24846if test $ac_cv_member_struct_tm_tm_zone = yes; then
Brett Cannon43802422005-02-10 20:48:03 +000024847
24848cat >>confdefs.h <<_ACEOF
24849#define HAVE_STRUCT_TM_TM_ZONE 1
24850_ACEOF
24851
24852
24853fi
24854
24855if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
24856
24857cat >>confdefs.h <<\_ACEOF
24858#define HAVE_TM_ZONE 1
24859_ACEOF
24860
24861else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024862 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
24863echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024864if test "${ac_cv_have_decl_tzname+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024865 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024866else
24867 cat >conftest.$ac_ext <<_ACEOF
24868/* confdefs.h. */
24869_ACEOF
24870cat confdefs.h >>conftest.$ac_ext
24871cat >>conftest.$ac_ext <<_ACEOF
24872/* end confdefs.h. */
24873#include <time.h>
24874
24875int
24876main ()
24877{
24878#ifndef tzname
24879 (void) tzname;
24880#endif
24881
24882 ;
24883 return 0;
24884}
24885_ACEOF
24886rm -f conftest.$ac_objext
24887if { (ac_try="$ac_compile"
24888case "(($ac_try" in
24889 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24890 *) ac_try_echo=$ac_try;;
24891esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024892eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024893 (eval "$ac_compile") 2>conftest.er1
24894 ac_status=$?
24895 grep -v '^ *+' conftest.er1 >conftest.err
24896 rm -f conftest.er1
24897 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024899 (exit $ac_status); } && {
24900 test -z "$ac_c_werror_flag" ||
24901 test ! -s conftest.err
24902 } && test -s conftest.$ac_objext; then
24903 ac_cv_have_decl_tzname=yes
24904else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024905 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024906sed 's/^/| /' conftest.$ac_ext >&5
24907
24908 ac_cv_have_decl_tzname=no
24909fi
24910
24911rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24912fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024913{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
24914echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
24915if test $ac_cv_have_decl_tzname = yes; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024916
24917cat >>confdefs.h <<_ACEOF
24918#define HAVE_DECL_TZNAME 1
24919_ACEOF
24920
24921
24922else
24923 cat >>confdefs.h <<_ACEOF
24924#define HAVE_DECL_TZNAME 0
24925_ACEOF
24926
24927
24928fi
24929
24930
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024931 { echo "$as_me:$LINENO: checking for tzname" >&5
24932echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000024933if test "${ac_cv_var_tzname+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024934 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000024935else
24936 cat >conftest.$ac_ext <<_ACEOF
24937/* confdefs.h. */
24938_ACEOF
24939cat confdefs.h >>conftest.$ac_ext
24940cat >>conftest.$ac_ext <<_ACEOF
24941/* end confdefs.h. */
24942#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024943#if !HAVE_DECL_TZNAME
24944extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000024945#endif
24946
24947int
24948main ()
24949{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024950return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000024951 ;
24952 return 0;
24953}
24954_ACEOF
24955rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024956if { (ac_try="$ac_link"
24957case "(($ac_try" in
24958 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24959 *) ac_try_echo=$ac_try;;
24960esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024961eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024962 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000024963 ac_status=$?
24964 grep -v '^ *+' conftest.er1 >conftest.err
24965 rm -f conftest.er1
24966 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024968 (exit $ac_status); } && {
24969 test -z "$ac_c_werror_flag" ||
24970 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024971 } && test -s conftest$ac_exeext &&
24972 $as_test_x conftest$ac_exeext; then
Brett Cannon43802422005-02-10 20:48:03 +000024973 ac_cv_var_tzname=yes
24974else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024975 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000024976sed 's/^/| /' conftest.$ac_ext >&5
24977
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024978 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000024979fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024980
24981rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000024982 conftest$ac_exeext conftest.$ac_ext
24983fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024984{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
24985echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000024986 if test $ac_cv_var_tzname = yes; then
24987
24988cat >>confdefs.h <<\_ACEOF
24989#define HAVE_TZNAME 1
24990_ACEOF
24991
24992 fi
24993fi
24994
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024995
Martin v. Löwis1d459062005-03-14 21:23:33 +000024996# check tzset(3) exists and works like we expect it to
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024997{ echo "$as_me:$LINENO: checking for working tzset()" >&5
24998echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024999if test "${ac_cv_working_tzset+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025000 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025001else
25002
25003if test "$cross_compiling" = yes; then
25004 ac_cv_working_tzset=no
25005else
25006 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025007/* confdefs.h. */
25008_ACEOF
25009cat confdefs.h >>conftest.$ac_ext
25010cat >>conftest.$ac_ext <<_ACEOF
25011/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025012
25013#include <stdlib.h>
25014#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000025015#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000025016
25017#if HAVE_TZNAME
25018extern char *tzname[];
25019#endif
25020
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025021int main()
25022{
Brett Cannon18367812003-09-19 00:59:16 +000025023 /* Note that we need to ensure that not only does tzset(3)
25024 do 'something' with localtime, but it works as documented
25025 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000025026 This includes making sure that tzname is set properly if
25027 tm->tm_zone does not exist since it is the alternative way
25028 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000025029
25030 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000025031 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000025032 */
25033
Martin v. Löwis1d459062005-03-14 21:23:33 +000025034 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000025035 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
25036
Neal Norwitz7f2588c2003-04-11 15:35:53 +000025037 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025038 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000025039 if (localtime(&groundhogday)->tm_hour != 0)
25040 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025041#if HAVE_TZNAME
25042 /* For UTC, tzname[1] is sometimes "", sometimes " " */
25043 if (strcmp(tzname[0], "UTC") ||
25044 (tzname[1][0] != 0 && tzname[1][0] != ' '))
25045 exit(1);
25046#endif
Brett Cannon18367812003-09-19 00:59:16 +000025047
Neal Norwitz7f2588c2003-04-11 15:35:53 +000025048 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025049 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000025050 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025051 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025052#if HAVE_TZNAME
25053 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
25054 exit(1);
25055#endif
Brett Cannon18367812003-09-19 00:59:16 +000025056
25057 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
25058 tzset();
25059 if (localtime(&groundhogday)->tm_hour != 11)
25060 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025061#if HAVE_TZNAME
25062 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
25063 exit(1);
25064#endif
25065
25066#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000025067 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
25068 exit(1);
25069 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
25070 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025071#endif
Brett Cannon18367812003-09-19 00:59:16 +000025072
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025073 exit(0);
25074}
25075
25076_ACEOF
25077rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025078if { (ac_try="$ac_link"
25079case "(($ac_try" in
25080 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25081 *) ac_try_echo=$ac_try;;
25082esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025083eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025084 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025085 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025087 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025088 { (case "(($ac_try" in
25089 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25090 *) ac_try_echo=$ac_try;;
25091esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025092eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025093 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025094 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025096 (exit $ac_status); }; }; then
25097 ac_cv_working_tzset=yes
25098else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025099 echo "$as_me: program exited with status $ac_status" >&5
25100echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025101sed 's/^/| /' conftest.$ac_ext >&5
25102
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025103( exit $ac_status )
25104ac_cv_working_tzset=no
25105fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025106rm -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 +000025107fi
25108
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025109
25110fi
25111
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025112{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
25113echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025114if test "$ac_cv_working_tzset" = yes
25115then
25116
25117cat >>confdefs.h <<\_ACEOF
25118#define HAVE_WORKING_TZSET 1
25119_ACEOF
25120
25121fi
25122
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025123# Look for subsecond timestamps in struct stat
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025124{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
25125echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025126if test "${ac_cv_stat_tv_nsec+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025127 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025128else
25129 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025130/* confdefs.h. */
25131_ACEOF
25132cat confdefs.h >>conftest.$ac_ext
25133cat >>conftest.$ac_ext <<_ACEOF
25134/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025135#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025136int
25137main ()
25138{
25139
25140struct stat st;
25141st.st_mtim.tv_nsec = 1;
25142
25143 ;
25144 return 0;
25145}
25146_ACEOF
25147rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025148if { (ac_try="$ac_compile"
25149case "(($ac_try" in
25150 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25151 *) ac_try_echo=$ac_try;;
25152esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025153eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025154 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025155 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025156 grep -v '^ *+' conftest.er1 >conftest.err
25157 rm -f conftest.er1
25158 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025160 (exit $ac_status); } && {
25161 test -z "$ac_c_werror_flag" ||
25162 test ! -s conftest.err
25163 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000025164 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025165else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025166 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025167sed 's/^/| /' conftest.$ac_ext >&5
25168
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025169 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025170fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000025171
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025172rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25173fi
25174
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025175{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
25176echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025177if test "$ac_cv_stat_tv_nsec" = yes
25178then
25179
25180cat >>confdefs.h <<\_ACEOF
25181#define HAVE_STAT_TV_NSEC 1
25182_ACEOF
25183
25184fi
25185
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025186# Look for BSD style subsecond timestamps in struct stat
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025187{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
25188echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025189if test "${ac_cv_stat_tv_nsec2+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025190 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025191else
25192 cat >conftest.$ac_ext <<_ACEOF
25193/* confdefs.h. */
25194_ACEOF
25195cat confdefs.h >>conftest.$ac_ext
25196cat >>conftest.$ac_ext <<_ACEOF
25197/* end confdefs.h. */
25198#include <sys/stat.h>
25199int
25200main ()
25201{
25202
25203struct stat st;
25204st.st_mtimespec.tv_nsec = 1;
25205
25206 ;
25207 return 0;
25208}
25209_ACEOF
25210rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025211if { (ac_try="$ac_compile"
25212case "(($ac_try" in
25213 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25214 *) ac_try_echo=$ac_try;;
25215esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025216eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025217 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025218 ac_status=$?
25219 grep -v '^ *+' conftest.er1 >conftest.err
25220 rm -f conftest.er1
25221 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025223 (exit $ac_status); } && {
25224 test -z "$ac_c_werror_flag" ||
25225 test ! -s conftest.err
25226 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025227 ac_cv_stat_tv_nsec2=yes
25228else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025229 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025230sed 's/^/| /' conftest.$ac_ext >&5
25231
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025232 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025233fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000025234
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025235rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25236fi
25237
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025238{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
25239echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025240if test "$ac_cv_stat_tv_nsec2" = yes
25241then
25242
25243cat >>confdefs.h <<\_ACEOF
25244#define HAVE_STAT_TV_NSEC2 1
25245_ACEOF
25246
25247fi
25248
Jack Jansen666b1e72001-10-31 12:11:48 +000025249# On HP/UX 11.0, mvwdelch is a block with a return statement
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025250{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
25251echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025252if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025253 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000025254else
Martin v. Löwis11437992002-04-12 09:54:03 +000025255 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025256/* confdefs.h. */
25257_ACEOF
25258cat confdefs.h >>conftest.$ac_ext
25259cat >>conftest.$ac_ext <<_ACEOF
25260/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000025261#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025262int
25263main ()
25264{
Jack Jansen666b1e72001-10-31 12:11:48 +000025265
25266 int rtn;
25267 rtn = mvwdelch(0,0,0);
25268
Martin v. Löwis11437992002-04-12 09:54:03 +000025269 ;
25270 return 0;
25271}
25272_ACEOF
25273rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025274if { (ac_try="$ac_compile"
25275case "(($ac_try" in
25276 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25277 *) ac_try_echo=$ac_try;;
25278esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025279eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025280 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025281 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025282 grep -v '^ *+' conftest.er1 >conftest.err
25283 rm -f conftest.er1
25284 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025286 (exit $ac_status); } && {
25287 test -z "$ac_c_werror_flag" ||
25288 test ! -s conftest.err
25289 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000025290 ac_cv_mvwdelch_is_expression=yes
25291else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025292 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025293sed 's/^/| /' conftest.$ac_ext >&5
25294
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025295 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000025296fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000025297
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025298rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25299fi
25300
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025301{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
25302echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000025303
25304if test "$ac_cv_mvwdelch_is_expression" = yes
25305then
Martin v. Löwis11437992002-04-12 09:54:03 +000025306
25307cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000025308#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025309_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000025310
25311fi
25312
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025313{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
25314echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025315if test "${ac_cv_window_has_flags+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025316 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000025317else
Martin v. Löwis11437992002-04-12 09:54:03 +000025318 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025319/* confdefs.h. */
25320_ACEOF
25321cat confdefs.h >>conftest.$ac_ext
25322cat >>conftest.$ac_ext <<_ACEOF
25323/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000025324#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025325int
25326main ()
25327{
Jack Jansen666b1e72001-10-31 12:11:48 +000025328
25329 WINDOW *w;
25330 w->_flags = 0;
25331
Martin v. Löwis11437992002-04-12 09:54:03 +000025332 ;
25333 return 0;
25334}
25335_ACEOF
25336rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025337if { (ac_try="$ac_compile"
25338case "(($ac_try" in
25339 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25340 *) ac_try_echo=$ac_try;;
25341esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025342eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025343 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025344 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025345 grep -v '^ *+' conftest.er1 >conftest.err
25346 rm -f conftest.er1
25347 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025349 (exit $ac_status); } && {
25350 test -z "$ac_c_werror_flag" ||
25351 test ! -s conftest.err
25352 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000025353 ac_cv_window_has_flags=yes
25354else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025355 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025356sed 's/^/| /' conftest.$ac_ext >&5
25357
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025358 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000025359fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000025360
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025361rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25362fi
25363
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025364{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
25365echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000025366
Jack Jansen666b1e72001-10-31 12:11:48 +000025367
25368if test "$ac_cv_window_has_flags" = yes
25369then
Martin v. Löwis11437992002-04-12 09:54:03 +000025370
25371cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000025372#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025373_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000025374
25375fi
25376
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025377{ echo "$as_me:$LINENO: checking for is_term_resized" >&5
25378echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025379cat >conftest.$ac_ext <<_ACEOF
25380/* confdefs.h. */
25381_ACEOF
25382cat confdefs.h >>conftest.$ac_ext
25383cat >>conftest.$ac_ext <<_ACEOF
25384/* end confdefs.h. */
25385#include <curses.h>
25386int
25387main ()
25388{
25389void *x=is_term_resized
25390 ;
25391 return 0;
25392}
25393_ACEOF
25394rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025395if { (ac_try="$ac_compile"
25396case "(($ac_try" in
25397 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25398 *) ac_try_echo=$ac_try;;
25399esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025400eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025401 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025402 ac_status=$?
25403 grep -v '^ *+' conftest.er1 >conftest.err
25404 rm -f conftest.er1
25405 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025407 (exit $ac_status); } && {
25408 test -z "$ac_c_werror_flag" ||
25409 test ! -s conftest.err
25410 } && test -s conftest.$ac_objext; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000025411
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025412cat >>confdefs.h <<\_ACEOF
25413#define HAVE_CURSES_IS_TERM_RESIZED 1
25414_ACEOF
25415
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025416 { echo "$as_me:$LINENO: result: yes" >&5
25417echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025418else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025419 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025420sed 's/^/| /' conftest.$ac_ext >&5
25421
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025422 { echo "$as_me:$LINENO: result: no" >&5
25423echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025424
25425fi
25426
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025427rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25428
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025429{ echo "$as_me:$LINENO: checking for resize_term" >&5
25430echo $ECHO_N "checking for resize_term... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025431cat >conftest.$ac_ext <<_ACEOF
25432/* confdefs.h. */
25433_ACEOF
25434cat confdefs.h >>conftest.$ac_ext
25435cat >>conftest.$ac_ext <<_ACEOF
25436/* end confdefs.h. */
25437#include <curses.h>
25438int
25439main ()
25440{
25441void *x=resize_term
25442 ;
25443 return 0;
25444}
25445_ACEOF
25446rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025447if { (ac_try="$ac_compile"
25448case "(($ac_try" in
25449 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25450 *) ac_try_echo=$ac_try;;
25451esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025452eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025453 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025454 ac_status=$?
25455 grep -v '^ *+' conftest.er1 >conftest.err
25456 rm -f conftest.er1
25457 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025458 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025459 (exit $ac_status); } && {
25460 test -z "$ac_c_werror_flag" ||
25461 test ! -s conftest.err
25462 } && test -s conftest.$ac_objext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025463
25464cat >>confdefs.h <<\_ACEOF
25465#define HAVE_CURSES_RESIZE_TERM 1
25466_ACEOF
25467
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025468 { echo "$as_me:$LINENO: result: yes" >&5
25469echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025470else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025471 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025472sed 's/^/| /' conftest.$ac_ext >&5
25473
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025474 { echo "$as_me:$LINENO: result: no" >&5
25475echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025476
25477fi
25478
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025479rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25480
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025481{ echo "$as_me:$LINENO: checking for resizeterm" >&5
25482echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025483cat >conftest.$ac_ext <<_ACEOF
25484/* confdefs.h. */
25485_ACEOF
25486cat confdefs.h >>conftest.$ac_ext
25487cat >>conftest.$ac_ext <<_ACEOF
25488/* end confdefs.h. */
25489#include <curses.h>
25490int
25491main ()
25492{
25493void *x=resizeterm
25494 ;
25495 return 0;
25496}
25497_ACEOF
25498rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025499if { (ac_try="$ac_compile"
25500case "(($ac_try" in
25501 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25502 *) ac_try_echo=$ac_try;;
25503esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025504eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025505 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025506 ac_status=$?
25507 grep -v '^ *+' conftest.er1 >conftest.err
25508 rm -f conftest.er1
25509 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025511 (exit $ac_status); } && {
25512 test -z "$ac_c_werror_flag" ||
25513 test ! -s conftest.err
25514 } && test -s conftest.$ac_objext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025515
25516cat >>confdefs.h <<\_ACEOF
25517#define HAVE_CURSES_RESIZETERM 1
25518_ACEOF
25519
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025520 { echo "$as_me:$LINENO: result: yes" >&5
25521echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025522else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025523 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025524sed 's/^/| /' conftest.$ac_ext >&5
25525
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025526 { echo "$as_me:$LINENO: result: no" >&5
25527echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025528
25529fi
25530
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025531rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25532
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025533{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
25534echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000025535
25536if test -r /dev/ptmx
25537then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025538 { echo "$as_me:$LINENO: result: yes" >&5
25539echo "${ECHO_T}yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000025540
25541cat >>confdefs.h <<\_ACEOF
25542#define HAVE_DEV_PTMX 1
25543_ACEOF
25544
Thomas Wouters89f507f2006-12-13 04:49:30 +000025545else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025546 { echo "$as_me:$LINENO: result: no" >&5
25547echo "${ECHO_T}no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000025548fi
25549
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025550{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
25551echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000025552
25553if test -r /dev/ptc
25554then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025555 { echo "$as_me:$LINENO: result: yes" >&5
25556echo "${ECHO_T}yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000025557
25558cat >>confdefs.h <<\_ACEOF
25559#define HAVE_DEV_PTC 1
25560_ACEOF
25561
Thomas Wouters89f507f2006-12-13 04:49:30 +000025562else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025563 { echo "$as_me:$LINENO: result: no" >&5
25564echo "${ECHO_T}no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000025565fi
25566
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025567{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
25568echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000025569if test "$cross_compiling" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025570 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
Thomas Wouters477c8d52006-05-27 19:21:47 +000025571See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025572echo "$as_me: error: cannot run test program while cross compiling
Thomas Wouters477c8d52006-05-27 19:21:47 +000025573See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025574 { (exit 1); exit 1; }; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000025575else
25576 cat >conftest.$ac_ext <<_ACEOF
25577/* confdefs.h. */
25578_ACEOF
25579cat confdefs.h >>conftest.$ac_ext
25580cat >>conftest.$ac_ext <<_ACEOF
25581/* end confdefs.h. */
25582#include <stdio.h>
25583#include <stddef.h>
25584#include <string.h>
25585
Christian Heimes2c181612007-12-17 20:04:13 +000025586#ifdef HAVE_SYS_TYPES_H
25587#include <sys/types.h>
25588#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000025589
25590#ifdef HAVE_SSIZE_T
25591typedef ssize_t Py_ssize_t;
25592#elif SIZEOF_VOID_P == SIZEOF_LONG
25593typedef long Py_ssize_t;
25594#else
25595typedef int Py_ssize_t;
25596#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000025597
Christian Heimes2c181612007-12-17 20:04:13 +000025598int main()
25599{
25600 char buffer[256];
25601
Thomas Wouters477c8d52006-05-27 19:21:47 +000025602 if(sprintf(buffer, "%zd", (size_t)123) < 0)
25603 return 1;
25604
Thomas Wouters89f507f2006-12-13 04:49:30 +000025605 if (strcmp(buffer, "123"))
25606 return 1;
25607
25608 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
25609 return 1;
25610
25611 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000025612 return 1;
25613
25614 return 0;
25615}
25616_ACEOF
25617rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025618if { (ac_try="$ac_link"
25619case "(($ac_try" in
25620 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25621 *) ac_try_echo=$ac_try;;
25622esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025623eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025624 (eval "$ac_link") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000025625 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000025627 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025628 { (case "(($ac_try" in
25629 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25630 *) ac_try_echo=$ac_try;;
25631esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025632eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025633 (eval "$ac_try") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000025634 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000025636 (exit $ac_status); }; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025637 { echo "$as_me:$LINENO: result: yes" >&5
25638echo "${ECHO_T}yes" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000025639
25640cat >>confdefs.h <<\_ACEOF
25641#define PY_FORMAT_SIZE_T "z"
25642_ACEOF
25643
25644else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025645 echo "$as_me: program exited with status $ac_status" >&5
25646echo "$as_me: failed program was:" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000025647sed 's/^/| /' conftest.$ac_ext >&5
25648
25649( exit $ac_status )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025650{ echo "$as_me:$LINENO: result: no" >&5
25651echo "${ECHO_T}no" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000025652fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025653rm -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 +000025654fi
25655
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025656
25657
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025658{ echo "$as_me:$LINENO: checking for socklen_t" >&5
25659echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025660if test "${ac_cv_type_socklen_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025661 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000025662else
Martin v. Löwis11437992002-04-12 09:54:03 +000025663 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025664/* confdefs.h. */
25665_ACEOF
25666cat confdefs.h >>conftest.$ac_ext
25667cat >>conftest.$ac_ext <<_ACEOF
25668/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000025669
25670#ifdef HAVE_SYS_TYPES_H
25671#include <sys/types.h>
25672#endif
25673#ifdef HAVE_SYS_SOCKET_H
25674#include <sys/socket.h>
25675#endif
25676
25677
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025678typedef socklen_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000025679int
25680main ()
25681{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025682if ((ac__type_new_ *) 0)
25683 return 0;
25684if (sizeof (ac__type_new_))
25685 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000025686 ;
25687 return 0;
25688}
25689_ACEOF
25690rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025691if { (ac_try="$ac_compile"
25692case "(($ac_try" in
25693 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25694 *) ac_try_echo=$ac_try;;
25695esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025696eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025697 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025698 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025699 grep -v '^ *+' conftest.er1 >conftest.err
25700 rm -f conftest.er1
25701 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025703 (exit $ac_status); } && {
25704 test -z "$ac_c_werror_flag" ||
25705 test ! -s conftest.err
25706 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025707 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000025708else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025709 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025710sed 's/^/| /' conftest.$ac_ext >&5
25711
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025712 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000025713fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025714
25715rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025716fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025717{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
25718echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
25719if test $ac_cv_type_socklen_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025720 :
25721else
Guido van Rossum95713eb2000-05-18 20:53:31 +000025722
Martin v. Löwis01c04012002-11-11 14:58:44 +000025723cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000025724#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000025725_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000025726
25727fi
25728
Michael W. Hudson54241132001-12-07 15:38:26 +000025729
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025730{ echo "$as_me:$LINENO: checking for broken mbstowcs" >&5
25731echo $ECHO_N "checking for broken mbstowcs... $ECHO_C" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000025732if test "$cross_compiling" = yes; then
25733 ac_cv_broken_mbstowcs=no
25734else
25735 cat >conftest.$ac_ext <<_ACEOF
25736/* confdefs.h. */
25737_ACEOF
25738cat confdefs.h >>conftest.$ac_ext
25739cat >>conftest.$ac_ext <<_ACEOF
25740/* end confdefs.h. */
25741
25742#include<stdlib.h>
25743int main() {
25744 size_t len = -1;
25745 const char *str = "text";
25746 len = mbstowcs(NULL, str, 0);
25747 return (len != 4);
25748}
25749
25750_ACEOF
25751rm -f conftest$ac_exeext
25752if { (ac_try="$ac_link"
25753case "(($ac_try" in
25754 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25755 *) ac_try_echo=$ac_try;;
25756esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025757eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000025758 (eval "$ac_link") 2>&5
25759 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000025761 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
25762 { (case "(($ac_try" in
25763 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25764 *) ac_try_echo=$ac_try;;
25765esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025766eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000025767 (eval "$ac_try") 2>&5
25768 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000025770 (exit $ac_status); }; }; then
25771 ac_cv_broken_mbstowcs=no
25772else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025773 echo "$as_me: program exited with status $ac_status" >&5
25774echo "$as_me: failed program was:" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000025775sed 's/^/| /' conftest.$ac_ext >&5
25776
25777( exit $ac_status )
25778ac_cv_broken_mbstowcs=yes
25779fi
25780rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
25781fi
25782
25783
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025784{ echo "$as_me:$LINENO: result: $ac_cv_broken_mbstowcs" >&5
25785echo "${ECHO_T}$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000025786if test "$ac_cv_broken_mbstowcs" = yes
25787then
25788
25789cat >>confdefs.h <<\_ACEOF
25790#define HAVE_BROKEN_MBSTOWCS 1
25791_ACEOF
25792
25793fi
25794
Antoine Pitroub52ec782009-01-25 16:34:23 +000025795# Check for --with-computed-gotos
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025796{ echo "$as_me:$LINENO: checking for --with-computed-gotos" >&5
25797echo $ECHO_N "checking for --with-computed-gotos... $ECHO_C" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000025798
25799# Check whether --with-computed-gotos was given.
25800if test "${with_computed_gotos+set}" = set; then
25801 withval=$with_computed_gotos;
25802if test "$withval" != no
25803then
25804
25805cat >>confdefs.h <<\_ACEOF
25806#define USE_COMPUTED_GOTOS 1
25807_ACEOF
25808
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025809 { echo "$as_me:$LINENO: result: yes" >&5
25810echo "${ECHO_T}yes" >&6; }
25811else { echo "$as_me:$LINENO: result: no" >&5
25812echo "${ECHO_T}no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000025813fi
25814else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025815 { echo "$as_me:$LINENO: result: no" >&5
25816echo "${ECHO_T}no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000025817fi
25818
25819
Ronald Oussoren1b2cad02009-11-19 17:30:05 +000025820if test $ac_sys_system = Darwin
25821then
25822 LIBS="$LIBS -framework CoreFoundation"
25823fi
25824
25825
Antoine Pitroub52ec782009-01-25 16:34:23 +000025826
Michael W. Hudson54241132001-12-07 15:38:26 +000025827
25828
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000025829for h in `(cd $srcdir;echo Python/thread_*.h)`
25830do
25831 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
25832done
25833
Michael W. Hudson54241132001-12-07 15:38:26 +000025834
Neal Norwitzd24499d2005-12-18 21:36:39 +000025835SRCDIRS="Parser Grammar Objects Python Modules Mac"
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025836{ echo "$as_me:$LINENO: checking for build directories" >&5
25837echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000025838for dir in $SRCDIRS; do
25839 if test ! -d $dir; then
25840 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000025841 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000025842done
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025843{ echo "$as_me:$LINENO: result: done" >&5
25844echo "${ECHO_T}done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000025845
Guido van Rossum627b2d71993-12-24 10:39:16 +000025846# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000025847ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000025848
Martin v. Löwis11437992002-04-12 09:54:03 +000025849cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025850# This file is a shell script that caches the results of configure
25851# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000025852# scripts and configure runs, see configure's option --config-cache.
25853# It is not useful on other systems. If it contains results you don't
25854# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025855#
Martin v. Löwis11437992002-04-12 09:54:03 +000025856# config.status only pays attention to the cache file if you give it
25857# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025858#
Skip Montanaro6dead952003-09-25 14:50:04 +000025859# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000025860# loading this file, other *unset* `ac_cv_foo' will be assigned the
25861# following values.
25862
25863_ACEOF
25864
Guido van Rossumf78abae1997-01-21 22:02:36 +000025865# The following way of writing the cache mishandles newlines in values,
25866# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025867# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000025868# Ultrix sh set writes to stderr and can't be redirected directly,
25869# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025870(
25871 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
25872 eval ac_val=\$$ac_var
25873 case $ac_val in #(
25874 *${as_nl}*)
25875 case $ac_var in #(
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025876 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
25877echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025878 esac
25879 case $ac_var in #(
25880 _ | IFS | as_nl) ;; #(
25881 *) $as_unset $ac_var ;;
25882 esac ;;
25883 esac
25884 done
25885
Martin v. Löwis11437992002-04-12 09:54:03 +000025886 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025887 case $as_nl`(ac_space=' '; set) 2>&1` in #(
25888 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000025889 # `set' does not quote correctly, so add quotes (double-quote
25890 # substitution turns \\\\ into \\, and sed turns \\ into \).
25891 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025892 "s/'/'\\\\''/g;
25893 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025894 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000025895 *)
25896 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025897 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000025898 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025899 esac |
25900 sort
25901) |
Martin v. Löwis11437992002-04-12 09:54:03 +000025902 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025903 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000025904 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025905 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000025906 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
25907 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025908 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
25909 :end' >>confcache
25910if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
25911 if test -w "$cache_file"; then
25912 test "x$cache_file" != "x/dev/null" &&
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025913 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
25914echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000025915 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000025916 else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025917 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
25918echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000025919 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025920fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000025921rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000025922
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025923test "x$prefix" = xNONE && prefix=$ac_default_prefix
25924# Let make expand exec_prefix.
25925test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000025926
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025927DEFS=-DHAVE_CONFIG_H
25928
Skip Montanaro6dead952003-09-25 14:50:04 +000025929ac_libobjs=
25930ac_ltlibobjs=
25931for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
25932 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025933 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025934 ac_i=`echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025935 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
25936 # will be set to the directory where LIBOBJS objects are built.
25937 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
25938 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000025939done
25940LIBOBJS=$ac_libobjs
25941
25942LTLIBOBJS=$ac_ltlibobjs
25943
25944
Martin v. Löwis11437992002-04-12 09:54:03 +000025945
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025946: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000025947ac_clean_files_save=$ac_clean_files
25948ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025949{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
25950echo "$as_me: creating $CONFIG_STATUS" >&6;}
25951cat >$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025952#! $SHELL
25953# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000025954# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025955# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000025956# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000025957
Martin v. Löwis11437992002-04-12 09:54:03 +000025958debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000025959ac_cs_recheck=false
25960ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000025961SHELL=\${CONFIG_SHELL-$SHELL}
25962_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000025963
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025964cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025965## --------------------- ##
25966## M4sh Initialization. ##
25967## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000025968
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025969# Be more Bourne compatible
25970DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000025971if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
25972 emulate sh
25973 NULLCMD=:
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025974 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000025975 # is contrary to our usage. Disable this feature.
25976 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025977 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000025978else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025979 case `(set -o) 2>/dev/null` in
25980 *posix*) set -o posix ;;
25981esac
25982
Michael W. Hudson54241132001-12-07 15:38:26 +000025983fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000025984
25985
Michael W. Hudson54241132001-12-07 15:38:26 +000025986
Michael W. Hudson54241132001-12-07 15:38:26 +000025987
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025988# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000025989# Avoid depending upon Character Ranges.
25990as_cr_letters='abcdefghijklmnopqrstuvwxyz'
25991as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
25992as_cr_Letters=$as_cr_letters$as_cr_LETTERS
25993as_cr_digits='0123456789'
25994as_cr_alnum=$as_cr_Letters$as_cr_digits
25995
25996# The user is always right.
25997if test "${PATH_SEPARATOR+set}" != set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025998 echo "#! /bin/sh" >conf$$.sh
25999 echo "exit 0" >>conf$$.sh
26000 chmod +x conf$$.sh
26001 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
26002 PATH_SEPARATOR=';'
26003 else
26004 PATH_SEPARATOR=:
26005 fi
26006 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000026007fi
26008
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026009# Support unset when possible.
26010if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
26011 as_unset=unset
26012else
26013 as_unset=false
26014fi
Martin v. Löwis11437992002-04-12 09:54:03 +000026015
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026016
26017# IFS
26018# We need space, tab and new line, in precisely that order. Quoting is
26019# there to prevent editors from complaining about space-tab.
26020# (If _AS_PATH_WALK were called with IFS unset, it would disable word
26021# splitting by setting IFS to empty value.)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026022as_nl='
26023'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026024IFS=" "" $as_nl"
26025
26026# Find who we are. Look in the path if we contain no directory separator.
26027case $0 in
26028 *[\\/]* ) as_myself=$0 ;;
26029 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000026030for as_dir in $PATH
26031do
26032 IFS=$as_save_IFS
26033 test -z "$as_dir" && as_dir=.
26034 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
26035done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026036IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000026037
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026038 ;;
26039esac
26040# We did not find ourselves, most probably we were run as `sh COMMAND'
26041# in which case we are not to be found in the path.
26042if test "x$as_myself" = x; then
26043 as_myself=$0
26044fi
26045if test ! -f "$as_myself"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026046 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026047 { (exit 1); exit 1; }
26048fi
26049
26050# Work around bugs in pre-3.0 UWIN ksh.
26051for as_var in ENV MAIL MAILPATH
26052do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
26053done
26054PS1='$ '
26055PS2='> '
26056PS4='+ '
26057
26058# NLS nuisances.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026059for as_var in \
26060 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
26061 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
26062 LC_TELEPHONE LC_TIME
26063do
26064 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
26065 eval $as_var=C; export $as_var
26066 else
26067 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
26068 fi
26069done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026070
26071# Required to use basename.
26072if expr a : '\(a\)' >/dev/null 2>&1 &&
26073 test "X`expr 00001 : '.*\(...\)'`" = X001; then
26074 as_expr=expr
26075else
26076 as_expr=false
26077fi
26078
26079if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
26080 as_basename=basename
26081else
26082 as_basename=false
26083fi
26084
26085
26086# Name of the executable.
26087as_me=`$as_basename -- "$0" ||
26088$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
26089 X"$0" : 'X\(//\)$' \| \
26090 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026091echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026092 sed '/^.*\/\([^/][^/]*\)\/*$/{
26093 s//\1/
26094 q
26095 }
26096 /^X\/\(\/\/\)$/{
26097 s//\1/
26098 q
26099 }
26100 /^X\/\(\/\).*/{
26101 s//\1/
26102 q
26103 }
26104 s/.*/./; q'`
26105
26106# CDPATH.
26107$as_unset CDPATH
26108
26109
26110
Martin v. Löwis11437992002-04-12 09:54:03 +000026111 as_lineno_1=$LINENO
26112 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000026113 test "x$as_lineno_1" != "x$as_lineno_2" &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026114 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000026115
Martin v. Löwis11437992002-04-12 09:54:03 +000026116 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
26117 # uniformly replaced by the line number. The first 'sed' inserts a
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026118 # line-number line after each line using $LINENO; the second 'sed'
26119 # does the real work. The second script uses 'N' to pair each
26120 # line-number line with the line containing $LINENO, and appends
26121 # trailing '-' during substitution so that $LINENO is not a special
26122 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000026123 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026124 # scripts with optimization help from Paolo Bonzini. Blame Lee
26125 # E. McMahon (1931-1989) for sed's syntax. :-)
26126 sed -n '
26127 p
26128 /[$]LINENO/=
26129 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000026130 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026131 s/[$]LINENO.*/&-/
26132 t lineno
26133 b
26134 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000026135 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026136 :loop
26137 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000026138 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026139 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000026140 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026141 chmod +x "$as_me.lineno" ||
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026142 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000026143 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000026144
Martin v. Löwis11437992002-04-12 09:54:03 +000026145 # Don't try to exec as it changes $[0], causing all sort of problems
26146 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026147 # original and so on. Autoconf is especially sensitive to this).
26148 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000026149 # Exit status is that of the last command.
26150 exit
26151}
26152
26153
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026154if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
26155 as_dirname=dirname
26156else
26157 as_dirname=false
26158fi
26159
26160ECHO_C= ECHO_N= ECHO_T=
26161case `echo -n x` in
26162-n*)
26163 case `echo 'x\c'` in
26164 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
26165 *) ECHO_C='\c';;
26166 esac;;
26167*)
26168 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000026169esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026170
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026171if expr a : '\(a\)' >/dev/null 2>&1 &&
26172 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026173 as_expr=expr
26174else
26175 as_expr=false
26176fi
26177
26178rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026179if test -d conf$$.dir; then
26180 rm -f conf$$.dir/conf$$.file
26181else
26182 rm -f conf$$.dir
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026183 mkdir conf$$.dir
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026184fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026185echo >conf$$.file
26186if ln -s conf$$.file conf$$ 2>/dev/null; then
26187 as_ln_s='ln -s'
26188 # ... but there are two gotchas:
26189 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
26190 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
26191 # In both cases, we have to default to `cp -p'.
26192 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +000026193 as_ln_s='cp -p'
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026194elif ln conf$$.file conf$$ 2>/dev/null; then
26195 as_ln_s=ln
Martin v. Löwis11437992002-04-12 09:54:03 +000026196else
26197 as_ln_s='cp -p'
26198fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026199rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
26200rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000026201
Skip Montanaro6dead952003-09-25 14:50:04 +000026202if mkdir -p . 2>/dev/null; then
26203 as_mkdir_p=:
26204else
Skip Montanarof0d5f792004-08-15 14:08:23 +000026205 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000026206 as_mkdir_p=false
26207fi
26208
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026209if test -x / >/dev/null 2>&1; then
26210 as_test_x='test -x'
26211else
26212 if ls -dL / >/dev/null 2>&1; then
26213 as_ls_L_option=L
26214 else
26215 as_ls_L_option=
26216 fi
26217 as_test_x='
26218 eval sh -c '\''
26219 if test -d "$1"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026220 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026221 else
26222 case $1 in
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026223 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026224 esac;
26225 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
26226 ???[sx]*):;;*)false;;esac;fi
26227 '\'' sh
26228 '
26229fi
26230as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000026231
26232# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000026233as_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 +000026234
26235# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000026236as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000026237
26238
Martin v. Löwis11437992002-04-12 09:54:03 +000026239exec 6>&1
26240
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026241# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000026242# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026243# values after options handling.
26244ac_log="
Christian Heimes70e5cab2008-12-03 18:18:23 +000026245This file was extended by python $as_me 3.1, which was
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026246generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000026247
26248 CONFIG_FILES = $CONFIG_FILES
26249 CONFIG_HEADERS = $CONFIG_HEADERS
26250 CONFIG_LINKS = $CONFIG_LINKS
26251 CONFIG_COMMANDS = $CONFIG_COMMANDS
26252 $ $0 $@
26253
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026254on `(hostname || uname -n) 2>/dev/null | sed 1q`
26255"
26256
Martin v. Löwis11437992002-04-12 09:54:03 +000026257_ACEOF
26258
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026259cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026260# Files that config.status was made for.
Martin v. Löwis113a0852009-05-29 17:25:39 +000026261config_files="$ac_config_files"
26262config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000026263
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026264_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026265
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026266cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026267ac_cs_usage="\
26268\`$as_me' instantiates files from templates according to the
26269current configuration.
26270
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026271Usage: $0 [OPTIONS] [FILE]...
Martin v. Löwis11437992002-04-12 09:54:03 +000026272
26273 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026274 -V, --version print version number and configuration settings, then exit
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026275 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000026276 -d, --debug don't remove temporary files
26277 --recheck update $as_me by reconfiguring in the same conditions
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026278 --file=FILE[:TEMPLATE]
26279 instantiate the configuration file FILE
26280 --header=FILE[:TEMPLATE]
26281 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000026282
26283Configuration files:
26284$config_files
26285
26286Configuration headers:
26287$config_headers
26288
26289Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000026290
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026291_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026292cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026293ac_cs_version="\\
Christian Heimes70e5cab2008-12-03 18:18:23 +000026294python config.status 3.1
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026295configured by $0, generated by GNU Autoconf 2.61,
26296 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000026297
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026298Copyright (C) 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000026299This config.status script is free software; the Free Software Foundation
26300gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026301
26302ac_pwd='$ac_pwd'
26303srcdir='$srcdir'
26304INSTALL='$INSTALL'
Martin v. Löwis11437992002-04-12 09:54:03 +000026305_ACEOF
26306
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026307cat >>$CONFIG_STATUS <<\_ACEOF
26308# If no file are specified by the user, then we need to provide default
26309# value. By we need to know if files were specified by the user.
Martin v. Löwis11437992002-04-12 09:54:03 +000026310ac_need_defaults=:
26311while test $# != 0
26312do
26313 case $1 in
26314 --*=*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026315 ac_option=`expr "X$1" : 'X\([^=]*\)='`
26316 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000026317 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000026318 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026319 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000026320 ac_option=$1
26321 ac_optarg=$2
26322 ac_shift=shift
26323 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026324 esac
26325
Skip Montanaro6dead952003-09-25 14:50:04 +000026326 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000026327 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000026328 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
26329 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026330 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026331 echo "$ac_cs_version"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026332 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000026333 debug=: ;;
26334 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000026335 $ac_shift
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026336 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000026337 ac_need_defaults=false;;
26338 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000026339 $ac_shift
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026340 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000026341 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026342 --he | --h)
26343 # Conflict between --help and --header
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026344 { echo "$as_me: error: ambiguous option: $1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026345Try \`$0 --help' for more information." >&2
26346 { (exit 1); exit 1; }; };;
26347 --help | --hel | -h )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026348 echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000026349 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
26350 | -silent | --silent | --silen | --sile | --sil | --si | --s)
26351 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026352
26353 # This is an error.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026354 -*) { echo "$as_me: error: unrecognized option: $1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026355Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000026356 { (exit 1); exit 1; }; } ;;
26357
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026358 *) ac_config_targets="$ac_config_targets $1"
26359 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026360
26361 esac
26362 shift
26363done
26364
Skip Montanaro6dead952003-09-25 14:50:04 +000026365ac_configure_extra_args=
26366
26367if $ac_cs_silent; then
26368 exec 6>/dev/null
26369 ac_configure_extra_args="$ac_configure_extra_args --silent"
26370fi
26371
26372_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026373cat >>$CONFIG_STATUS <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026374if \$ac_cs_recheck; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026375 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
26376 CONFIG_SHELL=$SHELL
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026377 export CONFIG_SHELL
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026378 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000026379fi
26380
Martin v. Löwis11437992002-04-12 09:54:03 +000026381_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026382cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026383exec 5>>config.log
26384{
26385 echo
26386 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
26387## Running $as_me. ##
26388_ASBOX
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026389 echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026390} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026391
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026392_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026393cat >>$CONFIG_STATUS <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026394_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026395
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026396cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026397
26398# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000026399for ac_config_target in $ac_config_targets
26400do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026401 case $ac_config_target in
26402 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
26403 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
26404 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000026405 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
26406 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026407 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
26408 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000026409 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026410
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026411 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
26412echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000026413 { (exit 1); exit 1; }; };;
26414 esac
26415done
26416
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026417
Martin v. Löwis11437992002-04-12 09:54:03 +000026418# If the user did not use the arguments to specify the items to instantiate,
26419# then the envvar interface is used. Set only those that are not.
26420# We use the long form for the default assignment because of an extremely
26421# bizarre bug on SunOS 4.1.3.
26422if $ac_need_defaults; then
26423 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
26424 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
26425fi
26426
Skip Montanaro6dead952003-09-25 14:50:04 +000026427# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026428# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000026429# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026430# Hook for its removal unless debugging.
26431# Note that there is a small window in which the directory will not be cleaned:
26432# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000026433$debug ||
26434{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026435 tmp=
26436 trap 'exit_status=$?
26437 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
26438' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000026439 trap '{ (exit 1); exit 1; }' 1 2 13 15
26440}
Martin v. Löwis11437992002-04-12 09:54:03 +000026441# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000026442
Martin v. Löwis11437992002-04-12 09:54:03 +000026443{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026444 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000026445 test -n "$tmp" && test -d "$tmp"
26446} ||
26447{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026448 tmp=./conf$$-$RANDOM
26449 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000026450} ||
26451{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026452 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000026453 { (exit 1); exit 1; }
26454}
26455
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026456#
26457# Set up the sed scripts for CONFIG_FILES section.
26458#
26459
26460# No need to generate the scripts if there are no CONFIG_FILES.
26461# This happens for instance when ./config.status config.h
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026462if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026463
26464_ACEOF
26465
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026466
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026467
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026468ac_delim='%!_!# '
26469for ac_last_try in false false false false false :; do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026470 cat >conf$$subs.sed <<_ACEOF
26471SHELL!$SHELL$ac_delim
26472PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
26473PACKAGE_NAME!$PACKAGE_NAME$ac_delim
26474PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
26475PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
26476PACKAGE_STRING!$PACKAGE_STRING$ac_delim
26477PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
26478exec_prefix!$exec_prefix$ac_delim
26479prefix!$prefix$ac_delim
26480program_transform_name!$program_transform_name$ac_delim
26481bindir!$bindir$ac_delim
26482sbindir!$sbindir$ac_delim
26483libexecdir!$libexecdir$ac_delim
26484datarootdir!$datarootdir$ac_delim
26485datadir!$datadir$ac_delim
26486sysconfdir!$sysconfdir$ac_delim
26487sharedstatedir!$sharedstatedir$ac_delim
26488localstatedir!$localstatedir$ac_delim
26489includedir!$includedir$ac_delim
26490oldincludedir!$oldincludedir$ac_delim
26491docdir!$docdir$ac_delim
26492infodir!$infodir$ac_delim
26493htmldir!$htmldir$ac_delim
26494dvidir!$dvidir$ac_delim
26495pdfdir!$pdfdir$ac_delim
26496psdir!$psdir$ac_delim
26497libdir!$libdir$ac_delim
26498localedir!$localedir$ac_delim
26499mandir!$mandir$ac_delim
26500DEFS!$DEFS$ac_delim
26501ECHO_C!$ECHO_C$ac_delim
26502ECHO_N!$ECHO_N$ac_delim
26503ECHO_T!$ECHO_T$ac_delim
26504LIBS!$LIBS$ac_delim
26505build_alias!$build_alias$ac_delim
26506host_alias!$host_alias$ac_delim
26507target_alias!$target_alias$ac_delim
26508VERSION!$VERSION$ac_delim
26509SOVERSION!$SOVERSION$ac_delim
26510CONFIG_ARGS!$CONFIG_ARGS$ac_delim
26511UNIVERSALSDK!$UNIVERSALSDK$ac_delim
26512ARCH_RUN_32BIT!$ARCH_RUN_32BIT$ac_delim
26513PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
26514PYTHONFRAMEWORKIDENTIFIER!$PYTHONFRAMEWORKIDENTIFIER$ac_delim
26515PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
26516PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
26517PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
26518FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
26519FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
26520FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
26521FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
26522FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
26523MACHDEP!$MACHDEP$ac_delim
26524SGI_ABI!$SGI_ABI$ac_delim
26525CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
26526EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim
26527CC!$CC$ac_delim
26528CFLAGS!$CFLAGS$ac_delim
26529LDFLAGS!$LDFLAGS$ac_delim
26530CPPFLAGS!$CPPFLAGS$ac_delim
26531ac_ct_CC!$ac_ct_CC$ac_delim
26532EXEEXT!$EXEEXT$ac_delim
26533OBJEXT!$OBJEXT$ac_delim
26534CXX!$CXX$ac_delim
26535MAINCC!$MAINCC$ac_delim
26536CPP!$CPP$ac_delim
26537GREP!$GREP$ac_delim
26538EGREP!$EGREP$ac_delim
26539BUILDEXEEXT!$BUILDEXEEXT$ac_delim
26540LIBRARY!$LIBRARY$ac_delim
26541LDLIBRARY!$LDLIBRARY$ac_delim
26542DLLLIBRARY!$DLLLIBRARY$ac_delim
26543BLDLIBRARY!$BLDLIBRARY$ac_delim
26544LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
26545INSTSONAME!$INSTSONAME$ac_delim
26546RUNSHARED!$RUNSHARED$ac_delim
26547LINKCC!$LINKCC$ac_delim
26548GNULD!$GNULD$ac_delim
26549RANLIB!$RANLIB$ac_delim
26550AR!$AR$ac_delim
26551ARFLAGS!$ARFLAGS$ac_delim
26552SVNVERSION!$SVNVERSION$ac_delim
26553INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
26554INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
26555INSTALL_DATA!$INSTALL_DATA$ac_delim
26556LN!$LN$ac_delim
26557OPT!$OPT$ac_delim
26558BASECFLAGS!$BASECFLAGS$ac_delim
26559UNIVERSAL_ARCH_FLAGS!$UNIVERSAL_ARCH_FLAGS$ac_delim
26560OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
26561LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
26562SO!$SO$ac_delim
26563LDSHARED!$LDSHARED$ac_delim
26564BLDSHARED!$BLDSHARED$ac_delim
26565CCSHARED!$CCSHARED$ac_delim
26566LINKFORSHARED!$LINKFORSHARED$ac_delim
26567CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
26568_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026569
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026570 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026571 break
26572 elif $ac_last_try; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026573 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
26574echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026575 { (exit 1); exit 1; }; }
26576 else
26577 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000026578 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026579done
26580
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026581ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
26582if test -n "$ac_eof"; then
26583 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
26584 ac_eof=`expr $ac_eof + 1`
26585fi
26586
26587cat >>$CONFIG_STATUS <<_ACEOF
26588cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
26589/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026590_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026591sed '
26592s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
26593s/^/s,@/; s/!/@,|#_!!_#|/
26594:n
26595t n
26596s/'"$ac_delim"'$/,g/; t
26597s/$/\\/; p
26598N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
26599' >>$CONFIG_STATUS <conf$$subs.sed
26600rm -f conf$$subs.sed
26601cat >>$CONFIG_STATUS <<_ACEOF
26602CEOF$ac_eof
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026603_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026604
26605
26606ac_delim='%!_!# '
26607for ac_last_try in false false false false false :; do
26608 cat >conf$$subs.sed <<_ACEOF
26609SHLIBS!$SHLIBS$ac_delim
26610USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
26611SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
26612USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
26613LDLAST!$LDLAST$ac_delim
26614THREADOBJ!$THREADOBJ$ac_delim
26615DLINCLDIR!$DLINCLDIR$ac_delim
26616DYNLOADFILE!$DYNLOADFILE$ac_delim
26617MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
26618TRUE!$TRUE$ac_delim
26619LIBOBJS!$LIBOBJS$ac_delim
26620HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
26621HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
26622HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
26623HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
26624HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
26625LIBM!$LIBM$ac_delim
26626LIBC!$LIBC$ac_delim
26627THREADHEADERS!$THREADHEADERS$ac_delim
26628SRCDIRS!$SRCDIRS$ac_delim
26629LTLIBOBJS!$LTLIBOBJS$ac_delim
26630_ACEOF
26631
26632 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 21; then
26633 break
26634 elif $ac_last_try; then
26635 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
26636echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026637 { (exit 1); exit 1; }; }
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026638 else
26639 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
26640 fi
26641done
26642
26643ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
26644if test -n "$ac_eof"; then
26645 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
26646 ac_eof=`expr $ac_eof + 1`
26647fi
26648
26649cat >>$CONFIG_STATUS <<_ACEOF
26650cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
26651/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026652_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026653sed '
26654s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
26655s/^/s,@/; s/!/@,|#_!!_#|/
26656:n
26657t n
26658s/'"$ac_delim"'$/,g/; t
26659s/$/\\/; p
26660N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
26661' >>$CONFIG_STATUS <conf$$subs.sed
26662rm -f conf$$subs.sed
26663cat >>$CONFIG_STATUS <<_ACEOF
26664:end
26665s/|#_!!_#|//g
26666CEOF$ac_eof
26667_ACEOF
26668
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026669
26670# VPATH may cause trouble with some makes, so we remove $(srcdir),
26671# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
26672# trailing colons and then remove the whole line if VPATH becomes empty
26673# (actually we leave an empty line to preserve line numbers).
26674if test "x$srcdir" = x.; then
26675 ac_vpsub='/^[ ]*VPATH[ ]*=/{
26676s/:*\$(srcdir):*/:/
26677s/:*\${srcdir}:*/:/
26678s/:*@srcdir@:*/:/
26679s/^\([^=]*=[ ]*\):*/\1/
26680s/:*$//
26681s/^[^=]*=[ ]*$//
26682}'
26683fi
26684
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026685cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026686fi # test -n "$CONFIG_FILES"
26687
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026688
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026689for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026690do
26691 case $ac_tag in
26692 :[FHLC]) ac_mode=$ac_tag; continue;;
26693 esac
26694 case $ac_mode$ac_tag in
26695 :[FHL]*:*);;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026696 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
26697echo "$as_me: error: Invalid tag $ac_tag." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026698 { (exit 1); exit 1; }; };;
26699 :[FH]-) ac_tag=-:-;;
26700 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
26701 esac
26702 ac_save_IFS=$IFS
26703 IFS=:
26704 set x $ac_tag
26705 IFS=$ac_save_IFS
26706 shift
26707 ac_file=$1
26708 shift
26709
26710 case $ac_mode in
26711 :L) ac_source=$1;;
26712 :[FH])
26713 ac_file_inputs=
26714 for ac_f
26715 do
26716 case $ac_f in
26717 -) ac_f="$tmp/stdin";;
26718 *) # Look for the file first in the build tree, then in the source tree
26719 # (if the path is not absolute). The absolute path cannot be DOS-style,
26720 # because $ac_f cannot contain `:'.
26721 test -f "$ac_f" ||
26722 case $ac_f in
26723 [\\/$]*) false;;
26724 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
26725 esac ||
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026726 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
26727echo "$as_me: error: cannot find input file: $ac_f" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026728 { (exit 1); exit 1; }; };;
26729 esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026730 ac_file_inputs="$ac_file_inputs $ac_f"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026731 done
26732
26733 # Let's still pretend it is `configure' which instantiates (i.e., don't
26734 # use $as_me), people would be surprised to read:
26735 # /* config.h. Generated by config.status. */
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026736 configure_input="Generated from "`IFS=:
26737 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026738 if test x"$ac_file" != x-; then
26739 configure_input="$ac_file. $configure_input"
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026740 { echo "$as_me:$LINENO: creating $ac_file" >&5
26741echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026742 fi
26743
26744 case $ac_tag in
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026745 *:-:* | *:-) cat >"$tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026746 esac
26747 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026748 esac
26749
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026750 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000026751$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026752 X"$ac_file" : 'X\(//\)[^/]' \| \
26753 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026754 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026755echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026756 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26757 s//\1/
26758 q
26759 }
26760 /^X\(\/\/\)[^/].*/{
26761 s//\1/
26762 q
26763 }
26764 /^X\(\/\/\)$/{
26765 s//\1/
26766 q
26767 }
26768 /^X\(\/\).*/{
26769 s//\1/
26770 q
26771 }
26772 s/.*/./; q'`
26773 { as_dir="$ac_dir"
26774 case $as_dir in #(
26775 -*) as_dir=./$as_dir;;
26776 esac
26777 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000026778 as_dirs=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026779 while :; do
26780 case $as_dir in #(
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026781 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026782 *) as_qdir=$as_dir;;
26783 esac
26784 as_dirs="'$as_qdir' $as_dirs"
26785 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000026786$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026787 X"$as_dir" : 'X\(//\)[^/]' \| \
26788 X"$as_dir" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026789 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026790echo X"$as_dir" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026791 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26792 s//\1/
26793 q
26794 }
26795 /^X\(\/\/\)[^/].*/{
26796 s//\1/
26797 q
26798 }
26799 /^X\(\/\/\)$/{
26800 s//\1/
26801 q
26802 }
26803 /^X\(\/\).*/{
26804 s//\1/
26805 q
26806 }
26807 s/.*/./; q'`
26808 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000026809 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026810 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026811 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
26812echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000026813 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026814 ac_builddir=.
26815
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026816case "$ac_dir" in
26817.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
26818*)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026819 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026820 # A ".." for each directory in $ac_dir_suffix.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026821 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026822 case $ac_top_builddir_sub in
26823 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
26824 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
26825 esac ;;
26826esac
26827ac_abs_top_builddir=$ac_pwd
26828ac_abs_builddir=$ac_pwd$ac_dir_suffix
26829# for backward compatibility:
26830ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000026831
26832case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026833 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000026834 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026835 ac_top_srcdir=$ac_top_builddir_sub
26836 ac_abs_top_srcdir=$ac_pwd ;;
26837 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000026838 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026839 ac_top_srcdir=$srcdir
26840 ac_abs_top_srcdir=$srcdir ;;
26841 *) # Relative name.
26842 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
26843 ac_top_srcdir=$ac_top_build_prefix$srcdir
26844 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026845esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026846ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000026847
Martin v. Löwis11437992002-04-12 09:54:03 +000026848
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026849 case $ac_mode in
26850 :F)
26851 #
26852 # CONFIG_FILE
26853 #
Martin v. Löwis11437992002-04-12 09:54:03 +000026854
26855 case $INSTALL in
26856 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026857 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026858 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000026859_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026860
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026861cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026862# If the template does not know about datarootdir, expand it.
26863# FIXME: This hack should be removed a few years after 2.60.
26864ac_datarootdir_hack=; ac_datarootdir_seen=
26865
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026866case `sed -n '/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026867 p
26868 q
26869}
26870/@datadir@/p
26871/@docdir@/p
26872/@infodir@/p
26873/@localedir@/p
26874/@mandir@/p
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026875' $ac_file_inputs` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026876*datarootdir*) ac_datarootdir_seen=yes;;
26877*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026878 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
26879echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026880_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026881cat >>$CONFIG_STATUS <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026882 ac_datarootdir_hack='
26883 s&@datadir@&$datadir&g
26884 s&@docdir@&$docdir&g
26885 s&@infodir@&$infodir&g
26886 s&@localedir@&$localedir&g
26887 s&@mandir@&$mandir&g
26888 s&\\\${datarootdir}&$datarootdir&g' ;;
26889esac
26890_ACEOF
26891
26892# Neutralize VPATH when `$srcdir' = `.'.
26893# Shell code in configure.ac might set extrasub.
26894# FIXME: do we really want to maintain this feature?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026895cat >>$CONFIG_STATUS <<_ACEOF
26896 sed "$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000026897$extrasub
26898_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026899cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026900:t
26901/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026902s&@configure_input@&$configure_input&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026903s&@top_builddir@&$ac_top_builddir_sub&;t t
26904s&@srcdir@&$ac_srcdir&;t t
26905s&@abs_srcdir@&$ac_abs_srcdir&;t t
26906s&@top_srcdir@&$ac_top_srcdir&;t t
26907s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
26908s&@builddir@&$ac_builddir&;t t
26909s&@abs_builddir@&$ac_abs_builddir&;t t
26910s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
26911s&@INSTALL@&$ac_INSTALL&;t t
26912$ac_datarootdir_hack
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026913" $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 +000026914
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026915test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
26916 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
26917 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026918 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026919which seems to be undefined. Please make sure it is defined." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026920echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026921which seems to be undefined. Please make sure it is defined." >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000026922
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026923 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000026924 case $ac_file in
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026925 -) cat "$tmp/out"; rm -f "$tmp/out";;
26926 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
26927 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026928 ;;
26929 :H)
26930 #
26931 # CONFIG_HEADER
26932 #
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026933_ACEOF
26934
26935# Transform confdefs.h into a sed script `conftest.defines', that
26936# substitutes the proper values into config.h.in to produce config.h.
26937rm -f conftest.defines conftest.tail
26938# First, append a space to every undef/define line, to ease matching.
26939echo 's/$/ /' >conftest.defines
26940# Then, protect against being on the right side of a sed subst, or in
26941# an unquoted here document, in config.status. If some macros were
26942# called several times there might be several #defines for the same
26943# symbol, which is useless. But do not sort them, since the last
26944# AC_DEFINE must be honored.
26945ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
26946# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
26947# NAME is the cpp macro being defined, VALUE is the value it is being given.
26948# PARAMS is the parameter list in the macro definition--in most cases, it's
26949# just an empty string.
26950ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
26951ac_dB='\\)[ (].*,\\1define\\2'
26952ac_dC=' '
26953ac_dD=' ,'
26954
26955uniq confdefs.h |
26956 sed -n '
26957 t rset
26958 :rset
26959 s/^[ ]*#[ ]*define[ ][ ]*//
26960 t ok
26961 d
26962 :ok
26963 s/[\\&,]/\\&/g
26964 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
26965 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
26966 ' >>conftest.defines
26967
26968# Remove the space that was appended to ease matching.
26969# Then replace #undef with comments. This is necessary, for
26970# example, in the case of _POSIX_SOURCE, which is predefined and required
26971# on some systems where configure will not decide to define it.
26972# (The regexp can be short, since the line contains either #define or #undef.)
26973echo 's/ $//
26974s,^[ #]*u.*,/* & */,' >>conftest.defines
26975
26976# Break up conftest.defines:
26977ac_max_sed_lines=50
26978
26979# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
26980# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
26981# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
26982# et cetera.
26983ac_in='$ac_file_inputs'
26984ac_out='"$tmp/out1"'
26985ac_nxt='"$tmp/out2"'
26986
26987while :
26988do
26989 # Write a here document:
26990 cat >>$CONFIG_STATUS <<_ACEOF
26991 # First, check the format of the line:
26992 cat >"\$tmp/defines.sed" <<\\CEOF
26993/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
26994/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
26995b
26996:def
26997_ACEOF
26998 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
26999 echo 'CEOF
27000 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
27001 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
27002 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
27003 grep . conftest.tail >/dev/null || break
27004 rm -f conftest.defines
27005 mv conftest.tail conftest.defines
27006done
27007rm -f conftest.defines conftest.tail
27008
27009echo "ac_result=$ac_in" >>$CONFIG_STATUS
27010cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027011 if test x"$ac_file" != x-; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000027012 echo "/* $configure_input */" >"$tmp/config.h"
27013 cat "$ac_result" >>"$tmp/config.h"
27014 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
27015 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
27016echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027017 else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000027018 rm -f $ac_file
27019 mv "$tmp/config.h" $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000027020 fi
27021 else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000027022 echo "/* $configure_input */"
27023 cat "$ac_result"
Martin v. Löwis11437992002-04-12 09:54:03 +000027024 fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000027025 rm -f "$tmp/out12"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027026 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000027027
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027028
27029 esac
27030
27031done # for ac_tag
27032
Guido van Rossum627b2d71993-12-24 10:39:16 +000027033
Martin v. Löwis11437992002-04-12 09:54:03 +000027034{ (exit 0); exit 0; }
27035_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027036chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000027037ac_clean_files=$ac_clean_files_save
27038
27039
27040# configure is writing to config.log, and then calls config.status.
27041# config.status does its own redirection, appending to config.log.
27042# Unfortunately, on DOS this fails, as config.log is still kept open
27043# by configure, so config.status won't be able to write to it; its
27044# output is simply discarded. So we exec the FD to /dev/null,
27045# effectively closing config.log, so it can be properly (re)opened and
27046# appended to by config.status. When coming back to configure, we
27047# need to make the FD available again.
27048if test "$no_create" != yes; then
27049 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000027050 ac_config_status_args=
27051 test "$silent" = yes &&
27052 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000027053 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000027054 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000027055 exec 5>>config.log
27056 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
27057 # would make configure fail if this is the last instruction.
27058 $ac_cs_success || { (exit 1); exit 1; }
27059fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000027060
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000027061
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000027062echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000027063if test ! -f Modules/Setup
27064then
27065 cp $srcdir/Modules/Setup.dist Modules/Setup
27066fi
27067
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000027068echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000027069if test ! -f Modules/Setup.local
27070then
27071 echo "# Edit this file for local setup changes" >Modules/Setup.local
27072fi
27073
27074echo "creating Makefile"
27075$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
27076 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000027077 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000027078mv config.c Modules