blob: 891ed9cc047e8a988863b97d14884545d4e8fa22 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Benjamin Petersone7e59c22010-03-23 21:05:56 +00002# From configure.in Revision: 79117 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004# Generated by GNU Autoconf 2.61 for python 3.1.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Georg Brandle2e15612009-05-20 18:25:10 +00006# Report bugs to <http://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00007#
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010# This configure script is free software; the Free Software Foundation
11# gives unlimited permission to copy, distribute and modify it.
Martin v. Löwis11437992002-04-12 09:54:03 +000012## --------------------- ##
13## M4sh Initialization. ##
14## --------------------- ##
15
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016# Be more Bourne compatible
17DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000018if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
19 emulate sh
20 NULLCMD=:
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000022 # is contrary to our usage. Disable this feature.
23 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000025else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026 case `(set -o) 2>/dev/null` in
27 *posix*) set -o posix ;;
28esac
29
Martin v. Löwis11437992002-04-12 09:54:03 +000030fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000031
32
Martin v. Löwis11437992002-04-12 09:54:03 +000033
Martin v. Löwis11437992002-04-12 09:54:03 +000034
Thomas Wouters47b49bf2007-08-30 22:15:33 +000035# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000036# Avoid depending upon Character Ranges.
37as_cr_letters='abcdefghijklmnopqrstuvwxyz'
38as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
39as_cr_Letters=$as_cr_letters$as_cr_LETTERS
40as_cr_digits='0123456789'
41as_cr_alnum=$as_cr_Letters$as_cr_digits
42
43# The user is always right.
44if test "${PATH_SEPARATOR+set}" != set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000045 echo "#! /bin/sh" >conf$$.sh
46 echo "exit 0" >>conf$$.sh
47 chmod +x conf$$.sh
48 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
49 PATH_SEPARATOR=';'
50 else
51 PATH_SEPARATOR=:
52 fi
53 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000054fi
55
Thomas Wouters47b49bf2007-08-30 22:15:33 +000056# Support unset when possible.
57if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
58 as_unset=unset
59else
60 as_unset=false
61fi
Martin v. Löwis11437992002-04-12 09:54:03 +000062
Thomas Wouters47b49bf2007-08-30 22:15:33 +000063
64# IFS
65# We need space, tab and new line, in precisely that order. Quoting is
66# there to prevent editors from complaining about space-tab.
67# (If _AS_PATH_WALK were called with IFS unset, it would disable word
68# splitting by setting IFS to empty value.)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000069as_nl='
70'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000071IFS=" "" $as_nl"
72
73# Find who we are. Look in the path if we contain no directory separator.
74case $0 in
75 *[\\/]* ) as_myself=$0 ;;
76 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000077for as_dir in $PATH
78do
79 IFS=$as_save_IFS
80 test -z "$as_dir" && as_dir=.
81 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
82done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000083IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000084
Thomas Wouters47b49bf2007-08-30 22:15:33 +000085 ;;
86esac
87# We did not find ourselves, most probably we were run as `sh COMMAND'
88# in which case we are not to be found in the path.
89if test "x$as_myself" = x; then
90 as_myself=$0
91fi
92if test ! -f "$as_myself"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000093 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +000094 { (exit 1); exit 1; }
95fi
96
97# Work around bugs in pre-3.0 UWIN ksh.
98for as_var in ENV MAIL MAILPATH
99do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
100done
101PS1='$ '
102PS2='> '
103PS4='+ '
104
105# NLS nuisances.
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000106for as_var in \
107 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
108 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
109 LC_TELEPHONE LC_TIME
110do
111 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
112 eval $as_var=C; export $as_var
113 else
114 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
115 fi
116done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000117
118# Required to use basename.
119if expr a : '\(a\)' >/dev/null 2>&1 &&
120 test "X`expr 00001 : '.*\(...\)'`" = X001; then
121 as_expr=expr
122else
123 as_expr=false
124fi
125
126if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
127 as_basename=basename
128else
129 as_basename=false
130fi
131
132
133# Name of the executable.
134as_me=`$as_basename -- "$0" ||
135$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
136 X"$0" : 'X\(//\)$' \| \
137 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000138echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000139 sed '/^.*\/\([^/][^/]*\)\/*$/{
140 s//\1/
141 q
142 }
143 /^X\/\(\/\/\)$/{
144 s//\1/
145 q
146 }
147 /^X\/\(\/\).*/{
148 s//\1/
149 q
150 }
151 s/.*/./; q'`
152
153# CDPATH.
154$as_unset CDPATH
155
156
157if test "x$CONFIG_SHELL" = x; then
158 if (eval ":") 2>/dev/null; then
159 as_have_required=yes
160else
161 as_have_required=no
162fi
163
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000164 if test $as_have_required = yes && (eval ":
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000165(as_func_return () {
166 (exit \$1)
167}
168as_func_success () {
169 as_func_return 0
170}
171as_func_failure () {
172 as_func_return 1
173}
174as_func_ret_success () {
175 return 0
176}
177as_func_ret_failure () {
178 return 1
179}
180
181exitcode=0
182if as_func_success; then
183 :
184else
185 exitcode=1
186 echo as_func_success failed.
187fi
188
189if as_func_failure; then
190 exitcode=1
191 echo as_func_failure succeeded.
192fi
193
194if as_func_ret_success; then
195 :
196else
197 exitcode=1
198 echo as_func_ret_success failed.
199fi
200
201if as_func_ret_failure; then
202 exitcode=1
203 echo as_func_ret_failure succeeded.
204fi
205
206if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
207 :
208else
209 exitcode=1
210 echo positional parameters were not saved.
211fi
212
213test \$exitcode = 0) || { (exit 1); exit 1; }
214
215(
216 as_lineno_1=\$LINENO
217 as_lineno_2=\$LINENO
218 test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
219 test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
220") 2> /dev/null; then
221 :
222else
223 as_candidate_shells=
Martin v. Löwis11437992002-04-12 09:54:03 +0000224 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters89f507f2006-12-13 04:49:30 +0000225for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
Martin v. Löwis11437992002-04-12 09:54:03 +0000226do
227 IFS=$as_save_IFS
228 test -z "$as_dir" && as_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000229 case $as_dir in
Martin v. Löwis11437992002-04-12 09:54:03 +0000230 /*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000231 for as_base in sh bash ksh sh5; do
232 as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
233 done;;
234 esac
235done
236IFS=$as_save_IFS
237
238
239 for as_shell in $as_candidate_shells $SHELL; do
240 # Try only shells that exist, to save several forks.
241 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
242 { ("$as_shell") 2> /dev/null <<\_ASEOF
243if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
244 emulate sh
245 NULLCMD=:
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000246 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000247 # is contrary to our usage. Disable this feature.
248 alias -g '${1+"$@"}'='"$@"'
249 setopt NO_GLOB_SUBST
250else
251 case `(set -o) 2>/dev/null` in
252 *posix*) set -o posix ;;
253esac
254
255fi
256
257
258:
259_ASEOF
260}; then
261 CONFIG_SHELL=$as_shell
262 as_have_required=yes
263 if { "$as_shell" 2> /dev/null <<\_ASEOF
264if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
265 emulate sh
266 NULLCMD=:
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000267 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000268 # is contrary to our usage. Disable this feature.
269 alias -g '${1+"$@"}'='"$@"'
270 setopt NO_GLOB_SUBST
271else
272 case `(set -o) 2>/dev/null` in
273 *posix*) set -o posix ;;
274esac
275
276fi
277
278
279:
280(as_func_return () {
281 (exit $1)
282}
283as_func_success () {
284 as_func_return 0
285}
286as_func_failure () {
287 as_func_return 1
288}
289as_func_ret_success () {
290 return 0
291}
292as_func_ret_failure () {
293 return 1
294}
295
296exitcode=0
297if as_func_success; then
298 :
299else
300 exitcode=1
301 echo as_func_success failed.
302fi
303
304if as_func_failure; then
305 exitcode=1
306 echo as_func_failure succeeded.
307fi
308
309if as_func_ret_success; then
310 :
311else
312 exitcode=1
313 echo as_func_ret_success failed.
314fi
315
316if as_func_ret_failure; then
317 exitcode=1
318 echo as_func_ret_failure succeeded.
319fi
320
321if ( set x; as_func_ret_success y && test x = "$1" ); then
322 :
323else
324 exitcode=1
325 echo positional parameters were not saved.
326fi
327
328test $exitcode = 0) || { (exit 1); exit 1; }
329
330(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000331 as_lineno_1=$LINENO
332 as_lineno_2=$LINENO
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000333 test "x$as_lineno_1" != "x$as_lineno_2" &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000334 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
335
336_ASEOF
337}; then
338 break
339fi
340
341fi
342
343 done
344
345 if test "x$CONFIG_SHELL" != x; then
346 for as_var in BASH_ENV ENV
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000347 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
348 done
349 export CONFIG_SHELL
350 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000351fi
352
353
354 if test $as_have_required = no; then
355 echo This script requires a shell more modern than all the
356 echo shells that I found on your system. Please install a
357 echo modern shell, or manually run the script under such a
358 echo shell if you do have one.
359 { (exit 1); exit 1; }
360fi
361
362
363fi
364
365fi
366
367
368
369(eval "as_func_return () {
370 (exit \$1)
371}
372as_func_success () {
373 as_func_return 0
374}
375as_func_failure () {
376 as_func_return 1
377}
378as_func_ret_success () {
379 return 0
380}
381as_func_ret_failure () {
382 return 1
383}
384
385exitcode=0
386if as_func_success; then
387 :
388else
389 exitcode=1
390 echo as_func_success failed.
391fi
392
393if as_func_failure; then
394 exitcode=1
395 echo as_func_failure succeeded.
396fi
397
398if as_func_ret_success; then
399 :
400else
401 exitcode=1
402 echo as_func_ret_success failed.
403fi
404
405if as_func_ret_failure; then
406 exitcode=1
407 echo as_func_ret_failure succeeded.
408fi
409
410if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
411 :
412else
413 exitcode=1
414 echo positional parameters were not saved.
415fi
416
417test \$exitcode = 0") || {
418 echo No shell found that supports shell functions.
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000419 echo Please tell autoconf@gnu.org about your system,
420 echo including any error possibly output before this
421 echo message
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000422}
423
424
425
426 as_lineno_1=$LINENO
427 as_lineno_2=$LINENO
428 test "x$as_lineno_1" != "x$as_lineno_2" &&
429 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Martin v. Löwis11437992002-04-12 09:54:03 +0000430
431 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
432 # uniformly replaced by the line number. The first 'sed' inserts a
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000433 # line-number line after each line using $LINENO; the second 'sed'
434 # does the real work. The second script uses 'N' to pair each
435 # line-number line with the line containing $LINENO, and appends
436 # trailing '-' during substitution so that $LINENO is not a special
437 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +0000438 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000439 # scripts with optimization help from Paolo Bonzini. Blame Lee
440 # E. McMahon (1931-1989) for sed's syntax. :-)
441 sed -n '
442 p
443 /[$]LINENO/=
444 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000445 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000446 s/[$]LINENO.*/&-/
447 t lineno
448 b
449 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000450 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000451 :loop
452 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000453 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000454 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000455 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000456 chmod +x "$as_me.lineno" ||
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000457 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000458 { (exit 1); exit 1; }; }
459
460 # Don't try to exec as it changes $[0], causing all sort of problems
461 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000462 # original and so on. Autoconf is especially sensitive to this).
463 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000464 # Exit status is that of the last command.
465 exit
466}
467
468
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000469if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
470 as_dirname=dirname
471else
472 as_dirname=false
473fi
474
475ECHO_C= ECHO_N= ECHO_T=
476case `echo -n x` in
477-n*)
478 case `echo 'x\c'` in
479 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
480 *) ECHO_C='\c';;
481 esac;;
482*)
483 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000484esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000485
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000486if expr a : '\(a\)' >/dev/null 2>&1 &&
487 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000488 as_expr=expr
489else
490 as_expr=false
491fi
492
493rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000494if test -d conf$$.dir; then
495 rm -f conf$$.dir/conf$$.file
496else
497 rm -f conf$$.dir
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000498 mkdir conf$$.dir
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000499fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000500echo >conf$$.file
501if ln -s conf$$.file conf$$ 2>/dev/null; then
502 as_ln_s='ln -s'
503 # ... but there are two gotchas:
504 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
505 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
506 # In both cases, we have to default to `cp -p'.
507 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +0000508 as_ln_s='cp -p'
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000509elif ln conf$$.file conf$$ 2>/dev/null; then
510 as_ln_s=ln
Martin v. Löwis11437992002-04-12 09:54:03 +0000511else
512 as_ln_s='cp -p'
513fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000514rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
515rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000516
Skip Montanaro6dead952003-09-25 14:50:04 +0000517if mkdir -p . 2>/dev/null; then
518 as_mkdir_p=:
519else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000520 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000521 as_mkdir_p=false
522fi
523
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000524if test -x / >/dev/null 2>&1; then
525 as_test_x='test -x'
526else
527 if ls -dL / >/dev/null 2>&1; then
528 as_ls_L_option=L
529 else
530 as_ls_L_option=
531 fi
532 as_test_x='
533 eval sh -c '\''
534 if test -d "$1"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000535 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000536 else
537 case $1 in
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000538 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000539 esac;
540 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
541 ???[sx]*):;;*)false;;esac;fi
542 '\'' sh
543 '
544fi
545as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +0000546
547# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000548as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000549
550# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000551as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000552
553
Martin v. Löwis11437992002-04-12 09:54:03 +0000554
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000555exec 7<&0 </dev/null 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000556
557# Name of the host.
558# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
559# so uname gets run too.
560ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
561
Martin v. Löwis11437992002-04-12 09:54:03 +0000562#
563# Initializations.
564#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000565ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000566ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000567ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000568LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000569cross_compiling=no
570subdirs=
571MFLAGS=
572MAKEFLAGS=
573SHELL=${CONFIG_SHELL-/bin/sh}
574
Martin v. Löwis11437992002-04-12 09:54:03 +0000575# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000576PACKAGE_NAME='python'
577PACKAGE_TARNAME='python'
Christian Heimes70e5cab2008-12-03 18:18:23 +0000578PACKAGE_VERSION='3.1'
579PACKAGE_STRING='python 3.1'
Georg Brandle2e15612009-05-20 18:25:10 +0000580PACKAGE_BUGREPORT='http://bugs.python.org/'
Martin v. Löwis11437992002-04-12 09:54:03 +0000581
582ac_unique_file="Include/object.h"
583# Factoring default headers for most tests.
584ac_includes_default="\
585#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000586#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000587# include <sys/types.h>
588#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000589#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000590# include <sys/stat.h>
591#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000592#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <stdlib.h>
594# include <stddef.h>
595#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000596# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000597# include <stdlib.h>
598# endif
599#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000600#ifdef HAVE_STRING_H
601# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000602# include <memory.h>
603# endif
604# include <string.h>
605#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000606#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000607# include <strings.h>
608#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000609#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000610# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000611#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000612#ifdef HAVE_STDINT_H
613# include <stdint.h>
614#endif
615#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000616# include <unistd.h>
617#endif"
618
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000619ac_subst_vars='SHELL
Benjamin Petersona8332062009-09-11 22:36:27 +0000620PATH_SEPARATOR
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000621PACKAGE_NAME
622PACKAGE_TARNAME
623PACKAGE_VERSION
624PACKAGE_STRING
625PACKAGE_BUGREPORT
626exec_prefix
627prefix
628program_transform_name
629bindir
630sbindir
631libexecdir
632datarootdir
633datadir
634sysconfdir
635sharedstatedir
636localstatedir
637includedir
638oldincludedir
639docdir
640infodir
641htmldir
642dvidir
643pdfdir
644psdir
645libdir
646localedir
647mandir
648DEFS
649ECHO_C
650ECHO_N
651ECHO_T
652LIBS
653build_alias
654host_alias
655target_alias
656VERSION
657SOVERSION
658CONFIG_ARGS
659UNIVERSALSDK
660ARCH_RUN_32BIT
Benjamin Petersone7e59c22010-03-23 21:05:56 +0000661LIPO_32BIT_FLAGS
662LIPO_64BIT_FLAGS
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000663PYTHONFRAMEWORK
664PYTHONFRAMEWORKIDENTIFIER
665PYTHONFRAMEWORKDIR
666PYTHONFRAMEWORKPREFIX
667PYTHONFRAMEWORKINSTALLDIR
668FRAMEWORKINSTALLFIRST
669FRAMEWORKINSTALLLAST
670FRAMEWORKALTINSTALLFIRST
671FRAMEWORKALTINSTALLLAST
672FRAMEWORKUNIXTOOLSPREFIX
673MACHDEP
674SGI_ABI
675CONFIGURE_MACOSX_DEPLOYMENT_TARGET
676EXPORT_MACOSX_DEPLOYMENT_TARGET
677CC
678CFLAGS
679LDFLAGS
680CPPFLAGS
681ac_ct_CC
682EXEEXT
683OBJEXT
684CXX
685MAINCC
686CPP
687GREP
688EGREP
689BUILDEXEEXT
690LIBRARY
691LDLIBRARY
692DLLLIBRARY
693BLDLIBRARY
694LDLIBRARYDIR
695INSTSONAME
696RUNSHARED
697LINKCC
698GNULD
699RANLIB
700AR
701ARFLAGS
702SVNVERSION
703INSTALL_PROGRAM
704INSTALL_SCRIPT
705INSTALL_DATA
706LN
707OPT
708BASECFLAGS
709UNIVERSAL_ARCH_FLAGS
710OTHER_LIBTOOL_OPT
711LIBTOOL_CRUFT
712SO
713LDSHARED
714BLDSHARED
715CCSHARED
716LINKFORSHARED
717CFLAGSFORSHARED
718SHLIBS
719USE_SIGNAL_MODULE
720SIGNAL_OBJS
721USE_THREAD_MODULE
722LDLAST
723THREADOBJ
724DLINCLDIR
725DYNLOADFILE
726MACHDEP_OBJS
727TRUE
728LIBOBJS
729HAVE_GETHOSTBYNAME_R_6_ARG
730HAVE_GETHOSTBYNAME_R_5_ARG
731HAVE_GETHOSTBYNAME_R_3_ARG
732HAVE_GETHOSTBYNAME_R
733HAVE_GETHOSTBYNAME
734LIBM
735LIBC
736THREADHEADERS
737SRCDIRS
738LTLIBOBJS'
Skip Montanaro6dead952003-09-25 14:50:04 +0000739ac_subst_files=''
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000740 ac_precious_vars='build_alias
741host_alias
742target_alias
743CC
744CFLAGS
745LDFLAGS
746LIBS
747CPPFLAGS
748CPP'
749
Guido van Rossum627b2d71993-12-24 10:39:16 +0000750
Guido van Rossum7f43da71994-08-01 12:15:30 +0000751# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000752ac_init_help=
753ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000754# The variables have the same names as the options, with
755# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000756cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000757exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000758no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000759no_recursion=
760prefix=NONE
761program_prefix=NONE
762program_suffix=NONE
763program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000764silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000765site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000766srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000767verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000768x_includes=NONE
769x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000770
771# Installation directory options.
772# These are left unexpanded so users can "make install exec_prefix=/foo"
773# and all the variables that are supposed to be based on exec_prefix
774# by default will actually change.
775# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000776# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000777bindir='${exec_prefix}/bin'
778sbindir='${exec_prefix}/sbin'
779libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000780datarootdir='${prefix}/share'
781datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000782sysconfdir='${prefix}/etc'
783sharedstatedir='${prefix}/com'
784localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000785includedir='${prefix}/include'
786oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000787docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
788infodir='${datarootdir}/info'
789htmldir='${docdir}'
790dvidir='${docdir}'
791pdfdir='${docdir}'
792psdir='${docdir}'
793libdir='${exec_prefix}/lib'
794localedir='${datarootdir}/locale'
795mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000796
Guido van Rossum7f43da71994-08-01 12:15:30 +0000797ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000798ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000799for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000800do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000801 # If the previous option needs an argument, assign it.
802 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000803 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000804 ac_prev=
805 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000806 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000807
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000808 case $ac_option in
809 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
810 *) ac_optarg=yes ;;
811 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000812
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000813 # Accept the important Cygnus configure options, so we can diagnose typos.
814
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000815 case $ac_dashdash$ac_option in
816 --)
817 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000818
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000819 -bindir | --bindir | --bindi | --bind | --bin | --bi)
820 ac_prev=bindir ;;
821 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000822 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000823
824 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000825 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000826 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000827 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000828
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000829 -cache-file | --cache-file | --cache-fil | --cache-fi \
830 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
831 ac_prev=cache_file ;;
832 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
833 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000834 cache_file=$ac_optarg ;;
835
836 --config-cache | -C)
837 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000838
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000839 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000840 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000841 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000842 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000843
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000844 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
845 | --dataroo | --dataro | --datar)
846 ac_prev=datarootdir ;;
847 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
848 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
849 datarootdir=$ac_optarg ;;
850
Guido van Rossum7f43da71994-08-01 12:15:30 +0000851 -disable-* | --disable-*)
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000852 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000853 # Reject names that are not valid shell variable names.
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000854 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
855 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000856 { (exit 1); exit 1; }; }
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000857 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
858 eval enable_$ac_feature=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000859
860 -docdir | --docdir | --docdi | --doc | --do)
861 ac_prev=docdir ;;
862 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
863 docdir=$ac_optarg ;;
864
865 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
866 ac_prev=dvidir ;;
867 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
868 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000869
870 -enable-* | --enable-*)
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000871 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000872 # Reject names that are not valid shell variable names.
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000873 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
874 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000875 { (exit 1); exit 1; }; }
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000876 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
877 eval enable_$ac_feature=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000878
Guido van Rossum7f43da71994-08-01 12:15:30 +0000879 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
880 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
881 | --exec | --exe | --ex)
882 ac_prev=exec_prefix ;;
883 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
884 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
885 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000886 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000887
888 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000889 # Obsolete; use --with-gas.
890 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000891
Martin v. Löwis11437992002-04-12 09:54:03 +0000892 -help | --help | --hel | --he | -h)
893 ac_init_help=long ;;
894 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
895 ac_init_help=recursive ;;
896 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
897 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000898
899 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000900 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000901 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000902 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000903
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000904 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
905 ac_prev=htmldir ;;
906 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
907 | --ht=*)
908 htmldir=$ac_optarg ;;
909
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000910 -includedir | --includedir | --includedi | --included | --include \
911 | --includ | --inclu | --incl | --inc)
912 ac_prev=includedir ;;
913 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
914 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000915 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000916
917 -infodir | --infodir | --infodi | --infod | --info | --inf)
918 ac_prev=infodir ;;
919 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000920 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000921
922 -libdir | --libdir | --libdi | --libd)
923 ac_prev=libdir ;;
924 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000925 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000926
927 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
928 | --libexe | --libex | --libe)
929 ac_prev=libexecdir ;;
930 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
931 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000932 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000933
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000934 -localedir | --localedir | --localedi | --localed | --locale)
935 ac_prev=localedir ;;
936 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
937 localedir=$ac_optarg ;;
938
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000939 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000940 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000941 ac_prev=localstatedir ;;
942 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000943 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000944 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000945
946 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
947 ac_prev=mandir ;;
948 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000949 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000950
Guido van Rossum7f43da71994-08-01 12:15:30 +0000951 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000952 # Obsolete; use --without-fp.
953 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000954
955 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000956 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000957 no_create=yes ;;
958
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000959 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
960 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
961 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000962
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000963 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
964 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
965 | --oldin | --oldi | --old | --ol | --o)
966 ac_prev=oldincludedir ;;
967 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
968 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
969 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000970 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000971
Guido van Rossum7f43da71994-08-01 12:15:30 +0000972 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
973 ac_prev=prefix ;;
974 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000975 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000976
977 -program-prefix | --program-prefix | --program-prefi | --program-pref \
978 | --program-pre | --program-pr | --program-p)
979 ac_prev=program_prefix ;;
980 -program-prefix=* | --program-prefix=* | --program-prefi=* \
981 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000982 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000983
984 -program-suffix | --program-suffix | --program-suffi | --program-suff \
985 | --program-suf | --program-su | --program-s)
986 ac_prev=program_suffix ;;
987 -program-suffix=* | --program-suffix=* | --program-suffi=* \
988 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000989 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000990
991 -program-transform-name | --program-transform-name \
992 | --program-transform-nam | --program-transform-na \
993 | --program-transform-n | --program-transform- \
994 | --program-transform | --program-transfor \
995 | --program-transfo | --program-transf \
996 | --program-trans | --program-tran \
997 | --progr-tra | --program-tr | --program-t)
998 ac_prev=program_transform_name ;;
999 -program-transform-name=* | --program-transform-name=* \
1000 | --program-transform-nam=* | --program-transform-na=* \
1001 | --program-transform-n=* | --program-transform-=* \
1002 | --program-transform=* | --program-transfor=* \
1003 | --program-transfo=* | --program-transf=* \
1004 | --program-trans=* | --program-tran=* \
1005 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001006 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001007
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001008 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1009 ac_prev=pdfdir ;;
1010 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1011 pdfdir=$ac_optarg ;;
1012
1013 -psdir | --psdir | --psdi | --psd | --ps)
1014 ac_prev=psdir ;;
1015 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1016 psdir=$ac_optarg ;;
1017
Guido van Rossum7f43da71994-08-01 12:15:30 +00001018 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1019 | -silent | --silent | --silen | --sile | --sil)
1020 silent=yes ;;
1021
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001022 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1023 ac_prev=sbindir ;;
1024 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1025 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001026 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001027
1028 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1029 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1030 | --sharedst | --shareds | --shared | --share | --shar \
1031 | --sha | --sh)
1032 ac_prev=sharedstatedir ;;
1033 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1034 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1035 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1036 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001037 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001038
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001039 -site | --site | --sit)
1040 ac_prev=site ;;
1041 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001042 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001043
Guido van Rossum7f43da71994-08-01 12:15:30 +00001044 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1045 ac_prev=srcdir ;;
1046 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001047 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001048
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001049 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1050 | --syscon | --sysco | --sysc | --sys | --sy)
1051 ac_prev=sysconfdir ;;
1052 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1053 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001054 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001055
Guido van Rossum7f43da71994-08-01 12:15:30 +00001056 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001057 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001058 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001059 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001060
1061 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1062 verbose=yes ;;
1063
Martin v. Löwis11437992002-04-12 09:54:03 +00001064 -version | --version | --versio | --versi | --vers | -V)
1065 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001066
1067 -with-* | --with-*)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001068 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001069 # Reject names that are not valid shell variable names.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001070 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1071 { echo "$as_me: error: invalid package name: $ac_package" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001072 { (exit 1); exit 1; }; }
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001073 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1074 eval with_$ac_package=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001075
1076 -without-* | --without-*)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001077 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001078 # Reject names that are not valid shell variable names.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001079 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1080 { echo "$as_me: error: invalid package name: $ac_package" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001081 { (exit 1); exit 1; }; }
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001082 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1083 eval with_$ac_package=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001084
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001085 --x)
1086 # Obsolete; use --with-x.
1087 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001088
1089 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1090 | --x-incl | --x-inc | --x-in | --x-i)
1091 ac_prev=x_includes ;;
1092 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1093 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001094 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001095
1096 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1097 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1098 ac_prev=x_libraries ;;
1099 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1100 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001101 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001102
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001103 -*) { echo "$as_me: error: unrecognized option: $ac_option
Martin v. Löwis11437992002-04-12 09:54:03 +00001104Try \`$0 --help' for more information." >&2
1105 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001106 ;;
1107
Martin v. Löwis11437992002-04-12 09:54:03 +00001108 *=*)
1109 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1110 # Reject names that are not valid shell variable names.
1111 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001112 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001113 { (exit 1); exit 1; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001114 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001115 export $ac_envvar ;;
1116
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001117 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001118 # FIXME: should be removed in autoconf 3.0.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001119 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001120 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001121 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001122 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001123 ;;
1124
1125 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001126done
1127
Guido van Rossum7f43da71994-08-01 12:15:30 +00001128if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001129 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001130 { echo "$as_me: error: missing argument to $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001131 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001132fi
1133
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001134# Be sure to have absolute directory names.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001135for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1136 datadir sysconfdir sharedstatedir localstatedir includedir \
1137 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1138 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001139do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001140 eval ac_val=\$$ac_var
Martin v. Löwis11437992002-04-12 09:54:03 +00001141 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001142 [\\/$]* | ?:[\\/]* ) continue;;
1143 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001144 esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001145 { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001146 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001147done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001148
Martin v. Löwis11437992002-04-12 09:54:03 +00001149# There might be people who depend on the old broken behavior: `$host'
1150# used to hold the argument of --host etc.
1151# FIXME: To remove some day.
1152build=$build_alias
1153host=$host_alias
1154target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001155
Martin v. Löwis11437992002-04-12 09:54:03 +00001156# FIXME: To remove some day.
1157if test "x$host_alias" != x; then
1158 if test "x$build_alias" = x; then
1159 cross_compiling=maybe
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001160 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
Martin v. Löwis11437992002-04-12 09:54:03 +00001161 If a cross compiler is detected then cross compile mode will be used." >&2
1162 elif test "x$build_alias" != "x$host_alias"; then
1163 cross_compiling=yes
1164 fi
1165fi
1166
1167ac_tool_prefix=
1168test -n "$host_alias" && ac_tool_prefix=$host_alias-
1169
1170test "$silent" = yes && exec 6>/dev/null
1171
Guido van Rossum627b2d71993-12-24 10:39:16 +00001172
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001173ac_pwd=`pwd` && test -n "$ac_pwd" &&
1174ac_ls_di=`ls -di .` &&
1175ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001176 { echo "$as_me: error: Working directory cannot be determined" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001177 { (exit 1); exit 1; }; }
1178test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001179 { echo "$as_me: error: pwd does not report name of working directory" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001180 { (exit 1); exit 1; }; }
1181
1182
Guido van Rossum627b2d71993-12-24 10:39:16 +00001183# Find the source files, if location was not specified.
1184if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001185 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001186 # Try the directory containing this script, then the parent directory.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001187 ac_confdir=`$as_dirname -- "$0" ||
1188$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1189 X"$0" : 'X\(//\)[^/]' \| \
1190 X"$0" : 'X\(//\)$' \| \
1191 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
1192echo X"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001193 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1194 s//\1/
1195 q
1196 }
1197 /^X\(\/\/\)[^/].*/{
1198 s//\1/
1199 q
1200 }
1201 /^X\(\/\/\)$/{
1202 s//\1/
1203 q
1204 }
1205 /^X\(\/\).*/{
1206 s//\1/
1207 q
1208 }
1209 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001210 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001211 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001212 srcdir=..
1213 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001214else
1215 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001216fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001217if test ! -r "$srcdir/$ac_unique_file"; then
1218 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001219 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001220 { (exit 1); exit 1; }; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00001221fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001222ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1223ac_abs_confdir=`(
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001224 cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001225 { (exit 1); exit 1; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001226 pwd)`
1227# When building in place, set srcdir=.
1228if test "$ac_abs_confdir" = "$ac_pwd"; then
1229 srcdir=.
1230fi
1231# Remove unnecessary trailing slashes from srcdir.
1232# Double slashes in file names in object file debugging info
1233# mess up M-x gdb in Emacs.
1234case $srcdir in
1235*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1236esac
1237for ac_var in $ac_precious_vars; do
1238 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1239 eval ac_env_${ac_var}_value=\$${ac_var}
1240 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1241 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1242done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001243
Martin v. Löwis11437992002-04-12 09:54:03 +00001244#
1245# Report the --help message.
1246#
1247if test "$ac_init_help" = "long"; then
1248 # Omit some internal or obsolete options to make the list less imposing.
1249 # This message is too long to be a string in the A/UX 3.1 sh.
1250 cat <<_ACEOF
Christian Heimes70e5cab2008-12-03 18:18:23 +00001251\`configure' configures python 3.1 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001252
1253Usage: $0 [OPTION]... [VAR=VALUE]...
1254
1255To assign environment variables (e.g., CC, CFLAGS...), specify them as
1256VAR=VALUE. See below for descriptions of some of the useful variables.
1257
1258Defaults for the options are specified in brackets.
1259
1260Configuration:
1261 -h, --help display this help and exit
1262 --help=short display options specific to this package
1263 --help=recursive display the short help of all the included packages
1264 -V, --version display version information and exit
1265 -q, --quiet, --silent do not print \`checking...' messages
1266 --cache-file=FILE cache test results in FILE [disabled]
1267 -C, --config-cache alias for \`--cache-file=config.cache'
1268 -n, --no-create do not create output files
1269 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1270
Martin v. Löwis11437992002-04-12 09:54:03 +00001271Installation directories:
1272 --prefix=PREFIX install architecture-independent files in PREFIX
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001273 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001274 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001275 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001276
1277By default, \`make install' will install all the files in
1278\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1279an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1280for instance \`--prefix=\$HOME'.
1281
1282For better control, use the options below.
1283
1284Fine tuning of the installation directories:
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001285 --bindir=DIR user executables [EPREFIX/bin]
1286 --sbindir=DIR system admin executables [EPREFIX/sbin]
1287 --libexecdir=DIR program executables [EPREFIX/libexec]
1288 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1289 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1290 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1291 --libdir=DIR object code libraries [EPREFIX/lib]
1292 --includedir=DIR C header files [PREFIX/include]
1293 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1294 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1295 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1296 --infodir=DIR info documentation [DATAROOTDIR/info]
1297 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1298 --mandir=DIR man documentation [DATAROOTDIR/man]
1299 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1300 --htmldir=DIR html documentation [DOCDIR]
1301 --dvidir=DIR dvi documentation [DOCDIR]
1302 --pdfdir=DIR pdf documentation [DOCDIR]
1303 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001304_ACEOF
1305
1306 cat <<\_ACEOF
1307_ACEOF
1308fi
1309
1310if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001311 case $ac_init_help in
Christian Heimes70e5cab2008-12-03 18:18:23 +00001312 short | recursive ) echo "Configuration of python 3.1:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001313 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001314 cat <<\_ACEOF
1315
1316Optional Features:
1317 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1318 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001319 --enable-universalsdk[=SDKDIR]
Christian Heimes292d3512008-02-03 16:51:08 +00001320 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001321 --enable-framework[=INSTALLDIR]
1322 Build (MacOSX|Darwin) framework
1323 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001324 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001325 --enable-ipv6 Enable ipv6 (with ipv4) support
1326 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001327 --enable-big-digits[=BITS]
1328 use big digits for Python longs [BITS=30]
Martin v. Löwis11437992002-04-12 09:54:03 +00001329
1330Optional Packages:
1331 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1332 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001333 --with-universal-archs=ARCH
1334 select architectures for universal build ("32-bit",
Ronald Oussoren856624d2009-09-08 07:13:53 +00001335 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001336 --with-framework-name=FRAMEWORK
1337 specify an alternate name of the framework built
1338 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001339 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001340 --with-cxx-main=<compiler>
1341 compile main() and link python executable with C++
1342 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001343 --with-suffix=.exe set executable suffix
1344 --with-pydebug build with Py_DEBUG defined
1345 --with-libs='lib1 ...' link against additional libs
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001346 --with-system-ffi build _ctypes module using an installed ffi library
Matthias Klose55708cc2009-04-30 08:06:49 +00001347 --with-dbmliborder=db1:db2:...
1348 order to check db backends for dbm. Valid value is a
1349 colon separated string with the backend names
1350 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001351 --with-signal-module disable/enable signal module
1352 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1353 --with(out)-threads[=DIRECTORY]
1354 disable/enable thread support
1355 --with(out)-thread[=DIRECTORY]
1356 deprecated; use --with(out)-threads
1357 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001358 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001359 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001360 --with(out)-pymalloc disable/enable specialized mallocs
1361 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001362 --with-fpectl enable SIGFPE catching
1363 --with-libm=STRING math library
1364 --with-libc=STRING C library
Georg Brandl52d168a2008-01-07 18:10:24 +00001365 --with-wide-unicode Use 4-byte Unicode characters (default is 2 bytes)
Antoine Pitroub52ec782009-01-25 16:34:23 +00001366 --with-computed-gotos Use computed gotos / threaded dispatch in evaluation
1367 loop (not available on all compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001368
1369Some influential environment variables:
1370 CC C compiler command
1371 CFLAGS C compiler flags
1372 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1373 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001374 LIBS libraries to pass to the linker, e.g. -l<library>
1375 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1376 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001377 CPP C preprocessor
1378
1379Use these variables to override the choices made by `configure' or to help
1380it to find libraries and programs with nonstandard names/locations.
1381
Georg Brandle2e15612009-05-20 18:25:10 +00001382Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001383_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001384ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001385fi
1386
1387if test "$ac_init_help" = "recursive"; then
1388 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001389 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001390 test -d "$ac_dir" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001391 ac_builddir=.
1392
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001393case "$ac_dir" in
1394.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1395*)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001396 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001397 # A ".." for each directory in $ac_dir_suffix.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001398 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001399 case $ac_top_builddir_sub in
1400 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1401 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1402 esac ;;
1403esac
1404ac_abs_top_builddir=$ac_pwd
1405ac_abs_builddir=$ac_pwd$ac_dir_suffix
1406# for backward compatibility:
1407ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001408
1409case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001410 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001411 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001412 ac_top_srcdir=$ac_top_builddir_sub
1413 ac_abs_top_srcdir=$ac_pwd ;;
1414 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001415 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001416 ac_top_srcdir=$srcdir
1417 ac_abs_top_srcdir=$srcdir ;;
1418 *) # Relative name.
1419 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1420 ac_top_srcdir=$ac_top_build_prefix$srcdir
1421 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001422esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001423ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001424
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001425 cd "$ac_dir" || { ac_status=$?; continue; }
1426 # Check for guested configure.
1427 if test -f "$ac_srcdir/configure.gnu"; then
1428 echo &&
1429 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1430 elif test -f "$ac_srcdir/configure"; then
1431 echo &&
1432 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001433 else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001434 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001435 fi || ac_status=$?
1436 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001437 done
1438fi
1439
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001440test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001441if $ac_init_version; then
1442 cat <<\_ACEOF
Christian Heimes70e5cab2008-12-03 18:18:23 +00001443python configure 3.1
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001444generated by GNU Autoconf 2.61
Martin v. Löwis11437992002-04-12 09:54:03 +00001445
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001446Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014472002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001448This configure script is free software; the Free Software Foundation
1449gives unlimited permission to copy, distribute and modify it.
1450_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001451 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001452fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001453cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00001454This file contains any messages produced by compilers while
1455running configure, to aid debugging if configure makes a mistake.
1456
Christian Heimes70e5cab2008-12-03 18:18:23 +00001457It was created by python $as_me 3.1, which was
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001458generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00001459
1460 $ $0 $@
1461
1462_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001463exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00001464{
1465cat <<_ASUNAME
1466## --------- ##
1467## Platform. ##
1468## --------- ##
1469
1470hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1471uname -m = `(uname -m) 2>/dev/null || echo unknown`
1472uname -r = `(uname -r) 2>/dev/null || echo unknown`
1473uname -s = `(uname -s) 2>/dev/null || echo unknown`
1474uname -v = `(uname -v) 2>/dev/null || echo unknown`
1475
1476/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1477/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1478
1479/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1480/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1481/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001482/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00001483/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1484/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1485/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1486
1487_ASUNAME
1488
1489as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1490for as_dir in $PATH
1491do
1492 IFS=$as_save_IFS
1493 test -z "$as_dir" && as_dir=.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001494 echo "PATH: $as_dir"
Martin v. Löwis11437992002-04-12 09:54:03 +00001495done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001496IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00001497
1498} >&5
1499
1500cat >&5 <<_ACEOF
1501
1502
1503## ----------- ##
1504## Core tests. ##
1505## ----------- ##
1506
1507_ACEOF
1508
1509
1510# Keep a trace of the command line.
1511# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001512# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001513# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001514# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001515ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001516ac_configure_args0=
1517ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00001518ac_must_keep_next=false
1519for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001520do
Skip Montanaro6dead952003-09-25 14:50:04 +00001521 for ac_arg
1522 do
1523 case $ac_arg in
1524 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1525 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1526 | -silent | --silent | --silen | --sile | --sil)
1527 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001528 *\'*)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001529 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00001530 esac
1531 case $ac_pass in
1532 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1533 2)
1534 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1535 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001536 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00001537 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00001538 case $ac_arg in
1539 *=* | --config-cache | -C | -disable-* | --disable-* \
1540 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1541 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1542 | -with-* | --with-* | -without-* | --without-* | --x)
1543 case "$ac_configure_args0 " in
1544 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1545 esac
1546 ;;
1547 -* ) ac_must_keep_next=true ;;
1548 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00001549 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001550 ac_configure_args="$ac_configure_args '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00001551 ;;
1552 esac
1553 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001554done
Skip Montanaro6dead952003-09-25 14:50:04 +00001555$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1556$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001557
1558# When interrupted or exit'd, cleanup temporary files, and complete
1559# config.log. We remove comments because anyway the quotes in there
1560# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001561# WARNING: Use '\'' to represent an apostrophe within the trap.
1562# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
Martin v. Löwis11437992002-04-12 09:54:03 +00001563trap 'exit_status=$?
1564 # Save into config.log some information that might help in debugging.
1565 {
1566 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001567
Martin v. Löwis11437992002-04-12 09:54:03 +00001568 cat <<\_ASBOX
1569## ---------------- ##
1570## Cache variables. ##
1571## ---------------- ##
1572_ASBOX
1573 echo
1574 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001575(
1576 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1577 eval ac_val=\$$ac_var
1578 case $ac_val in #(
1579 *${as_nl}*)
1580 case $ac_var in #(
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001581 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1582echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001583 esac
1584 case $ac_var in #(
1585 _ | IFS | as_nl) ;; #(
1586 *) $as_unset $ac_var ;;
1587 esac ;;
1588 esac
1589 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001590 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001591 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1592 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001593 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001594 "s/'\''/'\''\\\\'\'''\''/g;
1595 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1596 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001597 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001598 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001599 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001600 esac |
1601 sort
1602)
Martin v. Löwis11437992002-04-12 09:54:03 +00001603 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001604
1605 cat <<\_ASBOX
1606## ----------------- ##
1607## Output variables. ##
1608## ----------------- ##
1609_ASBOX
1610 echo
1611 for ac_var in $ac_subst_vars
1612 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001613 eval ac_val=\$$ac_var
1614 case $ac_val in
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001615 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001616 esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001617 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001618 done | sort
1619 echo
1620
1621 if test -n "$ac_subst_files"; then
1622 cat <<\_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001623## ------------------- ##
1624## File substitutions. ##
1625## ------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00001626_ASBOX
1627 echo
1628 for ac_var in $ac_subst_files
1629 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001630 eval ac_val=\$$ac_var
1631 case $ac_val in
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001632 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001633 esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001634 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001635 done | sort
1636 echo
1637 fi
1638
Martin v. Löwis11437992002-04-12 09:54:03 +00001639 if test -s confdefs.h; then
1640 cat <<\_ASBOX
1641## ----------- ##
1642## confdefs.h. ##
1643## ----------- ##
1644_ASBOX
1645 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001646 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001647 echo
1648 fi
1649 test "$ac_signal" != 0 &&
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001650 echo "$as_me: caught signal $ac_signal"
1651 echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00001652 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001653 rm -f core *.core core.conftest.* &&
1654 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001655 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001656' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00001657for ac_signal in 1 2 13 15; do
1658 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1659done
1660ac_signal=0
1661
1662# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001663rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001664
1665# Predefined preprocessor variables.
1666
1667cat >>confdefs.h <<_ACEOF
1668#define PACKAGE_NAME "$PACKAGE_NAME"
1669_ACEOF
1670
1671
1672cat >>confdefs.h <<_ACEOF
1673#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1674_ACEOF
1675
1676
1677cat >>confdefs.h <<_ACEOF
1678#define PACKAGE_VERSION "$PACKAGE_VERSION"
1679_ACEOF
1680
1681
1682cat >>confdefs.h <<_ACEOF
1683#define PACKAGE_STRING "$PACKAGE_STRING"
1684_ACEOF
1685
1686
1687cat >>confdefs.h <<_ACEOF
1688#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1689_ACEOF
1690
1691
1692# Let the site file select an alternate cache file if it wants to.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001693# Prefer explicitly selected file to automatically selected ones.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001694if test -n "$CONFIG_SITE"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001695 set x "$CONFIG_SITE"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001696elif test "x$prefix" != xNONE; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001697 set x "$prefix/share/config.site" "$prefix/etc/config.site"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001698else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001699 set x "$ac_default_prefix/share/config.site" \
1700 "$ac_default_prefix/etc/config.site"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001701fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001702shift
1703for ac_site_file
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001704do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001705 if test -r "$ac_site_file"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001706 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1707echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001708 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001709 . "$ac_site_file"
1710 fi
1711done
1712
1713if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001714 # Some versions of bash will fail to source /dev/null (special
1715 # files actually), so we avoid doing that.
1716 if test -f "$cache_file"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001717 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1718echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001719 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001720 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1721 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00001722 esac
1723 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001724else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001725 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1726echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001727 >$cache_file
1728fi
1729
1730# Check that the precious variables saved in the cache have kept the same
1731# value.
1732ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001733for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001734 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1735 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001736 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1737 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00001738 case $ac_old_set,$ac_new_set in
1739 set,)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001740 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1741echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001742 ac_cache_corrupted=: ;;
1743 ,set)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001744 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1745echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001746 ac_cache_corrupted=: ;;
1747 ,);;
1748 *)
1749 if test "x$ac_old_val" != "x$ac_new_val"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001750 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1751echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1752 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1753echo "$as_me: former value: $ac_old_val" >&2;}
1754 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1755echo "$as_me: current value: $ac_new_val" >&2;}
1756 ac_cache_corrupted=:
Martin v. Löwis11437992002-04-12 09:54:03 +00001757 fi;;
1758 esac
1759 # Pass precious variables to config.status.
1760 if test "$ac_new_set" = set; then
1761 case $ac_new_val in
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001762 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001763 *) ac_arg=$ac_var=$ac_new_val ;;
1764 esac
1765 case " $ac_configure_args " in
1766 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1767 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1768 esac
1769 fi
1770done
1771if $ac_cache_corrupted; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001772 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1773echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1774 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1775echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001776 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001777fi
1778
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
Guido van Rossum7f43da71994-08-01 12:15:30 +00001803ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001804ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001805ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1806ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1807ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001808
Guido van Rossum627b2d71993-12-24 10:39:16 +00001809
Michael W. Hudson54241132001-12-07 15:38:26 +00001810
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001811ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001812
1813
Martin v. Löwis11437992002-04-12 09:54:03 +00001814
Benjamin Petersond23f8222009-04-05 19:13:16 +00001815if test "$prefix" != "/"; then
1816 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
1817fi
1818
1819
Martin v. Löwis11437992002-04-12 09:54:03 +00001820
1821
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001822
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001823
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001824# We don't use PACKAGE_ variables, and they cause conflicts
1825# with other autoconf-based packages that include Python.h
1826grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1827rm confdefs.h
1828mv confdefs.h.new confdefs.h
1829
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001830
Christian Heimes70e5cab2008-12-03 18:18:23 +00001831VERSION=3.1
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001832
Martin v. Löwis1142de32002-03-29 16:28:31 +00001833
1834SOVERSION=1.0
1835
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001836# The later defininition of _XOPEN_SOURCE disables certain features
1837# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1838
1839cat >>confdefs.h <<\_ACEOF
1840#define _GNU_SOURCE 1
1841_ACEOF
1842
1843
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001844# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1845# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1846# them.
1847
1848cat >>confdefs.h <<\_ACEOF
1849#define _NETBSD_SOURCE 1
1850_ACEOF
1851
1852
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001853# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1854# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1855# them.
1856
1857cat >>confdefs.h <<\_ACEOF
1858#define __BSD_VISIBLE 1
1859_ACEOF
1860
1861
Martin v. Löwisd6320502004-08-12 13:45:08 +00001862# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1863# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
1864
1865cat >>confdefs.h <<\_ACEOF
1866#define _BSD_TYPES 1
1867_ACEOF
1868
1869
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001870# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1871# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
1872# them.
1873
1874cat >>confdefs.h <<\_ACEOF
1875#define _DARWIN_C_SOURCE 1
1876_ACEOF
1877
1878
1879
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001880define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001881
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001882# Arguments passed to configure.
1883
1884CONFIG_ARGS="$ac_configure_args"
1885
Ronald Oussorend5736812010-02-07 12:04:41 +00001886{ echo "$as_me:$LINENO: checking for --enable-universalsdk" >&5
1887echo $ECHO_N "checking for --enable-universalsdk... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001888# Check whether --enable-universalsdk was given.
Thomas Wouters477c8d52006-05-27 19:21:47 +00001889if test "${enable_universalsdk+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001890 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00001891 case $enableval in
1892 yes)
1893 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussorend5736812010-02-07 12:04:41 +00001894 if test ! -d "${enableval}"
1895 then
1896 enableval=/
1897 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00001898 ;;
1899 esac
1900 case $enableval in
1901 no)
1902 UNIVERSALSDK=
1903 enable_universalsdk=
1904 ;;
1905 *)
1906 UNIVERSALSDK=$enableval
Ronald Oussorend5736812010-02-07 12:04:41 +00001907 if test ! -d "${UNIVERSALSDK}"
1908 then
1909 { { echo "$as_me:$LINENO: error: --enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" >&5
1910echo "$as_me: error: --enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" >&2;}
1911 { (exit 1); exit 1; }; }
1912 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00001913 ;;
1914 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001915
Ronald Oussorend5736812010-02-07 12:04:41 +00001916
Thomas Wouters477c8d52006-05-27 19:21:47 +00001917else
1918
1919 UNIVERSALSDK=
1920 enable_universalsdk=
1921
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001922fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00001923
Ronald Oussorend5736812010-02-07 12:04:41 +00001924if test -n "${UNIVERSALSDK}"
1925then
1926 { echo "$as_me:$LINENO: result: ${UNIVERSALSDK}" >&5
1927echo "${ECHO_T}${UNIVERSALSDK}" >&6; }
1928else
1929 { echo "$as_me:$LINENO: result: no" >&5
1930echo "${ECHO_T}no" >&6; }
1931fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00001932
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001933
Benjamin Peterson6794aa32008-07-16 20:33:37 +00001934
1935
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001936UNIVERSAL_ARCHS="32-bit"
Benjamin Petersone7e59c22010-03-23 21:05:56 +00001937
1938
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001939{ echo "$as_me:$LINENO: checking for --with-universal-archs" >&5
1940echo $ECHO_N "checking for --with-universal-archs... $ECHO_C" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001941
1942# Check whether --with-universal-archs was given.
1943if test "${with_universal_archs+set}" = set; then
1944 withval=$with_universal_archs;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001945 { echo "$as_me:$LINENO: result: $withval" >&5
1946echo "${ECHO_T}$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001947 UNIVERSAL_ARCHS="$withval"
1948
1949else
1950
Ronald Oussoren5644eb72009-09-20 20:10:02 +00001951 { echo "$as_me:$LINENO: result: 32-bit" >&5
1952echo "${ECHO_T}32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001953
1954fi
1955
1956
1957
1958
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001959
1960# Check whether --with-framework-name was given.
1961if test "${with_framework_name+set}" = set; then
1962 withval=$with_framework_name;
1963 PYTHONFRAMEWORK=${withval}
1964 PYTHONFRAMEWORKDIR=${withval}.framework
1965 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
1966
1967else
1968
1969 PYTHONFRAMEWORK=Python
1970 PYTHONFRAMEWORKDIR=Python.framework
1971 PYTHONFRAMEWORKIDENTIFIER=org.python.python
1972
1973fi
1974
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001975# Check whether --enable-framework was given.
Thomas Wouters477c8d52006-05-27 19:21:47 +00001976if test "${enable_framework+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001977 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00001978 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001979 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001980 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001981 esac
1982 case $enableval in
1983 no)
1984 PYTHONFRAMEWORK=
1985 PYTHONFRAMEWORKDIR=no-framework
1986 PYTHONFRAMEWORKPREFIX=
1987 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00001988 FRAMEWORKINSTALLFIRST=
1989 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00001990 FRAMEWORKALTINSTALLFIRST=
1991 FRAMEWORKALTINSTALLLAST=
1992 if test "x${prefix}" = "xNONE"; then
1993 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1994 else
1995 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1996 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001997 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001998 ;;
1999 *)
2000 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00002001 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00002002 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00002003 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Benjamin Petersone7e59c22010-03-23 21:05:56 +00002004 case "${UNIVERSAL_ARCHS}" in
2005 all|3-way|intel)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002006 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkinstallunixtools4way"
Ronald Oussorene3918352009-03-30 18:00:28 +00002007 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkaltinstallunixtools4way"
Benjamin Petersone7e59c22010-03-23 21:05:56 +00002008 ;;
2009 *)
Ronald Oussorene3918352009-03-30 18:00:28 +00002010 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002011 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Benjamin Petersone7e59c22010-03-23 21:05:56 +00002012 ;;
2013 esac
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002014
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002015 if test "x${prefix}" = "xNONE" ; then
2016 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2017 else
2018 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2019 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002020 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00002021
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002022 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00002023 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002024 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002025
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002026 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002027
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002028 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2029
2030 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2031
Jack Jansene578a632001-08-15 01:27:14 +00002032 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002033
Guido van Rossum563e7081996-09-10 18:20:48 +00002034else
Martin v. Löwis11437992002-04-12 09:54:03 +00002035
Jack Jansene578a632001-08-15 01:27:14 +00002036 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002037 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002038 PYTHONFRAMEWORKPREFIX=
2039 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002040 FRAMEWORKINSTALLFIRST=
2041 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002042 FRAMEWORKALTINSTALLFIRST=
2043 FRAMEWORKALTINSTALLLAST=
2044 if test "x${prefix}" = "xNONE" ; then
2045 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2046 else
2047 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2048 fi
Jack Jansene578a632001-08-15 01:27:14 +00002049 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002050
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002051 if test "$UNIVERSAL_ARCHS" = "all"
2052 then
2053 FRAMEWORKINSTALLLAST=update4wayuniversal
2054 FRAMEWORKALTINSTALLLAST=update4wayuniversal
2055 fi
2056
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002057fi
2058
Thomas Wouters477c8d52006-05-27 19:21:47 +00002059
2060
Michael W. Hudson54241132001-12-07 15:38:26 +00002061
2062
2063
2064
Jack Jansene578a632001-08-15 01:27:14 +00002065
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002066
2067
2068
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002069
Jack Jansene578a632001-08-15 01:27:14 +00002070##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00002071## AC_HELP_STRING(--with-dyld,
2072## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00002073##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002074# Set name for machine-dependent library files
2075
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002076{ echo "$as_me:$LINENO: checking MACHDEP" >&5
2077echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002078if test -z "$MACHDEP"
2079then
Guido van Rossum563e7081996-09-10 18:20:48 +00002080 ac_sys_system=`uname -s`
Benjamin Petersona8332062009-09-11 22:36:27 +00002081 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002082 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002083 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002084 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002085 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002086 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002087 ac_md_system=`echo $ac_sys_system |
2088 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2089 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002090 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002091 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002092
Guido van Rossum07397971997-04-29 21:49:50 +00002093 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002094 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002095 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00002096 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002097 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002098 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002099 esac
2100fi
Guido van Rossum91922671997-10-09 20:24:13 +00002101
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002102# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2103# disable features if it is defined, without any means to access these
2104# features as extensions. For these systems, we skip the definition of
2105# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2106# some feature, make sure there is no alternative way to access this
2107# feature. Also, when using wildcards, make sure you have verified the
2108# need for not defining _XOPEN_SOURCE on all systems matching the
2109# wildcard, and that the wildcard does not include future systems
2110# (which may remove their limitations).
2111case $ac_sys_system/$ac_sys_release in
2112 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2113 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002114 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis4d0a20a2010-02-15 21:46:27 +00002115 # In addition, Stefan Krah confirms that issue #1244610 exists through
2116 # OpenBSD 4.6, but is fixed in 4.7.
2117 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00002118 define_xopen_source=no
2119 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2120 # also defined. This can be overridden by defining _BSD_SOURCE
2121 # As this has a different meaning on Linux, only define it on OpenBSD
2122
2123cat >>confdefs.h <<\_ACEOF
2124#define _BSD_SOURCE 1
2125_ACEOF
2126
2127 ;;
Martin v. Löwis4d0a20a2010-02-15 21:46:27 +00002128 OpenBSD/4.[789])
Martin v. Löwisf6594222010-02-15 08:37:47 +00002129 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2130 # also defined. This can be overridden by defining _BSD_SOURCE
2131 # As this has a different meaning on Linux, only define it on OpenBSD
2132
2133cat >>confdefs.h <<\_ACEOF
2134#define _BSD_SOURCE 1
2135_ACEOF
2136
2137 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00002138 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
2139 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
2140 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00002141 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6[A-S])
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002142 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00002143 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
2144 # of union __?sigval. Reported by Stuart Bishop.
2145 SunOS/5.6)
2146 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002147 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
2148 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00002149 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00002150 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002151 define_xopen_source=no;;
2152 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002153 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002154 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002155 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00002156 # On FreeBSD 4, the math functions C89 does not cover are never defined
2157 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
2158 FreeBSD/4.*)
2159 define_xopen_source=no;;
2160 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
2161 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
2162 # identifies itself as Darwin/7.*
2163 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2164 # disables platform specific features beyond repair.
2165 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2166 # has no effect, don't bother defining them
2167 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00002168 define_xopen_source=no;;
Ronald Oussorend4be7a22010-03-09 06:41:58 +00002169 Darwin/1[0-9].*)
Ronald Oussoren095d2822010-03-08 07:03:14 +00002170 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002171 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
2172 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
2173 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00002174 AIX/4)
2175 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002176 AIX/5)
2177 if test `uname -r` -eq 1; then
2178 define_xopen_source=no
2179 fi
2180 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00002181 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
2182 # defining NI_NUMERICHOST.
2183 QNX/6.3.2)
2184 define_xopen_source=no
2185 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002186
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002187esac
2188
2189if test $define_xopen_source = yes
2190then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002191 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
2192 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00002193 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
2194 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00002195 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00002196 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00002197
2198cat >>confdefs.h <<\_ACEOF
2199#define _XOPEN_SOURCE 500
2200_ACEOF
2201
2202 ;;
2203 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002204
2205cat >>confdefs.h <<\_ACEOF
2206#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002207_ACEOF
2208
Skip Montanarof0d5f792004-08-15 14:08:23 +00002209 ;;
2210 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002211
2212 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
2213 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
2214 # several APIs are not declared. Since this is also needed in some
2215 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00002216 # except for Solaris 10, where it must not be defined,
2217 # as it implies XPG4.2
2218 case $ac_sys_system/$ac_sys_release in
2219 SunOS/5.10)
2220 ;;
2221 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002222
2223cat >>confdefs.h <<\_ACEOF
2224#define _XOPEN_SOURCE_EXTENDED 1
2225_ACEOF
2226
Martin v. Löwis7dece662005-11-26 11:38:24 +00002227 ;;
2228 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002229
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002230
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002231cat >>confdefs.h <<\_ACEOF
2232#define _POSIX_C_SOURCE 200112L
2233_ACEOF
2234
2235
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002236fi
2237
Guido van Rossum91922671997-10-09 20:24:13 +00002238#
2239# SGI compilers allow the specification of the both the ABI and the
2240# ISA on the command line. Depending on the values of these switches,
2241# different and often incompatable code will be generated.
2242#
2243# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
2244# thus supply support for various ABI/ISA combinations. The MACHDEP
2245# variable is also adjusted.
2246#
2247
2248if test ! -z "$SGI_ABI"
2249then
2250 CC="cc $SGI_ABI"
2251 LDFLAGS="$SGI_ABI $LDFLAGS"
2252 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
2253fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002254{ echo "$as_me:$LINENO: result: $MACHDEP" >&5
2255echo "${ECHO_T}$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002256
Jack Jansen6b08a402004-06-03 12:41:45 +00002257# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
2258# it may influence the way we can build extensions, so distutils
2259# needs to check it
2260
Thomas Wouters477c8d52006-05-27 19:21:47 +00002261
Jack Jansen6b08a402004-06-03 12:41:45 +00002262CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002263EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00002264
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002265{ echo "$as_me:$LINENO: checking machine type as reported by uname -m" >&5
2266echo $ECHO_N "checking machine type as reported by uname -m... $ECHO_C" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00002267ac_sys_machine=`uname -m`
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002268{ echo "$as_me:$LINENO: result: $ac_sys_machine" >&5
2269echo "${ECHO_T}$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00002270
Guido van Rossum627b2d71993-12-24 10:39:16 +00002271# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00002272
2273# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
2274# for debug/optimization stuff. BASECFLAGS is for flags that are required
2275# just to get things to compile and link. Users are free to override OPT
2276# when running configure or make. The build should not break if they do.
2277# BASECFLAGS should generally not be messed with, however.
2278
2279# XXX shouldn't some/most/all of this code be merged with the stuff later
2280# on that fiddles with OPT and BASECFLAGS?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002281{ echo "$as_me:$LINENO: checking for --without-gcc" >&5
2282echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002283
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002284# Check whether --with-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002285if test "${with_gcc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002286 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002287 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00002288 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00002289 without_gcc=yes;;
2290 yes) CC=gcc
2291 without_gcc=no;;
2292 *) CC=$withval
2293 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002294 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00002295else
Martin v. Löwis11437992002-04-12 09:54:03 +00002296
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002297 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002298 AIX*) CC=cc_r
2299 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00002300 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00002301 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002302fi
2303
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002304{ echo "$as_me:$LINENO: result: $without_gcc" >&5
2305echo "${ECHO_T}$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002306
Guido van Rossum8b131c51995-03-09 14:10:13 +00002307# If the user switches compilers, we can't believe the cache
2308if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
2309then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002310 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002311(it is also a good idea to do 'make clean' before compiling)" >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002312echo "$as_me: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002313(it is also a good idea to do 'make clean' before compiling)" >&2;}
2314 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00002315fi
2316
Martin v. Löwis11437992002-04-12 09:54:03 +00002317ac_ext=c
2318ac_cpp='$CPP $CPPFLAGS'
2319ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2320ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2321ac_compiler_gnu=$ac_cv_c_compiler_gnu
2322if test -n "$ac_tool_prefix"; then
2323 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2324set dummy ${ac_tool_prefix}gcc; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002325{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2326echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002327if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002328 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002329else
2330 if test -n "$CC"; then
2331 ac_cv_prog_CC="$CC" # Let the user override the test.
2332else
Martin v. Löwis11437992002-04-12 09:54:03 +00002333as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2334for as_dir in $PATH
2335do
2336 IFS=$as_save_IFS
2337 test -z "$as_dir" && as_dir=.
2338 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002339 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002340 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002341 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002342 break 2
2343 fi
2344done
2345done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002346IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002347
Jack Jansendd19cf82001-12-06 22:36:17 +00002348fi
2349fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002350CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00002351if test -n "$CC"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002352 { echo "$as_me:$LINENO: result: $CC" >&5
2353echo "${ECHO_T}$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002354else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002355 { echo "$as_me:$LINENO: result: no" >&5
2356echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002357fi
2358
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002359
Martin v. Löwis11437992002-04-12 09:54:03 +00002360fi
2361if test -z "$ac_cv_prog_CC"; then
2362 ac_ct_CC=$CC
2363 # Extract the first word of "gcc", so it can be a program name with args.
2364set dummy gcc; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002365{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2366echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002367if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002368 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002369else
2370 if test -n "$ac_ct_CC"; then
2371 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2372else
2373as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2374for as_dir in $PATH
2375do
2376 IFS=$as_save_IFS
2377 test -z "$as_dir" && as_dir=.
2378 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002379 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002380 ac_cv_prog_ac_ct_CC="gcc"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002381 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002382 break 2
2383 fi
2384done
2385done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002386IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002387
2388fi
2389fi
2390ac_ct_CC=$ac_cv_prog_ac_ct_CC
2391if test -n "$ac_ct_CC"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002392 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2393echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002394else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002395 { echo "$as_me:$LINENO: result: no" >&5
2396echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002397fi
2398
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002399 if test "x$ac_ct_CC" = x; then
2400 CC=""
2401 else
2402 case $cross_compiling:$ac_tool_warned in
2403yes:)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002404{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2405whose name does not start with the host triplet. If you think this
2406configuration is useful to you, please write to autoconf@gnu.org." >&5
2407echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2408whose name does not start with the host triplet. If you think this
2409configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002410ac_tool_warned=yes ;;
2411esac
2412 CC=$ac_ct_CC
2413 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002414else
2415 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002416fi
2417
Jack Jansendd19cf82001-12-06 22:36:17 +00002418if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002419 if test -n "$ac_tool_prefix"; then
2420 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
Martin v. Löwis11437992002-04-12 09:54:03 +00002421set dummy ${ac_tool_prefix}cc; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002422{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2423echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002424if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002425 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002426else
2427 if test -n "$CC"; then
2428 ac_cv_prog_CC="$CC" # Let the user override the test.
2429else
Martin v. Löwis11437992002-04-12 09:54:03 +00002430as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2431for as_dir in $PATH
2432do
2433 IFS=$as_save_IFS
2434 test -z "$as_dir" && as_dir=.
2435 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002436 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002437 ac_cv_prog_CC="${ac_tool_prefix}cc"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002438 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002439 break 2
2440 fi
2441done
2442done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002443IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002444
2445fi
2446fi
2447CC=$ac_cv_prog_CC
2448if test -n "$CC"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002449 { echo "$as_me:$LINENO: result: $CC" >&5
2450echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002451else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002452 { echo "$as_me:$LINENO: result: no" >&5
2453echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002454fi
2455
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002456
Martin v. Löwis11437992002-04-12 09:54:03 +00002457 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002458fi
2459if test -z "$CC"; then
2460 # Extract the first word of "cc", so it can be a program name with args.
2461set dummy cc; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002462{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2463echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002464if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002465 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002466else
2467 if test -n "$CC"; then
2468 ac_cv_prog_CC="$CC" # Let the user override the test.
2469else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002470 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002471as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2472for as_dir in $PATH
2473do
2474 IFS=$as_save_IFS
2475 test -z "$as_dir" && as_dir=.
2476 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002477 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002478 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2479 ac_prog_rejected=yes
2480 continue
2481 fi
2482 ac_cv_prog_CC="cc"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002483 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002484 break 2
2485 fi
2486done
2487done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002488IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002489
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002490if test $ac_prog_rejected = yes; then
2491 # We found a bogon in the path, so make sure we never use it.
2492 set dummy $ac_cv_prog_CC
2493 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002494 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002495 # We chose a different compiler from the bogus one.
2496 # However, it has the same basename, so the bogon will be chosen
2497 # first if we set CC to just the basename; use the full file name.
2498 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002499 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002500 fi
2501fi
2502fi
2503fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002504CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002505if test -n "$CC"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002506 { echo "$as_me:$LINENO: result: $CC" >&5
2507echo "${ECHO_T}$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002508else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002509 { echo "$as_me:$LINENO: result: no" >&5
2510echo "${ECHO_T}no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002511fi
2512
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002513
Martin v. Löwis11437992002-04-12 09:54:03 +00002514fi
2515if test -z "$CC"; then
2516 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002517 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002518 do
2519 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2520set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002521{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2522echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002523if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002524 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002525else
2526 if test -n "$CC"; then
2527 ac_cv_prog_CC="$CC" # Let the user override the test.
2528else
Martin v. Löwis11437992002-04-12 09:54:03 +00002529as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2530for as_dir in $PATH
2531do
2532 IFS=$as_save_IFS
2533 test -z "$as_dir" && as_dir=.
2534 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002535 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002536 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002537 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002538 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002539 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002540done
2541done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002542IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002543
2544fi
2545fi
2546CC=$ac_cv_prog_CC
2547if test -n "$CC"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002548 { echo "$as_me:$LINENO: result: $CC" >&5
2549echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002550else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002551 { echo "$as_me:$LINENO: result: no" >&5
2552echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002553fi
2554
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002555
Martin v. Löwis11437992002-04-12 09:54:03 +00002556 test -n "$CC" && break
2557 done
2558fi
2559if test -z "$CC"; then
2560 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002561 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002562do
2563 # Extract the first word of "$ac_prog", so it can be a program name with args.
2564set dummy $ac_prog; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002565{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2566echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002567if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002568 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002569else
2570 if test -n "$ac_ct_CC"; then
2571 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2572else
2573as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2574for as_dir in $PATH
2575do
2576 IFS=$as_save_IFS
2577 test -z "$as_dir" && as_dir=.
2578 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002579 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002580 ac_cv_prog_ac_ct_CC="$ac_prog"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002581 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002582 break 2
2583 fi
2584done
2585done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002586IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00002587
Martin v. Löwis11437992002-04-12 09:54:03 +00002588fi
2589fi
2590ac_ct_CC=$ac_cv_prog_ac_ct_CC
2591if test -n "$ac_ct_CC"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002592 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2593echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002594else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002595 { echo "$as_me:$LINENO: result: no" >&5
2596echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002597fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002598
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002599
Martin v. Löwis11437992002-04-12 09:54:03 +00002600 test -n "$ac_ct_CC" && break
2601done
Michael W. Hudson54241132001-12-07 15:38:26 +00002602
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002603 if test "x$ac_ct_CC" = x; then
2604 CC=""
2605 else
2606 case $cross_compiling:$ac_tool_warned in
2607yes:)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002608{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2609whose name does not start with the host triplet. If you think this
2610configuration is useful to you, please write to autoconf@gnu.org." >&5
2611echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2612whose name does not start with the host triplet. If you think this
2613configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002614ac_tool_warned=yes ;;
2615esac
2616 CC=$ac_ct_CC
2617 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002618fi
2619
2620fi
2621
2622
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002623test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002624See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002625echo "$as_me: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002626See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002627 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002628
2629# Provide some information about the compiler.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002630echo "$as_me:$LINENO: checking for C compiler version" >&5
2631ac_compiler=`set X $ac_compile; echo $2`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002632{ (ac_try="$ac_compiler --version >&5"
2633case "(($ac_try" in
2634 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2635 *) ac_try_echo=$ac_try;;
2636esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002637eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002638 (eval "$ac_compiler --version >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002639 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002641 (exit $ac_status); }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002642{ (ac_try="$ac_compiler -v >&5"
2643case "(($ac_try" in
2644 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2645 *) ac_try_echo=$ac_try;;
2646esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002647eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002648 (eval "$ac_compiler -v >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002649 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002651 (exit $ac_status); }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002652{ (ac_try="$ac_compiler -V >&5"
2653case "(($ac_try" in
2654 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2655 *) ac_try_echo=$ac_try;;
2656esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002657eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002658 (eval "$ac_compiler -V >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002659 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002661 (exit $ac_status); }
2662
2663cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002664/* confdefs.h. */
2665_ACEOF
2666cat confdefs.h >>conftest.$ac_ext
2667cat >>conftest.$ac_ext <<_ACEOF
2668/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002669
Martin v. Löwis11437992002-04-12 09:54:03 +00002670int
2671main ()
2672{
2673
2674 ;
2675 return 0;
2676}
2677_ACEOF
2678ac_clean_files_save=$ac_clean_files
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002679ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002680# Try to create an executable without -o first, disregard a.out.
2681# It will help us diagnose broken compilers, and finding out an intuition
2682# of exeext.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002683{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2684echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
2685ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2686#
2687# List of possible output files, starting from the most likely.
2688# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2689# only as a last resort. b.out is created by i960 compilers.
2690ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2691#
2692# The IRIX 6 linker writes into existing files which may not be
2693# executable, retaining their permissions. Remove them first so a
2694# subsequent execution test works.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002695ac_rmfiles=
2696for ac_file in $ac_files
2697do
2698 case $ac_file in
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002699 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002700 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2701 esac
2702done
2703rm -f $ac_rmfiles
2704
2705if { (ac_try="$ac_link_default"
2706case "(($ac_try" in
2707 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2708 *) ac_try_echo=$ac_try;;
2709esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002710eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002711 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002712 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002714 (exit $ac_status); }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002715 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2716# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2717# in a Makefile. We should not override ac_cv_exeext if it was cached,
2718# so that the user can short-circuit this test for compilers unknown to
2719# Autoconf.
2720for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00002721do
2722 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002723 case $ac_file in
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002724 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002725 ;;
2726 [ab].out )
2727 # We found the default executable, but exeext='' is most
2728 # certainly right.
2729 break;;
2730 *.* )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002731 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2732 then :; else
2733 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2734 fi
2735 # We set ac_cv_exeext here because the later test for it is not
2736 # safe: cross compilers may not add the suffix if given an `-o'
2737 # argument, so we may need to know it at that point already.
2738 # Even if this section looks crufty: it has the advantage of
2739 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002740 break;;
2741 * )
2742 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002743 esac
2744done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002745test "$ac_cv_exeext" = no && ac_cv_exeext=
2746
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002747else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002748 ac_file=''
2749fi
2750
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002751{ echo "$as_me:$LINENO: result: $ac_file" >&5
2752echo "${ECHO_T}$ac_file" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002753if test -z "$ac_file"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002754 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002755sed 's/^/| /' conftest.$ac_ext >&5
2756
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002757{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002758See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002759echo "$as_me: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002760See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002761 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002762fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002763
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002764ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002765
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002766# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002767# the compiler is broken, or we cross compile.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002768{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2769echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002770# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2771# If not cross compiling, check that we can run a simple program.
2772if test "$cross_compiling" != yes; then
2773 if { ac_try='./$ac_file'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002774 { (case "(($ac_try" in
2775 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2776 *) ac_try_echo=$ac_try;;
2777esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002778eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002779 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002780 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002782 (exit $ac_status); }; }; then
2783 cross_compiling=no
2784 else
2785 if test "$cross_compiling" = maybe; then
2786 cross_compiling=yes
2787 else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002788 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002789If you meant to cross compile, use \`--host'.
2790See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002791echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002792If you meant to cross compile, use \`--host'.
2793See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002794 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002795 fi
2796 fi
2797fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002798{ echo "$as_me:$LINENO: result: yes" >&5
2799echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002800
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002801rm -f a.out a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002802ac_clean_files=$ac_clean_files_save
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002803# Check that the compiler produces executables we can run. If not, either
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002804# the compiler is broken, or we cross compile.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002805{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2806echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2807{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2808echo "${ECHO_T}$cross_compiling" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00002809
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002810{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2811echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002812if { (ac_try="$ac_link"
2813case "(($ac_try" in
2814 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2815 *) ac_try_echo=$ac_try;;
2816esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002817eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002818 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002819 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002821 (exit $ac_status); }; then
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002822 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2823# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2824# work properly (i.e., refer to `conftest.exe'), while it won't with
2825# `rm'.
2826for ac_file in conftest.exe conftest conftest.*; do
2827 test -f "$ac_file" || continue
2828 case $ac_file in
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002829 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002830 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2831 break;;
2832 * ) break;;
2833 esac
2834done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002835else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002836 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002837See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002838echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002839See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002840 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002841fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002842
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002843rm -f conftest$ac_cv_exeext
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002844{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2845echo "${ECHO_T}$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002846
2847rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002848EXEEXT=$ac_cv_exeext
2849ac_exeext=$EXEEXT
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002850{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
2851echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002852if test "${ac_cv_objext+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002853 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002854else
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002855 cat >conftest.$ac_ext <<_ACEOF
2856/* confdefs.h. */
2857_ACEOF
2858cat confdefs.h >>conftest.$ac_ext
2859cat >>conftest.$ac_ext <<_ACEOF
2860/* end confdefs.h. */
2861
2862int
2863main ()
2864{
2865
2866 ;
2867 return 0;
2868}
2869_ACEOF
2870rm -f conftest.o conftest.obj
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002871if { (ac_try="$ac_compile"
2872case "(($ac_try" in
2873 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2874 *) ac_try_echo=$ac_try;;
2875esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002876eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002877 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002878 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002880 (exit $ac_status); }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002881 for ac_file in conftest.o conftest.obj conftest.*; do
2882 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00002883 case $ac_file in
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002884 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002885 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2886 break;;
2887 esac
2888done
2889else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002890 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002891sed 's/^/| /' conftest.$ac_ext >&5
2892
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002893{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002894See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002895echo "$as_me: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002896See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002897 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002898fi
2899
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002900rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002901fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002902{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2903echo "${ECHO_T}$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002904OBJEXT=$ac_cv_objext
2905ac_objext=$OBJEXT
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002906{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2907echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002908if test "${ac_cv_c_compiler_gnu+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002909 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002910else
2911 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002912/* confdefs.h. */
2913_ACEOF
2914cat confdefs.h >>conftest.$ac_ext
2915cat >>conftest.$ac_ext <<_ACEOF
2916/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002917
Martin v. Löwis11437992002-04-12 09:54:03 +00002918int
2919main ()
2920{
2921#ifndef __GNUC__
2922 choke me
2923#endif
2924
2925 ;
2926 return 0;
2927}
2928_ACEOF
2929rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002930if { (ac_try="$ac_compile"
2931case "(($ac_try" in
2932 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2933 *) ac_try_echo=$ac_try;;
2934esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002935eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002936 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002937 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002938 grep -v '^ *+' conftest.er1 >conftest.err
2939 rm -f conftest.er1
2940 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002942 (exit $ac_status); } && {
2943 test -z "$ac_c_werror_flag" ||
2944 test ! -s conftest.err
2945 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002946 ac_compiler_gnu=yes
2947else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002948 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002949sed 's/^/| /' conftest.$ac_ext >&5
2950
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002951 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002952fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002953
2954rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002955ac_cv_c_compiler_gnu=$ac_compiler_gnu
2956
2957fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002958{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2959echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
2960GCC=`test $ac_compiler_gnu = yes && echo yes`
Martin v. Löwis11437992002-04-12 09:54:03 +00002961ac_test_CFLAGS=${CFLAGS+set}
2962ac_save_CFLAGS=$CFLAGS
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002963{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2964echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002965if test "${ac_cv_prog_cc_g+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002966 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002967else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002968 ac_save_c_werror_flag=$ac_c_werror_flag
2969 ac_c_werror_flag=yes
2970 ac_cv_prog_cc_g=no
2971 CFLAGS="-g"
2972 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002973/* confdefs.h. */
2974_ACEOF
2975cat confdefs.h >>conftest.$ac_ext
2976cat >>conftest.$ac_ext <<_ACEOF
2977/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002978
Martin v. Löwis11437992002-04-12 09:54:03 +00002979int
2980main ()
2981{
2982
2983 ;
2984 return 0;
2985}
2986_ACEOF
2987rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002988if { (ac_try="$ac_compile"
2989case "(($ac_try" in
2990 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2991 *) ac_try_echo=$ac_try;;
2992esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002993eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002994 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002995 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002996 grep -v '^ *+' conftest.er1 >conftest.err
2997 rm -f conftest.er1
2998 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00002999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003000 (exit $ac_status); } && {
3001 test -z "$ac_c_werror_flag" ||
3002 test ! -s conftest.err
3003 } && test -s conftest.$ac_objext; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003004 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003005else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003006 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003007sed 's/^/| /' conftest.$ac_ext >&5
3008
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003009 CFLAGS=""
3010 cat >conftest.$ac_ext <<_ACEOF
3011/* confdefs.h. */
3012_ACEOF
3013cat confdefs.h >>conftest.$ac_ext
3014cat >>conftest.$ac_ext <<_ACEOF
3015/* end confdefs.h. */
3016
3017int
3018main ()
3019{
3020
3021 ;
3022 return 0;
3023}
3024_ACEOF
3025rm -f conftest.$ac_objext
3026if { (ac_try="$ac_compile"
3027case "(($ac_try" in
3028 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3029 *) ac_try_echo=$ac_try;;
3030esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003031eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003032 (eval "$ac_compile") 2>conftest.er1
3033 ac_status=$?
3034 grep -v '^ *+' conftest.er1 >conftest.err
3035 rm -f conftest.er1
3036 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003038 (exit $ac_status); } && {
3039 test -z "$ac_c_werror_flag" ||
3040 test ! -s conftest.err
3041 } && test -s conftest.$ac_objext; then
3042 :
3043else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003044 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003045sed 's/^/| /' conftest.$ac_ext >&5
3046
3047 ac_c_werror_flag=$ac_save_c_werror_flag
3048 CFLAGS="-g"
3049 cat >conftest.$ac_ext <<_ACEOF
3050/* confdefs.h. */
3051_ACEOF
3052cat confdefs.h >>conftest.$ac_ext
3053cat >>conftest.$ac_ext <<_ACEOF
3054/* end confdefs.h. */
3055
3056int
3057main ()
3058{
3059
3060 ;
3061 return 0;
3062}
3063_ACEOF
3064rm -f conftest.$ac_objext
3065if { (ac_try="$ac_compile"
3066case "(($ac_try" in
3067 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3068 *) ac_try_echo=$ac_try;;
3069esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003070eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003071 (eval "$ac_compile") 2>conftest.er1
3072 ac_status=$?
3073 grep -v '^ *+' conftest.er1 >conftest.err
3074 rm -f conftest.er1
3075 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003077 (exit $ac_status); } && {
3078 test -z "$ac_c_werror_flag" ||
3079 test ! -s conftest.err
3080 } && test -s conftest.$ac_objext; then
3081 ac_cv_prog_cc_g=yes
3082else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003083 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003084sed 's/^/| /' conftest.$ac_ext >&5
3085
3086
Guido van Rossum627b2d71993-12-24 10:39:16 +00003087fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003088
3089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003090fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003091
3092rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3093fi
3094
3095rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3096 ac_c_werror_flag=$ac_save_c_werror_flag
3097fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003098{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3099echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003100if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003101 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003102elif test $ac_cv_prog_cc_g = yes; then
3103 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003104 CFLAGS="-g -O2"
3105 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003106 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003107 fi
3108else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003109 if test "$GCC" = yes; then
3110 CFLAGS="-O2"
3111 else
3112 CFLAGS=
3113 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003114fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003115{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3116echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003117if test "${ac_cv_prog_cc_c89+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003118 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003119else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003120 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003121ac_save_CC=$CC
3122cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003123/* confdefs.h. */
3124_ACEOF
3125cat confdefs.h >>conftest.$ac_ext
3126cat >>conftest.$ac_ext <<_ACEOF
3127/* end confdefs.h. */
3128#include <stdarg.h>
3129#include <stdio.h>
3130#include <sys/types.h>
3131#include <sys/stat.h>
3132/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3133struct buf { int x; };
3134FILE * (*rcsopen) (struct buf *, struct stat *, int);
3135static char *e (p, i)
3136 char **p;
3137 int i;
3138{
3139 return p[i];
3140}
3141static char *f (char * (*g) (char **, int), char **p, ...)
3142{
3143 char *s;
3144 va_list v;
3145 va_start (v,p);
3146 s = g (p, va_arg (v,int));
3147 va_end (v);
3148 return s;
3149}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003150
3151/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3152 function prototypes and stuff, but not '\xHH' hex character constants.
3153 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003154 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003155 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3156 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003157 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003158int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3159
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003160/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3161 inside strings and character constants. */
3162#define FOO(x) 'x'
3163int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3164
Skip Montanaro6dead952003-09-25 14:50:04 +00003165int test (int i, double x);
3166struct s1 {int (*f) (int a);};
3167struct s2 {int (*f) (double a);};
3168int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3169int argc;
3170char **argv;
3171int
3172main ()
3173{
3174return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3175 ;
3176 return 0;
3177}
3178_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003179for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3180 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003181do
3182 CC="$ac_save_CC $ac_arg"
3183 rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003184if { (ac_try="$ac_compile"
3185case "(($ac_try" in
3186 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3187 *) ac_try_echo=$ac_try;;
3188esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003189eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003190 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00003191 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003192 grep -v '^ *+' conftest.er1 >conftest.err
3193 rm -f conftest.er1
3194 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003195 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003196 (exit $ac_status); } && {
3197 test -z "$ac_c_werror_flag" ||
3198 test ! -s conftest.err
3199 } && test -s conftest.$ac_objext; then
3200 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003201else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003202 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003203sed 's/^/| /' conftest.$ac_ext >&5
3204
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003205
Skip Montanaro6dead952003-09-25 14:50:04 +00003206fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003207
3208rm -f core conftest.err conftest.$ac_objext
3209 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003210done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003211rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003212CC=$ac_save_CC
3213
3214fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003215# AC_CACHE_VAL
3216case "x$ac_cv_prog_cc_c89" in
3217 x)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003218 { echo "$as_me:$LINENO: result: none needed" >&5
3219echo "${ECHO_T}none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003220 xno)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003221 { echo "$as_me:$LINENO: result: unsupported" >&5
3222echo "${ECHO_T}unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003223 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003224 CC="$CC $ac_cv_prog_cc_c89"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003225 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3226echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003227esac
3228
Skip Montanaro6dead952003-09-25 14:50:04 +00003229
Martin v. Löwis11437992002-04-12 09:54:03 +00003230ac_ext=c
3231ac_cpp='$CPP $CPPFLAGS'
3232ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3233ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3234ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003235
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003236
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003237
3238
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003239{ echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
3240echo $ECHO_N "checking for --with-cxx-main=<compiler>... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003241
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003242# Check whether --with-cxx_main was given.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003243if test "${with_cxx_main+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003244 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003245
3246 case $withval in
3247 no) with_cxx_main=no
3248 MAINCC='$(CC)';;
3249 yes) with_cxx_main=yes
3250 MAINCC='$(CXX)';;
3251 *) with_cxx_main=yes
3252 MAINCC=$withval
3253 if test -z "$CXX"
3254 then
3255 CXX=$withval
3256 fi;;
3257 esac
3258else
3259
3260 with_cxx_main=no
3261 MAINCC='$(CC)'
3262
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003263fi
3264
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003265{ echo "$as_me:$LINENO: result: $with_cxx_main" >&5
3266echo "${ECHO_T}$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003267
3268preset_cxx="$CXX"
3269if test -z "$CXX"
3270then
3271 case "$CC" in
3272 gcc) # Extract the first word of "g++", so it can be a program name with args.
3273set dummy g++; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003274{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3275echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003276if test "${ac_cv_path_CXX+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003277 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003278else
3279 case $CXX in
3280 [\\/]* | ?:[\\/]*)
3281 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3282 ;;
3283 *)
3284 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3285for as_dir in notfound
3286do
3287 IFS=$as_save_IFS
3288 test -z "$as_dir" && as_dir=.
3289 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003290 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003291 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003292 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003293 break 2
3294 fi
3295done
3296done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003297IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003298
3299 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
3300 ;;
3301esac
3302fi
3303CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003304if test -n "$CXX"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003305 { echo "$as_me:$LINENO: result: $CXX" >&5
3306echo "${ECHO_T}$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003307else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003308 { echo "$as_me:$LINENO: result: no" >&5
3309echo "${ECHO_T}no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003310fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003311
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003312 ;;
3313 cc) # Extract the first word of "c++", so it can be a program name with args.
3314set dummy c++; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003315{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3316echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003317if test "${ac_cv_path_CXX+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003318 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003319else
3320 case $CXX in
3321 [\\/]* | ?:[\\/]*)
3322 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3323 ;;
3324 *)
3325 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3326for as_dir in notfound
3327do
3328 IFS=$as_save_IFS
3329 test -z "$as_dir" && as_dir=.
3330 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003331 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003332 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003333 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003334 break 2
3335 fi
3336done
3337done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003338IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003339
3340 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
3341 ;;
3342esac
3343fi
3344CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003345if test -n "$CXX"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003346 { echo "$as_me:$LINENO: result: $CXX" >&5
3347echo "${ECHO_T}$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003348else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003349 { echo "$as_me:$LINENO: result: no" >&5
3350echo "${ECHO_T}no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003351fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003352
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003353 ;;
3354 esac
3355 if test "$CXX" = "notfound"
3356 then
3357 CXX=""
3358 fi
3359fi
3360if test -z "$CXX"
3361then
3362 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
3363do
3364 # Extract the first word of "$ac_prog", so it can be a program name with args.
3365set dummy $ac_prog; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003366{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3367echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003368if test "${ac_cv_prog_CXX+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003369 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003370else
3371 if test -n "$CXX"; then
3372 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3373else
3374as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3375for as_dir in $PATH
3376do
3377 IFS=$as_save_IFS
3378 test -z "$as_dir" && as_dir=.
3379 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003380 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003381 ac_cv_prog_CXX="$ac_prog"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003382 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003383 break 2
3384 fi
3385done
3386done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003387IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003388
3389fi
3390fi
3391CXX=$ac_cv_prog_CXX
3392if test -n "$CXX"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003393 { echo "$as_me:$LINENO: result: $CXX" >&5
3394echo "${ECHO_T}$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003395else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003396 { echo "$as_me:$LINENO: result: no" >&5
3397echo "${ECHO_T}no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003398fi
3399
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003400
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003401 test -n "$CXX" && break
3402done
3403test -n "$CXX" || CXX="notfound"
3404
3405 if test "$CXX" = "notfound"
3406 then
3407 CXX=""
3408 fi
3409fi
3410if test "$preset_cxx" != "$CXX"
3411then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003412 { echo "$as_me:$LINENO: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003413
3414 By default, distutils will build C++ extension modules with \"$CXX\".
3415 If this is not intended, then set CXX on the configure command line.
3416 " >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003417echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003418
3419 By default, distutils will build C++ extension modules with \"$CXX\".
3420 If this is not intended, then set CXX on the configure command line.
3421 " >&2;}
3422fi
3423
3424
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003425# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00003426
3427ac_ext=c
3428ac_cpp='$CPP $CPPFLAGS'
3429ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3430ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3431ac_compiler_gnu=$ac_cv_c_compiler_gnu
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003432{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3433echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003434# On Suns, sometimes $CPP names a directory.
3435if test -n "$CPP" && test -d "$CPP"; then
3436 CPP=
3437fi
3438if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003439 if test "${ac_cv_prog_CPP+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003440 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003441else
Martin v. Löwis11437992002-04-12 09:54:03 +00003442 # Double quotes because CPP needs to be expanded
3443 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3444 do
3445 ac_preproc_ok=false
3446for ac_c_preproc_warn_flag in '' yes
3447do
3448 # Use a header file that comes with gcc, so configuring glibc
3449 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003450 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3451 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003452 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00003453 # not just through cpp. "Syntax error" is here to catch this case.
3454 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003455/* confdefs.h. */
3456_ACEOF
3457cat confdefs.h >>conftest.$ac_ext
3458cat >>conftest.$ac_ext <<_ACEOF
3459/* end confdefs.h. */
3460#ifdef __STDC__
3461# include <limits.h>
3462#else
3463# include <assert.h>
3464#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003465 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003466_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003467if { (ac_try="$ac_cpp conftest.$ac_ext"
3468case "(($ac_try" in
3469 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3470 *) ac_try_echo=$ac_try;;
3471esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003472eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003473 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003474 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003475 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003476 rm -f conftest.er1
3477 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003478 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003479 (exit $ac_status); } >/dev/null && {
3480 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3481 test ! -s conftest.err
3482 }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003483 :
3484else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003485 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003486sed 's/^/| /' conftest.$ac_ext >&5
3487
Martin v. Löwis11437992002-04-12 09:54:03 +00003488 # Broken: fails on valid input.
3489continue
Jack Jansendd19cf82001-12-06 22:36:17 +00003490fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003491
Martin v. Löwis11437992002-04-12 09:54:03 +00003492rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00003493
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003494 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003495 # can be detected and how.
3496 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003497/* confdefs.h. */
3498_ACEOF
3499cat confdefs.h >>conftest.$ac_ext
3500cat >>conftest.$ac_ext <<_ACEOF
3501/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003502#include <ac_nonexistent.h>
3503_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003504if { (ac_try="$ac_cpp conftest.$ac_ext"
3505case "(($ac_try" in
3506 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3507 *) ac_try_echo=$ac_try;;
3508esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003509eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003510 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003511 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003512 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003513 rm -f conftest.er1
3514 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003515 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003516 (exit $ac_status); } >/dev/null && {
3517 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3518 test ! -s conftest.err
3519 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003520 # Broken: success on invalid input.
3521continue
3522else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003523 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003524sed 's/^/| /' conftest.$ac_ext >&5
3525
Martin v. Löwis11437992002-04-12 09:54:03 +00003526 # Passes both tests.
3527ac_preproc_ok=:
3528break
3529fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003530
Martin v. Löwis11437992002-04-12 09:54:03 +00003531rm -f conftest.err conftest.$ac_ext
3532
3533done
3534# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3535rm -f conftest.err conftest.$ac_ext
3536if $ac_preproc_ok; then
3537 break
3538fi
3539
3540 done
3541 ac_cv_prog_CPP=$CPP
3542
3543fi
3544 CPP=$ac_cv_prog_CPP
3545else
3546 ac_cv_prog_CPP=$CPP
3547fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003548{ echo "$as_me:$LINENO: result: $CPP" >&5
3549echo "${ECHO_T}$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003550ac_preproc_ok=false
3551for ac_c_preproc_warn_flag in '' yes
3552do
3553 # Use a header file that comes with gcc, so configuring glibc
3554 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003555 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3556 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003557 # On the NeXT, cc -E runs the code through the compiler's parser,
3558 # not just through cpp. "Syntax error" is here to catch this case.
3559 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003560/* confdefs.h. */
3561_ACEOF
3562cat confdefs.h >>conftest.$ac_ext
3563cat >>conftest.$ac_ext <<_ACEOF
3564/* end confdefs.h. */
3565#ifdef __STDC__
3566# include <limits.h>
3567#else
3568# include <assert.h>
3569#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003570 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003571_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003572if { (ac_try="$ac_cpp conftest.$ac_ext"
3573case "(($ac_try" in
3574 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3575 *) ac_try_echo=$ac_try;;
3576esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003577eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003578 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003579 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003580 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003581 rm -f conftest.er1
3582 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003584 (exit $ac_status); } >/dev/null && {
3585 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3586 test ! -s conftest.err
3587 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003588 :
3589else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003590 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003591sed 's/^/| /' conftest.$ac_ext >&5
3592
Martin v. Löwis11437992002-04-12 09:54:03 +00003593 # Broken: fails on valid input.
3594continue
3595fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003596
Martin v. Löwis11437992002-04-12 09:54:03 +00003597rm -f conftest.err conftest.$ac_ext
3598
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003599 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003600 # can be detected and how.
3601 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003602/* confdefs.h. */
3603_ACEOF
3604cat confdefs.h >>conftest.$ac_ext
3605cat >>conftest.$ac_ext <<_ACEOF
3606/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003607#include <ac_nonexistent.h>
3608_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003609if { (ac_try="$ac_cpp conftest.$ac_ext"
3610case "(($ac_try" in
3611 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3612 *) ac_try_echo=$ac_try;;
3613esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003614eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003615 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003616 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003617 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003618 rm -f conftest.er1
3619 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003621 (exit $ac_status); } >/dev/null && {
3622 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3623 test ! -s conftest.err
3624 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003625 # Broken: success on invalid input.
3626continue
3627else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003628 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003629sed 's/^/| /' conftest.$ac_ext >&5
3630
Martin v. Löwis11437992002-04-12 09:54:03 +00003631 # Passes both tests.
3632ac_preproc_ok=:
3633break
3634fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003635
Martin v. Löwis11437992002-04-12 09:54:03 +00003636rm -f conftest.err conftest.$ac_ext
3637
3638done
3639# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3640rm -f conftest.err conftest.$ac_ext
3641if $ac_preproc_ok; then
3642 :
3643else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003644 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003645See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003646echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003647See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003648 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003649fi
3650
3651ac_ext=c
3652ac_cpp='$CPP $CPPFLAGS'
3653ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3654ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3655ac_compiler_gnu=$ac_cv_c_compiler_gnu
3656
3657
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003658{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3659echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003660if test "${ac_cv_path_GREP+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003661 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003662else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003663 # Extract the first word of "grep ggrep" to use in msg output
3664if test -z "$GREP"; then
3665set dummy grep ggrep; ac_prog_name=$2
3666if test "${ac_cv_path_GREP+set}" = set; then
3667 echo $ECHO_N "(cached) $ECHO_C" >&6
3668else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003669 ac_path_GREP_found=false
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003670# Loop through the user's path and test for each of PROGNAME-LIST
3671as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003672for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3673do
3674 IFS=$as_save_IFS
3675 test -z "$as_dir" && as_dir=.
3676 for ac_prog in grep ggrep; do
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003677 for ac_exec_ext in '' $ac_executable_extensions; do
3678 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3679 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3680 # Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003681 # Check for GNU $ac_path_GREP
3682case `"$ac_path_GREP" --version 2>&1` in
3683*GNU*)
3684 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3685*)
3686 ac_count=0
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003687 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003688 while :
3689 do
3690 cat "conftest.in" "conftest.in" >"conftest.tmp"
3691 mv "conftest.tmp" "conftest.in"
3692 cp "conftest.in" "conftest.nl"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003693 echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003694 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3695 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3696 ac_count=`expr $ac_count + 1`
3697 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3698 # Best one so far, save it but keep looking for a better one
3699 ac_cv_path_GREP="$ac_path_GREP"
3700 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00003701 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003702 # 10*(2^10) chars as input seems more than enough
3703 test $ac_count -gt 10 && break
3704 done
3705 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3706esac
3707
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003708
3709 $ac_path_GREP_found && break 3
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003710 done
3711done
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003712
3713done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003714IFS=$as_save_IFS
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003715
3716
3717fi
3718
3719GREP="$ac_cv_path_GREP"
3720if test -z "$GREP"; then
3721 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3722echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003723 { (exit 1); exit 1; }; }
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003724fi
3725
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003726else
3727 ac_cv_path_GREP=$GREP
3728fi
3729
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003730
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003731fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003732{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3733echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003734 GREP="$ac_cv_path_GREP"
3735
3736
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003737{ echo "$as_me:$LINENO: checking for egrep" >&5
3738echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003739if test "${ac_cv_path_EGREP+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003740 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003741else
3742 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3743 then ac_cv_path_EGREP="$GREP -E"
3744 else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003745 # Extract the first word of "egrep" to use in msg output
3746if test -z "$EGREP"; then
3747set dummy egrep; ac_prog_name=$2
3748if test "${ac_cv_path_EGREP+set}" = set; then
3749 echo $ECHO_N "(cached) $ECHO_C" >&6
3750else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003751 ac_path_EGREP_found=false
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003752# Loop through the user's path and test for each of PROGNAME-LIST
3753as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003754for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3755do
3756 IFS=$as_save_IFS
3757 test -z "$as_dir" && as_dir=.
3758 for ac_prog in egrep; do
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003759 for ac_exec_ext in '' $ac_executable_extensions; do
3760 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3761 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3762 # Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003763 # Check for GNU $ac_path_EGREP
3764case `"$ac_path_EGREP" --version 2>&1` in
3765*GNU*)
3766 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3767*)
3768 ac_count=0
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003769 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003770 while :
3771 do
3772 cat "conftest.in" "conftest.in" >"conftest.tmp"
3773 mv "conftest.tmp" "conftest.in"
3774 cp "conftest.in" "conftest.nl"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003775 echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003776 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3777 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3778 ac_count=`expr $ac_count + 1`
3779 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3780 # Best one so far, save it but keep looking for a better one
3781 ac_cv_path_EGREP="$ac_path_EGREP"
3782 ac_path_EGREP_max=$ac_count
3783 fi
3784 # 10*(2^10) chars as input seems more than enough
3785 test $ac_count -gt 10 && break
3786 done
3787 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3788esac
3789
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003790
3791 $ac_path_EGREP_found && break 3
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003792 done
3793done
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003794
3795done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003796IFS=$as_save_IFS
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003797
3798
3799fi
3800
3801EGREP="$ac_cv_path_EGREP"
3802if test -z "$EGREP"; then
3803 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3804echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003805 { (exit 1); exit 1; }; }
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003806fi
3807
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003808else
3809 ac_cv_path_EGREP=$EGREP
3810fi
3811
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003812
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003813 fi
3814fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003815{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3816echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003817 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00003818
3819
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003820
3821{ echo "$as_me:$LINENO: checking for AIX" >&5
3822echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
3823cat >conftest.$ac_ext <<_ACEOF
Benjamin Petersona8332062009-09-11 22:36:27 +00003824/* confdefs.h. */
3825_ACEOF
3826cat confdefs.h >>conftest.$ac_ext
3827cat >>conftest.$ac_ext <<_ACEOF
3828/* end confdefs.h. */
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003829#ifdef _AIX
3830 yes
Benjamin Petersona8332062009-09-11 22:36:27 +00003831#endif
3832
Benjamin Petersona8332062009-09-11 22:36:27 +00003833_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003834if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3835 $EGREP "yes" >/dev/null 2>&1; then
3836 { echo "$as_me:$LINENO: result: yes" >&5
3837echo "${ECHO_T}yes" >&6; }
Benjamin Petersona8332062009-09-11 22:36:27 +00003838cat >>confdefs.h <<\_ACEOF
Antoine Pitrou20327222009-05-24 20:39:11 +00003839#define _ALL_SOURCE 1
3840_ACEOF
3841
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003842else
3843 { echo "$as_me:$LINENO: result: no" >&5
3844echo "${ECHO_T}no" >&6; }
3845fi
Benjamin Petersone7e59c22010-03-23 21:05:56 +00003846rm -f conftest*
Antoine Pitrou20327222009-05-24 20:39:11 +00003847
3848
3849
3850# Check for unsupported systems
3851case $ac_sys_system/$ac_sys_release in
3852atheos*|Linux*/1*)
3853 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3854 echo See README for details.
3855 exit 1;;
3856esac
3857
3858
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003859{ echo "$as_me:$LINENO: checking for --with-suffix" >&5
3860echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003861
3862# Check whether --with-suffix was given.
3863if test "${with_suffix+set}" = set; then
3864 withval=$with_suffix;
3865 case $withval in
3866 no) EXEEXT=;;
3867 yes) EXEEXT=.exe;;
3868 *) EXEEXT=$withval;;
3869 esac
3870fi
3871
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003872{ echo "$as_me:$LINENO: result: $EXEEXT" >&5
3873echo "${ECHO_T}$EXEEXT" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003874
3875# Test whether we're running on a non-case-sensitive system, in which
3876# case we give a warning if no ext is given
3877
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003878{ echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3879echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003880if test ! -d CaseSensitiveTestDir; then
3881mkdir CaseSensitiveTestDir
3882fi
3883
3884if test -d casesensitivetestdir
3885then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003886 { echo "$as_me:$LINENO: result: yes" >&5
3887echo "${ECHO_T}yes" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003888 BUILDEXEEXT=.exe
3889else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003890 { echo "$as_me:$LINENO: result: no" >&5
3891echo "${ECHO_T}no" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003892 BUILDEXEEXT=$EXEEXT
3893fi
3894rmdir CaseSensitiveTestDir
3895
3896case $MACHDEP in
3897bsdos*)
3898 case $CC in
3899 gcc) CC="$CC -D_HAVE_BSDI";;
3900 esac;;
3901esac
3902
3903case $ac_sys_system in
3904hp*|HP*)
3905 case $CC in
3906 cc|*/cc) CC="$CC -Ae";;
3907 esac;;
Antoine Pitrou20327222009-05-24 20:39:11 +00003908SunOS*)
3909 # Some functions have a prototype only with that define, e.g. confstr
3910
3911cat >>confdefs.h <<\_ACEOF
3912#define __EXTENSIONS__ 1
3913_ACEOF
3914
3915 ;;
3916esac
3917
3918
3919
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003920{ echo "$as_me:$LINENO: checking LIBRARY" >&5
3921echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003922if test -z "$LIBRARY"
3923then
3924 LIBRARY='libpython$(VERSION).a'
3925fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003926{ echo "$as_me:$LINENO: result: $LIBRARY" >&5
3927echo "${ECHO_T}$LIBRARY" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003928
3929# LDLIBRARY is the name of the library to link against (as opposed to the
3930# name of the library into which to insert object files). BLDLIBRARY is also
3931# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3932# is blank as the main program is not linked directly against LDLIBRARY.
3933# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3934# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3935# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3936# DLLLIBRARY is the shared (i.e., DLL) library.
3937#
3938# RUNSHARED is used to run shared python without installed libraries
3939#
3940# INSTSONAME is the name of the shared library that will be use to install
3941# on the system - some systems like version suffix, others don't
3942
3943
3944
3945
3946
3947
3948LDLIBRARY="$LIBRARY"
3949BLDLIBRARY='$(LDLIBRARY)'
3950INSTSONAME='$(LDLIBRARY)'
3951DLLLIBRARY=''
3952LDLIBRARYDIR=''
3953RUNSHARED=''
3954
3955# LINKCC is the command that links the python executable -- default is $(CC).
3956# If CXX is set, and if it is needed to link a main function that was
3957# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3958# python might then depend on the C++ runtime
3959# This is altered for AIX in order to build the export list before
3960# linking.
3961
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003962{ echo "$as_me:$LINENO: checking LINKCC" >&5
3963echo $ECHO_N "checking LINKCC... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003964if test -z "$LINKCC"
3965then
3966 LINKCC='$(PURIFY) $(MAINCC)'
3967 case $ac_sys_system in
3968 AIX*)
3969 exp_extra="\"\""
3970 if test $ac_sys_release -ge 5 -o \
3971 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3972 exp_extra="."
3973 fi
3974 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Antoine Pitrou20327222009-05-24 20:39:11 +00003975 QNX*)
3976 # qcc must be used because the other compilers do not
3977 # support -N.
3978 LINKCC=qcc;;
3979 esac
3980fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003981{ echo "$as_me:$LINENO: result: $LINKCC" >&5
3982echo "${ECHO_T}$LINKCC" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003983
3984# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
3985# make sure we default having it set to "no": this is used by
3986# distutils.unixccompiler to know if it should add --enable-new-dtags
3987# to linker command lines, and failing to detect GNU ld simply results
3988# in the same bahaviour as before.
3989
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003990{ echo "$as_me:$LINENO: checking for GNU ld" >&5
3991echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003992ac_prog=ld
3993if test "$GCC" = yes; then
3994 ac_prog=`$CC -print-prog-name=ld`
3995fi
3996case `"$ac_prog" -V 2>&1 < /dev/null` in
3997 *GNU*)
3998 GNULD=yes;;
3999 *)
4000 GNULD=no;;
4001esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004002{ echo "$as_me:$LINENO: result: $GNULD" >&5
4003echo "${ECHO_T}$GNULD" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004004
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004005{ echo "$as_me:$LINENO: checking for --enable-shared" >&5
4006echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004007# Check whether --enable-shared was given.
4008if test "${enable_shared+set}" = set; then
4009 enableval=$enable_shared;
4010fi
4011
4012
4013if test -z "$enable_shared"
4014then
4015 case $ac_sys_system in
4016 CYGWIN* | atheos*)
4017 enable_shared="yes";;
4018 *)
4019 enable_shared="no";;
4020 esac
4021fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004022{ echo "$as_me:$LINENO: result: $enable_shared" >&5
4023echo "${ECHO_T}$enable_shared" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004024
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004025{ echo "$as_me:$LINENO: checking for --enable-profiling" >&5
4026echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004027# Check whether --enable-profiling was given.
4028if test "${enable_profiling+set}" = set; then
4029 enableval=$enable_profiling; ac_save_cc="$CC"
4030 CC="$CC -pg"
4031 if test "$cross_compiling" = yes; then
4032 ac_enable_profiling="no"
4033else
4034 cat >conftest.$ac_ext <<_ACEOF
4035/* confdefs.h. */
4036_ACEOF
4037cat confdefs.h >>conftest.$ac_ext
4038cat >>conftest.$ac_ext <<_ACEOF
4039/* end confdefs.h. */
4040int main() { return 0; }
4041_ACEOF
4042rm -f conftest$ac_exeext
4043if { (ac_try="$ac_link"
4044case "(($ac_try" in
4045 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4046 *) ac_try_echo=$ac_try;;
4047esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004048eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004049 (eval "$ac_link") 2>&5
4050 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004052 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4053 { (case "(($ac_try" in
4054 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4055 *) ac_try_echo=$ac_try;;
4056esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004057eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004058 (eval "$ac_try") 2>&5
4059 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004061 (exit $ac_status); }; }; then
4062 ac_enable_profiling="yes"
4063else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004064 echo "$as_me: program exited with status $ac_status" >&5
4065echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004066sed 's/^/| /' conftest.$ac_ext >&5
4067
4068( exit $ac_status )
4069ac_enable_profiling="no"
4070fi
Antoine Pitrou20327222009-05-24 20:39:11 +00004071rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4072fi
4073
4074
4075 CC="$ac_save_cc"
4076fi
4077
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004078{ echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
4079echo "${ECHO_T}$ac_enable_profiling" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004080
4081case "$ac_enable_profiling" in
4082 "yes")
4083 BASECFLAGS="-pg $BASECFLAGS"
4084 LDFLAGS="-pg $LDFLAGS"
4085 ;;
4086esac
4087
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004088{ echo "$as_me:$LINENO: checking LDLIBRARY" >&5
4089echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004090
4091# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4092# library that we build, but we do not want to link against it (we
4093# will find it with a -framework option). For this reason there is an
4094# extra variable BLDLIBRARY against which Python and the extension
4095# modules are linked, BLDLIBRARY. This is normally the same as
4096# LDLIBRARY, but empty for MacOSX framework builds.
4097if test "$enable_framework"
4098then
4099 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4100 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4101 BLDLIBRARY=''
4102else
4103 BLDLIBRARY='$(LDLIBRARY)'
4104fi
4105
4106# Other platforms follow
4107if test $enable_shared = "yes"; then
4108
4109cat >>confdefs.h <<\_ACEOF
4110#define Py_ENABLE_SHARED 1
4111_ACEOF
4112
4113 case $ac_sys_system in
4114 CYGWIN*)
4115 LDLIBRARY='libpython$(VERSION).dll.a'
4116 DLLLIBRARY='libpython$(VERSION).dll'
4117 ;;
4118 SunOS*)
4119 LDLIBRARY='libpython$(VERSION).so'
4120 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
4121 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4122 INSTSONAME="$LDLIBRARY".$SOVERSION
4123 ;;
4124 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
4125 LDLIBRARY='libpython$(VERSION).so'
4126 BLDLIBRARY='-L. -lpython$(VERSION)'
4127 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4128 case $ac_sys_system in
4129 FreeBSD*)
4130 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4131 ;;
4132 esac
4133 INSTSONAME="$LDLIBRARY".$SOVERSION
4134 ;;
4135 hp*|HP*)
4136 case `uname -m` in
4137 ia64)
4138 LDLIBRARY='libpython$(VERSION).so'
4139 ;;
4140 *)
4141 LDLIBRARY='libpython$(VERSION).sl'
4142 ;;
4143 esac
4144 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
4145 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4146 ;;
4147 OSF*)
4148 LDLIBRARY='libpython$(VERSION).so'
4149 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
4150 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4151 ;;
4152 atheos*)
4153 LDLIBRARY='libpython$(VERSION).so'
4154 BLDLIBRARY='-L. -lpython$(VERSION)'
4155 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
4156 ;;
4157 Darwin*)
4158 LDLIBRARY='libpython$(VERSION).dylib'
4159 BLDLIBRARY='-L. -lpython$(VERSION)'
4160 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4161 ;;
4162
4163 esac
4164else # shared is disabled
4165 case $ac_sys_system in
4166 CYGWIN*)
4167 BLDLIBRARY='$(LIBRARY)'
4168 LDLIBRARY='libpython$(VERSION).dll.a'
4169 ;;
4170 esac
4171fi
4172
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004173{ echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
4174echo "${ECHO_T}$LDLIBRARY" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004175
4176if test -n "$ac_tool_prefix"; then
4177 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4178set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004179{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4180echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004181if test "${ac_cv_prog_RANLIB+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004182 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00004183else
4184 if test -n "$RANLIB"; then
4185 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4186else
4187as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4188for as_dir in $PATH
4189do
4190 IFS=$as_save_IFS
4191 test -z "$as_dir" && as_dir=.
4192 for ac_exec_ext in '' $ac_executable_extensions; do
4193 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4194 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004195 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004196 break 2
4197 fi
4198done
4199done
4200IFS=$as_save_IFS
4201
4202fi
4203fi
4204RANLIB=$ac_cv_prog_RANLIB
4205if test -n "$RANLIB"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004206 { echo "$as_me:$LINENO: result: $RANLIB" >&5
4207echo "${ECHO_T}$RANLIB" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004208else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004209 { echo "$as_me:$LINENO: result: no" >&5
4210echo "${ECHO_T}no" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004211fi
4212
4213
4214fi
4215if test -z "$ac_cv_prog_RANLIB"; then
4216 ac_ct_RANLIB=$RANLIB
4217 # Extract the first word of "ranlib", so it can be a program name with args.
4218set dummy ranlib; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004219{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4220echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004221if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004222 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00004223else
4224 if test -n "$ac_ct_RANLIB"; then
4225 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4226else
4227as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4228for as_dir in $PATH
4229do
4230 IFS=$as_save_IFS
4231 test -z "$as_dir" && as_dir=.
4232 for ac_exec_ext in '' $ac_executable_extensions; do
4233 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4234 ac_cv_prog_ac_ct_RANLIB="ranlib"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004235 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004236 break 2
4237 fi
4238done
4239done
4240IFS=$as_save_IFS
4241
4242fi
4243fi
4244ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4245if test -n "$ac_ct_RANLIB"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004246 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4247echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004248else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004249 { echo "$as_me:$LINENO: result: no" >&5
4250echo "${ECHO_T}no" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004251fi
4252
4253 if test "x$ac_ct_RANLIB" = x; then
4254 RANLIB=":"
4255 else
4256 case $cross_compiling:$ac_tool_warned in
4257yes:)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004258{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
4259whose name does not start with the host triplet. If you think this
4260configuration is useful to you, please write to autoconf@gnu.org." >&5
4261echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
4262whose name does not start with the host triplet. If you think this
4263configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Antoine Pitrou20327222009-05-24 20:39:11 +00004264ac_tool_warned=yes ;;
4265esac
4266 RANLIB=$ac_ct_RANLIB
4267 fi
4268else
4269 RANLIB="$ac_cv_prog_RANLIB"
4270fi
4271
4272
4273for ac_prog in ar aal
4274do
4275 # Extract the first word of "$ac_prog", so it can be a program name with args.
4276set dummy $ac_prog; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004277{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4278echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004279if test "${ac_cv_prog_AR+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004280 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00004281else
4282 if test -n "$AR"; then
4283 ac_cv_prog_AR="$AR" # Let the user override the test.
4284else
4285as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4286for as_dir in $PATH
4287do
4288 IFS=$as_save_IFS
4289 test -z "$as_dir" && as_dir=.
4290 for ac_exec_ext in '' $ac_executable_extensions; do
4291 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4292 ac_cv_prog_AR="$ac_prog"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004293 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004294 break 2
4295 fi
4296done
4297done
4298IFS=$as_save_IFS
4299
4300fi
4301fi
4302AR=$ac_cv_prog_AR
4303if test -n "$AR"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004304 { echo "$as_me:$LINENO: result: $AR" >&5
4305echo "${ECHO_T}$AR" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004306else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004307 { echo "$as_me:$LINENO: result: no" >&5
4308echo "${ECHO_T}no" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004309fi
4310
4311
4312 test -n "$AR" && break
4313done
4314test -n "$AR" || AR="ar"
4315
4316
4317# tweak ARFLAGS only if the user didn't set it on the command line
4318
4319if test -z "$ARFLAGS"
4320then
4321 ARFLAGS="rc"
4322fi
4323
4324
4325# Extract the first word of "svnversion", so it can be a program name with args.
4326set dummy svnversion; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004327{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4328echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004329if test "${ac_cv_prog_SVNVERSION+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004330 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00004331else
4332 if test -n "$SVNVERSION"; then
4333 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
4334else
4335as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4336for as_dir in $PATH
4337do
4338 IFS=$as_save_IFS
4339 test -z "$as_dir" && as_dir=.
4340 for ac_exec_ext in '' $ac_executable_extensions; do
4341 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4342 ac_cv_prog_SVNVERSION="found"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004343 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004344 break 2
4345 fi
4346done
4347done
4348IFS=$as_save_IFS
4349
4350 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
4351fi
4352fi
4353SVNVERSION=$ac_cv_prog_SVNVERSION
4354if test -n "$SVNVERSION"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004355 { echo "$as_me:$LINENO: result: $SVNVERSION" >&5
4356echo "${ECHO_T}$SVNVERSION" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004357else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004358 { echo "$as_me:$LINENO: result: no" >&5
4359echo "${ECHO_T}no" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004360fi
4361
4362
4363if test $SVNVERSION = found
4364then
4365 SVNVERSION="svnversion \$(srcdir)"
4366else
4367 SVNVERSION="echo Unversioned directory"
4368fi
4369
4370case $MACHDEP in
4371bsdos*|hp*|HP*)
4372 # install -d does not work on BSDI or HP-UX
4373 if test -z "$INSTALL"
4374 then
4375 INSTALL="${srcdir}/install-sh -c"
4376 fi
4377esac
4378ac_aux_dir=
4379for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4380 if test -f "$ac_dir/install-sh"; then
4381 ac_aux_dir=$ac_dir
4382 ac_install_sh="$ac_aux_dir/install-sh -c"
4383 break
4384 elif test -f "$ac_dir/install.sh"; then
4385 ac_aux_dir=$ac_dir
4386 ac_install_sh="$ac_aux_dir/install.sh -c"
4387 break
4388 elif test -f "$ac_dir/shtool"; then
4389 ac_aux_dir=$ac_dir
4390 ac_install_sh="$ac_aux_dir/shtool install -c"
4391 break
4392 fi
4393done
4394if test -z "$ac_aux_dir"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004395 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
4396echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
Antoine Pitrou20327222009-05-24 20:39:11 +00004397 { (exit 1); exit 1; }; }
4398fi
4399
4400# These three variables are undocumented and unsupported,
4401# and are intended to be withdrawn in a future Autoconf release.
4402# They can cause serious problems if a builder's source tree is in a directory
4403# whose full name contains unusual characters.
4404ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4405ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4406ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4407
4408
4409# Find a good install program. We prefer a C program (faster),
4410# so one script is as good as another. But avoid the broken or
4411# incompatible versions:
4412# SysV /etc/install, /usr/sbin/install
4413# SunOS /usr/etc/install
4414# IRIX /sbin/install
4415# AIX /bin/install
4416# AmigaOS /C/install, which installs bootblocks on floppy discs
4417# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4418# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4419# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4420# OS/2's system install, which has a completely different semantic
4421# ./install, which can be erroneously created by make from ./install.sh.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004422{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4423echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004424if test -z "$INSTALL"; then
4425if test "${ac_cv_path_install+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004426 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00004427else
4428 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4429for as_dir in $PATH
4430do
4431 IFS=$as_save_IFS
4432 test -z "$as_dir" && as_dir=.
4433 # Account for people who put trailing slashes in PATH elements.
4434case $as_dir/ in
4435 ./ | .// | /cC/* | \
4436 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4437 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
4438 /usr/ucb/* ) ;;
4439 *)
4440 # OSF1 and SCO ODT 3.0 have their own names for install.
4441 # Don't use installbsd from OSF since it installs stuff as root
4442 # by default.
4443 for ac_prog in ginstall scoinst install; do
4444 for ac_exec_ext in '' $ac_executable_extensions; do
4445 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
4446 if test $ac_prog = install &&
4447 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4448 # AIX install. It has an incompatible calling convention.
4449 :
4450 elif test $ac_prog = install &&
4451 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4452 # program-specific install script used by HP pwplus--don't use.
4453 :
4454 else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004455 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4456 break 3
Antoine Pitrou20327222009-05-24 20:39:11 +00004457 fi
4458 fi
4459 done
4460 done
4461 ;;
4462esac
Antoine Pitrou20327222009-05-24 20:39:11 +00004463done
4464IFS=$as_save_IFS
4465
Antoine Pitrou20327222009-05-24 20:39:11 +00004466
4467fi
4468 if test "${ac_cv_path_install+set}" = set; then
4469 INSTALL=$ac_cv_path_install
4470 else
4471 # As a last resort, use the slow shell script. Don't cache a
4472 # value for INSTALL within a source directory, because that will
4473 # break other packages using the cache if that directory is
4474 # removed, or if the value is a relative name.
4475 INSTALL=$ac_install_sh
4476 fi
4477fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004478{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4479echo "${ECHO_T}$INSTALL" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004480
4481# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4482# It thinks the first close brace ends the variable substitution.
4483test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4484
4485test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4486
4487test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4488
4489
4490# Not every filesystem supports hard links
4491
4492if test -z "$LN" ; then
4493 case $ac_sys_system in
4494 CYGWIN*) LN="ln -s";;
4495 atheos*) LN="ln -s";;
4496 *) LN=ln;;
4497 esac
4498fi
4499
4500# Check for --with-pydebug
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004501{ echo "$as_me:$LINENO: checking for --with-pydebug" >&5
4502echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004503
4504# Check whether --with-pydebug was given.
4505if test "${with_pydebug+set}" = set; then
4506 withval=$with_pydebug;
4507if test "$withval" != no
4508then
4509
4510cat >>confdefs.h <<\_ACEOF
4511#define Py_DEBUG 1
4512_ACEOF
4513
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004514 { echo "$as_me:$LINENO: result: yes" >&5
4515echo "${ECHO_T}yes" >&6; };
Antoine Pitrou20327222009-05-24 20:39:11 +00004516 Py_DEBUG='true'
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004517else { echo "$as_me:$LINENO: result: no" >&5
4518echo "${ECHO_T}no" >&6; }; Py_DEBUG='false'
Antoine Pitrou20327222009-05-24 20:39:11 +00004519fi
4520else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004521 { echo "$as_me:$LINENO: result: no" >&5
4522echo "${ECHO_T}no" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004523fi
4524
4525
4526# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
4527# merged with this chunk of code?
4528
4529# Optimizer/debugger flags
4530# ------------------------
4531# (The following bit of code is complicated enough - please keep things
4532# indented properly. Just pretend you're editing Python code. ;-)
4533
4534# There are two parallel sets of case statements below, one that checks to
4535# see if OPT was set and one that does BASECFLAGS setting based upon
4536# compiler and platform. BASECFLAGS tweaks need to be made even if the
4537# user set OPT.
4538
4539# tweak OPT based on compiler and platform, only if the user didn't set
4540# it on the command line
4541
Benjamin Petersone7e59c22010-03-23 21:05:56 +00004542if test "${OPT-unset}" = "unset"
Antoine Pitrou20327222009-05-24 20:39:11 +00004543then
4544 case $GCC in
4545 yes)
4546 if test "$CC" != 'g++' ; then
4547 STRICT_PROTO="-Wstrict-prototypes"
4548 fi
4549 # For gcc 4.x we need to use -fwrapv so lets check if its supported
4550 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
4551 WRAP="-fwrapv"
4552 fi
4553 case $ac_cv_prog_cc_g in
4554 yes)
4555 if test "$Py_DEBUG" = 'true' ; then
4556 # Optimization messes up debuggers, so turn it off for
4557 # debug builds.
4558 OPT="-g -Wall $STRICT_PROTO"
4559 else
4560 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
4561 fi
4562 ;;
4563 *)
4564 OPT="-O3 -Wall $STRICT_PROTO"
4565 ;;
4566 esac
4567 case $ac_sys_system in
4568 SCO_SV*) OPT="$OPT -m486 -DSCO5"
4569 ;;
4570 esac
4571 ;;
4572
4573 *)
4574 OPT="-O"
4575 ;;
4576 esac
Antoine Pitrou20327222009-05-24 20:39:11 +00004577fi
4578
4579
4580
4581# The -arch flags for universal builds on OSX
4582UNIVERSAL_ARCH_FLAGS=
4583
4584
4585# tweak BASECFLAGS based on compiler and platform
4586case $GCC in
4587yes)
4588 # Python violates C99 rules, by casting between incompatible
4589 # pointer types. GCC may generate bad code as a result of that,
4590 # so use -fno-strict-aliasing if supported.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004591 { echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
4592echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004593 ac_save_cc="$CC"
4594 CC="$CC -fno-strict-aliasing"
4595 if test "$cross_compiling" = yes; then
4596 ac_cv_no_strict_aliasing_ok=no
4597else
4598 cat >conftest.$ac_ext <<_ACEOF
4599/* confdefs.h. */
4600_ACEOF
4601cat confdefs.h >>conftest.$ac_ext
4602cat >>conftest.$ac_ext <<_ACEOF
4603/* end confdefs.h. */
4604int main() { return 0; }
4605_ACEOF
4606rm -f conftest$ac_exeext
4607if { (ac_try="$ac_link"
4608case "(($ac_try" in
4609 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4610 *) ac_try_echo=$ac_try;;
4611esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004612eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004613 (eval "$ac_link") 2>&5
4614 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004616 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4617 { (case "(($ac_try" in
4618 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4619 *) ac_try_echo=$ac_try;;
4620esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004621eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004622 (eval "$ac_try") 2>&5
4623 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004625 (exit $ac_status); }; }; then
4626 ac_cv_no_strict_aliasing_ok=yes
4627else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004628 echo "$as_me: program exited with status $ac_status" >&5
4629echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004630sed 's/^/| /' conftest.$ac_ext >&5
4631
4632( exit $ac_status )
4633ac_cv_no_strict_aliasing_ok=no
4634fi
Antoine Pitrou20327222009-05-24 20:39:11 +00004635rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4636fi
4637
4638
4639 CC="$ac_save_cc"
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004640 { echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
4641echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004642 if test $ac_cv_no_strict_aliasing_ok = yes
4643 then
4644 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
4645 fi
4646
4647 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
4648 # support. Without this, treatment of subnormals doesn't follow
4649 # the standard.
4650 case $ac_sys_machine in
4651 alpha*)
4652 BASECFLAGS="$BASECFLAGS -mieee"
4653 ;;
4654 esac
4655
4656 case $ac_sys_system in
4657 SCO_SV*)
4658 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
4659 ;;
4660 # is there any other compiler on Darwin besides gcc?
4661 Darwin*)
4662 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
4663 # used to be here, but non-Apple gcc doesn't accept them.
4664
4665
4666 if test "${enable_universalsdk}"; then
4667 UNIVERSAL_ARCH_FLAGS=""
4668 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
Antoine Pitrou20327222009-05-24 20:39:11 +00004669 ARCH_RUN_32BIT=""
Benjamin Petersone7e59c22010-03-23 21:05:56 +00004670 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
Antoine Pitrou20327222009-05-24 20:39:11 +00004671
4672 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
Ronald Oussorend45ff2c2009-09-06 11:11:04 +00004673 ARCH_RUN_32BIT="true"
Benjamin Petersone7e59c22010-03-23 21:05:56 +00004674 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Antoine Pitrou20327222009-05-24 20:39:11 +00004675
4676 elif test "$UNIVERSAL_ARCHS" = "all" ; then
Ronald Oussorenc8c89c42010-02-11 13:24:45 +00004677 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Benjamin Petersone7e59c22010-03-23 21:05:56 +00004678 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
4679 LIPO_32BIT_FLAGS="-extract i386 -extract ppc7400"
4680 LIPO_64BIT_FLAGS="-extract x86_64 -extract ppc64"
Antoine Pitrou20327222009-05-24 20:39:11 +00004681
Ronald Oussoren856624d2009-09-08 07:13:53 +00004682 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
Ronald Oussorenc8c89c42010-02-11 13:24:45 +00004683 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Benjamin Petersone7e59c22010-03-23 21:05:56 +00004684 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
4685 LIPO_32BIT_FLAGS="-extract i386"
4686 LIPO_64BIT_FLAGS="-extract x86_64"
Ronald Oussoren856624d2009-09-08 07:13:53 +00004687
4688 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
Ronald Oussorenc8c89c42010-02-11 13:24:45 +00004689 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Benjamin Petersone7e59c22010-03-23 21:05:56 +00004690 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
4691 LIPO_32BIT_FLAGS="-extract i386 -extract ppc7400"
4692 LIPO_64BIT_FLAGS="-extract x86_64"
Ronald Oussoren856624d2009-09-08 07:13:53 +00004693
Antoine Pitrou20327222009-05-24 20:39:11 +00004694 else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004695 { { echo "$as_me:$LINENO: error: proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" >&5
4696echo "$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 +00004697 { (exit 1); exit 1; }; }
4698
4699 fi
4700
4701
4702 BASECFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
4703 tgt=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4704 if test "${UNIVERSALSDK}" != "/" -a "${tgt}" '>' '10.4' ; then
4705 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
4706 fi
4707 fi
4708
4709 # Calculate the right deployment target for this build.
4710 #
4711 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4712 if test ${cur_target} '>' 10.2; then
4713 cur_target=10.3
Ronald Oussorend45ff2c2009-09-06 11:11:04 +00004714 if test ${enable_universalsdk}; then
4715 if test "${UNIVERSAL_ARCHS}" = "all"; then
4716 # Ensure that the default platform for a
4717 # 4-way universal build is OSX 10.5,
4718 # that's the first OS release where
4719 # 4-way builds make sense.
4720 cur_target='10.5'
Ronald Oussoren856624d2009-09-08 07:13:53 +00004721
4722 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
4723 cur_target='10.5'
4724
4725 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
4726 cur_target='10.5'
4727
4728 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
4729 cur_target='10.5'
Ronald Oussorend45ff2c2009-09-06 11:11:04 +00004730 fi
4731 else
Ronald Oussoren175a8842010-02-11 13:40:06 +00004732 if test `/usr/bin/arch` = "i386"; then
Ronald Oussorend45ff2c2009-09-06 11:11:04 +00004733 # On Intel macs default to a deployment
4734 # target of 10.4, that's the first OSX
4735 # release with Intel support.
4736 cur_target="10.4"
4737 fi
4738 fi
Antoine Pitrou20327222009-05-24 20:39:11 +00004739 fi
4740 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
4741
4742 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
4743 # environment with a value that is the same as what we'll use
4744 # in the Makefile to ensure that we'll get the same compiler
4745 # environment during configure and build time.
4746 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
4747 export MACOSX_DEPLOYMENT_TARGET
4748 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
4749
4750 ;;
4751 OSF*)
4752 BASECFLAGS="$BASECFLAGS -mieee"
4753 ;;
4754 esac
4755 ;;
4756
4757*)
4758 case $ac_sys_system in
4759 OpenUNIX*|UnixWare*)
4760 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
4761 ;;
4762 OSF*)
4763 BASECFLAGS="$BASECFLAGS -ieee -std"
4764 ;;
4765 SCO_SV*)
4766 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
4767 ;;
4768 esac
4769 ;;
4770esac
4771
4772if test "$Py_DEBUG" = 'true'; then
4773 :
4774else
4775 OPT="-DNDEBUG $OPT"
4776fi
4777
4778if test "$ac_arch_flags"
4779then
4780 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
4781fi
4782
4783# disable check for icc since it seems to pass, but generates a warning
4784if test "$CC" = icc
4785then
4786 ac_cv_opt_olimit_ok=no
4787fi
4788
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004789{ echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
4790echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004791if test "${ac_cv_opt_olimit_ok+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004792 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00004793else
4794 ac_save_cc="$CC"
4795CC="$CC -OPT:Olimit=0"
4796if test "$cross_compiling" = yes; then
4797 ac_cv_opt_olimit_ok=no
4798else
4799 cat >conftest.$ac_ext <<_ACEOF
4800/* confdefs.h. */
4801_ACEOF
4802cat confdefs.h >>conftest.$ac_ext
4803cat >>conftest.$ac_ext <<_ACEOF
4804/* end confdefs.h. */
4805int main() { return 0; }
4806_ACEOF
4807rm -f conftest$ac_exeext
4808if { (ac_try="$ac_link"
4809case "(($ac_try" in
4810 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4811 *) ac_try_echo=$ac_try;;
4812esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004813eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004814 (eval "$ac_link") 2>&5
4815 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004817 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4818 { (case "(($ac_try" in
4819 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4820 *) ac_try_echo=$ac_try;;
4821esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004822eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004823 (eval "$ac_try") 2>&5
4824 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004826 (exit $ac_status); }; }; then
4827 ac_cv_opt_olimit_ok=yes
4828else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004829 echo "$as_me: program exited with status $ac_status" >&5
4830echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004831sed 's/^/| /' conftest.$ac_ext >&5
4832
4833( exit $ac_status )
4834ac_cv_opt_olimit_ok=no
4835fi
Antoine Pitrou20327222009-05-24 20:39:11 +00004836rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4837fi
4838
4839
4840CC="$ac_save_cc"
4841fi
4842
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004843{ echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
4844echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004845if test $ac_cv_opt_olimit_ok = yes; then
4846 case $ac_sys_system in
4847 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
4848 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
4849 # environment?
4850 Darwin*)
4851 ;;
4852 *)
4853 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
4854 ;;
4855 esac
4856else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004857 { echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
4858echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004859 if test "${ac_cv_olimit_ok+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004860 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00004861else
4862 ac_save_cc="$CC"
4863 CC="$CC -Olimit 1500"
4864 if test "$cross_compiling" = yes; then
4865 ac_cv_olimit_ok=no
4866else
4867 cat >conftest.$ac_ext <<_ACEOF
4868/* confdefs.h. */
4869_ACEOF
4870cat confdefs.h >>conftest.$ac_ext
4871cat >>conftest.$ac_ext <<_ACEOF
4872/* end confdefs.h. */
4873int main() { return 0; }
4874_ACEOF
4875rm -f conftest$ac_exeext
4876if { (ac_try="$ac_link"
4877case "(($ac_try" in
4878 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4879 *) ac_try_echo=$ac_try;;
4880esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004881eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004882 (eval "$ac_link") 2>&5
4883 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004885 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4886 { (case "(($ac_try" in
4887 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4888 *) ac_try_echo=$ac_try;;
4889esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004890eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004891 (eval "$ac_try") 2>&5
4892 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004894 (exit $ac_status); }; }; then
4895 ac_cv_olimit_ok=yes
4896else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004897 echo "$as_me: program exited with status $ac_status" >&5
4898echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004899sed 's/^/| /' conftest.$ac_ext >&5
4900
4901( exit $ac_status )
4902ac_cv_olimit_ok=no
4903fi
Antoine Pitrou20327222009-05-24 20:39:11 +00004904rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4905fi
4906
4907
4908 CC="$ac_save_cc"
4909fi
4910
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004911 { echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4912echo "${ECHO_T}$ac_cv_olimit_ok" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004913 if test $ac_cv_olimit_ok = yes; then
4914 BASECFLAGS="$BASECFLAGS -Olimit 1500"
4915 fi
4916fi
4917
4918# Check whether GCC supports PyArg_ParseTuple format
4919if test "$GCC" = "yes"
4920then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004921 { echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
4922echo $ECHO_N "checking whether gcc supports ParseTuple __format__... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004923 save_CFLAGS=$CFLAGS
4924 CFLAGS="$CFLAGS -Werror"
4925 cat >conftest.$ac_ext <<_ACEOF
4926/* confdefs.h. */
4927_ACEOF
4928cat confdefs.h >>conftest.$ac_ext
4929cat >>conftest.$ac_ext <<_ACEOF
4930/* end confdefs.h. */
4931
4932 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
4933
4934int
4935main ()
4936{
4937
4938 ;
4939 return 0;
4940}
4941_ACEOF
4942rm -f conftest.$ac_objext
4943if { (ac_try="$ac_compile"
4944case "(($ac_try" in
4945 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4946 *) ac_try_echo=$ac_try;;
4947esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004948eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004949 (eval "$ac_compile") 2>conftest.er1
4950 ac_status=$?
4951 grep -v '^ *+' conftest.er1 >conftest.err
4952 rm -f conftest.er1
4953 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004955 (exit $ac_status); } && {
4956 test -z "$ac_c_werror_flag" ||
4957 test ! -s conftest.err
4958 } && test -s conftest.$ac_objext; then
4959
4960cat >>confdefs.h <<\_ACEOF
4961#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
4962_ACEOF
4963
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004964 { echo "$as_me:$LINENO: result: yes" >&5
4965echo "${ECHO_T}yes" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004966else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004967 echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004968sed 's/^/| /' conftest.$ac_ext >&5
4969
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004970 { echo "$as_me:$LINENO: result: no" >&5
4971echo "${ECHO_T}no" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004972
4973fi
4974
4975rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4976 CFLAGS=$save_CFLAGS
4977fi
4978
4979# On some compilers, pthreads are available without further options
4980# (e.g. MacOS X). On some of these systems, the compiler will not
4981# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
4982# So we have to see first whether pthreads are available without
4983# options before we can check whether -Kpthread improves anything.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004984{ echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
4985echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004986if test "${ac_cv_pthread_is_default+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004987 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00004988else
4989 if test "$cross_compiling" = yes; then
4990 ac_cv_pthread_is_default=no
4991else
4992 cat >conftest.$ac_ext <<_ACEOF
4993/* confdefs.h. */
4994_ACEOF
4995cat confdefs.h >>conftest.$ac_ext
4996cat >>conftest.$ac_ext <<_ACEOF
4997/* end confdefs.h. */
4998
4999#include <pthread.h>
5000
5001void* routine(void* p){return NULL;}
5002
5003int main(){
5004 pthread_t p;
5005 if(pthread_create(&p,NULL,routine,NULL)!=0)
5006 return 1;
5007 (void)pthread_detach(p);
5008 return 0;
5009}
5010
5011_ACEOF
5012rm -f conftest$ac_exeext
5013if { (ac_try="$ac_link"
5014case "(($ac_try" in
5015 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5016 *) ac_try_echo=$ac_try;;
5017esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005018eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005019 (eval "$ac_link") 2>&5
5020 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005022 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5023 { (case "(($ac_try" in
5024 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5025 *) ac_try_echo=$ac_try;;
5026esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005027eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005028 (eval "$ac_try") 2>&5
5029 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005031 (exit $ac_status); }; }; then
5032
5033 ac_cv_pthread_is_default=yes
5034 ac_cv_kthread=no
5035 ac_cv_pthread=no
5036
5037else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005038 echo "$as_me: program exited with status $ac_status" >&5
5039echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005040sed 's/^/| /' conftest.$ac_ext >&5
5041
5042( exit $ac_status )
5043ac_cv_pthread_is_default=no
5044fi
Antoine Pitrou20327222009-05-24 20:39:11 +00005045rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5046fi
5047
5048
5049
5050fi
5051
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005052{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
5053echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005054
5055
5056if test $ac_cv_pthread_is_default = yes
5057then
5058 ac_cv_kpthread=no
5059else
5060# -Kpthread, if available, provides the right #defines
5061# and linker options to make pthread_create available
5062# Some compilers won't report that they do not support -Kpthread,
5063# so we need to run a program to see whether it really made the
5064# function available.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005065{ echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
5066echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005067if test "${ac_cv_kpthread+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005068 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00005069else
5070 ac_save_cc="$CC"
5071CC="$CC -Kpthread"
5072if test "$cross_compiling" = yes; then
5073 ac_cv_kpthread=no
5074else
5075 cat >conftest.$ac_ext <<_ACEOF
5076/* confdefs.h. */
5077_ACEOF
5078cat confdefs.h >>conftest.$ac_ext
5079cat >>conftest.$ac_ext <<_ACEOF
5080/* end confdefs.h. */
5081
5082#include <pthread.h>
5083
5084void* routine(void* p){return NULL;}
5085
5086int main(){
5087 pthread_t p;
5088 if(pthread_create(&p,NULL,routine,NULL)!=0)
5089 return 1;
5090 (void)pthread_detach(p);
5091 return 0;
5092}
5093
5094_ACEOF
5095rm -f conftest$ac_exeext
5096if { (ac_try="$ac_link"
5097case "(($ac_try" in
5098 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5099 *) ac_try_echo=$ac_try;;
5100esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005101eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005102 (eval "$ac_link") 2>&5
5103 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005105 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5106 { (case "(($ac_try" in
5107 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5108 *) ac_try_echo=$ac_try;;
5109esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005110eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005111 (eval "$ac_try") 2>&5
5112 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005114 (exit $ac_status); }; }; then
5115 ac_cv_kpthread=yes
5116else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005117 echo "$as_me: program exited with status $ac_status" >&5
5118echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005119sed 's/^/| /' conftest.$ac_ext >&5
5120
5121( exit $ac_status )
5122ac_cv_kpthread=no
5123fi
Antoine Pitrou20327222009-05-24 20:39:11 +00005124rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5125fi
5126
5127
5128CC="$ac_save_cc"
5129fi
5130
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005131{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
5132echo "${ECHO_T}$ac_cv_kpthread" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005133fi
5134
5135if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5136then
5137# -Kthread, if available, provides the right #defines
5138# and linker options to make pthread_create available
5139# Some compilers won't report that they do not support -Kthread,
5140# so we need to run a program to see whether it really made the
5141# function available.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005142{ echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
5143echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005144if test "${ac_cv_kthread+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005145 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00005146else
5147 ac_save_cc="$CC"
5148CC="$CC -Kthread"
5149if test "$cross_compiling" = yes; then
5150 ac_cv_kthread=no
5151else
5152 cat >conftest.$ac_ext <<_ACEOF
5153/* confdefs.h. */
5154_ACEOF
5155cat confdefs.h >>conftest.$ac_ext
5156cat >>conftest.$ac_ext <<_ACEOF
5157/* end confdefs.h. */
5158
5159#include <pthread.h>
5160
5161void* routine(void* p){return NULL;}
5162
5163int main(){
5164 pthread_t p;
5165 if(pthread_create(&p,NULL,routine,NULL)!=0)
5166 return 1;
5167 (void)pthread_detach(p);
5168 return 0;
5169}
5170
5171_ACEOF
5172rm -f conftest$ac_exeext
5173if { (ac_try="$ac_link"
5174case "(($ac_try" in
5175 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5176 *) ac_try_echo=$ac_try;;
5177esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005178eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005179 (eval "$ac_link") 2>&5
5180 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005182 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5183 { (case "(($ac_try" in
5184 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5185 *) ac_try_echo=$ac_try;;
5186esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005187eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005188 (eval "$ac_try") 2>&5
5189 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005191 (exit $ac_status); }; }; then
5192 ac_cv_kthread=yes
5193else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005194 echo "$as_me: program exited with status $ac_status" >&5
5195echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005196sed 's/^/| /' conftest.$ac_ext >&5
5197
5198( exit $ac_status )
5199ac_cv_kthread=no
5200fi
Antoine Pitrou20327222009-05-24 20:39:11 +00005201rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5202fi
5203
5204
5205CC="$ac_save_cc"
5206fi
5207
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005208{ echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
5209echo "${ECHO_T}$ac_cv_kthread" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005210fi
5211
5212if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5213then
5214# -pthread, if available, provides the right #defines
5215# and linker options to make pthread_create available
5216# Some compilers won't report that they do not support -pthread,
5217# so we need to run a program to see whether it really made the
5218# function available.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005219{ echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
5220echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005221if test "${ac_cv_thread+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005222 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00005223else
5224 ac_save_cc="$CC"
5225CC="$CC -pthread"
5226if test "$cross_compiling" = yes; then
5227 ac_cv_pthread=no
5228else
5229 cat >conftest.$ac_ext <<_ACEOF
5230/* confdefs.h. */
5231_ACEOF
5232cat confdefs.h >>conftest.$ac_ext
5233cat >>conftest.$ac_ext <<_ACEOF
5234/* end confdefs.h. */
5235
5236#include <pthread.h>
5237
5238void* routine(void* p){return NULL;}
5239
5240int main(){
5241 pthread_t p;
5242 if(pthread_create(&p,NULL,routine,NULL)!=0)
5243 return 1;
5244 (void)pthread_detach(p);
5245 return 0;
5246}
5247
5248_ACEOF
5249rm -f conftest$ac_exeext
5250if { (ac_try="$ac_link"
5251case "(($ac_try" in
5252 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5253 *) ac_try_echo=$ac_try;;
5254esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005255eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005256 (eval "$ac_link") 2>&5
5257 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005258 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005259 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5260 { (case "(($ac_try" in
5261 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5262 *) ac_try_echo=$ac_try;;
5263esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005264eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005265 (eval "$ac_try") 2>&5
5266 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005268 (exit $ac_status); }; }; then
5269 ac_cv_pthread=yes
5270else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005271 echo "$as_me: program exited with status $ac_status" >&5
5272echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005273sed 's/^/| /' conftest.$ac_ext >&5
5274
5275( exit $ac_status )
5276ac_cv_pthread=no
5277fi
Antoine Pitrou20327222009-05-24 20:39:11 +00005278rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5279fi
5280
5281
5282CC="$ac_save_cc"
5283fi
5284
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005285{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5286echo "${ECHO_T}$ac_cv_pthread" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005287fi
5288
5289# If we have set a CC compiler flag for thread support then
5290# check if it works for CXX, too.
5291ac_cv_cxx_thread=no
5292if test ! -z "$CXX"
5293then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005294{ echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5295echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005296ac_save_cxx="$CXX"
5297
5298if test "$ac_cv_kpthread" = "yes"
5299then
5300 CXX="$CXX -Kpthread"
5301 ac_cv_cxx_thread=yes
5302elif test "$ac_cv_kthread" = "yes"
5303then
5304 CXX="$CXX -Kthread"
5305 ac_cv_cxx_thread=yes
5306elif test "$ac_cv_pthread" = "yes"
5307then
5308 CXX="$CXX -pthread"
5309 ac_cv_cxx_thread=yes
5310fi
5311
5312if test $ac_cv_cxx_thread = yes
5313then
5314 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5315 $CXX -c conftest.$ac_ext 2>&5
5316 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5317 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5318 then
5319 ac_cv_cxx_thread=yes
5320 else
5321 ac_cv_cxx_thread=no
5322 fi
5323 rm -fr conftest*
5324fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005325{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5326echo "${ECHO_T}$ac_cv_cxx_thread" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005327fi
5328CXX="$ac_save_cxx"
5329
5330
5331# checks for header files
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005332{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5333echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005334if test "${ac_cv_header_stdc+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005335 echo $ECHO_N "(cached) $ECHO_C" >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00005336else
5337 cat >conftest.$ac_ext <<_ACEOF
5338/* confdefs.h. */
5339_ACEOF
5340cat confdefs.h >>conftest.$ac_ext
5341cat >>conftest.$ac_ext <<_ACEOF
5342/* end confdefs.h. */
5343#include <stdlib.h>
5344#include <stdarg.h>
5345#include <string.h>
5346#include <float.h>
5347
5348int
5349main ()
5350{
5351
5352 ;
5353 return 0;
5354}
5355_ACEOF
5356rm -f conftest.$ac_objext
5357if { (ac_try="$ac_compile"
5358case "(($ac_try" in
5359 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5360 *) ac_try_echo=$ac_try;;
5361esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005362eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005363 (eval "$ac_compile") 2>conftest.er1
5364 ac_status=$?
5365 grep -v '^ *+' conftest.er1 >conftest.err
5366 rm -f conftest.er1
5367 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005369 (exit $ac_status); } && {
5370 test -z "$ac_c_werror_flag" ||
5371 test ! -s conftest.err
5372 } && test -s conftest.$ac_objext; then
5373 ac_cv_header_stdc=yes
5374else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005375 echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005376sed 's/^/| /' conftest.$ac_ext >&5
5377
5378 ac_cv_header_stdc=no
5379fi
5380
5381rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5382
5383if test $ac_cv_header_stdc = yes; then
5384 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5385 cat >conftest.$ac_ext <<_ACEOF
5386/* confdefs.h. */
5387_ACEOF
5388cat confdefs.h >>conftest.$ac_ext
5389cat >>conftest.$ac_ext <<_ACEOF
5390/* end confdefs.h. */
5391#include <string.h>
5392
5393_ACEOF
5394if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5395 $EGREP "memchr" >/dev/null 2>&1; then
5396 :
5397else
5398 ac_cv_header_stdc=no
5399fi
Benjamin Petersone7e59c22010-03-23 21:05:56 +00005400rm -f conftest*
Antoine Pitrou20327222009-05-24 20:39:11 +00005401
5402fi
5403
5404if test $ac_cv_header_stdc = yes; then
5405 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5406 cat >conftest.$ac_ext <<_ACEOF
5407/* confdefs.h. */
5408_ACEOF
5409cat confdefs.h >>conftest.$ac_ext
5410cat >>conftest.$ac_ext <<_ACEOF
5411/* end confdefs.h. */
5412#include <stdlib.h>
5413
5414_ACEOF
5415if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5416 $EGREP "free" >/dev/null 2>&1; then
5417 :
5418else
5419 ac_cv_header_stdc=no
5420fi
Benjamin Petersone7e59c22010-03-23 21:05:56 +00005421rm -f conftest*
Antoine Pitrou20327222009-05-24 20:39:11 +00005422
5423fi
5424
5425if test $ac_cv_header_stdc = yes; then
5426 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5427 if test "$cross_compiling" = yes; then
5428 :
5429else
5430 cat >conftest.$ac_ext <<_ACEOF
5431/* confdefs.h. */
5432_ACEOF
5433cat confdefs.h >>conftest.$ac_ext
5434cat >>conftest.$ac_ext <<_ACEOF
5435/* end confdefs.h. */
5436#include <ctype.h>
5437#include <stdlib.h>
5438#if ((' ' & 0x0FF) == 0x020)
5439# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5440# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5441#else
5442# define ISLOWER(c) \
5443 (('a' <= (c) && (c) <= 'i') \
5444 || ('j' <= (c) && (c) <= 'r') \
5445 || ('s' <= (c) && (c) <= 'z'))
5446# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5447#endif
5448
5449#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5450int
5451main ()
5452{
5453 int i;
5454 for (i = 0; i < 256; i++)
5455 if (XOR (islower (i), ISLOWER (i))
5456 || toupper (i) != TOUPPER (i))
5457 return 2;
5458 return 0;
5459}
5460_ACEOF
5461rm -f conftest$ac_exeext
5462if { (ac_try="$ac_link"
5463case "(($ac_try" in
5464 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5465 *) ac_try_echo=$ac_try;;
5466esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005467eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005468 (eval "$ac_link") 2>&5
5469 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005471 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5472 { (case "(($ac_try" in
5473 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5474 *) ac_try_echo=$ac_try;;
5475esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005476eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005477 (eval "$ac_try") 2>&5
5478 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005480 (exit $ac_status); }; }; then
5481 :
5482else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005483 echo "$as_me: program exited with status $ac_status" >&5
5484echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005485sed 's/^/| /' conftest.$ac_ext >&5
5486
5487( exit $ac_status )
5488ac_cv_header_stdc=no
5489fi
Antoine Pitrou20327222009-05-24 20:39:11 +00005490rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5491fi
5492
5493
5494fi
5495fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005496{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5497echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005498if test $ac_cv_header_stdc = yes; then
5499
5500cat >>confdefs.h <<\_ACEOF
5501#define STDC_HEADERS 1
5502_ACEOF
5503
5504fi
5505
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005506# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5517 inttypes.h stdint.h unistd.h
5518do
5519as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5520{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5521echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5522if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5523 echo $ECHO_N "(cached) $ECHO_C" >&6
5524else
5525 cat >conftest.$ac_ext <<_ACEOF
5526/* confdefs.h. */
5527_ACEOF
5528cat confdefs.h >>conftest.$ac_ext
5529cat >>conftest.$ac_ext <<_ACEOF
5530/* end confdefs.h. */
5531$ac_includes_default
5532
5533#include <$ac_header>
5534_ACEOF
5535rm -f conftest.$ac_objext
5536if { (ac_try="$ac_compile"
5537case "(($ac_try" in
5538 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5539 *) ac_try_echo=$ac_try;;
5540esac
5541eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5542 (eval "$ac_compile") 2>conftest.er1
5543 ac_status=$?
5544 grep -v '^ *+' conftest.er1 >conftest.err
5545 rm -f conftest.er1
5546 cat conftest.err >&5
5547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5548 (exit $ac_status); } && {
5549 test -z "$ac_c_werror_flag" ||
5550 test ! -s conftest.err
5551 } && test -s conftest.$ac_objext; then
5552 eval "$as_ac_Header=yes"
5553else
5554 echo "$as_me: failed program was:" >&5
5555sed 's/^/| /' conftest.$ac_ext >&5
5556
5557 eval "$as_ac_Header=no"
5558fi
5559
5560rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5561fi
5562ac_res=`eval echo '${'$as_ac_Header'}'`
5563 { echo "$as_me:$LINENO: result: $ac_res" >&5
5564echo "${ECHO_T}$ac_res" >&6; }
5565if test `eval echo '${'$as_ac_Header'}'` = yes; then
5566 cat >>confdefs.h <<_ACEOF
5567#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5568_ACEOF
5569
5570fi
5571
5572done
5573
5574
Antoine Pitrou20327222009-05-24 20:39:11 +00005575
Martin v. Löwis11437992002-04-12 09:54:03 +00005576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
Anthony Baxter8a560de2004-10-13 15:30:56 +00005611
Martin v. Löwisc3001752005-01-23 09:27:24 +00005612
Martin v. Löwis11017b12006-01-14 18:12:57 +00005613
Thomas Wouters477c8d52006-05-27 19:21:47 +00005614
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005615
5616
5617
5618
5619
5620
5621
5622
Thomas Wouters89f507f2006-12-13 04:49:30 +00005623
Christian Heimes043d6f62008-01-07 17:19:16 +00005624
Christian Heimes4fbc72b2008-03-22 00:47:35 +00005625
5626
Christian Heimesbbe741d2008-03-28 10:53:29 +00005627
Benjamin Petersonde9c8692008-07-01 18:23:09 +00005628
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005629for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5630fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00005631ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00005632shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005633unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00005634sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
5635sys/lock.h sys/mkdev.h sys/modem.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005636sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Benjamin Petersonde9c8692008-07-01 18:23:09 +00005637sys/termio.h sys/time.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005638sys/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 +00005639sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimes043d6f62008-01-07 17:19:16 +00005640bluetooth/bluetooth.h linux/tipc.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00005641do
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005642as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005643if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005644 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5645echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005646if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005647 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005648fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005649ac_res=`eval echo '${'$as_ac_Header'}'`
5650 { echo "$as_me:$LINENO: result: $ac_res" >&5
5651echo "${ECHO_T}$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005652else
Martin v. Löwis11437992002-04-12 09:54:03 +00005653 # Is the header compilable?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005654{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5655echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005656cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005657/* confdefs.h. */
5658_ACEOF
5659cat confdefs.h >>conftest.$ac_ext
5660cat >>conftest.$ac_ext <<_ACEOF
5661/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005662$ac_includes_default
5663#include <$ac_header>
5664_ACEOF
5665rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005666if { (ac_try="$ac_compile"
5667case "(($ac_try" in
5668 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5669 *) ac_try_echo=$ac_try;;
5670esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005671eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005672 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005673 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005674 grep -v '^ *+' conftest.er1 >conftest.err
5675 rm -f conftest.er1
5676 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005678 (exit $ac_status); } && {
5679 test -z "$ac_c_werror_flag" ||
5680 test ! -s conftest.err
5681 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005682 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00005683else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005684 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005685sed 's/^/| /' conftest.$ac_ext >&5
5686
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005687 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005688fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005689
5690rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005691{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5692echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005693
5694# Is the header present?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005695{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5696echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005697cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005698/* confdefs.h. */
5699_ACEOF
5700cat confdefs.h >>conftest.$ac_ext
5701cat >>conftest.$ac_ext <<_ACEOF
5702/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005703#include <$ac_header>
5704_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005705if { (ac_try="$ac_cpp conftest.$ac_ext"
5706case "(($ac_try" in
5707 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5708 *) ac_try_echo=$ac_try;;
5709esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005710eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005711 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005712 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005713 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00005714 rm -f conftest.er1
5715 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005717 (exit $ac_status); } >/dev/null && {
5718 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5719 test ! -s conftest.err
5720 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005721 ac_header_preproc=yes
5722else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005723 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005724sed 's/^/| /' conftest.$ac_ext >&5
5725
Martin v. Löwis11437992002-04-12 09:54:03 +00005726 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00005727fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005728
Martin v. Löwis11437992002-04-12 09:54:03 +00005729rm -f conftest.err conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005730{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5731echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005732
5733# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005734case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5735 yes:no: )
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005736 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5737echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
5738 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5739echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005740 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005741 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005742 no:yes:* )
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005743 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5744echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
5745 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5746echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5747 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5748echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5749 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5750echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
5751 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5752echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5753 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5754echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005755 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00005756## -------------------------------------- ##
5757## Report this to http://bugs.python.org/ ##
5758## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005759_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005760 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005761 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00005762esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005763{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5764echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005765if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005766 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005767else
Skip Montanarof0d5f792004-08-15 14:08:23 +00005768 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005769fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005770ac_res=`eval echo '${'$as_ac_Header'}'`
5771 { echo "$as_me:$LINENO: result: $ac_res" >&5
5772echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005773
5774fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005775if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005776 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005777#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005778_ACEOF
5779
5780fi
5781
Guido van Rossum627b2d71993-12-24 10:39:16 +00005782done
5783
Martin v. Löwis11437992002-04-12 09:54:03 +00005784
5785
5786
5787
5788
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005789ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005790for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005791 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
5792{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5793echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005794if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005795 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005796else
Martin v. Löwis11437992002-04-12 09:54:03 +00005797 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005798/* confdefs.h. */
5799_ACEOF
5800cat confdefs.h >>conftest.$ac_ext
5801cat >>conftest.$ac_ext <<_ACEOF
5802/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005803#include <sys/types.h>
5804#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00005805
Martin v. Löwis11437992002-04-12 09:54:03 +00005806int
5807main ()
5808{
5809if ((DIR *) 0)
5810return 0;
5811 ;
5812 return 0;
5813}
5814_ACEOF
5815rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005816if { (ac_try="$ac_compile"
5817case "(($ac_try" in
5818 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5819 *) ac_try_echo=$ac_try;;
5820esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005821eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005822 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005823 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005824 grep -v '^ *+' conftest.er1 >conftest.err
5825 rm -f conftest.er1
5826 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005828 (exit $ac_status); } && {
5829 test -z "$ac_c_werror_flag" ||
5830 test ! -s conftest.err
5831 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005832 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00005833else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005834 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005835sed 's/^/| /' conftest.$ac_ext >&5
5836
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005837 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005838fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005839
5840rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005841fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005842ac_res=`eval echo '${'$as_ac_Header'}'`
5843 { echo "$as_me:$LINENO: result: $ac_res" >&5
5844echo "${ECHO_T}$ac_res" >&6; }
5845if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005846 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005847#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005848_ACEOF
5849
5850ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00005851fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005852
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005853done
5854# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5855if test $ac_header_dirent = dirent.h; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005856 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5857echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005858if test "${ac_cv_search_opendir+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005859 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005860else
Martin v. Löwis11437992002-04-12 09:54:03 +00005861 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005862cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005863/* confdefs.h. */
5864_ACEOF
5865cat confdefs.h >>conftest.$ac_ext
5866cat >>conftest.$ac_ext <<_ACEOF
5867/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005868
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005869/* Override any GCC internal prototype to avoid an error.
5870 Use char because int might match the return type of a GCC
5871 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005872#ifdef __cplusplus
5873extern "C"
5874#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005875char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005876int
5877main ()
5878{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005879return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005880 ;
5881 return 0;
5882}
5883_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005884for ac_lib in '' dir; do
5885 if test -z "$ac_lib"; then
5886 ac_res="none required"
5887 else
5888 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005889 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005890 fi
5891 rm -f conftest.$ac_objext conftest$ac_exeext
5892if { (ac_try="$ac_link"
5893case "(($ac_try" in
5894 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5895 *) ac_try_echo=$ac_try;;
5896esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005897eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005898 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005899 ac_status=$?
5900 grep -v '^ *+' conftest.er1 >conftest.err
5901 rm -f conftest.er1
5902 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005904 (exit $ac_status); } && {
5905 test -z "$ac_c_werror_flag" ||
5906 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005907 } && test -s conftest$ac_exeext &&
5908 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005909 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00005910else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005911 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005912sed 's/^/| /' conftest.$ac_ext >&5
5913
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005914
Thomas Wouters477c8d52006-05-27 19:21:47 +00005915fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005916
5917rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5918 conftest$ac_exeext
5919 if test "${ac_cv_search_opendir+set}" = set; then
5920 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005921fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005922done
5923if test "${ac_cv_search_opendir+set}" = set; then
5924 :
5925else
5926 ac_cv_search_opendir=no
5927fi
5928rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005929LIBS=$ac_func_search_save_LIBS
5930fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005931{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5932echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005933ac_res=$ac_cv_search_opendir
5934if test "$ac_res" != no; then
5935 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005936
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005937fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005938
Michael W. Hudson54241132001-12-07 15:38:26 +00005939else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005940 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5941echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005942if test "${ac_cv_search_opendir+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005943 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005944else
5945 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005946cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005947/* confdefs.h. */
5948_ACEOF
5949cat confdefs.h >>conftest.$ac_ext
5950cat >>conftest.$ac_ext <<_ACEOF
5951/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005952
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005953/* Override any GCC internal prototype to avoid an error.
5954 Use char because int might match the return type of a GCC
5955 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005956#ifdef __cplusplus
5957extern "C"
5958#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005959char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005960int
5961main ()
5962{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005963return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005964 ;
5965 return 0;
5966}
5967_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005968for ac_lib in '' x; do
5969 if test -z "$ac_lib"; then
5970 ac_res="none required"
5971 else
5972 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005973 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005974 fi
5975 rm -f conftest.$ac_objext conftest$ac_exeext
5976if { (ac_try="$ac_link"
5977case "(($ac_try" in
5978 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5979 *) ac_try_echo=$ac_try;;
5980esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005981eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005982 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005983 ac_status=$?
5984 grep -v '^ *+' conftest.er1 >conftest.err
5985 rm -f conftest.er1
5986 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005988 (exit $ac_status); } && {
5989 test -z "$ac_c_werror_flag" ||
5990 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005991 } && test -s conftest$ac_exeext &&
5992 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005993 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00005994else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00005995 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005996sed 's/^/| /' conftest.$ac_ext >&5
5997
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005998
Thomas Wouters477c8d52006-05-27 19:21:47 +00005999fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006000
6001rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6002 conftest$ac_exeext
6003 if test "${ac_cv_search_opendir+set}" = set; then
6004 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006005fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006006done
6007if test "${ac_cv_search_opendir+set}" = set; then
6008 :
6009else
6010 ac_cv_search_opendir=no
6011fi
6012rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006013LIBS=$ac_func_search_save_LIBS
6014fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006015{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
6016echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006017ac_res=$ac_cv_search_opendir
6018if test "$ac_res" != no; then
6019 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006020
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006021fi
6022
6023fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006024
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006025{ echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
6026echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006027if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006028 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006029else
6030 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006031/* confdefs.h. */
6032_ACEOF
6033cat confdefs.h >>conftest.$ac_ext
6034cat >>conftest.$ac_ext <<_ACEOF
6035/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006036#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006037int
6038main ()
6039{
6040return makedev(0, 0);
6041 ;
6042 return 0;
6043}
6044_ACEOF
6045rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006046if { (ac_try="$ac_link"
6047case "(($ac_try" in
6048 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6049 *) ac_try_echo=$ac_try;;
6050esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006051eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006052 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006053 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006054 grep -v '^ *+' conftest.er1 >conftest.err
6055 rm -f conftest.er1
6056 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006058 (exit $ac_status); } && {
6059 test -z "$ac_c_werror_flag" ||
6060 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006061 } && test -s conftest$ac_exeext &&
6062 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006063 ac_cv_header_sys_types_h_makedev=yes
6064else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006065 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006066sed 's/^/| /' conftest.$ac_ext >&5
6067
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006068 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006069fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006070
6071rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006072 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006073
6074fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006075{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
6076echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006077
6078if test $ac_cv_header_sys_types_h_makedev = no; then
6079if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006080 { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6081echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006082if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006083 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006084fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006085{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6086echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006087else
6088 # Is the header compilable?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006089{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
6090echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006091cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006092/* confdefs.h. */
6093_ACEOF
6094cat confdefs.h >>conftest.$ac_ext
6095cat >>conftest.$ac_ext <<_ACEOF
6096/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006097$ac_includes_default
6098#include <sys/mkdev.h>
6099_ACEOF
6100rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006101if { (ac_try="$ac_compile"
6102case "(($ac_try" in
6103 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6104 *) ac_try_echo=$ac_try;;
6105esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006106eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006107 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006108 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006109 grep -v '^ *+' conftest.er1 >conftest.err
6110 rm -f conftest.er1
6111 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006113 (exit $ac_status); } && {
6114 test -z "$ac_c_werror_flag" ||
6115 test ! -s conftest.err
6116 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006117 ac_header_compiler=yes
6118else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006119 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006120sed 's/^/| /' conftest.$ac_ext >&5
6121
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006122 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006123fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006124
6125rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006126{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6127echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006128
6129# Is the header present?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006130{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
6131echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006132cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006133/* confdefs.h. */
6134_ACEOF
6135cat confdefs.h >>conftest.$ac_ext
6136cat >>conftest.$ac_ext <<_ACEOF
6137/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006138#include <sys/mkdev.h>
6139_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006140if { (ac_try="$ac_cpp conftest.$ac_ext"
6141case "(($ac_try" in
6142 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6143 *) ac_try_echo=$ac_try;;
6144esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006145eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006146 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006147 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006148 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006149 rm -f conftest.er1
6150 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006152 (exit $ac_status); } >/dev/null && {
6153 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6154 test ! -s conftest.err
6155 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006156 ac_header_preproc=yes
6157else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006158 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006159sed 's/^/| /' conftest.$ac_ext >&5
6160
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006161 ac_header_preproc=no
6162fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006163
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006164rm -f conftest.err conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006165{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6166echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006167
6168# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006169case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6170 yes:no: )
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006171 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
6172echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6173 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
6174echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006175 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006176 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006177 no:yes:* )
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006178 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
6179echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
6180 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
6181echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
6182 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
6183echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
6184 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
6185echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
6186 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
6187echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
6188 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
6189echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006190 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00006191## -------------------------------------- ##
6192## Report this to http://bugs.python.org/ ##
6193## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006194_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006195 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006196 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006197esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006198{ echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6199echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006200if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006201 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006202else
6203 ac_cv_header_sys_mkdev_h=$ac_header_preproc
6204fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006205{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6206echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006207
6208fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006209if test $ac_cv_header_sys_mkdev_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006210
6211cat >>confdefs.h <<\_ACEOF
6212#define MAJOR_IN_MKDEV 1
6213_ACEOF
6214
6215fi
6216
6217
6218
6219 if test $ac_cv_header_sys_mkdev_h = no; then
6220 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006221 { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6222echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006223if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006224 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006225fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006226{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6227echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006228else
6229 # Is the header compilable?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006230{ echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6231echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006232cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006233/* confdefs.h. */
6234_ACEOF
6235cat confdefs.h >>conftest.$ac_ext
6236cat >>conftest.$ac_ext <<_ACEOF
6237/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006238$ac_includes_default
6239#include <sys/sysmacros.h>
6240_ACEOF
6241rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006242if { (ac_try="$ac_compile"
6243case "(($ac_try" in
6244 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6245 *) ac_try_echo=$ac_try;;
6246esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006247eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006248 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006249 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006250 grep -v '^ *+' conftest.er1 >conftest.err
6251 rm -f conftest.er1
6252 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006253 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006254 (exit $ac_status); } && {
6255 test -z "$ac_c_werror_flag" ||
6256 test ! -s conftest.err
6257 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006258 ac_header_compiler=yes
6259else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006260 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006261sed 's/^/| /' conftest.$ac_ext >&5
6262
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006263 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006264fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006265
6266rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006267{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6268echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006269
6270# Is the header present?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006271{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6272echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006273cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006274/* confdefs.h. */
6275_ACEOF
6276cat confdefs.h >>conftest.$ac_ext
6277cat >>conftest.$ac_ext <<_ACEOF
6278/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006279#include <sys/sysmacros.h>
6280_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006281if { (ac_try="$ac_cpp conftest.$ac_ext"
6282case "(($ac_try" in
6283 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6284 *) ac_try_echo=$ac_try;;
6285esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006286eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006287 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006288 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006289 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006290 rm -f conftest.er1
6291 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006292 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006293 (exit $ac_status); } >/dev/null && {
6294 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6295 test ! -s conftest.err
6296 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006297 ac_header_preproc=yes
6298else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006299 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006300sed 's/^/| /' conftest.$ac_ext >&5
6301
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006302 ac_header_preproc=no
6303fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006304
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006305rm -f conftest.err conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006306{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6307echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006308
6309# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006310case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6311 yes:no: )
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006312 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6313echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6314 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6315echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006316 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006317 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006318 no:yes:* )
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006319 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6320echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
6321 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6322echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6323 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6324echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6325 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6326echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
6327 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6328echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
6329 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6330echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006331 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00006332## -------------------------------------- ##
6333## Report this to http://bugs.python.org/ ##
6334## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006335_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006336 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006337 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006338esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006339{ echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6340echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006341if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006342 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006343else
6344 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6345fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006346{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6347echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006348
6349fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006350if test $ac_cv_header_sys_sysmacros_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006351
6352cat >>confdefs.h <<\_ACEOF
6353#define MAJOR_IN_SYSMACROS 1
6354_ACEOF
6355
6356fi
6357
6358
6359 fi
6360fi
6361
Michael W. Hudson54241132001-12-07 15:38:26 +00006362
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006363# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006364
6365for ac_header in term.h
6366do
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006367as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6368{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6369echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006370if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006371 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006372else
6373 cat >conftest.$ac_ext <<_ACEOF
6374/* confdefs.h. */
6375_ACEOF
6376cat confdefs.h >>conftest.$ac_ext
6377cat >>conftest.$ac_ext <<_ACEOF
6378/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006379
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006380#ifdef HAVE_CURSES_H
6381#include <curses.h>
6382#endif
6383
6384
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006385#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006386_ACEOF
6387rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006388if { (ac_try="$ac_compile"
6389case "(($ac_try" in
6390 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6391 *) ac_try_echo=$ac_try;;
6392esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006393eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006394 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006395 ac_status=$?
6396 grep -v '^ *+' conftest.er1 >conftest.err
6397 rm -f conftest.er1
6398 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006400 (exit $ac_status); } && {
6401 test -z "$ac_c_werror_flag" ||
6402 test ! -s conftest.err
6403 } && test -s conftest.$ac_objext; then
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006404 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006405else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006406 echo "$as_me: failed program was:" >&5
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006407sed 's/^/| /' conftest.$ac_ext >&5
6408
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006409 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006410fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006411
6412rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006413fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006414ac_res=`eval echo '${'$as_ac_Header'}'`
6415 { echo "$as_me:$LINENO: result: $ac_res" >&5
6416echo "${ECHO_T}$ac_res" >&6; }
6417if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006418 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006419#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006420_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006421
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006422fi
6423
6424done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006425
6426
Martin v. Löwis11017b12006-01-14 18:12:57 +00006427# On Linux, netlink.h requires asm/types.h
6428
6429for ac_header in linux/netlink.h
6430do
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006431as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6432{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6433echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006434if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006435 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11017b12006-01-14 18:12:57 +00006436else
6437 cat >conftest.$ac_ext <<_ACEOF
6438/* confdefs.h. */
6439_ACEOF
6440cat confdefs.h >>conftest.$ac_ext
6441cat >>conftest.$ac_ext <<_ACEOF
6442/* end confdefs.h. */
6443
6444#ifdef HAVE_ASM_TYPES_H
6445#include <asm/types.h>
6446#endif
6447#ifdef HAVE_SYS_SOCKET_H
6448#include <sys/socket.h>
6449#endif
6450
6451
6452#include <$ac_header>
6453_ACEOF
6454rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006455if { (ac_try="$ac_compile"
6456case "(($ac_try" in
6457 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6458 *) ac_try_echo=$ac_try;;
6459esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006460eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006461 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006462 ac_status=$?
6463 grep -v '^ *+' conftest.er1 >conftest.err
6464 rm -f conftest.er1
6465 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006467 (exit $ac_status); } && {
6468 test -z "$ac_c_werror_flag" ||
6469 test ! -s conftest.err
6470 } && test -s conftest.$ac_objext; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006471 eval "$as_ac_Header=yes"
6472else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006473 echo "$as_me: failed program was:" >&5
Martin v. Löwis11017b12006-01-14 18:12:57 +00006474sed 's/^/| /' conftest.$ac_ext >&5
6475
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006476 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00006477fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006478
6479rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00006480fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006481ac_res=`eval echo '${'$as_ac_Header'}'`
6482 { echo "$as_me:$LINENO: result: $ac_res" >&5
6483echo "${ECHO_T}$ac_res" >&6; }
6484if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006485 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006486#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006487_ACEOF
6488
6489fi
6490
6491done
6492
6493
Guido van Rossum627b2d71993-12-24 10:39:16 +00006494# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006495was_it_defined=no
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006496{ echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
6497echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006498cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006499/* confdefs.h. */
6500_ACEOF
6501cat confdefs.h >>conftest.$ac_ext
6502cat >>conftest.$ac_ext <<_ACEOF
6503/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006504#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006505
6506_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006507if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006508 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006509 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006510else
Martin v. Löwis11437992002-04-12 09:54:03 +00006511
6512
6513cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006514#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00006515_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006516
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006517
Guido van Rossum627b2d71993-12-24 10:39:16 +00006518fi
Benjamin Petersone7e59c22010-03-23 21:05:56 +00006519rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006520
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006521{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
6522echo "${ECHO_T}$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006523
Neal Norwitz11690112002-07-30 01:08:28 +00006524# Check whether using makedev requires defining _OSF_SOURCE
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006525{ echo "$as_me:$LINENO: checking for makedev" >&5
6526echo $ECHO_N "checking for makedev... $ECHO_C" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006527cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006528/* confdefs.h. */
6529_ACEOF
6530cat confdefs.h >>conftest.$ac_ext
6531cat >>conftest.$ac_ext <<_ACEOF
6532/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006533#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006534int
6535main ()
6536{
6537 makedev(0, 0)
6538 ;
6539 return 0;
6540}
6541_ACEOF
6542rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006543if { (ac_try="$ac_link"
6544case "(($ac_try" in
6545 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6546 *) ac_try_echo=$ac_try;;
6547esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006548eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006549 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006550 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006551 grep -v '^ *+' conftest.er1 >conftest.err
6552 rm -f conftest.er1
6553 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006555 (exit $ac_status); } && {
6556 test -z "$ac_c_werror_flag" ||
6557 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006558 } && test -s conftest$ac_exeext &&
6559 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006560 ac_cv_has_makedev=yes
6561else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006562 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006563sed 's/^/| /' conftest.$ac_ext >&5
6564
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006565 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006566fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006567
6568rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006569 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006570if test "$ac_cv_has_makedev" = "no"; then
6571 # we didn't link, try if _OSF_SOURCE will allow us to link
6572 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006573/* confdefs.h. */
6574_ACEOF
6575cat confdefs.h >>conftest.$ac_ext
6576cat >>conftest.$ac_ext <<_ACEOF
6577/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006578
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006579#define _OSF_SOURCE 1
6580#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006581
Neal Norwitz11690112002-07-30 01:08:28 +00006582int
6583main ()
6584{
6585 makedev(0, 0)
6586 ;
6587 return 0;
6588}
6589_ACEOF
6590rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006591if { (ac_try="$ac_link"
6592case "(($ac_try" in
6593 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6594 *) ac_try_echo=$ac_try;;
6595esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006596eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006597 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006598 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006599 grep -v '^ *+' conftest.er1 >conftest.err
6600 rm -f conftest.er1
6601 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006603 (exit $ac_status); } && {
6604 test -z "$ac_c_werror_flag" ||
6605 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006606 } && test -s conftest$ac_exeext &&
6607 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006608 ac_cv_has_makedev=yes
6609else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006610 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006611sed 's/^/| /' conftest.$ac_ext >&5
6612
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006613 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006614fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006615
6616rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006617 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006618 if test "$ac_cv_has_makedev" = "yes"; then
6619
6620cat >>confdefs.h <<\_ACEOF
6621#define _OSF_SOURCE 1
6622_ACEOF
6623
6624 fi
6625fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006626{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
6627echo "${ECHO_T}$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006628if test "$ac_cv_has_makedev" = "yes"; then
6629
6630cat >>confdefs.h <<\_ACEOF
6631#define HAVE_MAKEDEV 1
6632_ACEOF
6633
6634fi
6635
Martin v. Löwis399a6892002-10-04 10:22:02 +00006636# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6637# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6638# defined, but the compiler does not support pragma redefine_extname,
6639# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6640# structures (such as rlimit64) without declaring them. As a
6641# work-around, disable LFS on such configurations
6642
6643use_lfs=yes
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006644{ echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
6645echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006646cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006647/* confdefs.h. */
6648_ACEOF
6649cat confdefs.h >>conftest.$ac_ext
6650cat >>conftest.$ac_ext <<_ACEOF
6651/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006652
6653#define _LARGEFILE_SOURCE 1
6654#define _FILE_OFFSET_BITS 64
6655#include <sys/resource.h>
6656
Martin v. Löwis399a6892002-10-04 10:22:02 +00006657int
6658main ()
6659{
6660struct rlimit foo;
6661 ;
6662 return 0;
6663}
6664_ACEOF
6665rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006666if { (ac_try="$ac_compile"
6667case "(($ac_try" in
6668 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6669 *) ac_try_echo=$ac_try;;
6670esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006671eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006672 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00006673 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006674 grep -v '^ *+' conftest.er1 >conftest.err
6675 rm -f conftest.er1
6676 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006678 (exit $ac_status); } && {
6679 test -z "$ac_c_werror_flag" ||
6680 test ! -s conftest.err
6681 } && test -s conftest.$ac_objext; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00006682 sol_lfs_bug=no
6683else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006684 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006685sed 's/^/| /' conftest.$ac_ext >&5
6686
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006687 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006688fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006689
6690rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006691{ echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
6692echo "${ECHO_T}$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006693if test "$sol_lfs_bug" = "yes"; then
6694 use_lfs=no
6695fi
6696
6697if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006698# Two defines needed to enable largefile support on various platforms
6699# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006700
Martin v. Löwis11437992002-04-12 09:54:03 +00006701cat >>confdefs.h <<\_ACEOF
6702#define _LARGEFILE_SOURCE 1
6703_ACEOF
6704
6705
6706cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006707#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00006708_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006709
Martin v. Löwis399a6892002-10-04 10:22:02 +00006710fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006711
Guido van Rossum84e7b241996-08-19 21:59:00 +00006712# Add some code to confdefs.h so that the test for off_t works on SCO
6713cat >> confdefs.h <<\EOF
6714#if defined(SCO_DS)
6715#undef _OFF_T
6716#endif
6717EOF
6718
Guido van Rossumef2255b2000-03-10 22:30:29 +00006719# Type availability checks
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006720{ echo "$as_me:$LINENO: checking for mode_t" >&5
6721echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006722if test "${ac_cv_type_mode_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006723 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006724else
Benjamin Petersona8332062009-09-11 22:36:27 +00006725 cat >conftest.$ac_ext <<_ACEOF
6726/* confdefs.h. */
6727_ACEOF
6728cat confdefs.h >>conftest.$ac_ext
6729cat >>conftest.$ac_ext <<_ACEOF
6730/* end confdefs.h. */
6731$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006732typedef mode_t ac__type_new_;
Benjamin Petersona8332062009-09-11 22:36:27 +00006733int
6734main ()
6735{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006736if ((ac__type_new_ *) 0)
6737 return 0;
6738if (sizeof (ac__type_new_))
6739 return 0;
Benjamin Petersona8332062009-09-11 22:36:27 +00006740 ;
6741 return 0;
6742}
6743_ACEOF
6744rm -f conftest.$ac_objext
6745if { (ac_try="$ac_compile"
6746case "(($ac_try" in
6747 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6748 *) ac_try_echo=$ac_try;;
6749esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006750eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00006751 (eval "$ac_compile") 2>conftest.er1
6752 ac_status=$?
6753 grep -v '^ *+' conftest.er1 >conftest.err
6754 rm -f conftest.er1
6755 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006756 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00006757 (exit $ac_status); } && {
6758 test -z "$ac_c_werror_flag" ||
6759 test ! -s conftest.err
6760 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006761 ac_cv_type_mode_t=yes
Jack Jansendd19cf82001-12-06 22:36:17 +00006762else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006763 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006764sed 's/^/| /' conftest.$ac_ext >&5
6765
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006766 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00006767fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006768
6769rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006770fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006771{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
6772echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
6773if test $ac_cv_type_mode_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006774 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006775else
Martin v. Löwis11437992002-04-12 09:54:03 +00006776
6777cat >>confdefs.h <<_ACEOF
6778#define mode_t int
6779_ACEOF
6780
6781fi
6782
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006783{ echo "$as_me:$LINENO: checking for off_t" >&5
6784echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006785if test "${ac_cv_type_off_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006786 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006787else
Benjamin Petersona8332062009-09-11 22:36:27 +00006788 cat >conftest.$ac_ext <<_ACEOF
6789/* confdefs.h. */
6790_ACEOF
6791cat confdefs.h >>conftest.$ac_ext
6792cat >>conftest.$ac_ext <<_ACEOF
6793/* end confdefs.h. */
6794$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006795typedef off_t ac__type_new_;
Benjamin Petersona8332062009-09-11 22:36:27 +00006796int
6797main ()
6798{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006799if ((ac__type_new_ *) 0)
6800 return 0;
6801if (sizeof (ac__type_new_))
6802 return 0;
Benjamin Petersona8332062009-09-11 22:36:27 +00006803 ;
6804 return 0;
6805}
6806_ACEOF
6807rm -f conftest.$ac_objext
6808if { (ac_try="$ac_compile"
6809case "(($ac_try" in
6810 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6811 *) ac_try_echo=$ac_try;;
6812esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006813eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00006814 (eval "$ac_compile") 2>conftest.er1
6815 ac_status=$?
6816 grep -v '^ *+' conftest.er1 >conftest.err
6817 rm -f conftest.er1
6818 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00006820 (exit $ac_status); } && {
6821 test -z "$ac_c_werror_flag" ||
6822 test ! -s conftest.err
6823 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006824 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006825else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006826 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006827sed 's/^/| /' conftest.$ac_ext >&5
6828
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006829 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006830fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006831
6832rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006833fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006834{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6835echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
6836if test $ac_cv_type_off_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006837 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006838else
Martin v. Löwis11437992002-04-12 09:54:03 +00006839
6840cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006841#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006842_ACEOF
6843
6844fi
6845
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006846{ echo "$as_me:$LINENO: checking for pid_t" >&5
6847echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006848if test "${ac_cv_type_pid_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006849 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006850else
Benjamin Petersona8332062009-09-11 22:36:27 +00006851 cat >conftest.$ac_ext <<_ACEOF
6852/* confdefs.h. */
6853_ACEOF
6854cat confdefs.h >>conftest.$ac_ext
6855cat >>conftest.$ac_ext <<_ACEOF
6856/* end confdefs.h. */
6857$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006858typedef pid_t ac__type_new_;
Benjamin Petersona8332062009-09-11 22:36:27 +00006859int
6860main ()
6861{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006862if ((ac__type_new_ *) 0)
6863 return 0;
6864if (sizeof (ac__type_new_))
6865 return 0;
Benjamin Petersona8332062009-09-11 22:36:27 +00006866 ;
6867 return 0;
6868}
6869_ACEOF
6870rm -f conftest.$ac_objext
6871if { (ac_try="$ac_compile"
6872case "(($ac_try" in
6873 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6874 *) ac_try_echo=$ac_try;;
6875esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006876eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00006877 (eval "$ac_compile") 2>conftest.er1
6878 ac_status=$?
6879 grep -v '^ *+' conftest.er1 >conftest.err
6880 rm -f conftest.er1
6881 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006882 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00006883 (exit $ac_status); } && {
6884 test -z "$ac_c_werror_flag" ||
6885 test ! -s conftest.err
6886 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006887 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006888else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006889 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006890sed 's/^/| /' conftest.$ac_ext >&5
6891
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006892 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006893fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006894
6895rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006896fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006897{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
6898echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
6899if test $ac_cv_type_pid_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006900 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006901else
Martin v. Löwis11437992002-04-12 09:54:03 +00006902
6903cat >>confdefs.h <<_ACEOF
6904#define pid_t int
6905_ACEOF
6906
6907fi
6908
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006909{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
6910echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006911if test "${ac_cv_type_signal+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006912 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006913else
6914 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006915/* confdefs.h. */
6916_ACEOF
6917cat confdefs.h >>conftest.$ac_ext
6918cat >>conftest.$ac_ext <<_ACEOF
6919/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00006920#include <sys/types.h>
6921#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006922
Martin v. Löwis11437992002-04-12 09:54:03 +00006923int
6924main ()
6925{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006926return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00006927 ;
6928 return 0;
6929}
6930_ACEOF
6931rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006932if { (ac_try="$ac_compile"
6933case "(($ac_try" in
6934 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6935 *) ac_try_echo=$ac_try;;
6936esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006937eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006938 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006939 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006940 grep -v '^ *+' conftest.er1 >conftest.err
6941 rm -f conftest.er1
6942 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006944 (exit $ac_status); } && {
6945 test -z "$ac_c_werror_flag" ||
6946 test ! -s conftest.err
6947 } && test -s conftest.$ac_objext; then
6948 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00006949else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006950 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006951sed 's/^/| /' conftest.$ac_ext >&5
6952
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006953 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00006954fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006955
6956rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006957fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006958{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
6959echo "${ECHO_T}$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006960
Martin v. Löwis11437992002-04-12 09:54:03 +00006961cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006962#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00006963_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006964
Michael W. Hudson54241132001-12-07 15:38:26 +00006965
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006966{ echo "$as_me:$LINENO: checking for size_t" >&5
6967echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006968if test "${ac_cv_type_size_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006969 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006970else
Benjamin Petersona8332062009-09-11 22:36:27 +00006971 cat >conftest.$ac_ext <<_ACEOF
6972/* confdefs.h. */
6973_ACEOF
6974cat confdefs.h >>conftest.$ac_ext
6975cat >>conftest.$ac_ext <<_ACEOF
6976/* end confdefs.h. */
6977$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006978typedef size_t ac__type_new_;
Benjamin Petersona8332062009-09-11 22:36:27 +00006979int
6980main ()
6981{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006982if ((ac__type_new_ *) 0)
6983 return 0;
6984if (sizeof (ac__type_new_))
6985 return 0;
Benjamin Petersona8332062009-09-11 22:36:27 +00006986 ;
6987 return 0;
6988}
6989_ACEOF
6990rm -f conftest.$ac_objext
6991if { (ac_try="$ac_compile"
6992case "(($ac_try" in
6993 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6994 *) ac_try_echo=$ac_try;;
6995esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00006996eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00006997 (eval "$ac_compile") 2>conftest.er1
6998 ac_status=$?
6999 grep -v '^ *+' conftest.er1 >conftest.err
7000 rm -f conftest.er1
7001 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00007003 (exit $ac_status); } && {
7004 test -z "$ac_c_werror_flag" ||
7005 test ! -s conftest.err
7006 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007007 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007008else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007009 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007010sed 's/^/| /' conftest.$ac_ext >&5
7011
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007012 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007013fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007014
7015rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007016fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007017{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
7018echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
7019if test $ac_cv_type_size_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007020 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007021else
Martin v. Löwis11437992002-04-12 09:54:03 +00007022
7023cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007024#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007025_ACEOF
7026
7027fi
7028
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007029{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
7030echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007031if test "${ac_cv_type_uid_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007032 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007033else
7034 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007035/* confdefs.h. */
7036_ACEOF
7037cat confdefs.h >>conftest.$ac_ext
7038cat >>conftest.$ac_ext <<_ACEOF
7039/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007040#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007041
7042_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007043if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00007044 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007045 ac_cv_type_uid_t=yes
7046else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007047 ac_cv_type_uid_t=no
7048fi
Benjamin Petersone7e59c22010-03-23 21:05:56 +00007049rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007050
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007051fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007052{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
7053echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007054if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007055
Martin v. Löwis11437992002-04-12 09:54:03 +00007056cat >>confdefs.h <<\_ACEOF
7057#define uid_t int
7058_ACEOF
7059
7060
7061cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007062#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00007063_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007064
7065fi
7066
Mark Dickinsonbd792642009-03-18 20:06:12 +00007067
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007068 { echo "$as_me:$LINENO: checking for uint32_t" >&5
7069echo $ECHO_N "checking for uint32_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007070if test "${ac_cv_c_uint32_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007071 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007072else
7073 ac_cv_c_uint32_t=no
7074 for ac_type in 'uint32_t' 'unsigned int' 'unsigned long int' \
7075 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7076 cat >conftest.$ac_ext <<_ACEOF
7077/* confdefs.h. */
7078_ACEOF
7079cat confdefs.h >>conftest.$ac_ext
7080cat >>conftest.$ac_ext <<_ACEOF
7081/* end confdefs.h. */
7082$ac_includes_default
7083int
7084main ()
7085{
7086static int test_array [1 - 2 * !(($ac_type) -1 >> (32 - 1) == 1)];
7087test_array [0] = 0
7088
7089 ;
7090 return 0;
7091}
7092_ACEOF
7093rm -f conftest.$ac_objext
7094if { (ac_try="$ac_compile"
7095case "(($ac_try" in
7096 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7097 *) ac_try_echo=$ac_try;;
7098esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007099eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007100 (eval "$ac_compile") 2>conftest.er1
7101 ac_status=$?
7102 grep -v '^ *+' conftest.er1 >conftest.err
7103 rm -f conftest.er1
7104 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007106 (exit $ac_status); } && {
7107 test -z "$ac_c_werror_flag" ||
7108 test ! -s conftest.err
7109 } && test -s conftest.$ac_objext; then
7110 case $ac_type in
7111 uint32_t) ac_cv_c_uint32_t=yes ;;
7112 *) ac_cv_c_uint32_t=$ac_type ;;
7113esac
7114
7115else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007116 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007117sed 's/^/| /' conftest.$ac_ext >&5
7118
7119
7120fi
7121
7122rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7123 test "$ac_cv_c_uint32_t" != no && break
7124 done
7125fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007126{ echo "$as_me:$LINENO: result: $ac_cv_c_uint32_t" >&5
7127echo "${ECHO_T}$ac_cv_c_uint32_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007128 case $ac_cv_c_uint32_t in #(
7129 no|yes) ;; #(
7130 *)
7131
7132cat >>confdefs.h <<\_ACEOF
7133#define _UINT32_T 1
7134_ACEOF
7135
7136
7137cat >>confdefs.h <<_ACEOF
7138#define uint32_t $ac_cv_c_uint32_t
7139_ACEOF
7140;;
7141 esac
7142
7143
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007144 { echo "$as_me:$LINENO: checking for uint64_t" >&5
7145echo $ECHO_N "checking for uint64_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007146if test "${ac_cv_c_uint64_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007147 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007148else
7149 ac_cv_c_uint64_t=no
7150 for ac_type in 'uint64_t' 'unsigned int' 'unsigned long int' \
7151 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7152 cat >conftest.$ac_ext <<_ACEOF
7153/* confdefs.h. */
7154_ACEOF
7155cat confdefs.h >>conftest.$ac_ext
7156cat >>conftest.$ac_ext <<_ACEOF
7157/* end confdefs.h. */
7158$ac_includes_default
7159int
7160main ()
7161{
7162static int test_array [1 - 2 * !(($ac_type) -1 >> (64 - 1) == 1)];
7163test_array [0] = 0
7164
7165 ;
7166 return 0;
7167}
7168_ACEOF
7169rm -f conftest.$ac_objext
7170if { (ac_try="$ac_compile"
7171case "(($ac_try" in
7172 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7173 *) ac_try_echo=$ac_try;;
7174esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007175eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007176 (eval "$ac_compile") 2>conftest.er1
7177 ac_status=$?
7178 grep -v '^ *+' conftest.er1 >conftest.err
7179 rm -f conftest.er1
7180 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007182 (exit $ac_status); } && {
7183 test -z "$ac_c_werror_flag" ||
7184 test ! -s conftest.err
7185 } && test -s conftest.$ac_objext; then
7186 case $ac_type in
7187 uint64_t) ac_cv_c_uint64_t=yes ;;
7188 *) ac_cv_c_uint64_t=$ac_type ;;
7189esac
7190
7191else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007192 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007193sed 's/^/| /' conftest.$ac_ext >&5
7194
7195
7196fi
7197
7198rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7199 test "$ac_cv_c_uint64_t" != no && break
7200 done
7201fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007202{ echo "$as_me:$LINENO: result: $ac_cv_c_uint64_t" >&5
7203echo "${ECHO_T}$ac_cv_c_uint64_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007204 case $ac_cv_c_uint64_t in #(
7205 no|yes) ;; #(
7206 *)
7207
7208cat >>confdefs.h <<\_ACEOF
7209#define _UINT64_T 1
7210_ACEOF
7211
7212
7213cat >>confdefs.h <<_ACEOF
7214#define uint64_t $ac_cv_c_uint64_t
7215_ACEOF
7216;;
7217 esac
7218
7219
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007220 { echo "$as_me:$LINENO: checking for int32_t" >&5
7221echo $ECHO_N "checking for int32_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007222if test "${ac_cv_c_int32_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007223 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007224else
7225 ac_cv_c_int32_t=no
7226 for ac_type in 'int32_t' 'int' 'long int' \
7227 'long long int' 'short int' 'signed char'; do
7228 cat >conftest.$ac_ext <<_ACEOF
7229/* confdefs.h. */
7230_ACEOF
7231cat confdefs.h >>conftest.$ac_ext
7232cat >>conftest.$ac_ext <<_ACEOF
7233/* end confdefs.h. */
7234$ac_includes_default
7235int
7236main ()
7237{
7238static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1))];
7239test_array [0] = 0
7240
7241 ;
7242 return 0;
7243}
7244_ACEOF
7245rm -f conftest.$ac_objext
7246if { (ac_try="$ac_compile"
7247case "(($ac_try" in
7248 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7249 *) ac_try_echo=$ac_try;;
7250esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007251eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007252 (eval "$ac_compile") 2>conftest.er1
7253 ac_status=$?
7254 grep -v '^ *+' conftest.er1 >conftest.err
7255 rm -f conftest.er1
7256 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007258 (exit $ac_status); } && {
7259 test -z "$ac_c_werror_flag" ||
7260 test ! -s conftest.err
7261 } && test -s conftest.$ac_objext; then
7262 cat >conftest.$ac_ext <<_ACEOF
7263/* confdefs.h. */
7264_ACEOF
7265cat confdefs.h >>conftest.$ac_ext
7266cat >>conftest.$ac_ext <<_ACEOF
7267/* end confdefs.h. */
7268$ac_includes_default
7269int
7270main ()
7271{
7272static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007273 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 2))];
Mark Dickinsonbd792642009-03-18 20:06:12 +00007274test_array [0] = 0
7275
7276 ;
7277 return 0;
7278}
7279_ACEOF
7280rm -f conftest.$ac_objext
7281if { (ac_try="$ac_compile"
7282case "(($ac_try" in
7283 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7284 *) ac_try_echo=$ac_try;;
7285esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007286eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007287 (eval "$ac_compile") 2>conftest.er1
7288 ac_status=$?
7289 grep -v '^ *+' conftest.er1 >conftest.err
7290 rm -f conftest.er1
7291 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007292 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007293 (exit $ac_status); } && {
7294 test -z "$ac_c_werror_flag" ||
7295 test ! -s conftest.err
7296 } && test -s conftest.$ac_objext; then
7297 :
7298else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007299 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007300sed 's/^/| /' conftest.$ac_ext >&5
7301
7302 case $ac_type in
7303 int32_t) ac_cv_c_int32_t=yes ;;
7304 *) ac_cv_c_int32_t=$ac_type ;;
7305esac
7306
7307fi
7308
7309rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7310else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007311 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007312sed 's/^/| /' conftest.$ac_ext >&5
7313
7314
7315fi
7316
7317rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7318 test "$ac_cv_c_int32_t" != no && break
7319 done
7320fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007321{ echo "$as_me:$LINENO: result: $ac_cv_c_int32_t" >&5
7322echo "${ECHO_T}$ac_cv_c_int32_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007323 case $ac_cv_c_int32_t in #(
7324 no|yes) ;; #(
7325 *)
7326
7327cat >>confdefs.h <<_ACEOF
7328#define int32_t $ac_cv_c_int32_t
7329_ACEOF
7330;;
7331 esac
7332
7333
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007334 { echo "$as_me:$LINENO: checking for int64_t" >&5
7335echo $ECHO_N "checking for int64_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007336if test "${ac_cv_c_int64_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007337 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007338else
7339 ac_cv_c_int64_t=no
7340 for ac_type in 'int64_t' 'int' 'long int' \
7341 'long long int' 'short int' 'signed char'; do
7342 cat >conftest.$ac_ext <<_ACEOF
7343/* confdefs.h. */
7344_ACEOF
7345cat confdefs.h >>conftest.$ac_ext
7346cat >>conftest.$ac_ext <<_ACEOF
7347/* end confdefs.h. */
7348$ac_includes_default
7349int
7350main ()
7351{
7352static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1))];
7353test_array [0] = 0
7354
7355 ;
7356 return 0;
7357}
7358_ACEOF
7359rm -f conftest.$ac_objext
7360if { (ac_try="$ac_compile"
7361case "(($ac_try" in
7362 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7363 *) ac_try_echo=$ac_try;;
7364esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007365eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007366 (eval "$ac_compile") 2>conftest.er1
7367 ac_status=$?
7368 grep -v '^ *+' conftest.er1 >conftest.err
7369 rm -f conftest.er1
7370 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007371 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007372 (exit $ac_status); } && {
7373 test -z "$ac_c_werror_flag" ||
7374 test ! -s conftest.err
7375 } && test -s conftest.$ac_objext; then
7376 cat >conftest.$ac_ext <<_ACEOF
7377/* confdefs.h. */
7378_ACEOF
7379cat confdefs.h >>conftest.$ac_ext
7380cat >>conftest.$ac_ext <<_ACEOF
7381/* end confdefs.h. */
7382$ac_includes_default
7383int
7384main ()
7385{
7386static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1)
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007387 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 2))];
Mark Dickinsonbd792642009-03-18 20:06:12 +00007388test_array [0] = 0
7389
7390 ;
7391 return 0;
7392}
7393_ACEOF
7394rm -f conftest.$ac_objext
7395if { (ac_try="$ac_compile"
7396case "(($ac_try" in
7397 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7398 *) ac_try_echo=$ac_try;;
7399esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007400eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007401 (eval "$ac_compile") 2>conftest.er1
7402 ac_status=$?
7403 grep -v '^ *+' conftest.er1 >conftest.err
7404 rm -f conftest.er1
7405 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007407 (exit $ac_status); } && {
7408 test -z "$ac_c_werror_flag" ||
7409 test ! -s conftest.err
7410 } && test -s conftest.$ac_objext; then
7411 :
7412else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007413 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007414sed 's/^/| /' conftest.$ac_ext >&5
7415
7416 case $ac_type in
7417 int64_t) ac_cv_c_int64_t=yes ;;
7418 *) ac_cv_c_int64_t=$ac_type ;;
7419esac
7420
7421fi
7422
7423rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7424else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007425 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007426sed 's/^/| /' conftest.$ac_ext >&5
7427
7428
7429fi
7430
7431rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7432 test "$ac_cv_c_int64_t" != no && break
7433 done
7434fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007435{ echo "$as_me:$LINENO: result: $ac_cv_c_int64_t" >&5
7436echo "${ECHO_T}$ac_cv_c_int64_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007437 case $ac_cv_c_int64_t in #(
7438 no|yes) ;; #(
7439 *)
7440
7441cat >>confdefs.h <<_ACEOF
7442#define int64_t $ac_cv_c_int64_t
7443_ACEOF
7444;;
7445 esac
7446
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007447{ echo "$as_me:$LINENO: checking for ssize_t" >&5
7448echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00007449if test "${ac_cv_type_ssize_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007450 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007451else
Benjamin Petersona8332062009-09-11 22:36:27 +00007452 cat >conftest.$ac_ext <<_ACEOF
7453/* confdefs.h. */
7454_ACEOF
7455cat confdefs.h >>conftest.$ac_ext
7456cat >>conftest.$ac_ext <<_ACEOF
7457/* end confdefs.h. */
7458$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007459typedef ssize_t ac__type_new_;
Benjamin Petersona8332062009-09-11 22:36:27 +00007460int
7461main ()
7462{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007463if ((ac__type_new_ *) 0)
7464 return 0;
7465if (sizeof (ac__type_new_))
7466 return 0;
Benjamin Petersona8332062009-09-11 22:36:27 +00007467 ;
7468 return 0;
7469}
7470_ACEOF
7471rm -f conftest.$ac_objext
7472if { (ac_try="$ac_compile"
7473case "(($ac_try" in
7474 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7475 *) ac_try_echo=$ac_try;;
7476esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007477eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00007478 (eval "$ac_compile") 2>conftest.er1
7479 ac_status=$?
7480 grep -v '^ *+' conftest.er1 >conftest.err
7481 rm -f conftest.er1
7482 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007483 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00007484 (exit $ac_status); } && {
7485 test -z "$ac_c_werror_flag" ||
7486 test ! -s conftest.err
7487 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007488 ac_cv_type_ssize_t=yes
Martin v. Löwis18e16552006-02-15 17:27:45 +00007489else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007490 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +00007491sed 's/^/| /' conftest.$ac_ext >&5
7492
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007493 ac_cv_type_ssize_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00007494fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007495
7496rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00007497fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007498{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
7499echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
7500if test $ac_cv_type_ssize_t = yes; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00007501
7502cat >>confdefs.h <<\_ACEOF
7503#define HAVE_SSIZE_T 1
7504_ACEOF
7505
7506fi
7507
Jack Jansendd19cf82001-12-06 22:36:17 +00007508
Michael W. Hudson54241132001-12-07 15:38:26 +00007509# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007510# ANSI C requires sizeof(char) == 1, so no need to check it
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007511{ echo "$as_me:$LINENO: checking for int" >&5
7512echo $ECHO_N "checking for int... $ECHO_C" >&6; }
7513if test "${ac_cv_type_int+set}" = set; then
7514 echo $ECHO_N "(cached) $ECHO_C" >&6
7515else
7516 cat >conftest.$ac_ext <<_ACEOF
7517/* confdefs.h. */
7518_ACEOF
7519cat confdefs.h >>conftest.$ac_ext
7520cat >>conftest.$ac_ext <<_ACEOF
7521/* end confdefs.h. */
7522$ac_includes_default
7523typedef int ac__type_new_;
7524int
7525main ()
7526{
7527if ((ac__type_new_ *) 0)
7528 return 0;
7529if (sizeof (ac__type_new_))
7530 return 0;
7531 ;
7532 return 0;
7533}
7534_ACEOF
7535rm -f conftest.$ac_objext
7536if { (ac_try="$ac_compile"
7537case "(($ac_try" in
7538 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7539 *) ac_try_echo=$ac_try;;
7540esac
7541eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7542 (eval "$ac_compile") 2>conftest.er1
7543 ac_status=$?
7544 grep -v '^ *+' conftest.er1 >conftest.err
7545 rm -f conftest.er1
7546 cat conftest.err >&5
7547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7548 (exit $ac_status); } && {
7549 test -z "$ac_c_werror_flag" ||
7550 test ! -s conftest.err
7551 } && test -s conftest.$ac_objext; then
7552 ac_cv_type_int=yes
7553else
7554 echo "$as_me: failed program was:" >&5
7555sed 's/^/| /' conftest.$ac_ext >&5
7556
7557 ac_cv_type_int=no
7558fi
7559
7560rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7561fi
7562{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
7563echo "${ECHO_T}$ac_cv_type_int" >&6; }
7564
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007565# The cast to long int works around a bug in the HP C Compiler
7566# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7567# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7568# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007569{ echo "$as_me:$LINENO: checking size of int" >&5
7570echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007571if test "${ac_cv_sizeof_int+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007572 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007573else
Martin v. Löwis11437992002-04-12 09:54:03 +00007574 if test "$cross_compiling" = yes; then
7575 # Depending upon the size, compute the lo and hi bounds.
7576cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007577/* confdefs.h. */
7578_ACEOF
7579cat confdefs.h >>conftest.$ac_ext
7580cat >>conftest.$ac_ext <<_ACEOF
7581/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007582$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007583 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007584int
7585main ()
7586{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007587static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007588test_array [0] = 0
7589
7590 ;
7591 return 0;
7592}
7593_ACEOF
7594rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007595if { (ac_try="$ac_compile"
7596case "(($ac_try" in
7597 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7598 *) ac_try_echo=$ac_try;;
7599esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007600eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007601 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007602 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007603 grep -v '^ *+' conftest.er1 >conftest.err
7604 rm -f conftest.er1
7605 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007606 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007607 (exit $ac_status); } && {
7608 test -z "$ac_c_werror_flag" ||
7609 test ! -s conftest.err
7610 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007611 ac_lo=0 ac_mid=0
7612 while :; do
7613 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007614/* confdefs.h. */
7615_ACEOF
7616cat confdefs.h >>conftest.$ac_ext
7617cat >>conftest.$ac_ext <<_ACEOF
7618/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007619$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007620 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007621int
7622main ()
7623{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007624static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007625test_array [0] = 0
7626
7627 ;
7628 return 0;
7629}
7630_ACEOF
7631rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007632if { (ac_try="$ac_compile"
7633case "(($ac_try" in
7634 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7635 *) ac_try_echo=$ac_try;;
7636esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007637eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007638 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007639 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007640 grep -v '^ *+' conftest.er1 >conftest.err
7641 rm -f conftest.er1
7642 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007643 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007644 (exit $ac_status); } && {
7645 test -z "$ac_c_werror_flag" ||
7646 test ! -s conftest.err
7647 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007648 ac_hi=$ac_mid; break
7649else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007650 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007651sed 's/^/| /' conftest.$ac_ext >&5
7652
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007653 ac_lo=`expr $ac_mid + 1`
7654 if test $ac_lo -le $ac_mid; then
7655 ac_lo= ac_hi=
7656 break
7657 fi
7658 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007659fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007660
7661rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007662 done
7663else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007664 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007665sed 's/^/| /' conftest.$ac_ext >&5
7666
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007667 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007668/* confdefs.h. */
7669_ACEOF
7670cat confdefs.h >>conftest.$ac_ext
7671cat >>conftest.$ac_ext <<_ACEOF
7672/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007673$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007674 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007675int
7676main ()
7677{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007678static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007679test_array [0] = 0
7680
7681 ;
7682 return 0;
7683}
7684_ACEOF
7685rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007686if { (ac_try="$ac_compile"
7687case "(($ac_try" in
7688 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7689 *) ac_try_echo=$ac_try;;
7690esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007691eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007692 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007693 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007694 grep -v '^ *+' conftest.er1 >conftest.err
7695 rm -f conftest.er1
7696 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007698 (exit $ac_status); } && {
7699 test -z "$ac_c_werror_flag" ||
7700 test ! -s conftest.err
7701 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007702 ac_hi=-1 ac_mid=-1
7703 while :; do
7704 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007705/* confdefs.h. */
7706_ACEOF
7707cat confdefs.h >>conftest.$ac_ext
7708cat >>conftest.$ac_ext <<_ACEOF
7709/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007710$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007711 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007712int
7713main ()
7714{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007715static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007716test_array [0] = 0
7717
7718 ;
7719 return 0;
7720}
7721_ACEOF
7722rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007723if { (ac_try="$ac_compile"
7724case "(($ac_try" in
7725 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7726 *) ac_try_echo=$ac_try;;
7727esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007728eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007729 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007730 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007731 grep -v '^ *+' conftest.er1 >conftest.err
7732 rm -f conftest.er1
7733 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007735 (exit $ac_status); } && {
7736 test -z "$ac_c_werror_flag" ||
7737 test ! -s conftest.err
7738 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007739 ac_lo=$ac_mid; break
7740else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007741 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007742sed 's/^/| /' conftest.$ac_ext >&5
7743
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007744 ac_hi=`expr '(' $ac_mid ')' - 1`
7745 if test $ac_mid -le $ac_hi; then
7746 ac_lo= ac_hi=
7747 break
7748 fi
7749 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007750fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007751
7752rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007753 done
7754else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007755 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007756sed 's/^/| /' conftest.$ac_ext >&5
7757
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007758 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007759fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007760
7761rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007762fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007763
7764rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007765# Binary search between lo and hi bounds.
7766while test "x$ac_lo" != "x$ac_hi"; do
7767 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7768 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007769/* confdefs.h. */
7770_ACEOF
7771cat confdefs.h >>conftest.$ac_ext
7772cat >>conftest.$ac_ext <<_ACEOF
7773/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007774$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007775 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007776int
7777main ()
7778{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007779static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007780test_array [0] = 0
7781
7782 ;
7783 return 0;
7784}
7785_ACEOF
7786rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007787if { (ac_try="$ac_compile"
7788case "(($ac_try" in
7789 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7790 *) ac_try_echo=$ac_try;;
7791esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007792eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007793 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007794 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007795 grep -v '^ *+' conftest.er1 >conftest.err
7796 rm -f conftest.er1
7797 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007799 (exit $ac_status); } && {
7800 test -z "$ac_c_werror_flag" ||
7801 test ! -s conftest.err
7802 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007803 ac_hi=$ac_mid
7804else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007805 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007806sed 's/^/| /' conftest.$ac_ext >&5
7807
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007808 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007809fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007810
7811rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007812done
7813case $ac_lo in
7814?*) ac_cv_sizeof_int=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007815'') if test "$ac_cv_type_int" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007816 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007817See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007818echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007819See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007820 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007821 else
7822 ac_cv_sizeof_int=0
7823 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007824esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007825else
Martin v. Löwis11437992002-04-12 09:54:03 +00007826 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007827/* confdefs.h. */
7828_ACEOF
7829cat confdefs.h >>conftest.$ac_ext
7830cat >>conftest.$ac_ext <<_ACEOF
7831/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007832$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007833 typedef int ac__type_sizeof_;
7834static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7835static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007836#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007837#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007838int
7839main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007840{
Martin v. Löwis11437992002-04-12 09:54:03 +00007841
7842 FILE *f = fopen ("conftest.val", "w");
7843 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007844 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007845 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007846 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007847 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007848 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007849 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007850 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007851 }
7852 else
7853 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007854 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007855 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007856 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007857 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007858 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007859 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007860
7861 ;
7862 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007863}
Martin v. Löwis11437992002-04-12 09:54:03 +00007864_ACEOF
7865rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007866if { (ac_try="$ac_link"
7867case "(($ac_try" in
7868 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7869 *) ac_try_echo=$ac_try;;
7870esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007871eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007872 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007873 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007875 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007876 { (case "(($ac_try" in
7877 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7878 *) ac_try_echo=$ac_try;;
7879esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007880eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007881 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007882 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007883 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007884 (exit $ac_status); }; }; then
7885 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007886else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007887 echo "$as_me: program exited with status $ac_status" >&5
7888echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007889sed 's/^/| /' conftest.$ac_ext >&5
7890
Martin v. Löwis11437992002-04-12 09:54:03 +00007891( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007892if test "$ac_cv_type_int" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007893 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007894See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007895echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007896See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007897 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007898 else
7899 ac_cv_sizeof_int=0
7900 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007901fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007902rm -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 +00007903fi
7904rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007905fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007906{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
7907echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007908
7909
7910
Martin v. Löwis11437992002-04-12 09:54:03 +00007911cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007912#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007913_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007914
7915
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007916{ echo "$as_me:$LINENO: checking for long" >&5
7917echo $ECHO_N "checking for long... $ECHO_C" >&6; }
7918if test "${ac_cv_type_long+set}" = set; then
7919 echo $ECHO_N "(cached) $ECHO_C" >&6
7920else
7921 cat >conftest.$ac_ext <<_ACEOF
7922/* confdefs.h. */
7923_ACEOF
7924cat confdefs.h >>conftest.$ac_ext
7925cat >>conftest.$ac_ext <<_ACEOF
7926/* end confdefs.h. */
7927$ac_includes_default
7928typedef long ac__type_new_;
7929int
7930main ()
7931{
7932if ((ac__type_new_ *) 0)
7933 return 0;
7934if (sizeof (ac__type_new_))
7935 return 0;
7936 ;
7937 return 0;
7938}
7939_ACEOF
7940rm -f conftest.$ac_objext
7941if { (ac_try="$ac_compile"
7942case "(($ac_try" in
7943 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7944 *) ac_try_echo=$ac_try;;
7945esac
7946eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7947 (eval "$ac_compile") 2>conftest.er1
7948 ac_status=$?
7949 grep -v '^ *+' conftest.er1 >conftest.err
7950 rm -f conftest.er1
7951 cat conftest.err >&5
7952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7953 (exit $ac_status); } && {
7954 test -z "$ac_c_werror_flag" ||
7955 test ! -s conftest.err
7956 } && test -s conftest.$ac_objext; then
7957 ac_cv_type_long=yes
7958else
7959 echo "$as_me: failed program was:" >&5
7960sed 's/^/| /' conftest.$ac_ext >&5
7961
7962 ac_cv_type_long=no
7963fi
7964
7965rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7966fi
7967{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
7968echo "${ECHO_T}$ac_cv_type_long" >&6; }
7969
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007970# The cast to long int works around a bug in the HP C Compiler
7971# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7972# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7973# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007974{ echo "$as_me:$LINENO: checking size of long" >&5
7975echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007976if test "${ac_cv_sizeof_long+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007977 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007978else
Martin v. Löwis11437992002-04-12 09:54:03 +00007979 if test "$cross_compiling" = yes; then
7980 # Depending upon the size, compute the lo and hi bounds.
7981cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007982/* confdefs.h. */
7983_ACEOF
7984cat confdefs.h >>conftest.$ac_ext
7985cat >>conftest.$ac_ext <<_ACEOF
7986/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007987$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007988 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007989int
7990main ()
7991{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00007992static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007993test_array [0] = 0
7994
7995 ;
7996 return 0;
7997}
7998_ACEOF
7999rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008000if { (ac_try="$ac_compile"
8001case "(($ac_try" in
8002 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8003 *) ac_try_echo=$ac_try;;
8004esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008005eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008006 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008007 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008008 grep -v '^ *+' conftest.er1 >conftest.err
8009 rm -f conftest.er1
8010 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008012 (exit $ac_status); } && {
8013 test -z "$ac_c_werror_flag" ||
8014 test ! -s conftest.err
8015 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008016 ac_lo=0 ac_mid=0
8017 while :; do
8018 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008019/* confdefs.h. */
8020_ACEOF
8021cat confdefs.h >>conftest.$ac_ext
8022cat >>conftest.$ac_ext <<_ACEOF
8023/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008024$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008025 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008026int
8027main ()
8028{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008029static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008030test_array [0] = 0
8031
8032 ;
8033 return 0;
8034}
8035_ACEOF
8036rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008037if { (ac_try="$ac_compile"
8038case "(($ac_try" in
8039 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8040 *) ac_try_echo=$ac_try;;
8041esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008042eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008043 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008044 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008045 grep -v '^ *+' conftest.er1 >conftest.err
8046 rm -f conftest.er1
8047 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008049 (exit $ac_status); } && {
8050 test -z "$ac_c_werror_flag" ||
8051 test ! -s conftest.err
8052 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008053 ac_hi=$ac_mid; break
8054else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008055 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008056sed 's/^/| /' conftest.$ac_ext >&5
8057
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008058 ac_lo=`expr $ac_mid + 1`
8059 if test $ac_lo -le $ac_mid; then
8060 ac_lo= ac_hi=
8061 break
8062 fi
8063 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008064fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008065
8066rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008067 done
8068else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008069 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008070sed 's/^/| /' conftest.$ac_ext >&5
8071
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008072 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008073/* confdefs.h. */
8074_ACEOF
8075cat confdefs.h >>conftest.$ac_ext
8076cat >>conftest.$ac_ext <<_ACEOF
8077/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008078$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008079 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008080int
8081main ()
8082{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008083static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008084test_array [0] = 0
8085
8086 ;
8087 return 0;
8088}
8089_ACEOF
8090rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008091if { (ac_try="$ac_compile"
8092case "(($ac_try" in
8093 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8094 *) ac_try_echo=$ac_try;;
8095esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008096eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008097 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008098 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008099 grep -v '^ *+' conftest.er1 >conftest.err
8100 rm -f conftest.er1
8101 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008103 (exit $ac_status); } && {
8104 test -z "$ac_c_werror_flag" ||
8105 test ! -s conftest.err
8106 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008107 ac_hi=-1 ac_mid=-1
8108 while :; do
8109 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008110/* confdefs.h. */
8111_ACEOF
8112cat confdefs.h >>conftest.$ac_ext
8113cat >>conftest.$ac_ext <<_ACEOF
8114/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008115$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008116 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008117int
8118main ()
8119{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008120static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008121test_array [0] = 0
8122
8123 ;
8124 return 0;
8125}
8126_ACEOF
8127rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008128if { (ac_try="$ac_compile"
8129case "(($ac_try" in
8130 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8131 *) ac_try_echo=$ac_try;;
8132esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008133eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008134 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008135 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008136 grep -v '^ *+' conftest.er1 >conftest.err
8137 rm -f conftest.er1
8138 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008140 (exit $ac_status); } && {
8141 test -z "$ac_c_werror_flag" ||
8142 test ! -s conftest.err
8143 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008144 ac_lo=$ac_mid; break
8145else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008146 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008147sed 's/^/| /' conftest.$ac_ext >&5
8148
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008149 ac_hi=`expr '(' $ac_mid ')' - 1`
8150 if test $ac_mid -le $ac_hi; then
8151 ac_lo= ac_hi=
8152 break
8153 fi
8154 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008155fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008156
8157rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008158 done
8159else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008160 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008161sed 's/^/| /' conftest.$ac_ext >&5
8162
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008163 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008164fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008165
8166rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008167fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008168
8169rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008170# Binary search between lo and hi bounds.
8171while test "x$ac_lo" != "x$ac_hi"; do
8172 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8173 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008174/* confdefs.h. */
8175_ACEOF
8176cat confdefs.h >>conftest.$ac_ext
8177cat >>conftest.$ac_ext <<_ACEOF
8178/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008179$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008180 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008181int
8182main ()
8183{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008184static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008185test_array [0] = 0
8186
8187 ;
8188 return 0;
8189}
8190_ACEOF
8191rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008192if { (ac_try="$ac_compile"
8193case "(($ac_try" in
8194 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8195 *) ac_try_echo=$ac_try;;
8196esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008197eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008198 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008199 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008200 grep -v '^ *+' conftest.er1 >conftest.err
8201 rm -f conftest.er1
8202 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008204 (exit $ac_status); } && {
8205 test -z "$ac_c_werror_flag" ||
8206 test ! -s conftest.err
8207 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008208 ac_hi=$ac_mid
8209else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008210 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008211sed 's/^/| /' conftest.$ac_ext >&5
8212
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008213 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008214fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008215
8216rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008217done
8218case $ac_lo in
8219?*) ac_cv_sizeof_long=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008220'') if test "$ac_cv_type_long" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008221 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008222See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008223echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008224See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008225 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008226 else
8227 ac_cv_sizeof_long=0
8228 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008229esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008230else
Martin v. Löwis11437992002-04-12 09:54:03 +00008231 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008232/* confdefs.h. */
8233_ACEOF
8234cat confdefs.h >>conftest.$ac_ext
8235cat >>conftest.$ac_ext <<_ACEOF
8236/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008237$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008238 typedef long ac__type_sizeof_;
8239static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8240static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008241#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008242#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008243int
8244main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008245{
Martin v. Löwis11437992002-04-12 09:54:03 +00008246
8247 FILE *f = fopen ("conftest.val", "w");
8248 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008249 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008250 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008251 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008252 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008253 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008254 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008255 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008256 }
8257 else
8258 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008259 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008260 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008261 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008262 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008263 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008264 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008265
8266 ;
8267 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008268}
Martin v. Löwis11437992002-04-12 09:54:03 +00008269_ACEOF
8270rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008271if { (ac_try="$ac_link"
8272case "(($ac_try" in
8273 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8274 *) ac_try_echo=$ac_try;;
8275esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008276eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008277 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008278 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008280 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008281 { (case "(($ac_try" in
8282 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8283 *) ac_try_echo=$ac_try;;
8284esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008285eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008286 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008287 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008288 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008289 (exit $ac_status); }; }; then
8290 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008291else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008292 echo "$as_me: program exited with status $ac_status" >&5
8293echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008294sed 's/^/| /' conftest.$ac_ext >&5
8295
Martin v. Löwis11437992002-04-12 09:54:03 +00008296( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008297if test "$ac_cv_type_long" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008298 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008299See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008300echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008301See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008302 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008303 else
8304 ac_cv_sizeof_long=0
8305 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008306fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008307rm -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 +00008308fi
8309rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008310fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008311{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
8312echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008313
8314
8315
Martin v. Löwis11437992002-04-12 09:54:03 +00008316cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008317#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008318_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008319
8320
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008321{ echo "$as_me:$LINENO: checking for void *" >&5
8322echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
8323if test "${ac_cv_type_void_p+set}" = set; then
8324 echo $ECHO_N "(cached) $ECHO_C" >&6
8325else
8326 cat >conftest.$ac_ext <<_ACEOF
8327/* confdefs.h. */
8328_ACEOF
8329cat confdefs.h >>conftest.$ac_ext
8330cat >>conftest.$ac_ext <<_ACEOF
8331/* end confdefs.h. */
8332$ac_includes_default
8333typedef void * ac__type_new_;
8334int
8335main ()
8336{
8337if ((ac__type_new_ *) 0)
8338 return 0;
8339if (sizeof (ac__type_new_))
8340 return 0;
8341 ;
8342 return 0;
8343}
8344_ACEOF
8345rm -f conftest.$ac_objext
8346if { (ac_try="$ac_compile"
8347case "(($ac_try" in
8348 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8349 *) ac_try_echo=$ac_try;;
8350esac
8351eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8352 (eval "$ac_compile") 2>conftest.er1
8353 ac_status=$?
8354 grep -v '^ *+' conftest.er1 >conftest.err
8355 rm -f conftest.er1
8356 cat conftest.err >&5
8357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8358 (exit $ac_status); } && {
8359 test -z "$ac_c_werror_flag" ||
8360 test ! -s conftest.err
8361 } && test -s conftest.$ac_objext; then
8362 ac_cv_type_void_p=yes
8363else
8364 echo "$as_me: failed program was:" >&5
8365sed 's/^/| /' conftest.$ac_ext >&5
8366
8367 ac_cv_type_void_p=no
8368fi
8369
8370rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8371fi
8372{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
8373echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
8374
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008375# The cast to long int works around a bug in the HP C Compiler
8376# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8377# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8378# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008379{ echo "$as_me:$LINENO: checking size of void *" >&5
8380echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008381if test "${ac_cv_sizeof_void_p+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008382 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008383else
Martin v. Löwis11437992002-04-12 09:54:03 +00008384 if test "$cross_compiling" = yes; then
8385 # Depending upon the size, compute the lo and hi bounds.
8386cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008387/* confdefs.h. */
8388_ACEOF
8389cat confdefs.h >>conftest.$ac_ext
8390cat >>conftest.$ac_ext <<_ACEOF
8391/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008392$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008393 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008394int
8395main ()
8396{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008397static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008398test_array [0] = 0
8399
8400 ;
8401 return 0;
8402}
8403_ACEOF
8404rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008405if { (ac_try="$ac_compile"
8406case "(($ac_try" in
8407 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8408 *) ac_try_echo=$ac_try;;
8409esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008410eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008411 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008412 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008413 grep -v '^ *+' conftest.er1 >conftest.err
8414 rm -f conftest.er1
8415 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008417 (exit $ac_status); } && {
8418 test -z "$ac_c_werror_flag" ||
8419 test ! -s conftest.err
8420 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008421 ac_lo=0 ac_mid=0
8422 while :; do
8423 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008424/* confdefs.h. */
8425_ACEOF
8426cat confdefs.h >>conftest.$ac_ext
8427cat >>conftest.$ac_ext <<_ACEOF
8428/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008429$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008430 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008431int
8432main ()
8433{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008434static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008435test_array [0] = 0
8436
8437 ;
8438 return 0;
8439}
8440_ACEOF
8441rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008442if { (ac_try="$ac_compile"
8443case "(($ac_try" in
8444 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8445 *) ac_try_echo=$ac_try;;
8446esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008447eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008448 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008449 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008450 grep -v '^ *+' conftest.er1 >conftest.err
8451 rm -f conftest.er1
8452 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008453 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008454 (exit $ac_status); } && {
8455 test -z "$ac_c_werror_flag" ||
8456 test ! -s conftest.err
8457 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008458 ac_hi=$ac_mid; break
8459else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008460 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008461sed 's/^/| /' conftest.$ac_ext >&5
8462
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008463 ac_lo=`expr $ac_mid + 1`
8464 if test $ac_lo -le $ac_mid; then
8465 ac_lo= ac_hi=
8466 break
8467 fi
8468 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008469fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008470
8471rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008472 done
8473else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008474 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008475sed 's/^/| /' conftest.$ac_ext >&5
8476
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008477 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008478/* confdefs.h. */
8479_ACEOF
8480cat confdefs.h >>conftest.$ac_ext
8481cat >>conftest.$ac_ext <<_ACEOF
8482/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008483$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008484 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008485int
8486main ()
8487{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008488static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008489test_array [0] = 0
8490
8491 ;
8492 return 0;
8493}
8494_ACEOF
8495rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008496if { (ac_try="$ac_compile"
8497case "(($ac_try" in
8498 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8499 *) ac_try_echo=$ac_try;;
8500esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008501eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008502 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008503 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008504 grep -v '^ *+' conftest.er1 >conftest.err
8505 rm -f conftest.er1
8506 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008508 (exit $ac_status); } && {
8509 test -z "$ac_c_werror_flag" ||
8510 test ! -s conftest.err
8511 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008512 ac_hi=-1 ac_mid=-1
8513 while :; do
8514 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008515/* confdefs.h. */
8516_ACEOF
8517cat confdefs.h >>conftest.$ac_ext
8518cat >>conftest.$ac_ext <<_ACEOF
8519/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008520$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008521 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008522int
8523main ()
8524{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008525static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008526test_array [0] = 0
8527
8528 ;
8529 return 0;
8530}
8531_ACEOF
8532rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008533if { (ac_try="$ac_compile"
8534case "(($ac_try" in
8535 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8536 *) ac_try_echo=$ac_try;;
8537esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008538eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008539 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008540 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008541 grep -v '^ *+' conftest.er1 >conftest.err
8542 rm -f conftest.er1
8543 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008545 (exit $ac_status); } && {
8546 test -z "$ac_c_werror_flag" ||
8547 test ! -s conftest.err
8548 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008549 ac_lo=$ac_mid; break
8550else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008551 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008552sed 's/^/| /' conftest.$ac_ext >&5
8553
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008554 ac_hi=`expr '(' $ac_mid ')' - 1`
8555 if test $ac_mid -le $ac_hi; then
8556 ac_lo= ac_hi=
8557 break
8558 fi
8559 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008560fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008561
8562rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008563 done
8564else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008565 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008566sed 's/^/| /' conftest.$ac_ext >&5
8567
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008568 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008569fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008570
8571rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008572fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008573
8574rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008575# Binary search between lo and hi bounds.
8576while test "x$ac_lo" != "x$ac_hi"; do
8577 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8578 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008579/* confdefs.h. */
8580_ACEOF
8581cat confdefs.h >>conftest.$ac_ext
8582cat >>conftest.$ac_ext <<_ACEOF
8583/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008584$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008585 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008586int
8587main ()
8588{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008589static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008590test_array [0] = 0
8591
8592 ;
8593 return 0;
8594}
8595_ACEOF
8596rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008597if { (ac_try="$ac_compile"
8598case "(($ac_try" in
8599 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8600 *) ac_try_echo=$ac_try;;
8601esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008602eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008603 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008604 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008605 grep -v '^ *+' conftest.er1 >conftest.err
8606 rm -f conftest.er1
8607 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008609 (exit $ac_status); } && {
8610 test -z "$ac_c_werror_flag" ||
8611 test ! -s conftest.err
8612 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008613 ac_hi=$ac_mid
8614else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008615 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008616sed 's/^/| /' conftest.$ac_ext >&5
8617
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008618 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008619fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008620
8621rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008622done
8623case $ac_lo in
8624?*) ac_cv_sizeof_void_p=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008625'') if test "$ac_cv_type_void_p" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008626 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008627See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008628echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008629See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008630 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008631 else
8632 ac_cv_sizeof_void_p=0
8633 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008634esac
Guido van Rossumad678af1998-10-02 14:42:15 +00008635else
Martin v. Löwis11437992002-04-12 09:54:03 +00008636 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008637/* confdefs.h. */
8638_ACEOF
8639cat confdefs.h >>conftest.$ac_ext
8640cat >>conftest.$ac_ext <<_ACEOF
8641/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008642$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008643 typedef void * ac__type_sizeof_;
8644static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8645static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008646#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008647#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008648int
8649main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00008650{
Martin v. Löwis11437992002-04-12 09:54:03 +00008651
8652 FILE *f = fopen ("conftest.val", "w");
8653 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008654 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008655 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008656 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008657 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008658 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008659 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008660 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008661 }
8662 else
8663 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008664 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008665 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008666 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008667 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008668 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008669 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008670
8671 ;
8672 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00008673}
Martin v. Löwis11437992002-04-12 09:54:03 +00008674_ACEOF
8675rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008676if { (ac_try="$ac_link"
8677case "(($ac_try" in
8678 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8679 *) ac_try_echo=$ac_try;;
8680esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008681eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008682 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008683 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008685 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008686 { (case "(($ac_try" in
8687 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8688 *) ac_try_echo=$ac_try;;
8689esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008690eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008691 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008692 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008694 (exit $ac_status); }; }; then
8695 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00008696else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008697 echo "$as_me: program exited with status $ac_status" >&5
8698echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008699sed 's/^/| /' conftest.$ac_ext >&5
8700
Martin v. Löwis11437992002-04-12 09:54:03 +00008701( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008702if test "$ac_cv_type_void_p" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008703 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008704See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008705echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008706See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008707 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008708 else
8709 ac_cv_sizeof_void_p=0
8710 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008711fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008712rm -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 +00008713fi
8714rm -f conftest.val
Guido van Rossumad678af1998-10-02 14:42:15 +00008715fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008716{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
8717echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008718
8719
8720
Martin v. Löwis11437992002-04-12 09:54:03 +00008721cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008722#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008723_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008724
8725
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008726{ echo "$as_me:$LINENO: checking for short" >&5
8727echo $ECHO_N "checking for short... $ECHO_C" >&6; }
8728if test "${ac_cv_type_short+set}" = set; then
8729 echo $ECHO_N "(cached) $ECHO_C" >&6
8730else
8731 cat >conftest.$ac_ext <<_ACEOF
8732/* confdefs.h. */
8733_ACEOF
8734cat confdefs.h >>conftest.$ac_ext
8735cat >>conftest.$ac_ext <<_ACEOF
8736/* end confdefs.h. */
8737$ac_includes_default
8738typedef short ac__type_new_;
8739int
8740main ()
8741{
8742if ((ac__type_new_ *) 0)
8743 return 0;
8744if (sizeof (ac__type_new_))
8745 return 0;
8746 ;
8747 return 0;
8748}
8749_ACEOF
8750rm -f conftest.$ac_objext
8751if { (ac_try="$ac_compile"
8752case "(($ac_try" in
8753 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8754 *) ac_try_echo=$ac_try;;
8755esac
8756eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8757 (eval "$ac_compile") 2>conftest.er1
8758 ac_status=$?
8759 grep -v '^ *+' conftest.er1 >conftest.err
8760 rm -f conftest.er1
8761 cat conftest.err >&5
8762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8763 (exit $ac_status); } && {
8764 test -z "$ac_c_werror_flag" ||
8765 test ! -s conftest.err
8766 } && test -s conftest.$ac_objext; then
8767 ac_cv_type_short=yes
8768else
8769 echo "$as_me: failed program was:" >&5
8770sed 's/^/| /' conftest.$ac_ext >&5
8771
8772 ac_cv_type_short=no
8773fi
8774
8775rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8776fi
8777{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
8778echo "${ECHO_T}$ac_cv_type_short" >&6; }
8779
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008780# The cast to long int works around a bug in the HP C Compiler
8781# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8782# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8783# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008784{ echo "$as_me:$LINENO: checking size of short" >&5
8785echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008786if test "${ac_cv_sizeof_short+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008787 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008788else
Martin v. Löwis11437992002-04-12 09:54:03 +00008789 if test "$cross_compiling" = yes; then
8790 # Depending upon the size, compute the lo and hi bounds.
8791cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008792/* confdefs.h. */
8793_ACEOF
8794cat confdefs.h >>conftest.$ac_ext
8795cat >>conftest.$ac_ext <<_ACEOF
8796/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008797$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008798 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008799int
8800main ()
8801{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008802static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008803test_array [0] = 0
8804
8805 ;
8806 return 0;
8807}
8808_ACEOF
8809rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008810if { (ac_try="$ac_compile"
8811case "(($ac_try" in
8812 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8813 *) ac_try_echo=$ac_try;;
8814esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008815eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008816 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008817 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008818 grep -v '^ *+' conftest.er1 >conftest.err
8819 rm -f conftest.er1
8820 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008822 (exit $ac_status); } && {
8823 test -z "$ac_c_werror_flag" ||
8824 test ! -s conftest.err
8825 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008826 ac_lo=0 ac_mid=0
8827 while :; do
8828 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008829/* confdefs.h. */
8830_ACEOF
8831cat confdefs.h >>conftest.$ac_ext
8832cat >>conftest.$ac_ext <<_ACEOF
8833/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008834$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008835 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008836int
8837main ()
8838{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008839static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008840test_array [0] = 0
8841
8842 ;
8843 return 0;
8844}
8845_ACEOF
8846rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008847if { (ac_try="$ac_compile"
8848case "(($ac_try" in
8849 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8850 *) ac_try_echo=$ac_try;;
8851esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008852eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008853 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008854 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008855 grep -v '^ *+' conftest.er1 >conftest.err
8856 rm -f conftest.er1
8857 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008859 (exit $ac_status); } && {
8860 test -z "$ac_c_werror_flag" ||
8861 test ! -s conftest.err
8862 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008863 ac_hi=$ac_mid; break
8864else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008865 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008866sed 's/^/| /' conftest.$ac_ext >&5
8867
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008868 ac_lo=`expr $ac_mid + 1`
8869 if test $ac_lo -le $ac_mid; then
8870 ac_lo= ac_hi=
8871 break
8872 fi
8873 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008874fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008875
8876rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008877 done
8878else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008879 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008880sed 's/^/| /' conftest.$ac_ext >&5
8881
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008882 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008883/* confdefs.h. */
8884_ACEOF
8885cat confdefs.h >>conftest.$ac_ext
8886cat >>conftest.$ac_ext <<_ACEOF
8887/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008888$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008889 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008890int
8891main ()
8892{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008893static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008894test_array [0] = 0
8895
8896 ;
8897 return 0;
8898}
8899_ACEOF
8900rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008901if { (ac_try="$ac_compile"
8902case "(($ac_try" in
8903 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8904 *) ac_try_echo=$ac_try;;
8905esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008906eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008907 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008908 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008909 grep -v '^ *+' conftest.er1 >conftest.err
8910 rm -f conftest.er1
8911 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008913 (exit $ac_status); } && {
8914 test -z "$ac_c_werror_flag" ||
8915 test ! -s conftest.err
8916 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008917 ac_hi=-1 ac_mid=-1
8918 while :; do
8919 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008920/* confdefs.h. */
8921_ACEOF
8922cat confdefs.h >>conftest.$ac_ext
8923cat >>conftest.$ac_ext <<_ACEOF
8924/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008925$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008926 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008927int
8928main ()
8929{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008930static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008931test_array [0] = 0
8932
8933 ;
8934 return 0;
8935}
8936_ACEOF
8937rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008938if { (ac_try="$ac_compile"
8939case "(($ac_try" in
8940 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8941 *) ac_try_echo=$ac_try;;
8942esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008943eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008944 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008945 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008946 grep -v '^ *+' conftest.er1 >conftest.err
8947 rm -f conftest.er1
8948 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008950 (exit $ac_status); } && {
8951 test -z "$ac_c_werror_flag" ||
8952 test ! -s conftest.err
8953 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008954 ac_lo=$ac_mid; break
8955else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008956 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008957sed 's/^/| /' conftest.$ac_ext >&5
8958
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008959 ac_hi=`expr '(' $ac_mid ')' - 1`
8960 if test $ac_mid -le $ac_hi; then
8961 ac_lo= ac_hi=
8962 break
8963 fi
8964 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008965fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008966
8967rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008968 done
8969else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008970 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008971sed 's/^/| /' conftest.$ac_ext >&5
8972
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008973 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008974fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008975
8976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008977fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008978
8979rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008980# Binary search between lo and hi bounds.
8981while test "x$ac_lo" != "x$ac_hi"; do
8982 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8983 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008984/* confdefs.h. */
8985_ACEOF
8986cat confdefs.h >>conftest.$ac_ext
8987cat >>conftest.$ac_ext <<_ACEOF
8988/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008989$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008990 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008991int
8992main ()
8993{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00008994static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008995test_array [0] = 0
8996
8997 ;
8998 return 0;
8999}
9000_ACEOF
9001rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009002if { (ac_try="$ac_compile"
9003case "(($ac_try" in
9004 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9005 *) ac_try_echo=$ac_try;;
9006esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009007eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009008 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009009 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009010 grep -v '^ *+' conftest.er1 >conftest.err
9011 rm -f conftest.er1
9012 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009014 (exit $ac_status); } && {
9015 test -z "$ac_c_werror_flag" ||
9016 test ! -s conftest.err
9017 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009018 ac_hi=$ac_mid
9019else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009020 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009021sed 's/^/| /' conftest.$ac_ext >&5
9022
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009023 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009024fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009025
9026rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009027done
9028case $ac_lo in
9029?*) ac_cv_sizeof_short=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009030'') if test "$ac_cv_type_short" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009031 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009032See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009033echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009034See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009035 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009036 else
9037 ac_cv_sizeof_short=0
9038 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009039esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009040else
Martin v. Löwis11437992002-04-12 09:54:03 +00009041 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009042/* confdefs.h. */
9043_ACEOF
9044cat confdefs.h >>conftest.$ac_ext
9045cat >>conftest.$ac_ext <<_ACEOF
9046/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009047$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009048 typedef short ac__type_sizeof_;
9049static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9050static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009051#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009052#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009053int
9054main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009055{
Martin v. Löwis11437992002-04-12 09:54:03 +00009056
9057 FILE *f = fopen ("conftest.val", "w");
9058 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009059 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009060 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009061 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009062 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009063 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009064 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009065 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009066 }
9067 else
9068 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009069 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009070 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009071 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009072 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009073 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009074 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009075
9076 ;
9077 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009078}
Martin v. Löwis11437992002-04-12 09:54:03 +00009079_ACEOF
9080rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009081if { (ac_try="$ac_link"
9082case "(($ac_try" in
9083 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9084 *) ac_try_echo=$ac_try;;
9085esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009086eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009087 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009088 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009089 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009090 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009091 { (case "(($ac_try" in
9092 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9093 *) ac_try_echo=$ac_try;;
9094esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009095eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009096 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009097 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009099 (exit $ac_status); }; }; then
9100 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009101else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009102 echo "$as_me: program exited with status $ac_status" >&5
9103echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009104sed 's/^/| /' conftest.$ac_ext >&5
9105
Martin v. Löwis11437992002-04-12 09:54:03 +00009106( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009107if test "$ac_cv_type_short" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009108 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009109See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009110echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009111See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009112 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009113 else
9114 ac_cv_sizeof_short=0
9115 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009116fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009117rm -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 +00009118fi
9119rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009120fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009121{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
9122echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009123
9124
9125
Martin v. Löwis11437992002-04-12 09:54:03 +00009126cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009127#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00009128_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009129
9130
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009131{ echo "$as_me:$LINENO: checking for float" >&5
9132echo $ECHO_N "checking for float... $ECHO_C" >&6; }
9133if test "${ac_cv_type_float+set}" = set; then
9134 echo $ECHO_N "(cached) $ECHO_C" >&6
9135else
9136 cat >conftest.$ac_ext <<_ACEOF
9137/* confdefs.h. */
9138_ACEOF
9139cat confdefs.h >>conftest.$ac_ext
9140cat >>conftest.$ac_ext <<_ACEOF
9141/* end confdefs.h. */
9142$ac_includes_default
9143typedef float ac__type_new_;
9144int
9145main ()
9146{
9147if ((ac__type_new_ *) 0)
9148 return 0;
9149if (sizeof (ac__type_new_))
9150 return 0;
9151 ;
9152 return 0;
9153}
9154_ACEOF
9155rm -f conftest.$ac_objext
9156if { (ac_try="$ac_compile"
9157case "(($ac_try" in
9158 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9159 *) ac_try_echo=$ac_try;;
9160esac
9161eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9162 (eval "$ac_compile") 2>conftest.er1
9163 ac_status=$?
9164 grep -v '^ *+' conftest.er1 >conftest.err
9165 rm -f conftest.er1
9166 cat conftest.err >&5
9167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9168 (exit $ac_status); } && {
9169 test -z "$ac_c_werror_flag" ||
9170 test ! -s conftest.err
9171 } && test -s conftest.$ac_objext; then
9172 ac_cv_type_float=yes
9173else
9174 echo "$as_me: failed program was:" >&5
9175sed 's/^/| /' conftest.$ac_ext >&5
9176
9177 ac_cv_type_float=no
9178fi
9179
9180rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9181fi
9182{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
9183echo "${ECHO_T}$ac_cv_type_float" >&6; }
9184
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009185# The cast to long int works around a bug in the HP C Compiler
9186# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9187# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9188# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009189{ echo "$as_me:$LINENO: checking size of float" >&5
9190echo $ECHO_N "checking size of float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009191if test "${ac_cv_sizeof_float+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009192 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009193else
Martin v. Löwis11437992002-04-12 09:54:03 +00009194 if test "$cross_compiling" = yes; then
9195 # Depending upon the size, compute the lo and hi bounds.
9196cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009197/* confdefs.h. */
9198_ACEOF
9199cat confdefs.h >>conftest.$ac_ext
9200cat >>conftest.$ac_ext <<_ACEOF
9201/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009202$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009203 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009204int
9205main ()
9206{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009207static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009208test_array [0] = 0
9209
9210 ;
9211 return 0;
9212}
9213_ACEOF
9214rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009215if { (ac_try="$ac_compile"
9216case "(($ac_try" in
9217 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9218 *) ac_try_echo=$ac_try;;
9219esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009220eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009221 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009222 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009223 grep -v '^ *+' conftest.er1 >conftest.err
9224 rm -f conftest.er1
9225 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009227 (exit $ac_status); } && {
9228 test -z "$ac_c_werror_flag" ||
9229 test ! -s conftest.err
9230 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009231 ac_lo=0 ac_mid=0
9232 while :; do
9233 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009234/* confdefs.h. */
9235_ACEOF
9236cat confdefs.h >>conftest.$ac_ext
9237cat >>conftest.$ac_ext <<_ACEOF
9238/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009239$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009240 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009241int
9242main ()
9243{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009244static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009245test_array [0] = 0
9246
9247 ;
9248 return 0;
9249}
9250_ACEOF
9251rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009252if { (ac_try="$ac_compile"
9253case "(($ac_try" in
9254 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9255 *) ac_try_echo=$ac_try;;
9256esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009257eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009258 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009259 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009260 grep -v '^ *+' conftest.er1 >conftest.err
9261 rm -f conftest.er1
9262 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009264 (exit $ac_status); } && {
9265 test -z "$ac_c_werror_flag" ||
9266 test ! -s conftest.err
9267 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009268 ac_hi=$ac_mid; break
9269else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009270 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009271sed 's/^/| /' conftest.$ac_ext >&5
9272
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009273 ac_lo=`expr $ac_mid + 1`
9274 if test $ac_lo -le $ac_mid; then
9275 ac_lo= ac_hi=
9276 break
9277 fi
9278 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009279fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009280
9281rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009282 done
9283else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009284 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009285sed 's/^/| /' conftest.$ac_ext >&5
9286
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009287 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009288/* confdefs.h. */
9289_ACEOF
9290cat confdefs.h >>conftest.$ac_ext
9291cat >>conftest.$ac_ext <<_ACEOF
9292/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009293$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009294 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009295int
9296main ()
9297{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009298static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009299test_array [0] = 0
9300
9301 ;
9302 return 0;
9303}
9304_ACEOF
9305rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009306if { (ac_try="$ac_compile"
9307case "(($ac_try" in
9308 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9309 *) ac_try_echo=$ac_try;;
9310esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009311eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009312 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009313 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009314 grep -v '^ *+' conftest.er1 >conftest.err
9315 rm -f conftest.er1
9316 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009318 (exit $ac_status); } && {
9319 test -z "$ac_c_werror_flag" ||
9320 test ! -s conftest.err
9321 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009322 ac_hi=-1 ac_mid=-1
9323 while :; do
9324 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009325/* confdefs.h. */
9326_ACEOF
9327cat confdefs.h >>conftest.$ac_ext
9328cat >>conftest.$ac_ext <<_ACEOF
9329/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009330$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009331 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009332int
9333main ()
9334{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009335static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009336test_array [0] = 0
9337
9338 ;
9339 return 0;
9340}
9341_ACEOF
9342rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009343if { (ac_try="$ac_compile"
9344case "(($ac_try" in
9345 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9346 *) ac_try_echo=$ac_try;;
9347esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009348eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009349 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009350 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009351 grep -v '^ *+' conftest.er1 >conftest.err
9352 rm -f conftest.er1
9353 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009355 (exit $ac_status); } && {
9356 test -z "$ac_c_werror_flag" ||
9357 test ! -s conftest.err
9358 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009359 ac_lo=$ac_mid; break
9360else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009361 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009362sed 's/^/| /' conftest.$ac_ext >&5
9363
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009364 ac_hi=`expr '(' $ac_mid ')' - 1`
9365 if test $ac_mid -le $ac_hi; then
9366 ac_lo= ac_hi=
9367 break
9368 fi
9369 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009370fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009371
9372rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009373 done
9374else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009375 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009376sed 's/^/| /' conftest.$ac_ext >&5
9377
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009378 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009379fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009380
9381rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009382fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009383
9384rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009385# Binary search between lo and hi bounds.
9386while test "x$ac_lo" != "x$ac_hi"; do
9387 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9388 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009389/* confdefs.h. */
9390_ACEOF
9391cat confdefs.h >>conftest.$ac_ext
9392cat >>conftest.$ac_ext <<_ACEOF
9393/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009394$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009395 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009396int
9397main ()
9398{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009399static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009400test_array [0] = 0
9401
9402 ;
9403 return 0;
9404}
9405_ACEOF
9406rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009407if { (ac_try="$ac_compile"
9408case "(($ac_try" in
9409 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9410 *) ac_try_echo=$ac_try;;
9411esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009412eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009413 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009414 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009415 grep -v '^ *+' conftest.er1 >conftest.err
9416 rm -f conftest.er1
9417 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009419 (exit $ac_status); } && {
9420 test -z "$ac_c_werror_flag" ||
9421 test ! -s conftest.err
9422 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009423 ac_hi=$ac_mid
9424else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009425 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009426sed 's/^/| /' conftest.$ac_ext >&5
9427
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009428 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009429fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009430
9431rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009432done
9433case $ac_lo in
9434?*) ac_cv_sizeof_float=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009435'') if test "$ac_cv_type_float" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009436 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009437See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009438echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009439See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009440 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009441 else
9442 ac_cv_sizeof_float=0
9443 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009444esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009445else
Martin v. Löwis11437992002-04-12 09:54:03 +00009446 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009447/* confdefs.h. */
9448_ACEOF
9449cat confdefs.h >>conftest.$ac_ext
9450cat >>conftest.$ac_ext <<_ACEOF
9451/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009452$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009453 typedef float ac__type_sizeof_;
9454static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9455static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009456#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009457#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009458int
9459main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009460{
Martin v. Löwis11437992002-04-12 09:54:03 +00009461
9462 FILE *f = fopen ("conftest.val", "w");
9463 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009464 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009465 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009466 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009467 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009468 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009469 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009470 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009471 }
9472 else
9473 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009474 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009475 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009476 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009477 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009478 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009479 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009480
9481 ;
9482 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009483}
Martin v. Löwis11437992002-04-12 09:54:03 +00009484_ACEOF
9485rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009486if { (ac_try="$ac_link"
9487case "(($ac_try" in
9488 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9489 *) ac_try_echo=$ac_try;;
9490esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009491eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009492 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009493 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009495 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009496 { (case "(($ac_try" in
9497 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9498 *) ac_try_echo=$ac_try;;
9499esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009500eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009501 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009502 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009504 (exit $ac_status); }; }; then
9505 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009506else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009507 echo "$as_me: program exited with status $ac_status" >&5
9508echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009509sed 's/^/| /' conftest.$ac_ext >&5
9510
Martin v. Löwis11437992002-04-12 09:54:03 +00009511( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009512if test "$ac_cv_type_float" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009513 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009514See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009515echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009516See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009517 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009518 else
9519 ac_cv_sizeof_float=0
9520 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009521fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009522rm -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 +00009523fi
9524rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009525fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009526{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
9527echo "${ECHO_T}$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009528
9529
9530
Martin v. Löwis11437992002-04-12 09:54:03 +00009531cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009532#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00009533_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009534
9535
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009536{ echo "$as_me:$LINENO: checking for double" >&5
9537echo $ECHO_N "checking for double... $ECHO_C" >&6; }
9538if test "${ac_cv_type_double+set}" = set; then
9539 echo $ECHO_N "(cached) $ECHO_C" >&6
9540else
9541 cat >conftest.$ac_ext <<_ACEOF
9542/* confdefs.h. */
9543_ACEOF
9544cat confdefs.h >>conftest.$ac_ext
9545cat >>conftest.$ac_ext <<_ACEOF
9546/* end confdefs.h. */
9547$ac_includes_default
9548typedef double ac__type_new_;
9549int
9550main ()
9551{
9552if ((ac__type_new_ *) 0)
9553 return 0;
9554if (sizeof (ac__type_new_))
9555 return 0;
9556 ;
9557 return 0;
9558}
9559_ACEOF
9560rm -f conftest.$ac_objext
9561if { (ac_try="$ac_compile"
9562case "(($ac_try" in
9563 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9564 *) ac_try_echo=$ac_try;;
9565esac
9566eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9567 (eval "$ac_compile") 2>conftest.er1
9568 ac_status=$?
9569 grep -v '^ *+' conftest.er1 >conftest.err
9570 rm -f conftest.er1
9571 cat conftest.err >&5
9572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9573 (exit $ac_status); } && {
9574 test -z "$ac_c_werror_flag" ||
9575 test ! -s conftest.err
9576 } && test -s conftest.$ac_objext; then
9577 ac_cv_type_double=yes
9578else
9579 echo "$as_me: failed program was:" >&5
9580sed 's/^/| /' conftest.$ac_ext >&5
9581
9582 ac_cv_type_double=no
9583fi
9584
9585rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9586fi
9587{ echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
9588echo "${ECHO_T}$ac_cv_type_double" >&6; }
9589
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009590# The cast to long int works around a bug in the HP C Compiler
9591# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9592# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9593# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009594{ echo "$as_me:$LINENO: checking size of double" >&5
9595echo $ECHO_N "checking size of double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009596if test "${ac_cv_sizeof_double+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009597 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009598else
Martin v. Löwis11437992002-04-12 09:54:03 +00009599 if test "$cross_compiling" = yes; then
9600 # Depending upon the size, compute the lo and hi bounds.
9601cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009602/* confdefs.h. */
9603_ACEOF
9604cat confdefs.h >>conftest.$ac_ext
9605cat >>conftest.$ac_ext <<_ACEOF
9606/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009607$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009608 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009609int
9610main ()
9611{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009612static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009613test_array [0] = 0
9614
9615 ;
9616 return 0;
9617}
9618_ACEOF
9619rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009620if { (ac_try="$ac_compile"
9621case "(($ac_try" in
9622 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9623 *) ac_try_echo=$ac_try;;
9624esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009625eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009626 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009627 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009628 grep -v '^ *+' conftest.er1 >conftest.err
9629 rm -f conftest.er1
9630 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009632 (exit $ac_status); } && {
9633 test -z "$ac_c_werror_flag" ||
9634 test ! -s conftest.err
9635 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009636 ac_lo=0 ac_mid=0
9637 while :; do
9638 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009639/* confdefs.h. */
9640_ACEOF
9641cat confdefs.h >>conftest.$ac_ext
9642cat >>conftest.$ac_ext <<_ACEOF
9643/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009644$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009645 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009646int
9647main ()
9648{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009649static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009650test_array [0] = 0
9651
9652 ;
9653 return 0;
9654}
9655_ACEOF
9656rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009657if { (ac_try="$ac_compile"
9658case "(($ac_try" in
9659 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9660 *) ac_try_echo=$ac_try;;
9661esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009662eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009663 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009664 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009665 grep -v '^ *+' conftest.er1 >conftest.err
9666 rm -f conftest.er1
9667 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009669 (exit $ac_status); } && {
9670 test -z "$ac_c_werror_flag" ||
9671 test ! -s conftest.err
9672 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009673 ac_hi=$ac_mid; break
9674else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009675 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009676sed 's/^/| /' conftest.$ac_ext >&5
9677
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009678 ac_lo=`expr $ac_mid + 1`
9679 if test $ac_lo -le $ac_mid; then
9680 ac_lo= ac_hi=
9681 break
9682 fi
9683 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009684fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009685
9686rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009687 done
9688else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009689 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009690sed 's/^/| /' conftest.$ac_ext >&5
9691
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009692 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009693/* confdefs.h. */
9694_ACEOF
9695cat confdefs.h >>conftest.$ac_ext
9696cat >>conftest.$ac_ext <<_ACEOF
9697/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009698$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009699 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009700int
9701main ()
9702{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009703static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009704test_array [0] = 0
9705
9706 ;
9707 return 0;
9708}
9709_ACEOF
9710rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009711if { (ac_try="$ac_compile"
9712case "(($ac_try" in
9713 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9714 *) ac_try_echo=$ac_try;;
9715esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009716eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009717 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009718 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009719 grep -v '^ *+' conftest.er1 >conftest.err
9720 rm -f conftest.er1
9721 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009723 (exit $ac_status); } && {
9724 test -z "$ac_c_werror_flag" ||
9725 test ! -s conftest.err
9726 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009727 ac_hi=-1 ac_mid=-1
9728 while :; do
9729 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009730/* confdefs.h. */
9731_ACEOF
9732cat confdefs.h >>conftest.$ac_ext
9733cat >>conftest.$ac_ext <<_ACEOF
9734/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009735$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009736 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009737int
9738main ()
9739{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009740static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009741test_array [0] = 0
9742
9743 ;
9744 return 0;
9745}
9746_ACEOF
9747rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009748if { (ac_try="$ac_compile"
9749case "(($ac_try" in
9750 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9751 *) ac_try_echo=$ac_try;;
9752esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009753eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009754 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009755 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009756 grep -v '^ *+' conftest.er1 >conftest.err
9757 rm -f conftest.er1
9758 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009759 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009760 (exit $ac_status); } && {
9761 test -z "$ac_c_werror_flag" ||
9762 test ! -s conftest.err
9763 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009764 ac_lo=$ac_mid; break
9765else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009766 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009767sed 's/^/| /' conftest.$ac_ext >&5
9768
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009769 ac_hi=`expr '(' $ac_mid ')' - 1`
9770 if test $ac_mid -le $ac_hi; then
9771 ac_lo= ac_hi=
9772 break
9773 fi
9774 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009775fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009776
9777rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009778 done
9779else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009780 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009781sed 's/^/| /' conftest.$ac_ext >&5
9782
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009783 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009784fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009785
9786rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009787fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009788
9789rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009790# Binary search between lo and hi bounds.
9791while test "x$ac_lo" != "x$ac_hi"; do
9792 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9793 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009794/* confdefs.h. */
9795_ACEOF
9796cat confdefs.h >>conftest.$ac_ext
9797cat >>conftest.$ac_ext <<_ACEOF
9798/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009799$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009800 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009801int
9802main ()
9803{
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009804static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009805test_array [0] = 0
9806
9807 ;
9808 return 0;
9809}
9810_ACEOF
9811rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009812if { (ac_try="$ac_compile"
9813case "(($ac_try" in
9814 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9815 *) ac_try_echo=$ac_try;;
9816esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009817eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009818 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009819 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009820 grep -v '^ *+' conftest.er1 >conftest.err
9821 rm -f conftest.er1
9822 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009824 (exit $ac_status); } && {
9825 test -z "$ac_c_werror_flag" ||
9826 test ! -s conftest.err
9827 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009828 ac_hi=$ac_mid
9829else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009830 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009831sed 's/^/| /' conftest.$ac_ext >&5
9832
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009833 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009834fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009835
9836rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009837done
9838case $ac_lo in
9839?*) ac_cv_sizeof_double=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009840'') if test "$ac_cv_type_double" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009841 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009842See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009843echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009844See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009845 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009846 else
9847 ac_cv_sizeof_double=0
9848 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009849esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009850else
Martin v. Löwis11437992002-04-12 09:54:03 +00009851 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009852/* confdefs.h. */
9853_ACEOF
9854cat confdefs.h >>conftest.$ac_ext
9855cat >>conftest.$ac_ext <<_ACEOF
9856/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009857$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009858 typedef double ac__type_sizeof_;
9859static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9860static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009861#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009862#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009863int
9864main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009865{
Martin v. Löwis11437992002-04-12 09:54:03 +00009866
9867 FILE *f = fopen ("conftest.val", "w");
9868 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009869 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009870 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009871 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009872 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009873 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009874 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009875 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009876 }
9877 else
9878 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009879 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009880 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009881 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009882 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009883 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009884 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009885
9886 ;
9887 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009888}
Martin v. Löwis11437992002-04-12 09:54:03 +00009889_ACEOF
9890rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009891if { (ac_try="$ac_link"
9892case "(($ac_try" in
9893 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9894 *) ac_try_echo=$ac_try;;
9895esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009896eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009897 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009898 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009900 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009901 { (case "(($ac_try" in
9902 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9903 *) ac_try_echo=$ac_try;;
9904esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009905eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009906 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009907 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009909 (exit $ac_status); }; }; then
9910 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009911else
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009912 echo "$as_me: program exited with status $ac_status" >&5
9913echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009914sed 's/^/| /' conftest.$ac_ext >&5
9915
Martin v. Löwis11437992002-04-12 09:54:03 +00009916( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009917if test "$ac_cv_type_double" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009918 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009919See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009920echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009921See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009922 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009923 else
9924 ac_cv_sizeof_double=0
9925 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009926fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009927rm -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 +00009928fi
9929rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009930fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009931{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
9932echo "${ECHO_T}$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009933
9934
9935
Martin v. Löwis11437992002-04-12 09:54:03 +00009936cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009937#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00009938_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009939
9940
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009941{ echo "$as_me:$LINENO: checking for fpos_t" >&5
9942echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6; }
9943if test "${ac_cv_type_fpos_t+set}" = set; then
9944 echo $ECHO_N "(cached) $ECHO_C" >&6
9945else
9946 cat >conftest.$ac_ext <<_ACEOF
9947/* confdefs.h. */
9948_ACEOF
9949cat confdefs.h >>conftest.$ac_ext
9950cat >>conftest.$ac_ext <<_ACEOF
9951/* end confdefs.h. */
9952$ac_includes_default
9953typedef fpos_t ac__type_new_;
9954int
9955main ()
9956{
9957if ((ac__type_new_ *) 0)
9958 return 0;
9959if (sizeof (ac__type_new_))
9960 return 0;
9961 ;
9962 return 0;
9963}
9964_ACEOF
9965rm -f conftest.$ac_objext
9966if { (ac_try="$ac_compile"
9967case "(($ac_try" in
9968 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9969 *) ac_try_echo=$ac_try;;
9970esac
9971eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9972 (eval "$ac_compile") 2>conftest.er1
9973 ac_status=$?
9974 grep -v '^ *+' conftest.er1 >conftest.err
9975 rm -f conftest.er1
9976 cat conftest.err >&5
9977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9978 (exit $ac_status); } && {
9979 test -z "$ac_c_werror_flag" ||
9980 test ! -s conftest.err
9981 } && test -s conftest.$ac_objext; then
9982 ac_cv_type_fpos_t=yes
9983else
9984 echo "$as_me: failed program was:" >&5
9985sed 's/^/| /' conftest.$ac_ext >&5
9986
9987 ac_cv_type_fpos_t=no
9988fi
9989
9990rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9991fi
9992{ echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
9993echo "${ECHO_T}$ac_cv_type_fpos_t" >&6; }
9994
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009995# The cast to long int works around a bug in the HP C Compiler
9996# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9997# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9998# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +00009999{ echo "$as_me:$LINENO: checking size of fpos_t" >&5
10000echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010001if test "${ac_cv_sizeof_fpos_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010002 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000010003else
Martin v. Löwis11437992002-04-12 09:54:03 +000010004 if test "$cross_compiling" = yes; then
10005 # Depending upon the size, compute the lo and hi bounds.
10006cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010007/* confdefs.h. */
10008_ACEOF
10009cat confdefs.h >>conftest.$ac_ext
10010cat >>conftest.$ac_ext <<_ACEOF
10011/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010012$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010013 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010014int
10015main ()
10016{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010017static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010018test_array [0] = 0
10019
10020 ;
10021 return 0;
10022}
10023_ACEOF
10024rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010025if { (ac_try="$ac_compile"
10026case "(($ac_try" in
10027 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10028 *) ac_try_echo=$ac_try;;
10029esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010030eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010031 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010032 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010033 grep -v '^ *+' conftest.er1 >conftest.err
10034 rm -f conftest.er1
10035 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010037 (exit $ac_status); } && {
10038 test -z "$ac_c_werror_flag" ||
10039 test ! -s conftest.err
10040 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010041 ac_lo=0 ac_mid=0
10042 while :; do
10043 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010044/* confdefs.h. */
10045_ACEOF
10046cat confdefs.h >>conftest.$ac_ext
10047cat >>conftest.$ac_ext <<_ACEOF
10048/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010049$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010050 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010051int
10052main ()
10053{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010054static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010055test_array [0] = 0
10056
10057 ;
10058 return 0;
10059}
10060_ACEOF
10061rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010062if { (ac_try="$ac_compile"
10063case "(($ac_try" in
10064 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10065 *) ac_try_echo=$ac_try;;
10066esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010067eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010068 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010069 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010070 grep -v '^ *+' conftest.er1 >conftest.err
10071 rm -f conftest.er1
10072 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010074 (exit $ac_status); } && {
10075 test -z "$ac_c_werror_flag" ||
10076 test ! -s conftest.err
10077 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010078 ac_hi=$ac_mid; break
10079else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010080 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010081sed 's/^/| /' conftest.$ac_ext >&5
10082
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010083 ac_lo=`expr $ac_mid + 1`
10084 if test $ac_lo -le $ac_mid; then
10085 ac_lo= ac_hi=
10086 break
10087 fi
10088 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010089fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010090
10091rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010092 done
10093else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010094 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010095sed 's/^/| /' conftest.$ac_ext >&5
10096
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010097 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010098/* confdefs.h. */
10099_ACEOF
10100cat confdefs.h >>conftest.$ac_ext
10101cat >>conftest.$ac_ext <<_ACEOF
10102/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010103$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010104 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010105int
10106main ()
10107{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010108static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010109test_array [0] = 0
10110
10111 ;
10112 return 0;
10113}
10114_ACEOF
10115rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010116if { (ac_try="$ac_compile"
10117case "(($ac_try" in
10118 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10119 *) ac_try_echo=$ac_try;;
10120esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010121eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010122 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010123 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010124 grep -v '^ *+' conftest.er1 >conftest.err
10125 rm -f conftest.er1
10126 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010128 (exit $ac_status); } && {
10129 test -z "$ac_c_werror_flag" ||
10130 test ! -s conftest.err
10131 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010132 ac_hi=-1 ac_mid=-1
10133 while :; do
10134 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010135/* confdefs.h. */
10136_ACEOF
10137cat confdefs.h >>conftest.$ac_ext
10138cat >>conftest.$ac_ext <<_ACEOF
10139/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010140$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010141 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010142int
10143main ()
10144{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010145static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010146test_array [0] = 0
10147
10148 ;
10149 return 0;
10150}
10151_ACEOF
10152rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010153if { (ac_try="$ac_compile"
10154case "(($ac_try" in
10155 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10156 *) ac_try_echo=$ac_try;;
10157esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010158eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010159 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010160 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010161 grep -v '^ *+' conftest.er1 >conftest.err
10162 rm -f conftest.er1
10163 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010165 (exit $ac_status); } && {
10166 test -z "$ac_c_werror_flag" ||
10167 test ! -s conftest.err
10168 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010169 ac_lo=$ac_mid; break
10170else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010171 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010172sed 's/^/| /' conftest.$ac_ext >&5
10173
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010174 ac_hi=`expr '(' $ac_mid ')' - 1`
10175 if test $ac_mid -le $ac_hi; then
10176 ac_lo= ac_hi=
10177 break
10178 fi
10179 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010180fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010181
10182rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010183 done
10184else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010185 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010186sed 's/^/| /' conftest.$ac_ext >&5
10187
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010188 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010189fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010190
10191rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010192fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010193
10194rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010195# Binary search between lo and hi bounds.
10196while test "x$ac_lo" != "x$ac_hi"; do
10197 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10198 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010199/* confdefs.h. */
10200_ACEOF
10201cat confdefs.h >>conftest.$ac_ext
10202cat >>conftest.$ac_ext <<_ACEOF
10203/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010204$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010205 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010206int
10207main ()
10208{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010209static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010210test_array [0] = 0
10211
10212 ;
10213 return 0;
10214}
10215_ACEOF
10216rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010217if { (ac_try="$ac_compile"
10218case "(($ac_try" in
10219 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10220 *) ac_try_echo=$ac_try;;
10221esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010222eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010223 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010224 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010225 grep -v '^ *+' conftest.er1 >conftest.err
10226 rm -f conftest.er1
10227 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010229 (exit $ac_status); } && {
10230 test -z "$ac_c_werror_flag" ||
10231 test ! -s conftest.err
10232 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010233 ac_hi=$ac_mid
10234else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010235 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010236sed 's/^/| /' conftest.$ac_ext >&5
10237
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010238 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010239fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010240
10241rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010242done
10243case $ac_lo in
10244?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010245'') if test "$ac_cv_type_fpos_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010246 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010247See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010248echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010249See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010250 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010251 else
10252 ac_cv_sizeof_fpos_t=0
10253 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010254esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010255else
Martin v. Löwis11437992002-04-12 09:54:03 +000010256 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010257/* confdefs.h. */
10258_ACEOF
10259cat confdefs.h >>conftest.$ac_ext
10260cat >>conftest.$ac_ext <<_ACEOF
10261/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010262$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010263 typedef fpos_t ac__type_sizeof_;
10264static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10265static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010266#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010267#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010268int
10269main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010270{
Martin v. Löwis11437992002-04-12 09:54:03 +000010271
10272 FILE *f = fopen ("conftest.val", "w");
10273 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010274 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010275 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010276 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010277 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010278 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010279 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010280 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010281 }
10282 else
10283 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010284 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010285 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010286 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010287 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010288 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010289 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010290
10291 ;
10292 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010293}
Martin v. Löwis11437992002-04-12 09:54:03 +000010294_ACEOF
10295rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010296if { (ac_try="$ac_link"
10297case "(($ac_try" in
10298 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10299 *) ac_try_echo=$ac_try;;
10300esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010301eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010302 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010303 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010305 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010306 { (case "(($ac_try" in
10307 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10308 *) ac_try_echo=$ac_try;;
10309esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010310eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010311 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010312 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010314 (exit $ac_status); }; }; then
10315 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010316else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010317 echo "$as_me: program exited with status $ac_status" >&5
10318echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010319sed 's/^/| /' conftest.$ac_ext >&5
10320
Martin v. Löwis11437992002-04-12 09:54:03 +000010321( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010322if test "$ac_cv_type_fpos_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010323 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010324See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010325echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010326See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010327 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010328 else
10329 ac_cv_sizeof_fpos_t=0
10330 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010331fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010332rm -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 +000010333fi
10334rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010335fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010336{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
10337echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010338
10339
10340
Martin v. Löwis11437992002-04-12 09:54:03 +000010341cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010342#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010343_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010344
Michael W. Hudson54241132001-12-07 15:38:26 +000010345
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010346{ echo "$as_me:$LINENO: checking for size_t" >&5
10347echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
10348if test "${ac_cv_type_size_t+set}" = set; then
10349 echo $ECHO_N "(cached) $ECHO_C" >&6
10350else
10351 cat >conftest.$ac_ext <<_ACEOF
10352/* confdefs.h. */
10353_ACEOF
10354cat confdefs.h >>conftest.$ac_ext
10355cat >>conftest.$ac_ext <<_ACEOF
10356/* end confdefs.h. */
10357$ac_includes_default
10358typedef size_t ac__type_new_;
10359int
10360main ()
10361{
10362if ((ac__type_new_ *) 0)
10363 return 0;
10364if (sizeof (ac__type_new_))
10365 return 0;
10366 ;
10367 return 0;
10368}
10369_ACEOF
10370rm -f conftest.$ac_objext
10371if { (ac_try="$ac_compile"
10372case "(($ac_try" in
10373 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10374 *) ac_try_echo=$ac_try;;
10375esac
10376eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10377 (eval "$ac_compile") 2>conftest.er1
10378 ac_status=$?
10379 grep -v '^ *+' conftest.er1 >conftest.err
10380 rm -f conftest.er1
10381 cat conftest.err >&5
10382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10383 (exit $ac_status); } && {
10384 test -z "$ac_c_werror_flag" ||
10385 test ! -s conftest.err
10386 } && test -s conftest.$ac_objext; then
10387 ac_cv_type_size_t=yes
10388else
10389 echo "$as_me: failed program was:" >&5
10390sed 's/^/| /' conftest.$ac_ext >&5
10391
10392 ac_cv_type_size_t=no
10393fi
10394
10395rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10396fi
10397{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
10398echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
10399
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010400# The cast to long int works around a bug in the HP C Compiler
10401# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10402# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10403# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010404{ echo "$as_me:$LINENO: checking size of size_t" >&5
10405echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010406if test "${ac_cv_sizeof_size_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010407 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +000010408else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010409 if test "$cross_compiling" = yes; then
10410 # Depending upon the size, compute the lo and hi bounds.
10411cat >conftest.$ac_ext <<_ACEOF
10412/* confdefs.h. */
10413_ACEOF
10414cat confdefs.h >>conftest.$ac_ext
10415cat >>conftest.$ac_ext <<_ACEOF
10416/* end confdefs.h. */
10417$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010418 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010419int
10420main ()
10421{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010422static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010423test_array [0] = 0
10424
10425 ;
10426 return 0;
10427}
10428_ACEOF
10429rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010430if { (ac_try="$ac_compile"
10431case "(($ac_try" in
10432 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10433 *) ac_try_echo=$ac_try;;
10434esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010435eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010436 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010437 ac_status=$?
10438 grep -v '^ *+' conftest.er1 >conftest.err
10439 rm -f conftest.er1
10440 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010442 (exit $ac_status); } && {
10443 test -z "$ac_c_werror_flag" ||
10444 test ! -s conftest.err
10445 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010446 ac_lo=0 ac_mid=0
10447 while :; do
10448 cat >conftest.$ac_ext <<_ACEOF
10449/* confdefs.h. */
10450_ACEOF
10451cat confdefs.h >>conftest.$ac_ext
10452cat >>conftest.$ac_ext <<_ACEOF
10453/* end confdefs.h. */
10454$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010455 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010456int
10457main ()
10458{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010459static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010460test_array [0] = 0
10461
10462 ;
10463 return 0;
10464}
10465_ACEOF
10466rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010467if { (ac_try="$ac_compile"
10468case "(($ac_try" in
10469 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10470 *) ac_try_echo=$ac_try;;
10471esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010472eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010473 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010474 ac_status=$?
10475 grep -v '^ *+' conftest.er1 >conftest.err
10476 rm -f conftest.er1
10477 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010478 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010479 (exit $ac_status); } && {
10480 test -z "$ac_c_werror_flag" ||
10481 test ! -s conftest.err
10482 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010483 ac_hi=$ac_mid; break
10484else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010485 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010486sed 's/^/| /' conftest.$ac_ext >&5
10487
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010488 ac_lo=`expr $ac_mid + 1`
10489 if test $ac_lo -le $ac_mid; then
10490 ac_lo= ac_hi=
10491 break
10492 fi
10493 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010494fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010495
10496rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010497 done
10498else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010499 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010500sed 's/^/| /' conftest.$ac_ext >&5
10501
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010502 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +000010503/* confdefs.h. */
10504_ACEOF
10505cat confdefs.h >>conftest.$ac_ext
10506cat >>conftest.$ac_ext <<_ACEOF
10507/* end confdefs.h. */
10508$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010509 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010510int
10511main ()
10512{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010513static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010514test_array [0] = 0
10515
10516 ;
10517 return 0;
10518}
10519_ACEOF
10520rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010521if { (ac_try="$ac_compile"
10522case "(($ac_try" in
10523 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10524 *) ac_try_echo=$ac_try;;
10525esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010526eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010527 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010528 ac_status=$?
10529 grep -v '^ *+' conftest.er1 >conftest.err
10530 rm -f conftest.er1
10531 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010533 (exit $ac_status); } && {
10534 test -z "$ac_c_werror_flag" ||
10535 test ! -s conftest.err
10536 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010537 ac_hi=-1 ac_mid=-1
10538 while :; do
10539 cat >conftest.$ac_ext <<_ACEOF
10540/* confdefs.h. */
10541_ACEOF
10542cat confdefs.h >>conftest.$ac_ext
10543cat >>conftest.$ac_ext <<_ACEOF
10544/* end confdefs.h. */
10545$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010546 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010547int
10548main ()
10549{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010550static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010551test_array [0] = 0
10552
10553 ;
10554 return 0;
10555}
10556_ACEOF
10557rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010558if { (ac_try="$ac_compile"
10559case "(($ac_try" in
10560 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10561 *) ac_try_echo=$ac_try;;
10562esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010563eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010564 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010565 ac_status=$?
10566 grep -v '^ *+' conftest.er1 >conftest.err
10567 rm -f conftest.er1
10568 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010570 (exit $ac_status); } && {
10571 test -z "$ac_c_werror_flag" ||
10572 test ! -s conftest.err
10573 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010574 ac_lo=$ac_mid; break
10575else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010576 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010577sed 's/^/| /' conftest.$ac_ext >&5
10578
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010579 ac_hi=`expr '(' $ac_mid ')' - 1`
10580 if test $ac_mid -le $ac_hi; then
10581 ac_lo= ac_hi=
10582 break
10583 fi
10584 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010585fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010586
10587rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010588 done
10589else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010590 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010591sed 's/^/| /' conftest.$ac_ext >&5
10592
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010593 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +000010594fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010595
10596rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010597fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010598
10599rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010600# Binary search between lo and hi bounds.
10601while test "x$ac_lo" != "x$ac_hi"; do
10602 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10603 cat >conftest.$ac_ext <<_ACEOF
10604/* confdefs.h. */
10605_ACEOF
10606cat confdefs.h >>conftest.$ac_ext
10607cat >>conftest.$ac_ext <<_ACEOF
10608/* end confdefs.h. */
10609$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010610 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010611int
10612main ()
10613{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010614static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010615test_array [0] = 0
10616
10617 ;
10618 return 0;
10619}
10620_ACEOF
10621rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010622if { (ac_try="$ac_compile"
10623case "(($ac_try" in
10624 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10625 *) ac_try_echo=$ac_try;;
10626esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010627eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010628 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010629 ac_status=$?
10630 grep -v '^ *+' conftest.er1 >conftest.err
10631 rm -f conftest.er1
10632 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010634 (exit $ac_status); } && {
10635 test -z "$ac_c_werror_flag" ||
10636 test ! -s conftest.err
10637 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010638 ac_hi=$ac_mid
10639else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010640 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010641sed 's/^/| /' conftest.$ac_ext >&5
10642
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010643 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010644fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010645
10646rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010647done
10648case $ac_lo in
10649?*) ac_cv_sizeof_size_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010650'') if test "$ac_cv_type_size_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010651 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010652See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010653echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010654See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010655 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010656 else
10657 ac_cv_sizeof_size_t=0
10658 fi ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010659esac
10660else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010661 cat >conftest.$ac_ext <<_ACEOF
10662/* confdefs.h. */
10663_ACEOF
10664cat confdefs.h >>conftest.$ac_ext
10665cat >>conftest.$ac_ext <<_ACEOF
10666/* end confdefs.h. */
10667$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010668 typedef size_t ac__type_sizeof_;
10669static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10670static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010671#include <stdio.h>
10672#include <stdlib.h>
10673int
10674main ()
10675{
10676
10677 FILE *f = fopen ("conftest.val", "w");
10678 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010679 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010680 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010681 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010682 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010683 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010684 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010685 fprintf (f, "%ld\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010686 }
10687 else
10688 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010689 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010690 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010691 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010692 fprintf (f, "%lu\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010693 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010694 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010695
10696 ;
10697 return 0;
10698}
10699_ACEOF
10700rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010701if { (ac_try="$ac_link"
10702case "(($ac_try" in
10703 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10704 *) ac_try_echo=$ac_try;;
10705esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010706eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010707 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010708 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010710 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010711 { (case "(($ac_try" in
10712 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10713 *) ac_try_echo=$ac_try;;
10714esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010715eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010716 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010717 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010719 (exit $ac_status); }; }; then
10720 ac_cv_sizeof_size_t=`cat conftest.val`
10721else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010722 echo "$as_me: program exited with status $ac_status" >&5
10723echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010724sed 's/^/| /' conftest.$ac_ext >&5
10725
10726( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010727if test "$ac_cv_type_size_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010728 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010729See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010730echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010731See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010732 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010733 else
10734 ac_cv_sizeof_size_t=0
10735 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +000010736fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010737rm -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 +000010738fi
10739rm -f conftest.val
Martin v. Löwis18e16552006-02-15 17:27:45 +000010740fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010741{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
10742echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010743
10744
10745
Martin v. Löwis18e16552006-02-15 17:27:45 +000010746cat >>confdefs.h <<_ACEOF
10747#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
10748_ACEOF
10749
10750
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010751{ echo "$as_me:$LINENO: checking for pid_t" >&5
10752echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
10753if test "${ac_cv_type_pid_t+set}" = set; then
10754 echo $ECHO_N "(cached) $ECHO_C" >&6
10755else
10756 cat >conftest.$ac_ext <<_ACEOF
10757/* confdefs.h. */
10758_ACEOF
10759cat confdefs.h >>conftest.$ac_ext
10760cat >>conftest.$ac_ext <<_ACEOF
10761/* end confdefs.h. */
10762$ac_includes_default
10763typedef pid_t ac__type_new_;
10764int
10765main ()
10766{
10767if ((ac__type_new_ *) 0)
10768 return 0;
10769if (sizeof (ac__type_new_))
10770 return 0;
10771 ;
10772 return 0;
10773}
10774_ACEOF
10775rm -f conftest.$ac_objext
10776if { (ac_try="$ac_compile"
10777case "(($ac_try" in
10778 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10779 *) ac_try_echo=$ac_try;;
10780esac
10781eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10782 (eval "$ac_compile") 2>conftest.er1
10783 ac_status=$?
10784 grep -v '^ *+' conftest.er1 >conftest.err
10785 rm -f conftest.er1
10786 cat conftest.err >&5
10787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10788 (exit $ac_status); } && {
10789 test -z "$ac_c_werror_flag" ||
10790 test ! -s conftest.err
10791 } && test -s conftest.$ac_objext; then
10792 ac_cv_type_pid_t=yes
10793else
10794 echo "$as_me: failed program was:" >&5
10795sed 's/^/| /' conftest.$ac_ext >&5
10796
10797 ac_cv_type_pid_t=no
10798fi
10799
10800rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10801fi
10802{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10803echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
10804
Christian Heimes400adb02008-02-01 08:12:03 +000010805# The cast to long int works around a bug in the HP C Compiler
10806# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10807# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10808# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010809{ echo "$as_me:$LINENO: checking size of pid_t" >&5
10810echo $ECHO_N "checking size of pid_t... $ECHO_C" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +000010811if test "${ac_cv_sizeof_pid_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010812 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes400adb02008-02-01 08:12:03 +000010813else
10814 if test "$cross_compiling" = yes; then
10815 # Depending upon the size, compute the lo and hi bounds.
10816cat >conftest.$ac_ext <<_ACEOF
10817/* confdefs.h. */
10818_ACEOF
10819cat confdefs.h >>conftest.$ac_ext
10820cat >>conftest.$ac_ext <<_ACEOF
10821/* end confdefs.h. */
10822$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010823 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010824int
10825main ()
10826{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010827static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Christian Heimes400adb02008-02-01 08:12:03 +000010828test_array [0] = 0
10829
10830 ;
10831 return 0;
10832}
10833_ACEOF
10834rm -f conftest.$ac_objext
10835if { (ac_try="$ac_compile"
10836case "(($ac_try" in
10837 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10838 *) ac_try_echo=$ac_try;;
10839esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010840eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010841 (eval "$ac_compile") 2>conftest.er1
10842 ac_status=$?
10843 grep -v '^ *+' conftest.er1 >conftest.err
10844 rm -f conftest.er1
10845 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010847 (exit $ac_status); } && {
10848 test -z "$ac_c_werror_flag" ||
10849 test ! -s conftest.err
10850 } && test -s conftest.$ac_objext; then
10851 ac_lo=0 ac_mid=0
10852 while :; do
10853 cat >conftest.$ac_ext <<_ACEOF
10854/* confdefs.h. */
10855_ACEOF
10856cat confdefs.h >>conftest.$ac_ext
10857cat >>conftest.$ac_ext <<_ACEOF
10858/* end confdefs.h. */
10859$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010860 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010861int
10862main ()
10863{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010864static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000010865test_array [0] = 0
10866
10867 ;
10868 return 0;
10869}
10870_ACEOF
10871rm -f conftest.$ac_objext
10872if { (ac_try="$ac_compile"
10873case "(($ac_try" in
10874 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10875 *) ac_try_echo=$ac_try;;
10876esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010877eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010878 (eval "$ac_compile") 2>conftest.er1
10879 ac_status=$?
10880 grep -v '^ *+' conftest.er1 >conftest.err
10881 rm -f conftest.er1
10882 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010883 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010884 (exit $ac_status); } && {
10885 test -z "$ac_c_werror_flag" ||
10886 test ! -s conftest.err
10887 } && test -s conftest.$ac_objext; then
10888 ac_hi=$ac_mid; break
10889else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010890 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010891sed 's/^/| /' conftest.$ac_ext >&5
10892
10893 ac_lo=`expr $ac_mid + 1`
10894 if test $ac_lo -le $ac_mid; then
10895 ac_lo= ac_hi=
10896 break
10897 fi
10898 ac_mid=`expr 2 '*' $ac_mid + 1`
10899fi
10900
10901rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10902 done
10903else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010904 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010905sed 's/^/| /' conftest.$ac_ext >&5
10906
10907 cat >conftest.$ac_ext <<_ACEOF
10908/* confdefs.h. */
10909_ACEOF
10910cat confdefs.h >>conftest.$ac_ext
10911cat >>conftest.$ac_ext <<_ACEOF
10912/* end confdefs.h. */
10913$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010914 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010915int
10916main ()
10917{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010918static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Christian Heimes400adb02008-02-01 08:12:03 +000010919test_array [0] = 0
10920
10921 ;
10922 return 0;
10923}
10924_ACEOF
10925rm -f conftest.$ac_objext
10926if { (ac_try="$ac_compile"
10927case "(($ac_try" in
10928 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10929 *) ac_try_echo=$ac_try;;
10930esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010931eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010932 (eval "$ac_compile") 2>conftest.er1
10933 ac_status=$?
10934 grep -v '^ *+' conftest.er1 >conftest.err
10935 rm -f conftest.er1
10936 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010937 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010938 (exit $ac_status); } && {
10939 test -z "$ac_c_werror_flag" ||
10940 test ! -s conftest.err
10941 } && test -s conftest.$ac_objext; then
10942 ac_hi=-1 ac_mid=-1
10943 while :; do
10944 cat >conftest.$ac_ext <<_ACEOF
10945/* confdefs.h. */
10946_ACEOF
10947cat confdefs.h >>conftest.$ac_ext
10948cat >>conftest.$ac_ext <<_ACEOF
10949/* end confdefs.h. */
10950$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010951 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010952int
10953main ()
10954{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010955static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000010956test_array [0] = 0
10957
10958 ;
10959 return 0;
10960}
10961_ACEOF
10962rm -f conftest.$ac_objext
10963if { (ac_try="$ac_compile"
10964case "(($ac_try" in
10965 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10966 *) ac_try_echo=$ac_try;;
10967esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010968eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010969 (eval "$ac_compile") 2>conftest.er1
10970 ac_status=$?
10971 grep -v '^ *+' conftest.er1 >conftest.err
10972 rm -f conftest.er1
10973 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010975 (exit $ac_status); } && {
10976 test -z "$ac_c_werror_flag" ||
10977 test ! -s conftest.err
10978 } && test -s conftest.$ac_objext; then
10979 ac_lo=$ac_mid; break
10980else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010981 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010982sed 's/^/| /' conftest.$ac_ext >&5
10983
10984 ac_hi=`expr '(' $ac_mid ')' - 1`
10985 if test $ac_mid -le $ac_hi; then
10986 ac_lo= ac_hi=
10987 break
10988 fi
10989 ac_mid=`expr 2 '*' $ac_mid`
10990fi
10991
10992rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10993 done
10994else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000010995 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010996sed 's/^/| /' conftest.$ac_ext >&5
10997
10998 ac_lo= ac_hi=
10999fi
11000
11001rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11002fi
11003
11004rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11005# Binary search between lo and hi bounds.
11006while test "x$ac_lo" != "x$ac_hi"; do
11007 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11008 cat >conftest.$ac_ext <<_ACEOF
11009/* confdefs.h. */
11010_ACEOF
11011cat confdefs.h >>conftest.$ac_ext
11012cat >>conftest.$ac_ext <<_ACEOF
11013/* end confdefs.h. */
11014$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011015 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000011016int
11017main ()
11018{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011019static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000011020test_array [0] = 0
11021
11022 ;
11023 return 0;
11024}
11025_ACEOF
11026rm -f conftest.$ac_objext
11027if { (ac_try="$ac_compile"
11028case "(($ac_try" in
11029 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11030 *) ac_try_echo=$ac_try;;
11031esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011032eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011033 (eval "$ac_compile") 2>conftest.er1
11034 ac_status=$?
11035 grep -v '^ *+' conftest.er1 >conftest.err
11036 rm -f conftest.er1
11037 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011039 (exit $ac_status); } && {
11040 test -z "$ac_c_werror_flag" ||
11041 test ! -s conftest.err
11042 } && test -s conftest.$ac_objext; then
11043 ac_hi=$ac_mid
11044else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011045 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011046sed 's/^/| /' conftest.$ac_ext >&5
11047
11048 ac_lo=`expr '(' $ac_mid ')' + 1`
11049fi
11050
11051rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11052done
11053case $ac_lo in
11054?*) ac_cv_sizeof_pid_t=$ac_lo;;
11055'') if test "$ac_cv_type_pid_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011056 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011057See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011058echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011059See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011060 { (exit 77); exit 77; }; }
Christian Heimes400adb02008-02-01 08:12:03 +000011061 else
11062 ac_cv_sizeof_pid_t=0
11063 fi ;;
11064esac
11065else
11066 cat >conftest.$ac_ext <<_ACEOF
11067/* confdefs.h. */
11068_ACEOF
11069cat confdefs.h >>conftest.$ac_ext
11070cat >>conftest.$ac_ext <<_ACEOF
11071/* end confdefs.h. */
11072$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011073 typedef pid_t ac__type_sizeof_;
11074static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11075static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Christian Heimes400adb02008-02-01 08:12:03 +000011076#include <stdio.h>
11077#include <stdlib.h>
11078int
11079main ()
11080{
11081
11082 FILE *f = fopen ("conftest.val", "w");
11083 if (! f)
11084 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011085 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Christian Heimes400adb02008-02-01 08:12:03 +000011086 {
11087 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011088 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes400adb02008-02-01 08:12:03 +000011089 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011090 fprintf (f, "%ld\n", i);
Christian Heimes400adb02008-02-01 08:12:03 +000011091 }
11092 else
11093 {
11094 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011095 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes400adb02008-02-01 08:12:03 +000011096 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011097 fprintf (f, "%lu\n", i);
Christian Heimes400adb02008-02-01 08:12:03 +000011098 }
11099 return ferror (f) || fclose (f) != 0;
11100
11101 ;
11102 return 0;
11103}
11104_ACEOF
11105rm -f conftest$ac_exeext
11106if { (ac_try="$ac_link"
11107case "(($ac_try" in
11108 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11109 *) ac_try_echo=$ac_try;;
11110esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011111eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011112 (eval "$ac_link") 2>&5
11113 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011114 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011115 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11116 { (case "(($ac_try" in
11117 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11118 *) ac_try_echo=$ac_try;;
11119esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011120eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011121 (eval "$ac_try") 2>&5
11122 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011124 (exit $ac_status); }; }; then
11125 ac_cv_sizeof_pid_t=`cat conftest.val`
11126else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011127 echo "$as_me: program exited with status $ac_status" >&5
11128echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011129sed 's/^/| /' conftest.$ac_ext >&5
11130
11131( exit $ac_status )
11132if test "$ac_cv_type_pid_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011133 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011134See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011135echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011136See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011137 { (exit 77); exit 77; }; }
Christian Heimes400adb02008-02-01 08:12:03 +000011138 else
11139 ac_cv_sizeof_pid_t=0
11140 fi
11141fi
11142rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11143fi
11144rm -f conftest.val
11145fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011146{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5
11147echo "${ECHO_T}$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +000011148
11149
11150
11151cat >>confdefs.h <<_ACEOF
11152#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
11153_ACEOF
11154
11155
Michael W. Hudson54241132001-12-07 15:38:26 +000011156
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011157{ echo "$as_me:$LINENO: checking for long long support" >&5
11158echo $ECHO_N "checking for long long support... $ECHO_C" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011159have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011160cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011161/* confdefs.h. */
11162_ACEOF
11163cat confdefs.h >>conftest.$ac_ext
11164cat >>conftest.$ac_ext <<_ACEOF
11165/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011166
Martin v. Löwis11437992002-04-12 09:54:03 +000011167int
11168main ()
11169{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011170long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011171 ;
11172 return 0;
11173}
11174_ACEOF
11175rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011176if { (ac_try="$ac_compile"
11177case "(($ac_try" in
11178 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11179 *) ac_try_echo=$ac_try;;
11180esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011181eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011182 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011183 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011184 grep -v '^ *+' conftest.er1 >conftest.err
11185 rm -f conftest.er1
11186 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011188 (exit $ac_status); } && {
11189 test -z "$ac_c_werror_flag" ||
11190 test ! -s conftest.err
11191 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011192
11193
11194cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011195#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011196_ACEOF
11197
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011198 have_long_long=yes
11199
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011200else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011201 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011202sed 's/^/| /' conftest.$ac_ext >&5
11203
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011204
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011205fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011206
11207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011208{ echo "$as_me:$LINENO: result: $have_long_long" >&5
11209echo "${ECHO_T}$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000011210if test "$have_long_long" = yes ; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011211{ echo "$as_me:$LINENO: checking for long long" >&5
11212echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
11213if test "${ac_cv_type_long_long+set}" = set; then
11214 echo $ECHO_N "(cached) $ECHO_C" >&6
11215else
11216 cat >conftest.$ac_ext <<_ACEOF
11217/* confdefs.h. */
11218_ACEOF
11219cat confdefs.h >>conftest.$ac_ext
11220cat >>conftest.$ac_ext <<_ACEOF
11221/* end confdefs.h. */
11222$ac_includes_default
11223typedef long long ac__type_new_;
11224int
11225main ()
11226{
11227if ((ac__type_new_ *) 0)
11228 return 0;
11229if (sizeof (ac__type_new_))
11230 return 0;
11231 ;
11232 return 0;
11233}
11234_ACEOF
11235rm -f conftest.$ac_objext
11236if { (ac_try="$ac_compile"
11237case "(($ac_try" in
11238 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11239 *) ac_try_echo=$ac_try;;
11240esac
11241eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11242 (eval "$ac_compile") 2>conftest.er1
11243 ac_status=$?
11244 grep -v '^ *+' conftest.er1 >conftest.err
11245 rm -f conftest.er1
11246 cat conftest.err >&5
11247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11248 (exit $ac_status); } && {
11249 test -z "$ac_c_werror_flag" ||
11250 test ! -s conftest.err
11251 } && test -s conftest.$ac_objext; then
11252 ac_cv_type_long_long=yes
11253else
11254 echo "$as_me: failed program was:" >&5
11255sed 's/^/| /' conftest.$ac_ext >&5
11256
11257 ac_cv_type_long_long=no
11258fi
11259
11260rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11261fi
11262{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
11263echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
11264
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011265# The cast to long int works around a bug in the HP C Compiler
11266# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11267# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11268# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011269{ echo "$as_me:$LINENO: checking size of long long" >&5
11270echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011271if test "${ac_cv_sizeof_long_long+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011272 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011273else
Martin v. Löwis11437992002-04-12 09:54:03 +000011274 if test "$cross_compiling" = yes; then
11275 # Depending upon the size, compute the lo and hi bounds.
11276cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011277/* confdefs.h. */
11278_ACEOF
11279cat confdefs.h >>conftest.$ac_ext
11280cat >>conftest.$ac_ext <<_ACEOF
11281/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011282$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011283 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011284int
11285main ()
11286{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011287static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011288test_array [0] = 0
11289
11290 ;
11291 return 0;
11292}
11293_ACEOF
11294rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011295if { (ac_try="$ac_compile"
11296case "(($ac_try" in
11297 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11298 *) ac_try_echo=$ac_try;;
11299esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011300eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011301 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011302 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011303 grep -v '^ *+' conftest.er1 >conftest.err
11304 rm -f conftest.er1
11305 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011307 (exit $ac_status); } && {
11308 test -z "$ac_c_werror_flag" ||
11309 test ! -s conftest.err
11310 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011311 ac_lo=0 ac_mid=0
11312 while :; do
11313 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011314/* confdefs.h. */
11315_ACEOF
11316cat confdefs.h >>conftest.$ac_ext
11317cat >>conftest.$ac_ext <<_ACEOF
11318/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011319$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011320 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011321int
11322main ()
11323{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011324static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011325test_array [0] = 0
11326
11327 ;
11328 return 0;
11329}
11330_ACEOF
11331rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011332if { (ac_try="$ac_compile"
11333case "(($ac_try" in
11334 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11335 *) ac_try_echo=$ac_try;;
11336esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011337eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011338 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011339 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011340 grep -v '^ *+' conftest.er1 >conftest.err
11341 rm -f conftest.er1
11342 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011344 (exit $ac_status); } && {
11345 test -z "$ac_c_werror_flag" ||
11346 test ! -s conftest.err
11347 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011348 ac_hi=$ac_mid; break
11349else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011350 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011351sed 's/^/| /' conftest.$ac_ext >&5
11352
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011353 ac_lo=`expr $ac_mid + 1`
11354 if test $ac_lo -le $ac_mid; then
11355 ac_lo= ac_hi=
11356 break
11357 fi
11358 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011359fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011360
11361rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011362 done
11363else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011364 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011365sed 's/^/| /' conftest.$ac_ext >&5
11366
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011367 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011368/* confdefs.h. */
11369_ACEOF
11370cat confdefs.h >>conftest.$ac_ext
11371cat >>conftest.$ac_ext <<_ACEOF
11372/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011373$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011374 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011375int
11376main ()
11377{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011378static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011379test_array [0] = 0
11380
11381 ;
11382 return 0;
11383}
11384_ACEOF
11385rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011386if { (ac_try="$ac_compile"
11387case "(($ac_try" in
11388 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11389 *) ac_try_echo=$ac_try;;
11390esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011391eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011392 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011393 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011394 grep -v '^ *+' conftest.er1 >conftest.err
11395 rm -f conftest.er1
11396 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011398 (exit $ac_status); } && {
11399 test -z "$ac_c_werror_flag" ||
11400 test ! -s conftest.err
11401 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011402 ac_hi=-1 ac_mid=-1
11403 while :; do
11404 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011405/* confdefs.h. */
11406_ACEOF
11407cat confdefs.h >>conftest.$ac_ext
11408cat >>conftest.$ac_ext <<_ACEOF
11409/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011410$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011411 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011412int
11413main ()
11414{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011415static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011416test_array [0] = 0
11417
11418 ;
11419 return 0;
11420}
11421_ACEOF
11422rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011423if { (ac_try="$ac_compile"
11424case "(($ac_try" in
11425 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11426 *) ac_try_echo=$ac_try;;
11427esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011428eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011429 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011430 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011431 grep -v '^ *+' conftest.er1 >conftest.err
11432 rm -f conftest.er1
11433 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011435 (exit $ac_status); } && {
11436 test -z "$ac_c_werror_flag" ||
11437 test ! -s conftest.err
11438 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011439 ac_lo=$ac_mid; break
11440else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011441 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011442sed 's/^/| /' conftest.$ac_ext >&5
11443
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011444 ac_hi=`expr '(' $ac_mid ')' - 1`
11445 if test $ac_mid -le $ac_hi; then
11446 ac_lo= ac_hi=
11447 break
11448 fi
11449 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000011450fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011451
11452rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011453 done
11454else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011455 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011456sed 's/^/| /' conftest.$ac_ext >&5
11457
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011458 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000011459fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011460
11461rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011462fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011463
11464rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011465# Binary search between lo and hi bounds.
11466while test "x$ac_lo" != "x$ac_hi"; do
11467 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11468 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011469/* confdefs.h. */
11470_ACEOF
11471cat confdefs.h >>conftest.$ac_ext
11472cat >>conftest.$ac_ext <<_ACEOF
11473/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011474$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011475 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011476int
11477main ()
11478{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011479static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011480test_array [0] = 0
11481
11482 ;
11483 return 0;
11484}
11485_ACEOF
11486rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011487if { (ac_try="$ac_compile"
11488case "(($ac_try" in
11489 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11490 *) ac_try_echo=$ac_try;;
11491esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011492eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011493 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011494 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011495 grep -v '^ *+' conftest.er1 >conftest.err
11496 rm -f conftest.er1
11497 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011499 (exit $ac_status); } && {
11500 test -z "$ac_c_werror_flag" ||
11501 test ! -s conftest.err
11502 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011503 ac_hi=$ac_mid
11504else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011505 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011506sed 's/^/| /' conftest.$ac_ext >&5
11507
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011508 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011509fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011510
11511rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011512done
11513case $ac_lo in
11514?*) ac_cv_sizeof_long_long=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011515'') if test "$ac_cv_type_long_long" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011516 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011517See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011518echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011519See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011520 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011521 else
11522 ac_cv_sizeof_long_long=0
11523 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011524esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011525else
Martin v. Löwis11437992002-04-12 09:54:03 +000011526 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011527/* confdefs.h. */
11528_ACEOF
11529cat confdefs.h >>conftest.$ac_ext
11530cat >>conftest.$ac_ext <<_ACEOF
11531/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011532$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011533 typedef long long ac__type_sizeof_;
11534static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11535static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011536#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011537#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011538int
11539main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011540{
Martin v. Löwis11437992002-04-12 09:54:03 +000011541
11542 FILE *f = fopen ("conftest.val", "w");
11543 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011544 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011545 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011546 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011547 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011548 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011549 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011550 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011551 }
11552 else
11553 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011554 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011555 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011556 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011557 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011558 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011559 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011560
11561 ;
11562 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011563}
Martin v. Löwis11437992002-04-12 09:54:03 +000011564_ACEOF
11565rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011566if { (ac_try="$ac_link"
11567case "(($ac_try" in
11568 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11569 *) ac_try_echo=$ac_try;;
11570esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011571eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011572 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011573 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011575 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011576 { (case "(($ac_try" in
11577 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11578 *) ac_try_echo=$ac_try;;
11579esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011580eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011581 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011582 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011584 (exit $ac_status); }; }; then
11585 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011586else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011587 echo "$as_me: program exited with status $ac_status" >&5
11588echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011589sed 's/^/| /' conftest.$ac_ext >&5
11590
Martin v. Löwis11437992002-04-12 09:54:03 +000011591( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011592if test "$ac_cv_type_long_long" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011593 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011594See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011595echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011596See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011597 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011598 else
11599 ac_cv_sizeof_long_long=0
11600 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011601fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011602rm -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 +000011603fi
11604rm -f conftest.val
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011605fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011606{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
11607echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011608
11609
11610
Martin v. Löwis11437992002-04-12 09:54:03 +000011611cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011612#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000011613_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011614
Michael W. Hudson54241132001-12-07 15:38:26 +000011615
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011616fi
11617
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011618{ echo "$as_me:$LINENO: checking for long double support" >&5
11619echo $ECHO_N "checking for long double support... $ECHO_C" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011620have_long_double=no
11621cat >conftest.$ac_ext <<_ACEOF
11622/* confdefs.h. */
11623_ACEOF
11624cat confdefs.h >>conftest.$ac_ext
11625cat >>conftest.$ac_ext <<_ACEOF
11626/* end confdefs.h. */
11627
11628int
11629main ()
11630{
11631long double x; x = (long double)0;
11632 ;
11633 return 0;
11634}
11635_ACEOF
11636rm -f conftest.$ac_objext
11637if { (ac_try="$ac_compile"
11638case "(($ac_try" in
11639 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11640 *) ac_try_echo=$ac_try;;
11641esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011642eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011643 (eval "$ac_compile") 2>conftest.er1
11644 ac_status=$?
11645 grep -v '^ *+' conftest.er1 >conftest.err
11646 rm -f conftest.er1
11647 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011649 (exit $ac_status); } && {
11650 test -z "$ac_c_werror_flag" ||
11651 test ! -s conftest.err
11652 } && test -s conftest.$ac_objext; then
11653
11654
11655cat >>confdefs.h <<\_ACEOF
11656#define HAVE_LONG_DOUBLE 1
11657_ACEOF
11658
11659 have_long_double=yes
11660
11661else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011662 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011663sed 's/^/| /' conftest.$ac_ext >&5
11664
11665
11666fi
11667
11668rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011669{ echo "$as_me:$LINENO: result: $have_long_double" >&5
11670echo "${ECHO_T}$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011671if test "$have_long_double" = yes ; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011672{ echo "$as_me:$LINENO: checking for long double" >&5
11673echo $ECHO_N "checking for long double... $ECHO_C" >&6; }
11674if test "${ac_cv_type_long_double+set}" = set; then
11675 echo $ECHO_N "(cached) $ECHO_C" >&6
11676else
11677 cat >conftest.$ac_ext <<_ACEOF
11678/* confdefs.h. */
11679_ACEOF
11680cat confdefs.h >>conftest.$ac_ext
11681cat >>conftest.$ac_ext <<_ACEOF
11682/* end confdefs.h. */
11683$ac_includes_default
11684typedef long double ac__type_new_;
11685int
11686main ()
11687{
11688if ((ac__type_new_ *) 0)
11689 return 0;
11690if (sizeof (ac__type_new_))
11691 return 0;
11692 ;
11693 return 0;
11694}
11695_ACEOF
11696rm -f conftest.$ac_objext
11697if { (ac_try="$ac_compile"
11698case "(($ac_try" in
11699 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11700 *) ac_try_echo=$ac_try;;
11701esac
11702eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11703 (eval "$ac_compile") 2>conftest.er1
11704 ac_status=$?
11705 grep -v '^ *+' conftest.er1 >conftest.err
11706 rm -f conftest.er1
11707 cat conftest.err >&5
11708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11709 (exit $ac_status); } && {
11710 test -z "$ac_c_werror_flag" ||
11711 test ! -s conftest.err
11712 } && test -s conftest.$ac_objext; then
11713 ac_cv_type_long_double=yes
11714else
11715 echo "$as_me: failed program was:" >&5
11716sed 's/^/| /' conftest.$ac_ext >&5
11717
11718 ac_cv_type_long_double=no
11719fi
11720
11721rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11722fi
11723{ echo "$as_me:$LINENO: result: $ac_cv_type_long_double" >&5
11724echo "${ECHO_T}$ac_cv_type_long_double" >&6; }
11725
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011726# The cast to long int works around a bug in the HP C Compiler
11727# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11728# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11729# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011730{ echo "$as_me:$LINENO: checking size of long double" >&5
11731echo $ECHO_N "checking size of long double... $ECHO_C" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011732if test "${ac_cv_sizeof_long_double+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011733 echo $ECHO_N "(cached) $ECHO_C" >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011734else
11735 if test "$cross_compiling" = yes; then
11736 # Depending upon the size, compute the lo and hi bounds.
11737cat >conftest.$ac_ext <<_ACEOF
11738/* confdefs.h. */
11739_ACEOF
11740cat confdefs.h >>conftest.$ac_ext
11741cat >>conftest.$ac_ext <<_ACEOF
11742/* end confdefs.h. */
11743$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011744 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011745int
11746main ()
11747{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011748static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011749test_array [0] = 0
11750
11751 ;
11752 return 0;
11753}
11754_ACEOF
11755rm -f conftest.$ac_objext
11756if { (ac_try="$ac_compile"
11757case "(($ac_try" in
11758 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11759 *) ac_try_echo=$ac_try;;
11760esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011761eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011762 (eval "$ac_compile") 2>conftest.er1
11763 ac_status=$?
11764 grep -v '^ *+' conftest.er1 >conftest.err
11765 rm -f conftest.er1
11766 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011768 (exit $ac_status); } && {
11769 test -z "$ac_c_werror_flag" ||
11770 test ! -s conftest.err
11771 } && test -s conftest.$ac_objext; then
11772 ac_lo=0 ac_mid=0
11773 while :; do
11774 cat >conftest.$ac_ext <<_ACEOF
11775/* confdefs.h. */
11776_ACEOF
11777cat confdefs.h >>conftest.$ac_ext
11778cat >>conftest.$ac_ext <<_ACEOF
11779/* end confdefs.h. */
11780$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011781 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011782int
11783main ()
11784{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011785static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011786test_array [0] = 0
11787
11788 ;
11789 return 0;
11790}
11791_ACEOF
11792rm -f conftest.$ac_objext
11793if { (ac_try="$ac_compile"
11794case "(($ac_try" in
11795 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11796 *) ac_try_echo=$ac_try;;
11797esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011798eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011799 (eval "$ac_compile") 2>conftest.er1
11800 ac_status=$?
11801 grep -v '^ *+' conftest.er1 >conftest.err
11802 rm -f conftest.er1
11803 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011805 (exit $ac_status); } && {
11806 test -z "$ac_c_werror_flag" ||
11807 test ! -s conftest.err
11808 } && test -s conftest.$ac_objext; then
11809 ac_hi=$ac_mid; break
11810else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011811 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011812sed 's/^/| /' conftest.$ac_ext >&5
11813
11814 ac_lo=`expr $ac_mid + 1`
11815 if test $ac_lo -le $ac_mid; then
11816 ac_lo= ac_hi=
11817 break
11818 fi
11819 ac_mid=`expr 2 '*' $ac_mid + 1`
11820fi
11821
11822rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11823 done
11824else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011825 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011826sed 's/^/| /' conftest.$ac_ext >&5
11827
11828 cat >conftest.$ac_ext <<_ACEOF
11829/* confdefs.h. */
11830_ACEOF
11831cat confdefs.h >>conftest.$ac_ext
11832cat >>conftest.$ac_ext <<_ACEOF
11833/* end confdefs.h. */
11834$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011835 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011836int
11837main ()
11838{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011839static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011840test_array [0] = 0
11841
11842 ;
11843 return 0;
11844}
11845_ACEOF
11846rm -f conftest.$ac_objext
11847if { (ac_try="$ac_compile"
11848case "(($ac_try" in
11849 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11850 *) ac_try_echo=$ac_try;;
11851esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011852eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011853 (eval "$ac_compile") 2>conftest.er1
11854 ac_status=$?
11855 grep -v '^ *+' conftest.er1 >conftest.err
11856 rm -f conftest.er1
11857 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011859 (exit $ac_status); } && {
11860 test -z "$ac_c_werror_flag" ||
11861 test ! -s conftest.err
11862 } && test -s conftest.$ac_objext; then
11863 ac_hi=-1 ac_mid=-1
11864 while :; do
11865 cat >conftest.$ac_ext <<_ACEOF
11866/* confdefs.h. */
11867_ACEOF
11868cat confdefs.h >>conftest.$ac_ext
11869cat >>conftest.$ac_ext <<_ACEOF
11870/* end confdefs.h. */
11871$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011872 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011873int
11874main ()
11875{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011876static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011877test_array [0] = 0
11878
11879 ;
11880 return 0;
11881}
11882_ACEOF
11883rm -f conftest.$ac_objext
11884if { (ac_try="$ac_compile"
11885case "(($ac_try" in
11886 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11887 *) ac_try_echo=$ac_try;;
11888esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011889eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011890 (eval "$ac_compile") 2>conftest.er1
11891 ac_status=$?
11892 grep -v '^ *+' conftest.er1 >conftest.err
11893 rm -f conftest.er1
11894 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011896 (exit $ac_status); } && {
11897 test -z "$ac_c_werror_flag" ||
11898 test ! -s conftest.err
11899 } && test -s conftest.$ac_objext; then
11900 ac_lo=$ac_mid; break
11901else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011902 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011903sed 's/^/| /' conftest.$ac_ext >&5
11904
11905 ac_hi=`expr '(' $ac_mid ')' - 1`
11906 if test $ac_mid -le $ac_hi; then
11907 ac_lo= ac_hi=
11908 break
11909 fi
11910 ac_mid=`expr 2 '*' $ac_mid`
11911fi
11912
11913rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11914 done
11915else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011916 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011917sed 's/^/| /' conftest.$ac_ext >&5
11918
11919 ac_lo= ac_hi=
11920fi
11921
11922rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11923fi
11924
11925rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11926# Binary search between lo and hi bounds.
11927while test "x$ac_lo" != "x$ac_hi"; do
11928 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11929 cat >conftest.$ac_ext <<_ACEOF
11930/* confdefs.h. */
11931_ACEOF
11932cat confdefs.h >>conftest.$ac_ext
11933cat >>conftest.$ac_ext <<_ACEOF
11934/* end confdefs.h. */
11935$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011936 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011937int
11938main ()
11939{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011940static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011941test_array [0] = 0
11942
11943 ;
11944 return 0;
11945}
11946_ACEOF
11947rm -f conftest.$ac_objext
11948if { (ac_try="$ac_compile"
11949case "(($ac_try" in
11950 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11951 *) ac_try_echo=$ac_try;;
11952esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011953eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011954 (eval "$ac_compile") 2>conftest.er1
11955 ac_status=$?
11956 grep -v '^ *+' conftest.er1 >conftest.err
11957 rm -f conftest.er1
11958 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011960 (exit $ac_status); } && {
11961 test -z "$ac_c_werror_flag" ||
11962 test ! -s conftest.err
11963 } && test -s conftest.$ac_objext; then
11964 ac_hi=$ac_mid
11965else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011966 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011967sed 's/^/| /' conftest.$ac_ext >&5
11968
11969 ac_lo=`expr '(' $ac_mid ')' + 1`
11970fi
11971
11972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11973done
11974case $ac_lo in
11975?*) ac_cv_sizeof_long_double=$ac_lo;;
11976'') if test "$ac_cv_type_long_double" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011977 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011978See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011979echo "$as_me: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011980See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011981 { (exit 77); exit 77; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011982 else
11983 ac_cv_sizeof_long_double=0
11984 fi ;;
11985esac
11986else
11987 cat >conftest.$ac_ext <<_ACEOF
11988/* confdefs.h. */
11989_ACEOF
11990cat confdefs.h >>conftest.$ac_ext
11991cat >>conftest.$ac_ext <<_ACEOF
11992/* end confdefs.h. */
11993$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000011994 typedef long double ac__type_sizeof_;
11995static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11996static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011997#include <stdio.h>
11998#include <stdlib.h>
11999int
12000main ()
12001{
12002
12003 FILE *f = fopen ("conftest.val", "w");
12004 if (! f)
12005 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012006 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012007 {
12008 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012009 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012010 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012011 fprintf (f, "%ld\n", i);
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012012 }
12013 else
12014 {
12015 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012016 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012017 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012018 fprintf (f, "%lu\n", i);
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012019 }
12020 return ferror (f) || fclose (f) != 0;
12021
12022 ;
12023 return 0;
12024}
12025_ACEOF
12026rm -f conftest$ac_exeext
12027if { (ac_try="$ac_link"
12028case "(($ac_try" in
12029 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12030 *) ac_try_echo=$ac_try;;
12031esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012032eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012033 (eval "$ac_link") 2>&5
12034 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012036 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12037 { (case "(($ac_try" in
12038 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12039 *) ac_try_echo=$ac_try;;
12040esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012041eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012042 (eval "$ac_try") 2>&5
12043 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012045 (exit $ac_status); }; }; then
12046 ac_cv_sizeof_long_double=`cat conftest.val`
12047else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012048 echo "$as_me: program exited with status $ac_status" >&5
12049echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012050sed 's/^/| /' conftest.$ac_ext >&5
12051
12052( exit $ac_status )
12053if test "$ac_cv_type_long_double" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012054 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012055See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012056echo "$as_me: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012057See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012058 { (exit 77); exit 77; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012059 else
12060 ac_cv_sizeof_long_double=0
12061 fi
12062fi
12063rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12064fi
12065rm -f conftest.val
12066fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012067{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5
12068echo "${ECHO_T}$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012069
12070
12071
12072cat >>confdefs.h <<_ACEOF
12073#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
12074_ACEOF
12075
12076
12077fi
12078
12079
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012080{ echo "$as_me:$LINENO: checking for _Bool support" >&5
12081echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012082have_c99_bool=no
12083cat >conftest.$ac_ext <<_ACEOF
12084/* confdefs.h. */
12085_ACEOF
12086cat confdefs.h >>conftest.$ac_ext
12087cat >>conftest.$ac_ext <<_ACEOF
12088/* end confdefs.h. */
12089
12090int
12091main ()
12092{
12093_Bool x; x = (_Bool)0;
12094 ;
12095 return 0;
12096}
12097_ACEOF
12098rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012099if { (ac_try="$ac_compile"
12100case "(($ac_try" in
12101 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12102 *) ac_try_echo=$ac_try;;
12103esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012104eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012105 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012106 ac_status=$?
12107 grep -v '^ *+' conftest.er1 >conftest.err
12108 rm -f conftest.er1
12109 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012110 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012111 (exit $ac_status); } && {
12112 test -z "$ac_c_werror_flag" ||
12113 test ! -s conftest.err
12114 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012115
12116
12117cat >>confdefs.h <<\_ACEOF
12118#define HAVE_C99_BOOL 1
12119_ACEOF
12120
12121 have_c99_bool=yes
12122
12123else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012124 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012125sed 's/^/| /' conftest.$ac_ext >&5
12126
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012127
Thomas Woutersb2137042007-02-01 18:02:27 +000012128fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012129
12130rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012131{ echo "$as_me:$LINENO: result: $have_c99_bool" >&5
12132echo "${ECHO_T}$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012133if test "$have_c99_bool" = yes ; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012134{ echo "$as_me:$LINENO: checking for _Bool" >&5
12135echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; }
12136if test "${ac_cv_type__Bool+set}" = set; then
12137 echo $ECHO_N "(cached) $ECHO_C" >&6
12138else
12139 cat >conftest.$ac_ext <<_ACEOF
12140/* confdefs.h. */
12141_ACEOF
12142cat confdefs.h >>conftest.$ac_ext
12143cat >>conftest.$ac_ext <<_ACEOF
12144/* end confdefs.h. */
12145$ac_includes_default
12146typedef _Bool ac__type_new_;
12147int
12148main ()
12149{
12150if ((ac__type_new_ *) 0)
12151 return 0;
12152if (sizeof (ac__type_new_))
12153 return 0;
12154 ;
12155 return 0;
12156}
12157_ACEOF
12158rm -f conftest.$ac_objext
12159if { (ac_try="$ac_compile"
12160case "(($ac_try" in
12161 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12162 *) ac_try_echo=$ac_try;;
12163esac
12164eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12165 (eval "$ac_compile") 2>conftest.er1
12166 ac_status=$?
12167 grep -v '^ *+' conftest.er1 >conftest.err
12168 rm -f conftest.er1
12169 cat conftest.err >&5
12170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12171 (exit $ac_status); } && {
12172 test -z "$ac_c_werror_flag" ||
12173 test ! -s conftest.err
12174 } && test -s conftest.$ac_objext; then
12175 ac_cv_type__Bool=yes
12176else
12177 echo "$as_me: failed program was:" >&5
12178sed 's/^/| /' conftest.$ac_ext >&5
12179
12180 ac_cv_type__Bool=no
12181fi
12182
12183rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12184fi
12185{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
12186echo "${ECHO_T}$ac_cv_type__Bool" >&6; }
12187
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012188# The cast to long int works around a bug in the HP C Compiler
12189# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12190# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12191# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012192{ echo "$as_me:$LINENO: checking size of _Bool" >&5
12193echo $ECHO_N "checking size of _Bool... $ECHO_C" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012194if test "${ac_cv_sizeof__Bool+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012195 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Woutersb2137042007-02-01 18:02:27 +000012196else
12197 if test "$cross_compiling" = yes; then
12198 # Depending upon the size, compute the lo and hi bounds.
12199cat >conftest.$ac_ext <<_ACEOF
12200/* confdefs.h. */
12201_ACEOF
12202cat confdefs.h >>conftest.$ac_ext
12203cat >>conftest.$ac_ext <<_ACEOF
12204/* end confdefs.h. */
12205$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012206 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012207int
12208main ()
12209{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012210static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012211test_array [0] = 0
12212
12213 ;
12214 return 0;
12215}
12216_ACEOF
12217rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012218if { (ac_try="$ac_compile"
12219case "(($ac_try" in
12220 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12221 *) ac_try_echo=$ac_try;;
12222esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012223eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012224 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012225 ac_status=$?
12226 grep -v '^ *+' conftest.er1 >conftest.err
12227 rm -f conftest.er1
12228 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012230 (exit $ac_status); } && {
12231 test -z "$ac_c_werror_flag" ||
12232 test ! -s conftest.err
12233 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012234 ac_lo=0 ac_mid=0
12235 while :; do
12236 cat >conftest.$ac_ext <<_ACEOF
12237/* confdefs.h. */
12238_ACEOF
12239cat confdefs.h >>conftest.$ac_ext
12240cat >>conftest.$ac_ext <<_ACEOF
12241/* end confdefs.h. */
12242$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012243 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012244int
12245main ()
12246{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012247static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012248test_array [0] = 0
12249
12250 ;
12251 return 0;
12252}
12253_ACEOF
12254rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012255if { (ac_try="$ac_compile"
12256case "(($ac_try" in
12257 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12258 *) ac_try_echo=$ac_try;;
12259esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012260eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012261 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012262 ac_status=$?
12263 grep -v '^ *+' conftest.er1 >conftest.err
12264 rm -f conftest.er1
12265 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012267 (exit $ac_status); } && {
12268 test -z "$ac_c_werror_flag" ||
12269 test ! -s conftest.err
12270 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012271 ac_hi=$ac_mid; break
12272else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012273 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012274sed 's/^/| /' conftest.$ac_ext >&5
12275
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012276 ac_lo=`expr $ac_mid + 1`
12277 if test $ac_lo -le $ac_mid; then
12278 ac_lo= ac_hi=
12279 break
12280 fi
12281 ac_mid=`expr 2 '*' $ac_mid + 1`
Thomas Woutersb2137042007-02-01 18:02:27 +000012282fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012283
12284rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012285 done
12286else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012287 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012288sed 's/^/| /' conftest.$ac_ext >&5
12289
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012290 cat >conftest.$ac_ext <<_ACEOF
Thomas Woutersb2137042007-02-01 18:02:27 +000012291/* confdefs.h. */
12292_ACEOF
12293cat confdefs.h >>conftest.$ac_ext
12294cat >>conftest.$ac_ext <<_ACEOF
12295/* end confdefs.h. */
12296$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012297 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012298int
12299main ()
12300{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012301static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012302test_array [0] = 0
12303
12304 ;
12305 return 0;
12306}
12307_ACEOF
12308rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012309if { (ac_try="$ac_compile"
12310case "(($ac_try" in
12311 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12312 *) ac_try_echo=$ac_try;;
12313esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012314eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012315 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012316 ac_status=$?
12317 grep -v '^ *+' conftest.er1 >conftest.err
12318 rm -f conftest.er1
12319 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012321 (exit $ac_status); } && {
12322 test -z "$ac_c_werror_flag" ||
12323 test ! -s conftest.err
12324 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012325 ac_hi=-1 ac_mid=-1
12326 while :; do
12327 cat >conftest.$ac_ext <<_ACEOF
12328/* confdefs.h. */
12329_ACEOF
12330cat confdefs.h >>conftest.$ac_ext
12331cat >>conftest.$ac_ext <<_ACEOF
12332/* end confdefs.h. */
12333$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012334 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012335int
12336main ()
12337{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012338static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012339test_array [0] = 0
12340
12341 ;
12342 return 0;
12343}
12344_ACEOF
12345rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012346if { (ac_try="$ac_compile"
12347case "(($ac_try" in
12348 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12349 *) ac_try_echo=$ac_try;;
12350esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012351eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012352 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012353 ac_status=$?
12354 grep -v '^ *+' conftest.er1 >conftest.err
12355 rm -f conftest.er1
12356 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012358 (exit $ac_status); } && {
12359 test -z "$ac_c_werror_flag" ||
12360 test ! -s conftest.err
12361 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012362 ac_lo=$ac_mid; break
12363else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012364 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012365sed 's/^/| /' conftest.$ac_ext >&5
12366
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012367 ac_hi=`expr '(' $ac_mid ')' - 1`
12368 if test $ac_mid -le $ac_hi; then
12369 ac_lo= ac_hi=
12370 break
12371 fi
12372 ac_mid=`expr 2 '*' $ac_mid`
Thomas Woutersb2137042007-02-01 18:02:27 +000012373fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012374
12375rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012376 done
12377else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012378 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012379sed 's/^/| /' conftest.$ac_ext >&5
12380
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012381 ac_lo= ac_hi=
Thomas Woutersb2137042007-02-01 18:02:27 +000012382fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012383
12384rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012385fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012386
12387rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012388# Binary search between lo and hi bounds.
12389while test "x$ac_lo" != "x$ac_hi"; do
12390 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12391 cat >conftest.$ac_ext <<_ACEOF
12392/* confdefs.h. */
12393_ACEOF
12394cat confdefs.h >>conftest.$ac_ext
12395cat >>conftest.$ac_ext <<_ACEOF
12396/* end confdefs.h. */
12397$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012398 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012399int
12400main ()
12401{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012402static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012403test_array [0] = 0
12404
12405 ;
12406 return 0;
12407}
12408_ACEOF
12409rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012410if { (ac_try="$ac_compile"
12411case "(($ac_try" in
12412 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12413 *) ac_try_echo=$ac_try;;
12414esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012415eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012416 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012417 ac_status=$?
12418 grep -v '^ *+' conftest.er1 >conftest.err
12419 rm -f conftest.er1
12420 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012422 (exit $ac_status); } && {
12423 test -z "$ac_c_werror_flag" ||
12424 test ! -s conftest.err
12425 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012426 ac_hi=$ac_mid
12427else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012428 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012429sed 's/^/| /' conftest.$ac_ext >&5
12430
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012431 ac_lo=`expr '(' $ac_mid ')' + 1`
Thomas Woutersb2137042007-02-01 18:02:27 +000012432fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012433
12434rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012435done
12436case $ac_lo in
12437?*) ac_cv_sizeof__Bool=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012438'') if test "$ac_cv_type__Bool" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012439 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012440See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012441echo "$as_me: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012442See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012443 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012444 else
12445 ac_cv_sizeof__Bool=0
12446 fi ;;
Thomas Woutersb2137042007-02-01 18:02:27 +000012447esac
12448else
12449 cat >conftest.$ac_ext <<_ACEOF
12450/* confdefs.h. */
12451_ACEOF
12452cat confdefs.h >>conftest.$ac_ext
12453cat >>conftest.$ac_ext <<_ACEOF
12454/* end confdefs.h. */
12455$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012456 typedef _Bool ac__type_sizeof_;
12457static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12458static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Thomas Woutersb2137042007-02-01 18:02:27 +000012459#include <stdio.h>
12460#include <stdlib.h>
12461int
12462main ()
12463{
12464
12465 FILE *f = fopen ("conftest.val", "w");
12466 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012467 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012468 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Thomas Woutersb2137042007-02-01 18:02:27 +000012469 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012470 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012471 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012472 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012473 fprintf (f, "%ld\n", i);
Thomas Woutersb2137042007-02-01 18:02:27 +000012474 }
12475 else
12476 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012477 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012478 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012479 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012480 fprintf (f, "%lu\n", i);
Thomas Woutersb2137042007-02-01 18:02:27 +000012481 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012482 return ferror (f) || fclose (f) != 0;
Thomas Woutersb2137042007-02-01 18:02:27 +000012483
12484 ;
12485 return 0;
12486}
12487_ACEOF
12488rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012489if { (ac_try="$ac_link"
12490case "(($ac_try" in
12491 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12492 *) ac_try_echo=$ac_try;;
12493esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012494eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012495 (eval "$ac_link") 2>&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012496 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012498 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012499 { (case "(($ac_try" in
12500 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12501 *) ac_try_echo=$ac_try;;
12502esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012503eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012504 (eval "$ac_try") 2>&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012505 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012507 (exit $ac_status); }; }; then
12508 ac_cv_sizeof__Bool=`cat conftest.val`
12509else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012510 echo "$as_me: program exited with status $ac_status" >&5
12511echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012512sed 's/^/| /' conftest.$ac_ext >&5
12513
12514( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012515if test "$ac_cv_type__Bool" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012516 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012517See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012518echo "$as_me: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012519See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012520 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012521 else
12522 ac_cv_sizeof__Bool=0
12523 fi
Thomas Woutersb2137042007-02-01 18:02:27 +000012524fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012525rm -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 +000012526fi
12527rm -f conftest.val
12528fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012529{ echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
12530echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012531
12532
12533
Thomas Woutersb2137042007-02-01 18:02:27 +000012534cat >>confdefs.h <<_ACEOF
12535#define SIZEOF__BOOL $ac_cv_sizeof__Bool
12536_ACEOF
12537
12538
12539fi
12540
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012541{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12542echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000012543if test "${ac_cv_type_uintptr_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012544 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters89f507f2006-12-13 04:49:30 +000012545else
12546 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012547/* confdefs.h. */
12548_ACEOF
12549cat confdefs.h >>conftest.$ac_ext
12550cat >>conftest.$ac_ext <<_ACEOF
12551/* end confdefs.h. */
Thomas Wouters89f507f2006-12-13 04:49:30 +000012552#ifdef HAVE_STDINT_H
12553 #include <stdint.h>
12554 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012555
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012556typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012557int
12558main ()
12559{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012560if ((ac__type_new_ *) 0)
12561 return 0;
12562if (sizeof (ac__type_new_))
12563 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012564 ;
12565 return 0;
12566}
12567_ACEOF
12568rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012569if { (ac_try="$ac_compile"
12570case "(($ac_try" in
12571 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12572 *) ac_try_echo=$ac_try;;
12573esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012574eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012575 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012576 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012577 grep -v '^ *+' conftest.er1 >conftest.err
12578 rm -f conftest.er1
12579 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012581 (exit $ac_status); } && {
12582 test -z "$ac_c_werror_flag" ||
12583 test ! -s conftest.err
12584 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012585 ac_cv_type_uintptr_t=yes
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012586else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012587 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012588sed 's/^/| /' conftest.$ac_ext >&5
12589
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012590 ac_cv_type_uintptr_t=no
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012591fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012592
12593rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters89f507f2006-12-13 04:49:30 +000012594fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012595{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12596echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12597if test $ac_cv_type_uintptr_t = yes; then
Thomas Wouters89f507f2006-12-13 04:49:30 +000012598
12599cat >>confdefs.h <<_ACEOF
12600#define HAVE_UINTPTR_T 1
12601_ACEOF
12602
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012603{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12604echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
12605if test "${ac_cv_type_uintptr_t+set}" = set; then
12606 echo $ECHO_N "(cached) $ECHO_C" >&6
12607else
12608 cat >conftest.$ac_ext <<_ACEOF
12609/* confdefs.h. */
12610_ACEOF
12611cat confdefs.h >>conftest.$ac_ext
12612cat >>conftest.$ac_ext <<_ACEOF
12613/* end confdefs.h. */
12614$ac_includes_default
12615typedef uintptr_t ac__type_new_;
12616int
12617main ()
12618{
12619if ((ac__type_new_ *) 0)
12620 return 0;
12621if (sizeof (ac__type_new_))
12622 return 0;
12623 ;
12624 return 0;
12625}
12626_ACEOF
12627rm -f conftest.$ac_objext
12628if { (ac_try="$ac_compile"
12629case "(($ac_try" in
12630 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12631 *) ac_try_echo=$ac_try;;
12632esac
12633eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12634 (eval "$ac_compile") 2>conftest.er1
12635 ac_status=$?
12636 grep -v '^ *+' conftest.er1 >conftest.err
12637 rm -f conftest.er1
12638 cat conftest.err >&5
12639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12640 (exit $ac_status); } && {
12641 test -z "$ac_c_werror_flag" ||
12642 test ! -s conftest.err
12643 } && test -s conftest.$ac_objext; then
12644 ac_cv_type_uintptr_t=yes
12645else
12646 echo "$as_me: failed program was:" >&5
12647sed 's/^/| /' conftest.$ac_ext >&5
12648
12649 ac_cv_type_uintptr_t=no
12650fi
12651
12652rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12653fi
12654{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12655echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12656
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012657# The cast to long int works around a bug in the HP C Compiler
12658# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12659# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12660# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012661{ echo "$as_me:$LINENO: checking size of uintptr_t" >&5
12662echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012663if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012664 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012665else
Martin v. Löwis11437992002-04-12 09:54:03 +000012666 if test "$cross_compiling" = yes; then
12667 # Depending upon the size, compute the lo and hi bounds.
12668cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012669/* confdefs.h. */
12670_ACEOF
12671cat confdefs.h >>conftest.$ac_ext
12672cat >>conftest.$ac_ext <<_ACEOF
12673/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012674$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012675 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012676int
12677main ()
12678{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012679static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012680test_array [0] = 0
12681
12682 ;
12683 return 0;
12684}
12685_ACEOF
12686rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012687if { (ac_try="$ac_compile"
12688case "(($ac_try" in
12689 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12690 *) ac_try_echo=$ac_try;;
12691esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012692eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012693 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012694 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012695 grep -v '^ *+' conftest.er1 >conftest.err
12696 rm -f conftest.er1
12697 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012698 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012699 (exit $ac_status); } && {
12700 test -z "$ac_c_werror_flag" ||
12701 test ! -s conftest.err
12702 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012703 ac_lo=0 ac_mid=0
12704 while :; do
12705 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012706/* confdefs.h. */
12707_ACEOF
12708cat confdefs.h >>conftest.$ac_ext
12709cat >>conftest.$ac_ext <<_ACEOF
12710/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012711$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012712 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012713int
12714main ()
12715{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012716static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012717test_array [0] = 0
12718
12719 ;
12720 return 0;
12721}
12722_ACEOF
12723rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012724if { (ac_try="$ac_compile"
12725case "(($ac_try" in
12726 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12727 *) ac_try_echo=$ac_try;;
12728esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012729eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012730 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012731 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012732 grep -v '^ *+' conftest.er1 >conftest.err
12733 rm -f conftest.er1
12734 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012736 (exit $ac_status); } && {
12737 test -z "$ac_c_werror_flag" ||
12738 test ! -s conftest.err
12739 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012740 ac_hi=$ac_mid; break
12741else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012742 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012743sed 's/^/| /' conftest.$ac_ext >&5
12744
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012745 ac_lo=`expr $ac_mid + 1`
12746 if test $ac_lo -le $ac_mid; then
12747 ac_lo= ac_hi=
12748 break
12749 fi
12750 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012751fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012752
12753rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012754 done
12755else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012756 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012757sed 's/^/| /' conftest.$ac_ext >&5
12758
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012759 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012760/* confdefs.h. */
12761_ACEOF
12762cat confdefs.h >>conftest.$ac_ext
12763cat >>conftest.$ac_ext <<_ACEOF
12764/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012765$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012766 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012767int
12768main ()
12769{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012770static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012771test_array [0] = 0
12772
12773 ;
12774 return 0;
12775}
12776_ACEOF
12777rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012778if { (ac_try="$ac_compile"
12779case "(($ac_try" in
12780 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12781 *) ac_try_echo=$ac_try;;
12782esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012783eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012784 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012785 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012786 grep -v '^ *+' conftest.er1 >conftest.err
12787 rm -f conftest.er1
12788 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012790 (exit $ac_status); } && {
12791 test -z "$ac_c_werror_flag" ||
12792 test ! -s conftest.err
12793 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012794 ac_hi=-1 ac_mid=-1
12795 while :; do
12796 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012797/* confdefs.h. */
12798_ACEOF
12799cat confdefs.h >>conftest.$ac_ext
12800cat >>conftest.$ac_ext <<_ACEOF
12801/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012802$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012803 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012804int
12805main ()
12806{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012807static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012808test_array [0] = 0
12809
12810 ;
12811 return 0;
12812}
12813_ACEOF
12814rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012815if { (ac_try="$ac_compile"
12816case "(($ac_try" in
12817 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12818 *) ac_try_echo=$ac_try;;
12819esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012820eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012821 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012822 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012823 grep -v '^ *+' conftest.er1 >conftest.err
12824 rm -f conftest.er1
12825 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012827 (exit $ac_status); } && {
12828 test -z "$ac_c_werror_flag" ||
12829 test ! -s conftest.err
12830 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012831 ac_lo=$ac_mid; break
12832else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012833 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012834sed 's/^/| /' conftest.$ac_ext >&5
12835
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012836 ac_hi=`expr '(' $ac_mid ')' - 1`
12837 if test $ac_mid -le $ac_hi; then
12838 ac_lo= ac_hi=
12839 break
12840 fi
12841 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000012842fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012843
12844rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012845 done
12846else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012847 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012848sed 's/^/| /' conftest.$ac_ext >&5
12849
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012850 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000012851fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012852
12853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012854fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012855
12856rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012857# Binary search between lo and hi bounds.
12858while test "x$ac_lo" != "x$ac_hi"; do
12859 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12860 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012861/* confdefs.h. */
12862_ACEOF
12863cat confdefs.h >>conftest.$ac_ext
12864cat >>conftest.$ac_ext <<_ACEOF
12865/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012866$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012867 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012868int
12869main ()
12870{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012871static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012872test_array [0] = 0
12873
12874 ;
12875 return 0;
12876}
12877_ACEOF
12878rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012879if { (ac_try="$ac_compile"
12880case "(($ac_try" in
12881 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12882 *) ac_try_echo=$ac_try;;
12883esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012884eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012885 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012886 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012887 grep -v '^ *+' conftest.er1 >conftest.err
12888 rm -f conftest.er1
12889 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012891 (exit $ac_status); } && {
12892 test -z "$ac_c_werror_flag" ||
12893 test ! -s conftest.err
12894 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012895 ac_hi=$ac_mid
12896else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012897 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012898sed 's/^/| /' conftest.$ac_ext >&5
12899
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012900 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012901fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012902
12903rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012904done
12905case $ac_lo in
12906?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012907'') if test "$ac_cv_type_uintptr_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012908 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012909See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012910echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012911See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012912 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012913 else
12914 ac_cv_sizeof_uintptr_t=0
12915 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012916esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012917else
Martin v. Löwis11437992002-04-12 09:54:03 +000012918 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012919/* confdefs.h. */
12920_ACEOF
12921cat confdefs.h >>conftest.$ac_ext
12922cat >>conftest.$ac_ext <<_ACEOF
12923/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012924$ac_includes_default
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012925 typedef uintptr_t ac__type_sizeof_;
12926static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12927static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000012928#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012929#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012930int
12931main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012932{
Martin v. Löwis11437992002-04-12 09:54:03 +000012933
12934 FILE *f = fopen ("conftest.val", "w");
12935 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012936 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012937 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000012938 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012939 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012940 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012941 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012942 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012943 }
12944 else
12945 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012946 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012947 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012948 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012949 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012950 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012951 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012952
12953 ;
12954 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012955}
Martin v. Löwis11437992002-04-12 09:54:03 +000012956_ACEOF
12957rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012958if { (ac_try="$ac_link"
12959case "(($ac_try" in
12960 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12961 *) ac_try_echo=$ac_try;;
12962esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012963eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012964 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012965 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012966 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012967 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012968 { (case "(($ac_try" in
12969 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12970 *) ac_try_echo=$ac_try;;
12971esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012972eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012973 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012974 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012975 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012976 (exit $ac_status); }; }; then
12977 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012978else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012979 echo "$as_me: program exited with status $ac_status" >&5
12980echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012981sed 's/^/| /' conftest.$ac_ext >&5
12982
Martin v. Löwis11437992002-04-12 09:54:03 +000012983( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012984if test "$ac_cv_type_uintptr_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012985 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012986See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012987echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012988See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012989 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012990 else
12991 ac_cv_sizeof_uintptr_t=0
12992 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012993fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012994rm -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 +000012995fi
12996rm -f conftest.val
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012997fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000012998{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
12999echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013000
13001
13002
Martin v. Löwis11437992002-04-12 09:54:03 +000013003cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013004#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013005_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013006
Michael W. Hudson54241132001-12-07 15:38:26 +000013007
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013008fi
13009
Thomas Wouters89f507f2006-12-13 04:49:30 +000013010
13011
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013012# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013013{ echo "$as_me:$LINENO: checking size of off_t" >&5
13014echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013015if test "${ac_cv_sizeof_off_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013016 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013017else
13018 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000013019 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013020else
Martin v. Löwis11437992002-04-12 09:54:03 +000013021 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013022/* confdefs.h. */
13023_ACEOF
13024cat confdefs.h >>conftest.$ac_ext
13025cat >>conftest.$ac_ext <<_ACEOF
13026/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013027#include <stdio.h>
13028#include <sys/types.h>
13029main()
13030{
13031 FILE *f=fopen("conftestval", "w");
13032 if (!f) exit(1);
13033 fprintf(f, "%d\n", sizeof(off_t));
13034 exit(0);
13035}
Martin v. Löwis11437992002-04-12 09:54:03 +000013036_ACEOF
13037rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013038if { (ac_try="$ac_link"
13039case "(($ac_try" in
13040 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13041 *) ac_try_echo=$ac_try;;
13042esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013043eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013044 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013045 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013047 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013048 { (case "(($ac_try" in
13049 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13050 *) ac_try_echo=$ac_try;;
13051esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013052eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013053 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013054 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013056 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013057 ac_cv_sizeof_off_t=`cat conftestval`
13058else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013059 echo "$as_me: program exited with status $ac_status" >&5
13060echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013061sed 's/^/| /' conftest.$ac_ext >&5
13062
Martin v. Löwis11437992002-04-12 09:54:03 +000013063( exit $ac_status )
13064ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013065fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013066rm -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 +000013067fi
13068
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013069
13070
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013071fi
13072
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013073{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
13074echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013075
13076cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013077#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013078_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013079
Michael W. Hudson54241132001-12-07 15:38:26 +000013080
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013081{ echo "$as_me:$LINENO: checking whether to enable large file support" >&5
13082echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6; }
Mark Dickinsonb87f0d02009-12-31 21:25:02 +000013083if test "$have_long_long" = yes
13084then
13085if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +000013086 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013087
Martin v. Löwis11437992002-04-12 09:54:03 +000013088cat >>confdefs.h <<\_ACEOF
13089#define HAVE_LARGEFILE_SUPPORT 1
13090_ACEOF
13091
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013092 { echo "$as_me:$LINENO: result: yes" >&5
13093echo "${ECHO_T}yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013094else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013095 { echo "$as_me:$LINENO: result: no" >&5
13096echo "${ECHO_T}no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013097fi
Mark Dickinsonb87f0d02009-12-31 21:25:02 +000013098else
13099 { echo "$as_me:$LINENO: result: no" >&5
13100echo "${ECHO_T}no" >&6; }
13101fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013102
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013103# AC_CHECK_SIZEOF() doesn't include <time.h>.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013104{ echo "$as_me:$LINENO: checking size of time_t" >&5
13105echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013106if test "${ac_cv_sizeof_time_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013107 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013108else
13109 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000013110 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013111else
Martin v. Löwis11437992002-04-12 09:54:03 +000013112 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013113/* confdefs.h. */
13114_ACEOF
13115cat confdefs.h >>conftest.$ac_ext
13116cat >>conftest.$ac_ext <<_ACEOF
13117/* end confdefs.h. */
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013118#include <stdio.h>
13119#include <time.h>
13120main()
13121{
13122 FILE *f=fopen("conftestval", "w");
13123 if (!f) exit(1);
13124 fprintf(f, "%d\n", sizeof(time_t));
13125 exit(0);
13126}
Martin v. Löwis11437992002-04-12 09:54:03 +000013127_ACEOF
13128rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013129if { (ac_try="$ac_link"
13130case "(($ac_try" in
13131 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13132 *) ac_try_echo=$ac_try;;
13133esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013134eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013135 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013136 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013138 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013139 { (case "(($ac_try" in
13140 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13141 *) ac_try_echo=$ac_try;;
13142esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013143eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013144 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013145 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013147 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013148 ac_cv_sizeof_time_t=`cat conftestval`
13149else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013150 echo "$as_me: program exited with status $ac_status" >&5
13151echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013152sed 's/^/| /' conftest.$ac_ext >&5
13153
Martin v. Löwis11437992002-04-12 09:54:03 +000013154( exit $ac_status )
13155ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013156fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013157rm -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 +000013158fi
13159
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013160
13161
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013162fi
13163
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013164{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
13165echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013166
13167cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013168#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013169_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013170
Michael W. Hudson54241132001-12-07 15:38:26 +000013171
13172
Trent Mick635f6fb2000-08-23 21:33:05 +000013173# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013174ac_save_cc="$CC"
13175if test "$ac_cv_kpthread" = "yes"
13176then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013177elif test "$ac_cv_kthread" = "yes"
13178then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013179elif test "$ac_cv_pthread" = "yes"
13180then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013181fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013182{ echo "$as_me:$LINENO: checking for pthread_t" >&5
13183echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013184have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013185cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013186/* confdefs.h. */
13187_ACEOF
13188cat confdefs.h >>conftest.$ac_ext
13189cat >>conftest.$ac_ext <<_ACEOF
13190/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000013191#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013192int
13193main ()
13194{
Guido van Rossum12580492000-09-24 16:47:19 +000013195pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013196 ;
13197 return 0;
13198}
13199_ACEOF
13200rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013201if { (ac_try="$ac_compile"
13202case "(($ac_try" in
13203 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13204 *) ac_try_echo=$ac_try;;
13205esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013206eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013207 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013208 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013209 grep -v '^ *+' conftest.er1 >conftest.err
13210 rm -f conftest.er1
13211 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013213 (exit $ac_status); } && {
13214 test -z "$ac_c_werror_flag" ||
13215 test ! -s conftest.err
13216 } && test -s conftest.$ac_objext; then
Trent Mick635f6fb2000-08-23 21:33:05 +000013217 have_pthread_t=yes
13218else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013219 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013220sed 's/^/| /' conftest.$ac_ext >&5
13221
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013222
Trent Mick635f6fb2000-08-23 21:33:05 +000013223fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013224
13225rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013226{ echo "$as_me:$LINENO: result: $have_pthread_t" >&5
13227echo "${ECHO_T}$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013228if test "$have_pthread_t" = yes ; then
13229 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013230 { echo "$as_me:$LINENO: checking size of pthread_t" >&5
13231echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013232 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013233 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000013234else
13235 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000013236 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +000013237else
Martin v. Löwis11437992002-04-12 09:54:03 +000013238 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013239/* confdefs.h. */
13240_ACEOF
13241cat confdefs.h >>conftest.$ac_ext
13242cat >>conftest.$ac_ext <<_ACEOF
13243/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000013244#include <stdio.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013245#include <pthread.h>
Trent Mick635f6fb2000-08-23 21:33:05 +000013246 main()
13247 {
13248 FILE *f=fopen("conftestval", "w");
13249 if (!f) exit(1);
13250 fprintf(f, "%d\n", sizeof(pthread_t));
13251 exit(0);
13252 }
Martin v. Löwis11437992002-04-12 09:54:03 +000013253_ACEOF
13254rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013255if { (ac_try="$ac_link"
13256case "(($ac_try" in
13257 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13258 *) ac_try_echo=$ac_try;;
13259esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013260eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013261 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013262 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013264 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013265 { (case "(($ac_try" in
13266 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13267 *) ac_try_echo=$ac_try;;
13268esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013269eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013270 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013271 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013273 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +000013274 ac_cv_sizeof_pthread_t=`cat conftestval`
13275else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013276 echo "$as_me: program exited with status $ac_status" >&5
13277echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013278sed 's/^/| /' conftest.$ac_ext >&5
13279
Martin v. Löwis11437992002-04-12 09:54:03 +000013280( exit $ac_status )
13281ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +000013282fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013283rm -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 +000013284fi
13285
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013286
13287
Trent Mick635f6fb2000-08-23 21:33:05 +000013288fi
13289
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013290 { echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
13291echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013292
13293cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000013294#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013295_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000013296
13297fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013298CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000013299
Michael W. Hudson54241132001-12-07 15:38:26 +000013300
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013301
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000013302
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013303case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013304 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000013305 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
13306 ;;
13307 Darwin/*)
13308 OTHER_LIBTOOL_OPT=""
13309 ;;
13310esac
13311
13312
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013313ARCH_RUN_32BIT=""
13314
Bob Ippolito7026a0a2005-03-28 23:23:47 +000013315case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013316 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +000013317 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
13318 if test "${enable_universalsdk}"; then
13319 :
13320 else
Ronald Oussoren175a8842010-02-11 13:40:06 +000013321 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +000013322 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000013323 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000013324 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000013325 Darwin/*)
Ronald Oussoren652f4de2010-02-07 11:54:03 +000013326 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +000013327 if test ${gcc_version} '<' 4.0
13328 then
13329 LIBTOOL_CRUFT="-lcc_dynamic"
13330 else
13331 LIBTOOL_CRUFT=""
13332 fi
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013333 if test "$cross_compiling" = yes; then
Ronald Oussoren856624d2009-09-08 07:13:53 +000013334 ac_osx_32bit=yes
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013335else
13336 cat >conftest.$ac_ext <<_ACEOF
13337/* confdefs.h. */
13338_ACEOF
13339cat confdefs.h >>conftest.$ac_ext
13340cat >>conftest.$ac_ext <<_ACEOF
13341/* end confdefs.h. */
Ronald Oussoren856624d2009-09-08 07:13:53 +000013342
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013343 #include <unistd.h>
13344 int main(int argc, char*argv[])
13345 {
13346 if (sizeof(long) == 4) {
13347 return 0;
13348 } else {
13349 return 1;
13350 }
Ronald Oussoren856624d2009-09-08 07:13:53 +000013351 }
13352
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013353_ACEOF
13354rm -f conftest$ac_exeext
13355if { (ac_try="$ac_link"
13356case "(($ac_try" in
13357 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13358 *) ac_try_echo=$ac_try;;
13359esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013360eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013361 (eval "$ac_link") 2>&5
13362 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013363 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013364 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13365 { (case "(($ac_try" in
13366 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13367 *) ac_try_echo=$ac_try;;
13368esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013369eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013370 (eval "$ac_try") 2>&5
13371 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013372 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013373 (exit $ac_status); }; }; then
13374 ac_osx_32bit=yes
13375else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013376 echo "$as_me: program exited with status $ac_status" >&5
13377echo "$as_me: failed program was:" >&5
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013378sed 's/^/| /' conftest.$ac_ext >&5
13379
13380( exit $ac_status )
13381ac_osx_32bit=no
13382fi
13383rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13384fi
13385
13386
13387
13388 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussoren175a8842010-02-11 13:40:06 +000013389 case `/usr/bin/arch` in
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013390 i386)
13391 MACOSX_DEFAULT_ARCH="i386"
13392 ;;
13393 ppc)
13394 MACOSX_DEFAULT_ARCH="ppc"
13395 ;;
13396 *)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013397 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
13398echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013399 { (exit 1); exit 1; }; }
13400 ;;
13401 esac
13402 else
Ronald Oussoren175a8842010-02-11 13:40:06 +000013403 case `/usr/bin/arch` in
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013404 i386)
13405 MACOSX_DEFAULT_ARCH="x86_64"
13406 ;;
13407 ppc)
13408 MACOSX_DEFAULT_ARCH="ppc64"
13409 ;;
13410 *)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013411 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
13412echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013413 { (exit 1); exit 1; }; }
13414 ;;
13415 esac
13416
13417 #ARCH_RUN_32BIT="true"
13418 fi
13419
13420 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +000013421 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000013422 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013423esac
13424
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013425{ echo "$as_me:$LINENO: checking for --enable-framework" >&5
13426echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000013427if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013428then
Skip Montanarodecc6a42003-01-01 20:07:49 +000013429 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000013430 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000013431 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013432
Martin v. Löwis11437992002-04-12 09:54:03 +000013433cat >>confdefs.h <<\_ACEOF
13434#define WITH_NEXT_FRAMEWORK 1
13435_ACEOF
13436
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013437 { echo "$as_me:$LINENO: result: yes" >&5
13438echo "${ECHO_T}yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +000013439 if test $enable_shared = "yes"
13440 then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013441 { { echo "$as_me:$LINENO: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" >&5
13442echo "$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 +000013443 { (exit 1); exit 1; }; }
13444 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013445else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013446 { echo "$as_me:$LINENO: result: no" >&5
13447echo "${ECHO_T}no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013448fi
13449
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013450{ echo "$as_me:$LINENO: checking for dyld" >&5
13451echo $ECHO_N "checking for dyld... $ECHO_C" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013452case $ac_sys_system/$ac_sys_release in
13453 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013454
Martin v. Löwis11437992002-04-12 09:54:03 +000013455cat >>confdefs.h <<\_ACEOF
13456#define WITH_DYLD 1
13457_ACEOF
13458
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013459 { echo "$as_me:$LINENO: result: always on for Darwin" >&5
13460echo "${ECHO_T}always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013461 ;;
13462 *)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013463 { echo "$as_me:$LINENO: result: no" >&5
13464echo "${ECHO_T}no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000013465 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013466esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013467
Guido van Rossum0a516c91994-09-12 10:58:40 +000013468# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000013469
Michael W. Hudson54241132001-12-07 15:38:26 +000013470
13471
13472
13473
Guido van Rossum0a516c91994-09-12 10:58:40 +000013474# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000013475# -- usually .so, .sl on HP-UX, .dll on Cygwin
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013476{ echo "$as_me:$LINENO: checking SO" >&5
13477echo $ECHO_N "checking SO... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013478if test -z "$SO"
13479then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013480 case $ac_sys_system in
Thomas Wouters477c8d52006-05-27 19:21:47 +000013481 hp*|HP*)
13482 case `uname -m` in
13483 ia64) SO=.so;;
13484 *) SO=.sl;;
13485 esac
13486 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000013487 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013488 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013489 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000013490else
13491 # this might also be a termcap variable, see #610332
13492 echo
13493 echo '====================================================================='
13494 echo '+ +'
13495 echo '+ WARNING: You have set SO in your environment. +'
13496 echo '+ Do you really mean to change the extension for shared libraries? +'
13497 echo '+ Continuing in 10 seconds to let you to ponder. +'
13498 echo '+ +'
13499 echo '====================================================================='
13500 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000013501fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013502{ echo "$as_me:$LINENO: result: $SO" >&5
13503echo "${ECHO_T}$SO" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000013504
Georg Brandlb1441c72009-01-03 22:33:39 +000013505
Thomas Wouters477c8d52006-05-27 19:21:47 +000013506cat >>confdefs.h <<_ACEOF
13507#define SHLIB_EXT "$SO"
13508_ACEOF
13509
Guido van Rossum0a516c91994-09-12 10:58:40 +000013510# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000013511# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013512# (Shared libraries in this instance are shared modules to be loaded into
13513# Python, as opposed to building Python itself as a shared library.)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013514{ echo "$as_me:$LINENO: checking LDSHARED" >&5
13515echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013516if test -z "$LDSHARED"
13517then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013518 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013519 AIX*)
13520 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000013521 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013522 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000013523 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000013524 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000013525 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +000013526 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000013527 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000013528 else LDSHARED='$(CC) -G';
Greg Ward57c9a6632000-05-26 12:22:54 +000013529 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +000013530 hp*|HP*)
13531 if test "$GCC" = "yes"
13532 then LDSHARED='$(CC) -shared'
13533 else LDSHARED='ld -b';
13534 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +000013535 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000013536 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000013537 LDSHARED='$(CC) $(LDFLAGS) -bundle'
13538 if test "$enable_framework" ; then
13539 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000013540 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
13541 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000013542 else
13543 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000013544 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000013545 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000013546 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000013547 LDSHARED='$(CC) $(LDFLAGS) -bundle'
13548 if test "$enable_framework" ; then
13549 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000013550 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
13551 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000013552 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000013553 # No framework, use the Python app as bundle-loader
13554 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000013555 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013556 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000013557 Darwin/*)
13558 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
13559 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +000013560
Benjamin Peterson14ae9592008-07-16 02:20:15 +000013561 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000013562 then
Thomas Wouters477c8d52006-05-27 19:21:47 +000013563 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +000013564 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +000013565 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000013566 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
13567 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000013568 else
13569 LDSHARED='$(CC) $(LDFLAGS) -bundle'
13570 if test "$enable_framework" ; then
13571 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000013572 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
13573 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000013574 else
13575 # No framework, use the Python app as bundle-loader
13576 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
13577 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
13578 fi
13579 fi
13580 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +000013581 Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000013582 BSD/OS*/4*) LDSHARED="gcc -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013583 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000013584 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000013585 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000013586 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000013587 else
13588 LDSHARED="ld -Bshareable ${LDFLAGS}"
13589 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013590 OpenBSD*)
13591 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
13592 then
13593 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
13594 else
13595 case `uname -r` in
13596 [01].* | 2.[0-7] | 2.[0-7].*)
13597 LDSHARED="ld -Bshareable ${LDFLAGS}"
13598 ;;
13599 *)
13600 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
13601 ;;
13602 esac
13603 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013604 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013605 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000013606 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000013607 then LDSHARED='$(CC) -shared'
13608 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000013609 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000013610 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Guido van Rossumaef734b2001-01-10 21:09:12 +000013611 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013612 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013613 *) LDSHARED="ld";;
13614 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013615fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013616{ echo "$as_me:$LINENO: result: $LDSHARED" >&5
13617echo "${ECHO_T}$LDSHARED" >&6; }
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013618BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000013619# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013620# library (module) -- this is only needed for a few systems
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013621{ echo "$as_me:$LINENO: checking CCSHARED" >&5
13622echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013623if test -z "$CCSHARED"
13624then
Guido van Rossum07397971997-04-29 21:49:50 +000013625 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000013626 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013627 then CCSHARED="-fPIC";
13628 elif test `uname -p` = sparc;
13629 then CCSHARED="-xcode=pic32";
13630 else CCSHARED="-Kpic";
13631 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000013632 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000013633 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000013634 else CCSHARED="+z";
13635 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013636 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000013637 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013638 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013639 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000013640 if test "$GCC" = "yes"
13641 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000013642 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000013643 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000013644 SCO_SV*)
13645 if test "$GCC" = "yes"
13646 then CCSHARED="-fPIC"
13647 else CCSHARED="-Kpic -belf"
13648 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013649 IRIX*/6*) case $CC in
13650 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000013651 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013652 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013653 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013654 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013655fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013656{ echo "$as_me:$LINENO: result: $CCSHARED" >&5
13657echo "${ECHO_T}$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013658# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013659# the python executable -- this is only needed for a few systems
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013660{ echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
13661echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013662if test -z "$LINKFORSHARED"
13663then
Guido van Rossum07397971997-04-29 21:49:50 +000013664 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013665 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000013666 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000013667 LINKFORSHARED="-Wl,-E -Wl,+s";;
13668# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000013669 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013670 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013671 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000013672 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +000013673 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +000013674 if test "$enable_framework"
13675 then
Jack Jansenda49e192005-01-07 13:08:22 +000013676 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000013677 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000013678 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013679 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000013680 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000013681 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013682 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000013683 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
13684 then
13685 LINKFORSHARED="-Wl,--export-dynamic"
13686 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013687 SunOS/5*) case $CC in
13688 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000013689 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000013690 then
13691 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013692 fi;;
13693 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000013694 CYGWIN*)
13695 if test $enable_shared = "no"
13696 then
13697 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
13698 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +000013699 QNX*)
13700 # -Wl,-E causes the symbols to be added to the dynamic
13701 # symbol table so that they can be found when a module
13702 # is loaded. -N 2048K causes the stack size to be set
13703 # to 2048 kilobytes so that the stack doesn't overflow
13704 # when running test_compile.py.
13705 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013706 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013707fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013708{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
13709echo "${ECHO_T}$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013710
Michael W. Hudson54241132001-12-07 15:38:26 +000013711
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000013712
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013713{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
13714echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013715if test ! "$LIBRARY" = "$LDLIBRARY"
13716then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000013717 case $ac_sys_system in
13718 CYGWIN*)
13719 # Cygwin needs CCSHARED when building extension DLLs
13720 # but not when building the interpreter DLL.
13721 CFLAGSFORSHARED='';;
13722 *)
13723 CFLAGSFORSHARED='$(CCSHARED)'
13724 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013725fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013726{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
13727echo "${ECHO_T}$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013728
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013729# SHLIBS are libraries (except -lc and -lm) to link to the python shared
13730# library (with --enable-shared).
13731# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000013732# symbols, this must be set to $(LIBS) (expanded by make). We do this even
13733# if it is not required, since it creates a dependency of the shared library
13734# to LIBS. This, in turn, means that applications linking the shared libpython
13735# don't need to link LIBS explicitly. The default should be only changed
13736# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013737
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013738{ echo "$as_me:$LINENO: checking SHLIBS" >&5
13739echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013740case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013741 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000013742 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013743esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013744{ echo "$as_me:$LINENO: result: $SHLIBS" >&5
13745echo "${ECHO_T}$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013746
13747
Guido van Rossum627b2d71993-12-24 10:39:16 +000013748# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000013749
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013750{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
13751echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013752if test "${ac_cv_lib_dl_dlopen+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013753 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013754else
Martin v. Löwis11437992002-04-12 09:54:03 +000013755 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013756LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013757cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013758/* confdefs.h. */
13759_ACEOF
13760cat confdefs.h >>conftest.$ac_ext
13761cat >>conftest.$ac_ext <<_ACEOF
13762/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013763
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013764/* Override any GCC internal prototype to avoid an error.
13765 Use char because int might match the return type of a GCC
13766 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013767#ifdef __cplusplus
13768extern "C"
13769#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013770char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013771int
13772main ()
13773{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013774return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013775 ;
13776 return 0;
13777}
13778_ACEOF
13779rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013780if { (ac_try="$ac_link"
13781case "(($ac_try" in
13782 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13783 *) ac_try_echo=$ac_try;;
13784esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013785eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013786 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013787 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013788 grep -v '^ *+' conftest.er1 >conftest.err
13789 rm -f conftest.er1
13790 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013792 (exit $ac_status); } && {
13793 test -z "$ac_c_werror_flag" ||
13794 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013795 } && test -s conftest$ac_exeext &&
13796 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013797 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013798else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013799 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013800sed 's/^/| /' conftest.$ac_ext >&5
13801
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013802 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013803fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013804
13805rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013806 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013807LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000013808fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013809{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
13810echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
13811if test $ac_cv_lib_dl_dlopen = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013812 cat >>confdefs.h <<_ACEOF
13813#define HAVE_LIBDL 1
13814_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013815
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013816 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013817
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013818fi
13819 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000013820
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013821{ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
13822echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013823if test "${ac_cv_lib_dld_shl_load+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013824 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013825else
Martin v. Löwis11437992002-04-12 09:54:03 +000013826 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013827LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013828cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013829/* confdefs.h. */
13830_ACEOF
13831cat confdefs.h >>conftest.$ac_ext
13832cat >>conftest.$ac_ext <<_ACEOF
13833/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013834
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013835/* Override any GCC internal prototype to avoid an error.
13836 Use char because int might match the return type of a GCC
13837 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013838#ifdef __cplusplus
13839extern "C"
13840#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013841char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013842int
13843main ()
13844{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013845return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013846 ;
13847 return 0;
13848}
13849_ACEOF
13850rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013851if { (ac_try="$ac_link"
13852case "(($ac_try" in
13853 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13854 *) ac_try_echo=$ac_try;;
13855esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013856eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013857 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013858 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013859 grep -v '^ *+' conftest.er1 >conftest.err
13860 rm -f conftest.er1
13861 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013863 (exit $ac_status); } && {
13864 test -z "$ac_c_werror_flag" ||
13865 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013866 } && test -s conftest$ac_exeext &&
13867 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013868 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013869else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013870 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013871sed 's/^/| /' conftest.$ac_ext >&5
13872
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013873 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013874fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013875
13876rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013877 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013878LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000013879fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013880{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
13881echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
13882if test $ac_cv_lib_dld_shl_load = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013883 cat >>confdefs.h <<_ACEOF
13884#define HAVE_LIBDLD 1
13885_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013886
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013887 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013888
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013889fi
13890 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000013891
Georg Brandlb1441c72009-01-03 22:33:39 +000013892# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +000013893if test "$with_threads" = "yes" -o -z "$with_threads"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013894 { echo "$as_me:$LINENO: checking for library containing sem_init" >&5
13895echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013896if test "${ac_cv_search_sem_init+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013897 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000013898else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013899 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000013900cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013901/* confdefs.h. */
13902_ACEOF
13903cat confdefs.h >>conftest.$ac_ext
13904cat >>conftest.$ac_ext <<_ACEOF
13905/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013906
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013907/* Override any GCC internal prototype to avoid an error.
13908 Use char because int might match the return type of a GCC
13909 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013910#ifdef __cplusplus
13911extern "C"
13912#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013913char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013914int
13915main ()
13916{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013917return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013918 ;
13919 return 0;
13920}
13921_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013922for ac_lib in '' pthread rt posix4; do
13923 if test -z "$ac_lib"; then
13924 ac_res="none required"
13925 else
13926 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013927 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013928 fi
13929 rm -f conftest.$ac_objext conftest$ac_exeext
13930if { (ac_try="$ac_link"
13931case "(($ac_try" in
13932 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13933 *) ac_try_echo=$ac_try;;
13934esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013935eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013936 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013937 ac_status=$?
13938 grep -v '^ *+' conftest.er1 >conftest.err
13939 rm -f conftest.er1
13940 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013942 (exit $ac_status); } && {
13943 test -z "$ac_c_werror_flag" ||
13944 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013945 } && test -s conftest$ac_exeext &&
13946 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013947 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +000013948else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013949 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013950sed 's/^/| /' conftest.$ac_ext >&5
13951
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013952
Thomas Wouters477c8d52006-05-27 19:21:47 +000013953fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013954
13955rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13956 conftest$ac_exeext
13957 if test "${ac_cv_search_sem_init+set}" = set; then
13958 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013959fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013960done
13961if test "${ac_cv_search_sem_init+set}" = set; then
13962 :
13963else
13964 ac_cv_search_sem_init=no
13965fi
13966rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013967LIBS=$ac_func_search_save_LIBS
13968fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013969{ echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
13970echo "${ECHO_T}$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013971ac_res=$ac_cv_search_sem_init
13972if test "$ac_res" != no; then
13973 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000013974
Martin v. Löwis41933dd2002-03-21 15:10:58 +000013975fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000013976 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000013977 # posix4 on Solaris 2.6
13978 # pthread (first!) on Linux
13979fi
13980
Martin v. Löwis19d17342003-06-14 21:03:05 +000013981# check if we need libintl for locale functions
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013982{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
13983echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000013984if test "${ac_cv_lib_intl_textdomain+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000013985 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +000013986else
13987 ac_check_lib_save_LIBS=$LIBS
13988LIBS="-lintl $LIBS"
13989cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013990/* confdefs.h. */
13991_ACEOF
13992cat confdefs.h >>conftest.$ac_ext
13993cat >>conftest.$ac_ext <<_ACEOF
13994/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000013995
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013996/* Override any GCC internal prototype to avoid an error.
13997 Use char because int might match the return type of a GCC
13998 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000013999#ifdef __cplusplus
14000extern "C"
14001#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000014002char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000014003int
14004main ()
14005{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014006return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000014007 ;
14008 return 0;
14009}
14010_ACEOF
14011rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014012if { (ac_try="$ac_link"
14013case "(($ac_try" in
14014 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14015 *) ac_try_echo=$ac_try;;
14016esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014017eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014018 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000014019 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014020 grep -v '^ *+' conftest.er1 >conftest.err
14021 rm -f conftest.er1
14022 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014024 (exit $ac_status); } && {
14025 test -z "$ac_c_werror_flag" ||
14026 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014027 } && test -s conftest$ac_exeext &&
14028 $as_test_x conftest$ac_exeext; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000014029 ac_cv_lib_intl_textdomain=yes
14030else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014031 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014032sed 's/^/| /' conftest.$ac_ext >&5
14033
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014034 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000014035fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014036
14037rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014038 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000014039LIBS=$ac_check_lib_save_LIBS
14040fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014041{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
14042echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; }
14043if test $ac_cv_lib_intl_textdomain = yes; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000014044
14045cat >>confdefs.h <<\_ACEOF
14046#define WITH_LIBINTL 1
14047_ACEOF
14048
Brett Cannonc6d936e2009-06-07 20:09:53 +000014049 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +000014050fi
14051
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014052
14053# checks for system dependent C++ extensions support
14054case "$ac_sys_system" in
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014055 AIX*) { echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
14056echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014057 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014058/* confdefs.h. */
14059_ACEOF
14060cat confdefs.h >>conftest.$ac_ext
14061cat >>conftest.$ac_ext <<_ACEOF
14062/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014063#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014064int
14065main ()
14066{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014067loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000014068 ;
14069 return 0;
14070}
14071_ACEOF
14072rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014073if { (ac_try="$ac_link"
14074case "(($ac_try" in
14075 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14076 *) ac_try_echo=$ac_try;;
14077esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014078eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014079 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014080 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014081 grep -v '^ *+' conftest.er1 >conftest.err
14082 rm -f conftest.er1
14083 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014085 (exit $ac_status); } && {
14086 test -z "$ac_c_werror_flag" ||
14087 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014088 } && test -s conftest$ac_exeext &&
14089 $as_test_x conftest$ac_exeext; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014090
Martin v. Löwis11437992002-04-12 09:54:03 +000014091cat >>confdefs.h <<\_ACEOF
14092#define AIX_GENUINE_CPLUSPLUS 1
14093_ACEOF
14094
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014095 { echo "$as_me:$LINENO: result: yes" >&5
14096echo "${ECHO_T}yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014097else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014098 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014099sed 's/^/| /' conftest.$ac_ext >&5
14100
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014101 { echo "$as_me:$LINENO: result: no" >&5
14102echo "${ECHO_T}no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014103fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014104
14105rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014106 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014107 *) ;;
14108esac
14109
Guido van Rossum70c7f481998-03-26 18:44:10 +000014110# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014111{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
14112echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014113if test "${ac_cv_lib_nsl_t_open+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014114 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014115else
Martin v. Löwis11437992002-04-12 09:54:03 +000014116 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014117LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014118cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014119/* confdefs.h. */
14120_ACEOF
14121cat confdefs.h >>conftest.$ac_ext
14122cat >>conftest.$ac_ext <<_ACEOF
14123/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014124
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014125/* Override any GCC internal prototype to avoid an error.
14126 Use char because int might match the return type of a GCC
14127 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014128#ifdef __cplusplus
14129extern "C"
14130#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014131char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014132int
14133main ()
14134{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014135return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014136 ;
14137 return 0;
14138}
14139_ACEOF
14140rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014141if { (ac_try="$ac_link"
14142case "(($ac_try" in
14143 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14144 *) ac_try_echo=$ac_try;;
14145esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014146eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014147 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014148 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014149 grep -v '^ *+' conftest.er1 >conftest.err
14150 rm -f conftest.er1
14151 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014153 (exit $ac_status); } && {
14154 test -z "$ac_c_werror_flag" ||
14155 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014156 } && test -s conftest$ac_exeext &&
14157 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014158 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014159else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014160 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014161sed 's/^/| /' conftest.$ac_ext >&5
14162
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014163 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014164fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014165
14166rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014167 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014168LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014169fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014170{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
14171echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6; }
14172if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014173 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014174fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000014175 # SVR4
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014176{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
14177echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014178if test "${ac_cv_lib_socket_socket+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014179 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014180else
Martin v. Löwis11437992002-04-12 09:54:03 +000014181 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014182LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014183cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014184/* confdefs.h. */
14185_ACEOF
14186cat confdefs.h >>conftest.$ac_ext
14187cat >>conftest.$ac_ext <<_ACEOF
14188/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014189
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014190/* Override any GCC internal prototype to avoid an error.
14191 Use char because int might match the return type of a GCC
14192 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014193#ifdef __cplusplus
14194extern "C"
14195#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014196char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014197int
14198main ()
14199{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014200return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014201 ;
14202 return 0;
14203}
14204_ACEOF
14205rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014206if { (ac_try="$ac_link"
14207case "(($ac_try" in
14208 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14209 *) ac_try_echo=$ac_try;;
14210esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014211eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014212 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014213 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014214 grep -v '^ *+' conftest.er1 >conftest.err
14215 rm -f conftest.er1
14216 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014218 (exit $ac_status); } && {
14219 test -z "$ac_c_werror_flag" ||
14220 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014221 } && test -s conftest$ac_exeext &&
14222 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014223 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014224else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014225 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014226sed 's/^/| /' conftest.$ac_ext >&5
14227
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014228 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014229fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014230
14231rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014232 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014233LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014234fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014235{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
14236echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
14237if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000014238 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000014239fi
14240 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000014241
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014242{ echo "$as_me:$LINENO: checking for --with-libs" >&5
14243echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014244
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014245# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000014246if test "${with_libs+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014247 withval=$with_libs;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014248{ echo "$as_me:$LINENO: result: $withval" >&5
14249echo "${ECHO_T}$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000014250LIBS="$withval $LIBS"
14251
14252else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014253 { echo "$as_me:$LINENO: result: no" >&5
14254echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014255fi
14256
Guido van Rossum7f43da71994-08-01 12:15:30 +000014257
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014258# Check for use of the system libffi library
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014259{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
14260echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014261
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014262# Check whether --with-system_ffi was given.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014263if test "${with_system_ffi+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014264 withval=$with_system_ffi;
14265fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014266
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014267
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014268{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5
14269echo "${ECHO_T}$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014270
Matthias Klose55708cc2009-04-30 08:06:49 +000014271# Check for --with-dbmliborder
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014272{ echo "$as_me:$LINENO: checking for --with-dbmliborder" >&5
14273echo $ECHO_N "checking for --with-dbmliborder... $ECHO_C" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000014274
14275# Check whether --with-dbmliborder was given.
14276if test "${with_dbmliborder+set}" = set; then
14277 withval=$with_dbmliborder;
14278if test x$with_dbmliborder = xyes
14279then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014280{ { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
14281echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Matthias Klose55708cc2009-04-30 08:06:49 +000014282 { (exit 1); exit 1; }; }
14283else
14284 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
14285 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
14286 then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014287 { { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
14288echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Matthias Klose55708cc2009-04-30 08:06:49 +000014289 { (exit 1); exit 1; }; }
14290 fi
14291 done
14292fi
14293fi
14294
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014295{ echo "$as_me:$LINENO: result: $with_dbmliborder" >&5
14296echo "${ECHO_T}$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000014297
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000014298# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014299
14300
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014301{ echo "$as_me:$LINENO: checking for --with-signal-module" >&5
14302echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014303
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014304# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014305if test "${with_signal_module+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014306 withval=$with_signal_module;
14307fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014308
14309
14310if test -z "$with_signal_module"
14311then with_signal_module="yes"
14312fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014313{ echo "$as_me:$LINENO: result: $with_signal_module" >&5
14314echo "${ECHO_T}$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014315
14316if test "${with_signal_module}" = "yes"; then
14317 USE_SIGNAL_MODULE=""
14318 SIGNAL_OBJS=""
14319else
14320 USE_SIGNAL_MODULE="#"
14321 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
14322fi
14323
Guido van Rossum3d15bd82001-01-10 18:53:48 +000014324# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000014325
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000014326USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000014327
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014328{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
14329echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014330
Guido van Rossumec2f0731997-01-22 20:54:01 +000014331
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014332# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000014333if test "${with_dec_threads+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014334 withval=$with_dec_threads;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014335{ echo "$as_me:$LINENO: result: $withval" >&5
14336echo "${ECHO_T}$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000014337LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000014338if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000014339 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000014340fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000014341else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014342 { echo "$as_me:$LINENO: result: no" >&5
14343echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014344fi
14345
Martin v. Löwis11437992002-04-12 09:54:03 +000014346
14347# Templates for things AC_DEFINEd more than once.
14348# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000014349
14350
Martin v. Löwis11437992002-04-12 09:54:03 +000014351
14352
14353
14354
14355
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014356{ echo "$as_me:$LINENO: checking for --with-threads" >&5
14357echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014358
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014359# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000014360if test "${with_threads+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014361 withval=$with_threads;
14362fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000014363
14364
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000014365# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000014366
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014367# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014368if test "${with_thread+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014369 withval=$with_thread; with_threads=$with_thread
14370fi
14371
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000014372
14373if test -z "$with_threads"
14374then with_threads="yes"
14375fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014376{ echo "$as_me:$LINENO: result: $with_threads" >&5
14377echo "${ECHO_T}$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000014378
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014379
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000014380if test "$with_threads" = "no"
14381then
14382 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014383elif test "$ac_cv_pthread_is_default" = yes
14384then
Martin v. Löwis11437992002-04-12 09:54:03 +000014385 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014386#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014387_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014388
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014389 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000014390 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014391#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014392_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014393
14394 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000014395 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014396elif test "$ac_cv_kpthread" = "yes"
14397then
14398 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000014399 if test "$ac_cv_cxx_thread" = "yes"; then
14400 CXX="$CXX -Kpthread"
14401 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014402 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000014403#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014404_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000014405
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014406 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014407 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000014408elif test "$ac_cv_kthread" = "yes"
14409then
14410 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000014411 if test "$ac_cv_cxx_thread" = "yes"; then
14412 CXX="$CXX -Kthread"
14413 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000014414 cat >>confdefs.h <<\_ACEOF
14415#define WITH_THREAD 1
14416_ACEOF
14417
14418 posix_threads=yes
14419 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014420elif test "$ac_cv_pthread" = "yes"
14421then
14422 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000014423 if test "$ac_cv_cxx_thread" = "yes"; then
14424 CXX="$CXX -pthread"
14425 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014426 cat >>confdefs.h <<\_ACEOF
14427#define WITH_THREAD 1
14428_ACEOF
14429
14430 posix_threads=yes
14431 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014432else
14433 if test ! -z "$with_threads" -a -d "$with_threads"
14434 then LDFLAGS="$LDFLAGS -L$with_threads"
14435 fi
14436 if test ! -z "$withval" -a -d "$withval"
14437 then LDFLAGS="$LDFLAGS -L$withval"
14438 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014439
14440 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000014441 # define _POSIX_THREADS in unistd.h. Some apparently don't
14442 # (e.g. gnu pth with pthread emulation)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014443 { echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
14444echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014445 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014446/* confdefs.h. */
14447_ACEOF
14448cat confdefs.h >>conftest.$ac_ext
14449cat >>conftest.$ac_ext <<_ACEOF
14450/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000014451
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014452#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000014453#ifdef _POSIX_THREADS
14454yes
14455#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014456
14457_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014458if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000014459 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014460 unistd_defines_pthreads=yes
14461else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014462 unistd_defines_pthreads=no
14463fi
Benjamin Petersone7e59c22010-03-23 21:05:56 +000014464rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014465
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014466 { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
14467echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014468
Martin v. Löwis11437992002-04-12 09:54:03 +000014469 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000014470#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014471_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000014472
Martin v. Löwis11437992002-04-12 09:54:03 +000014473 if test "${ac_cv_header_cthreads_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014474 { echo "$as_me:$LINENO: checking for cthreads.h" >&5
14475echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014476if test "${ac_cv_header_cthreads_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014477 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014478fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014479{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
14480echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014481else
Martin v. Löwis11437992002-04-12 09:54:03 +000014482 # Is the header compilable?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014483{ echo "$as_me:$LINENO: checking cthreads.h usability" >&5
14484echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014485cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014486/* confdefs.h. */
14487_ACEOF
14488cat confdefs.h >>conftest.$ac_ext
14489cat >>conftest.$ac_ext <<_ACEOF
14490/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014491$ac_includes_default
14492#include <cthreads.h>
14493_ACEOF
14494rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014495if { (ac_try="$ac_compile"
14496case "(($ac_try" in
14497 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14498 *) ac_try_echo=$ac_try;;
14499esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014500eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014501 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014502 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014503 grep -v '^ *+' conftest.er1 >conftest.err
14504 rm -f conftest.er1
14505 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014507 (exit $ac_status); } && {
14508 test -z "$ac_c_werror_flag" ||
14509 test ! -s conftest.err
14510 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014511 ac_header_compiler=yes
14512else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014513 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014514sed 's/^/| /' conftest.$ac_ext >&5
14515
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014516 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014517fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014518
14519rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014520{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14521echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014522
14523# Is the header present?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014524{ echo "$as_me:$LINENO: checking cthreads.h presence" >&5
14525echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014526cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014527/* confdefs.h. */
14528_ACEOF
14529cat confdefs.h >>conftest.$ac_ext
14530cat >>conftest.$ac_ext <<_ACEOF
14531/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014532#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014533_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014534if { (ac_try="$ac_cpp conftest.$ac_ext"
14535case "(($ac_try" in
14536 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14537 *) ac_try_echo=$ac_try;;
14538esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014539eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014540 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014541 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014542 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000014543 rm -f conftest.er1
14544 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014546 (exit $ac_status); } >/dev/null && {
14547 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14548 test ! -s conftest.err
14549 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014550 ac_header_preproc=yes
14551else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014552 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014553sed 's/^/| /' conftest.$ac_ext >&5
14554
Martin v. Löwis11437992002-04-12 09:54:03 +000014555 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014556fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014557
Martin v. Löwis11437992002-04-12 09:54:03 +000014558rm -f conftest.err conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014559{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14560echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014561
14562# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014563case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14564 yes:no: )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014565 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
14566echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
14567 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
14568echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014569 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014570 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014571 no:yes:* )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014572 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
14573echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
14574 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
14575echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
14576 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
14577echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
14578 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
14579echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
14580 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
14581echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
14582 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
14583echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014584 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000014585## -------------------------------------- ##
14586## Report this to http://bugs.python.org/ ##
14587## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014588_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014589 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014590 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014591esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014592{ echo "$as_me:$LINENO: checking for cthreads.h" >&5
14593echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014594if test "${ac_cv_header_cthreads_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014595 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014596else
14597 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014598fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014599{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
14600echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014601
14602fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014603if test $ac_cv_header_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014604 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014605#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014606_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014607
Martin v. Löwis11437992002-04-12 09:54:03 +000014608 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014609#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014610_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014611
Martin v. Löwis11437992002-04-12 09:54:03 +000014612
14613cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014614#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014615_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014616
14617 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014618 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014619else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014620
Martin v. Löwis11437992002-04-12 09:54:03 +000014621 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014622 { echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
14623echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014624if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014625 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014626fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014627{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
14628echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014629else
Martin v. Löwis11437992002-04-12 09:54:03 +000014630 # Is the header compilable?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014631{ echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
14632echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014633cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014634/* confdefs.h. */
14635_ACEOF
14636cat confdefs.h >>conftest.$ac_ext
14637cat >>conftest.$ac_ext <<_ACEOF
14638/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014639$ac_includes_default
14640#include <mach/cthreads.h>
14641_ACEOF
14642rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014643if { (ac_try="$ac_compile"
14644case "(($ac_try" in
14645 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14646 *) ac_try_echo=$ac_try;;
14647esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014648eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014649 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014650 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014651 grep -v '^ *+' conftest.er1 >conftest.err
14652 rm -f conftest.er1
14653 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014655 (exit $ac_status); } && {
14656 test -z "$ac_c_werror_flag" ||
14657 test ! -s conftest.err
14658 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014659 ac_header_compiler=yes
14660else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014661 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014662sed 's/^/| /' conftest.$ac_ext >&5
14663
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014664 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014665fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014666
14667rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014668{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14669echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014670
14671# Is the header present?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014672{ echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
14673echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014674cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014675/* confdefs.h. */
14676_ACEOF
14677cat confdefs.h >>conftest.$ac_ext
14678cat >>conftest.$ac_ext <<_ACEOF
14679/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014680#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014681_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014682if { (ac_try="$ac_cpp conftest.$ac_ext"
14683case "(($ac_try" in
14684 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14685 *) ac_try_echo=$ac_try;;
14686esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014687eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014688 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014689 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014690 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000014691 rm -f conftest.er1
14692 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014694 (exit $ac_status); } >/dev/null && {
14695 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14696 test ! -s conftest.err
14697 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014698 ac_header_preproc=yes
14699else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014700 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014701sed 's/^/| /' conftest.$ac_ext >&5
14702
Martin v. Löwis11437992002-04-12 09:54:03 +000014703 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014704fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014705
Martin v. Löwis11437992002-04-12 09:54:03 +000014706rm -f conftest.err conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014707{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14708echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014709
14710# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014711case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14712 yes:no: )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014713 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
14714echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
14715 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
14716echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014717 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014718 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014719 no:yes:* )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014720 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
14721echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
14722 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
14723echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
14724 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
14725echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
14726 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
14727echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
14728 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
14729echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
14730 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
14731echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014732 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000014733## -------------------------------------- ##
14734## Report this to http://bugs.python.org/ ##
14735## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014736_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014737 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014738 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014739esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014740{ echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
14741echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014742if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014743 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014744else
14745 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014746fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014747{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
14748echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014749
14750fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014751if test $ac_cv_header_mach_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014752 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014753#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014754_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014755
Martin v. Löwis11437992002-04-12 09:54:03 +000014756 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014757#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014758_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014759
Martin v. Löwis11437992002-04-12 09:54:03 +000014760
14761cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014762#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014763_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014764
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014765 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014766else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014767
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014768 { echo "$as_me:$LINENO: checking for --with-pth" >&5
14769echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014770
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014771# Check whether --with-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014772if test "${with_pth+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014773 withval=$with_pth; { echo "$as_me:$LINENO: result: $withval" >&5
14774echo "${ECHO_T}$withval" >&6; }
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000014775 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014776#define WITH_THREAD 1
14777_ACEOF
14778
14779
14780cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014781#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014782_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014783
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000014784 LIBS="-lpth $LIBS"
14785 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014786else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014787 { echo "$as_me:$LINENO: result: no" >&5
14788echo "${ECHO_T}no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014789
14790 # Just looking for pthread_create in libpthread is not enough:
14791 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
14792 # So we really have to include pthread.h, and then link.
14793 _libs=$LIBS
14794 LIBS="$LIBS -lpthread"
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014795 { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
14796echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014797 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014798/* confdefs.h. */
14799_ACEOF
14800cat confdefs.h >>conftest.$ac_ext
14801cat >>conftest.$ac_ext <<_ACEOF
14802/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014803#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000014804
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014805void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000014806int
14807main ()
14808{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014809
14810pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000014811 ;
14812 return 0;
14813}
14814_ACEOF
14815rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014816if { (ac_try="$ac_link"
14817case "(($ac_try" in
14818 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14819 *) ac_try_echo=$ac_try;;
14820esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014821eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014822 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014823 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014824 grep -v '^ *+' conftest.er1 >conftest.err
14825 rm -f conftest.er1
14826 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014828 (exit $ac_status); } && {
14829 test -z "$ac_c_werror_flag" ||
14830 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014831 } && test -s conftest$ac_exeext &&
14832 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014833
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014834 { echo "$as_me:$LINENO: result: yes" >&5
14835echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014836 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000014837#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014838_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000014839
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014840 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014841 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000014842else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014843 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014844sed 's/^/| /' conftest.$ac_ext >&5
14845
Martin v. Löwis11437992002-04-12 09:54:03 +000014846
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014847 LIBS=$_libs
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014848 { echo "$as_me:$LINENO: checking for pthread_detach" >&5
14849echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014850if test "${ac_cv_func_pthread_detach+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014851 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000014852else
Martin v. Löwis11437992002-04-12 09:54:03 +000014853 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014854/* confdefs.h. */
14855_ACEOF
14856cat confdefs.h >>conftest.$ac_ext
14857cat >>conftest.$ac_ext <<_ACEOF
14858/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014859/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
14860 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14861#define pthread_detach innocuous_pthread_detach
14862
Guido van Rossumad678af1998-10-02 14:42:15 +000014863/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014864 which can conflict with char pthread_detach (); below.
14865 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014866 <limits.h> exists even on freestanding compilers. */
14867
14868#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000014869# include <limits.h>
14870#else
14871# include <assert.h>
14872#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014873
14874#undef pthread_detach
14875
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014876/* Override any GCC internal prototype to avoid an error.
14877 Use char because int might match the return type of a GCC
14878 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014879#ifdef __cplusplus
14880extern "C"
14881#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014882char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000014883/* The GNU C library defines this for functions which it implements
14884 to always fail with ENOSYS. Some functions are actually named
14885 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014886#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000014887choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000014888#endif
14889
Skip Montanaro6dead952003-09-25 14:50:04 +000014890int
14891main ()
14892{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014893return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014894 ;
14895 return 0;
14896}
14897_ACEOF
14898rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014899if { (ac_try="$ac_link"
14900case "(($ac_try" in
14901 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14902 *) ac_try_echo=$ac_try;;
14903esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014904eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014905 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014906 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014907 grep -v '^ *+' conftest.er1 >conftest.err
14908 rm -f conftest.er1
14909 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014911 (exit $ac_status); } && {
14912 test -z "$ac_c_werror_flag" ||
14913 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014914 } && test -s conftest$ac_exeext &&
14915 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014916 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000014917else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014918 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014919sed 's/^/| /' conftest.$ac_ext >&5
14920
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014921 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000014922fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014923
14924rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014925 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000014926fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014927{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
14928echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; }
14929if test $ac_cv_func_pthread_detach = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014930 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000014931#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014932_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000014933
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014934 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014935 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000014936else
Guido van Rossumad678af1998-10-02 14:42:15 +000014937
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014938 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014939 { echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
14940echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014941if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014942 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014943fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014944{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
14945echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014946else
14947 # Is the header compilable?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014948{ echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
14949echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014950cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014951/* confdefs.h. */
14952_ACEOF
14953cat confdefs.h >>conftest.$ac_ext
14954cat >>conftest.$ac_ext <<_ACEOF
14955/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014956$ac_includes_default
14957#include <atheos/threads.h>
14958_ACEOF
14959rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014960if { (ac_try="$ac_compile"
14961case "(($ac_try" in
14962 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14963 *) ac_try_echo=$ac_try;;
14964esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014965eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014966 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014967 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014968 grep -v '^ *+' conftest.er1 >conftest.err
14969 rm -f conftest.er1
14970 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014971 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014972 (exit $ac_status); } && {
14973 test -z "$ac_c_werror_flag" ||
14974 test ! -s conftest.err
14975 } && test -s conftest.$ac_objext; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014976 ac_header_compiler=yes
14977else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014978 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014979sed 's/^/| /' conftest.$ac_ext >&5
14980
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014981 ac_header_compiler=no
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014982fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014983
14984rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014985{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14986echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014987
14988# Is the header present?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000014989{ echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
14990echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014991cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014992/* confdefs.h. */
14993_ACEOF
14994cat confdefs.h >>conftest.$ac_ext
14995cat >>conftest.$ac_ext <<_ACEOF
14996/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014997#include <atheos/threads.h>
14998_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014999if { (ac_try="$ac_cpp conftest.$ac_ext"
15000case "(($ac_try" in
15001 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15002 *) ac_try_echo=$ac_try;;
15003esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015004eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015005 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015006 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000015007 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015008 rm -f conftest.er1
15009 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015011 (exit $ac_status); } >/dev/null && {
15012 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15013 test ! -s conftest.err
15014 }; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015015 ac_header_preproc=yes
15016else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015017 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015018sed 's/^/| /' conftest.$ac_ext >&5
15019
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015020 ac_header_preproc=no
15021fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015022
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015023rm -f conftest.err conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015024{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15025echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015026
15027# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015028case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15029 yes:no: )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015030 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
15031echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15032 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
15033echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015034 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015035 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015036 no:yes:* )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015037 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
15038echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
15039 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
15040echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
15041 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
15042echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
15043 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5
15044echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;}
15045 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
15046echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
15047 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
15048echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015049 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000015050## -------------------------------------- ##
15051## Report this to http://bugs.python.org/ ##
15052## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015053_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015054 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000015055 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015056esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015057{ echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
15058echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015059if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015060 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015061else
15062 ac_cv_header_atheos_threads_h=$ac_header_preproc
15063fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015064{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
15065echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015066
15067fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015068if test $ac_cv_header_atheos_threads_h = yes; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015069 cat >>confdefs.h <<\_ACEOF
15070#define WITH_THREAD 1
15071_ACEOF
15072
15073
15074cat >>confdefs.h <<\_ACEOF
15075#define ATHEOS_THREADS 1
15076_ACEOF
15077
15078 THREADOBJ="Python/thread.o"
15079else
15080
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015081 { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
15082echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015083if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015084 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015085else
Martin v. Löwis11437992002-04-12 09:54:03 +000015086 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015087LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015088cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015089/* confdefs.h. */
15090_ACEOF
15091cat confdefs.h >>conftest.$ac_ext
15092cat >>conftest.$ac_ext <<_ACEOF
15093/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015094
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015095/* Override any GCC internal prototype to avoid an error.
15096 Use char because int might match the return type of a GCC
15097 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015098#ifdef __cplusplus
15099extern "C"
15100#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015101char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015102int
15103main ()
15104{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015105return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015106 ;
15107 return 0;
15108}
15109_ACEOF
15110rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015111if { (ac_try="$ac_link"
15112case "(($ac_try" in
15113 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15114 *) ac_try_echo=$ac_try;;
15115esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015116eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015117 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015118 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015119 grep -v '^ *+' conftest.er1 >conftest.err
15120 rm -f conftest.er1
15121 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015123 (exit $ac_status); } && {
15124 test -z "$ac_c_werror_flag" ||
15125 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015126 } && test -s conftest$ac_exeext &&
15127 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015128 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000015129else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015130 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015131sed 's/^/| /' conftest.$ac_ext >&5
15132
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015133 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000015134fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015135
15136rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015137 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015138LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000015139fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015140{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
15141echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
15142if test $ac_cv_lib_pthreads_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015143 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000015144#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015145_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000015146
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015147 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015148 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015149 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000015150else
Greg Steinadf63d62000-07-05 10:38:09 +000015151
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015152 { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
15153echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015154if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015155 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000015156else
Martin v. Löwis11437992002-04-12 09:54:03 +000015157 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000015158LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015159cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015160/* confdefs.h. */
15161_ACEOF
15162cat confdefs.h >>conftest.$ac_ext
15163cat >>conftest.$ac_ext <<_ACEOF
15164/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015165
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015166/* Override any GCC internal prototype to avoid an error.
15167 Use char because int might match the return type of a GCC
15168 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015169#ifdef __cplusplus
15170extern "C"
15171#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015172char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015173int
15174main ()
15175{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015176return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015177 ;
15178 return 0;
15179}
15180_ACEOF
15181rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015182if { (ac_try="$ac_link"
15183case "(($ac_try" in
15184 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15185 *) ac_try_echo=$ac_try;;
15186esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015187eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015188 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015189 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015190 grep -v '^ *+' conftest.er1 >conftest.err
15191 rm -f conftest.er1
15192 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015194 (exit $ac_status); } && {
15195 test -z "$ac_c_werror_flag" ||
15196 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015197 } && test -s conftest$ac_exeext &&
15198 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015199 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000015200else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015201 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015202sed 's/^/| /' conftest.$ac_ext >&5
15203
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015204 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000015205fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015206
15207rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015208 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015209LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000015210fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015211{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
15212echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
15213if test $ac_cv_lib_c_r_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015214 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000015215#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015216_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000015217
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015218 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015219 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015220 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000015221else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000015222
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015223 { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
15224echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015225if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015226 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015227else
Martin v. Löwis11437992002-04-12 09:54:03 +000015228 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015229LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015230cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015231/* confdefs.h. */
15232_ACEOF
15233cat confdefs.h >>conftest.$ac_ext
15234cat >>conftest.$ac_ext <<_ACEOF
15235/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015236
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015237/* Override any GCC internal prototype to avoid an error.
15238 Use char because int might match the return type of a GCC
15239 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015240#ifdef __cplusplus
15241extern "C"
15242#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015243char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015244int
15245main ()
15246{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015247return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015248 ;
15249 return 0;
15250}
15251_ACEOF
15252rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015253if { (ac_try="$ac_link"
15254case "(($ac_try" in
15255 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15256 *) ac_try_echo=$ac_try;;
15257esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015258eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015259 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015260 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015261 grep -v '^ *+' conftest.er1 >conftest.err
15262 rm -f conftest.er1
15263 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015265 (exit $ac_status); } && {
15266 test -z "$ac_c_werror_flag" ||
15267 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015268 } && test -s conftest$ac_exeext &&
15269 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015270 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015271else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015272 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015273sed 's/^/| /' conftest.$ac_ext >&5
15274
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015275 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015276fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015277
15278rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015279 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015280LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015281fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015282{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
15283echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; }
15284if test $ac_cv_lib_pthread___pthread_create_system = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015285 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015286#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015287_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015288
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015289 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015290 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015291 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015292else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015293
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015294 { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
15295echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015296if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015297 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000015298else
Martin v. Löwis11437992002-04-12 09:54:03 +000015299 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000015300LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015301cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015302/* confdefs.h. */
15303_ACEOF
15304cat confdefs.h >>conftest.$ac_ext
15305cat >>conftest.$ac_ext <<_ACEOF
15306/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015307
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015308/* Override any GCC internal prototype to avoid an error.
15309 Use char because int might match the return type of a GCC
15310 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015311#ifdef __cplusplus
15312extern "C"
15313#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015314char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015315int
15316main ()
15317{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015318return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015319 ;
15320 return 0;
15321}
15322_ACEOF
15323rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015324if { (ac_try="$ac_link"
15325case "(($ac_try" in
15326 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15327 *) ac_try_echo=$ac_try;;
15328esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015329eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015330 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015331 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015332 grep -v '^ *+' conftest.er1 >conftest.err
15333 rm -f conftest.er1
15334 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015336 (exit $ac_status); } && {
15337 test -z "$ac_c_werror_flag" ||
15338 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015339 } && test -s conftest$ac_exeext &&
15340 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015341 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000015342else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015343 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015344sed 's/^/| /' conftest.$ac_ext >&5
15345
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015346 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000015347fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015348
15349rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015350 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015351LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000015352fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015353{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
15354echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; }
15355if test $ac_cv_lib_cma_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015356 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000015357#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015358_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000015359
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015360 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015361 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015362 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000015363else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000015364
Martin v. Löwis130fb172001-07-19 11:00:41 +000015365 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000015366fi
15367
Guido van Rossum627b2d71993-12-24 10:39:16 +000015368
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015369fi
15370
Guido van Rossum0be3e491997-05-22 20:33:33 +000015371fi
15372
Guido van Rossum49545951997-12-02 19:28:29 +000015373fi
15374
Guido van Rossumb93a8621998-05-07 13:27:32 +000015375fi
15376
Guido van Rossum07bd90e2000-05-08 13:41:38 +000015377
Michael W. Hudson54241132001-12-07 15:38:26 +000015378fi
15379
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015380fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015381
15382rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015383 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015384fi
15385
Martin v. Löwis11437992002-04-12 09:54:03 +000015386fi
15387
15388
15389fi
15390
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015391
Michael W. Hudson54241132001-12-07 15:38:26 +000015392
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015393 { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
15394echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015395if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015396 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015397else
Martin v. Löwis11437992002-04-12 09:54:03 +000015398 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015399LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015400cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015401/* confdefs.h. */
15402_ACEOF
15403cat confdefs.h >>conftest.$ac_ext
15404cat >>conftest.$ac_ext <<_ACEOF
15405/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015406
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015407/* Override any GCC internal prototype to avoid an error.
15408 Use char because int might match the return type of a GCC
15409 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015410#ifdef __cplusplus
15411extern "C"
15412#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015413char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015414int
15415main ()
15416{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015417return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015418 ;
15419 return 0;
15420}
15421_ACEOF
15422rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015423if { (ac_try="$ac_link"
15424case "(($ac_try" in
15425 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15426 *) ac_try_echo=$ac_try;;
15427esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015428eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015429 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015430 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015431 grep -v '^ *+' conftest.er1 >conftest.err
15432 rm -f conftest.er1
15433 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015435 (exit $ac_status); } && {
15436 test -z "$ac_c_werror_flag" ||
15437 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015438 } && test -s conftest$ac_exeext &&
15439 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015440 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015441else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015442 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015443sed 's/^/| /' conftest.$ac_ext >&5
15444
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015445 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015446fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015447
15448rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015449 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015450LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015451fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015452{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
15453echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; }
15454if test $ac_cv_lib_mpc_usconfig = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015455 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015456#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015457_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015458
Martin v. Löwis130fb172001-07-19 11:00:41 +000015459 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015460 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015461 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000015462fi
15463
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015464
Neal Norwitza978ab02002-11-02 16:58:05 +000015465 if test "$posix_threads" != "yes"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015466 { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
15467echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015468if test "${ac_cv_lib_thread_thr_create+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015469 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015470else
Martin v. Löwis11437992002-04-12 09:54:03 +000015471 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015472LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015473cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015474/* confdefs.h. */
15475_ACEOF
15476cat confdefs.h >>conftest.$ac_ext
15477cat >>conftest.$ac_ext <<_ACEOF
15478/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015479
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015480/* Override any GCC internal prototype to avoid an error.
15481 Use char because int might match the return type of a GCC
15482 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015483#ifdef __cplusplus
15484extern "C"
15485#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015486char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015487int
15488main ()
15489{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015490return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015491 ;
15492 return 0;
15493}
15494_ACEOF
15495rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015496if { (ac_try="$ac_link"
15497case "(($ac_try" in
15498 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15499 *) ac_try_echo=$ac_try;;
15500esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015501eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015502 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015503 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015504 grep -v '^ *+' conftest.er1 >conftest.err
15505 rm -f conftest.er1
15506 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015508 (exit $ac_status); } && {
15509 test -z "$ac_c_werror_flag" ||
15510 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015511 } && test -s conftest$ac_exeext &&
15512 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015513 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015514else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015515 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015516sed 's/^/| /' conftest.$ac_ext >&5
15517
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015518 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015519fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015520
15521rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015522 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015523LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015524fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015525{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
15526echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
15527if test $ac_cv_lib_thread_thr_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015528 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015529#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015530_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015531
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015532 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015533 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015534 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000015535fi
15536
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015537 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015538
Martin v. Löwis130fb172001-07-19 11:00:41 +000015539 if test "$USE_THREAD_MODULE" != "#"
15540 then
15541 # If the above checks didn't disable threads, (at least) OSF1
15542 # needs this '-threads' argument during linking.
15543 case $ac_sys_system in
15544 OSF1) LDLAST=-threads;;
15545 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000015546 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015547fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015548
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015549if test "$posix_threads" = "yes"; then
15550 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015551
15552cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015553#define _POSIX_THREADS 1
15554_ACEOF
15555
15556 fi
15557
15558 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
15559 case $ac_sys_system/$ac_sys_release in
15560 SunOS/5.6)
15561cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015562#define HAVE_PTHREAD_DESTRUCTOR 1
15563_ACEOF
15564
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015565 ;;
15566 SunOS/5.8)
15567cat >>confdefs.h <<\_ACEOF
15568#define HAVE_BROKEN_POSIX_SEMAPHORES 1
15569_ACEOF
15570
15571 ;;
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000015572 AIX/5)
15573cat >>confdefs.h <<\_ACEOF
15574#define HAVE_BROKEN_POSIX_SEMAPHORES 1
15575_ACEOF
15576
15577 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015578 esac
15579
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015580 { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
15581echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015582 if test "${ac_cv_pthread_system_supported+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015583 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015584else
15585 if test "$cross_compiling" = yes; then
15586 ac_cv_pthread_system_supported=no
15587else
15588 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015589/* confdefs.h. */
15590_ACEOF
15591cat confdefs.h >>conftest.$ac_ext
15592cat >>conftest.$ac_ext <<_ACEOF
15593/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015594#include <pthread.h>
15595 void *foo(void *parm) {
15596 return NULL;
15597 }
15598 main() {
15599 pthread_attr_t attr;
15600 pthread_t id;
15601 if (pthread_attr_init(&attr)) exit(-1);
15602 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
15603 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
15604 exit(0);
15605 }
15606_ACEOF
15607rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015608if { (ac_try="$ac_link"
15609case "(($ac_try" in
15610 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15611 *) ac_try_echo=$ac_try;;
15612esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015613eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015614 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015615 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015617 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015618 { (case "(($ac_try" in
15619 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15620 *) ac_try_echo=$ac_try;;
15621esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015622eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015623 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015624 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015626 (exit $ac_status); }; }; then
15627 ac_cv_pthread_system_supported=yes
15628else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015629 echo "$as_me: program exited with status $ac_status" >&5
15630echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015631sed 's/^/| /' conftest.$ac_ext >&5
15632
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015633( exit $ac_status )
15634ac_cv_pthread_system_supported=no
15635fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015636rm -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 +000015637fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015638
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015639
15640
Guido van Rossum627b2d71993-12-24 10:39:16 +000015641fi
15642
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015643 { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
15644echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015645 if test "$ac_cv_pthread_system_supported" = "yes"; then
15646
15647cat >>confdefs.h <<\_ACEOF
15648#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
15649_ACEOF
15650
15651 fi
15652
15653for ac_func in pthread_sigmask
15654do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015655as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15656{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15657echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015658if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015659 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015660else
15661 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015662/* confdefs.h. */
15663_ACEOF
15664cat confdefs.h >>conftest.$ac_ext
15665cat >>conftest.$ac_ext <<_ACEOF
15666/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015667/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15668 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15669#define $ac_func innocuous_$ac_func
15670
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015671/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015672 which can conflict with char $ac_func (); below.
15673 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015674 <limits.h> exists even on freestanding compilers. */
15675
15676#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015677# include <limits.h>
15678#else
15679# include <assert.h>
15680#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015681
15682#undef $ac_func
15683
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015684/* Override any GCC internal prototype to avoid an error.
15685 Use char because int might match the return type of a GCC
15686 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015687#ifdef __cplusplus
15688extern "C"
15689#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015690char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015691/* The GNU C library defines this for functions which it implements
15692 to always fail with ENOSYS. Some functions are actually named
15693 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015694#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015695choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015696#endif
15697
Skip Montanaro6dead952003-09-25 14:50:04 +000015698int
15699main ()
15700{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015701return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015702 ;
15703 return 0;
15704}
15705_ACEOF
15706rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015707if { (ac_try="$ac_link"
15708case "(($ac_try" in
15709 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15710 *) ac_try_echo=$ac_try;;
15711esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015712eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015713 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015714 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015715 grep -v '^ *+' conftest.er1 >conftest.err
15716 rm -f conftest.er1
15717 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015719 (exit $ac_status); } && {
15720 test -z "$ac_c_werror_flag" ||
15721 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015722 } && test -s conftest$ac_exeext &&
15723 $as_test_x conftest$ac_exeext; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015724 eval "$as_ac_var=yes"
15725else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015726 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015727sed 's/^/| /' conftest.$ac_ext >&5
15728
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015729 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015730fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015731
15732rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015733 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015734fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015735ac_res=`eval echo '${'$as_ac_var'}'`
15736 { echo "$as_me:$LINENO: result: $ac_res" >&5
15737echo "${ECHO_T}$ac_res" >&6; }
15738if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015739 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015740#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015741_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000015742 case $ac_sys_system in
15743 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015744
Jason Tishlerfac083d2003-07-22 15:20:49 +000015745cat >>confdefs.h <<\_ACEOF
15746#define HAVE_BROKEN_PTHREAD_SIGMASK 1
15747_ACEOF
15748
15749 ;;
15750 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015751fi
15752done
15753
15754fi
15755
15756
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015757# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000015758
15759
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015760{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
15761echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015762# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015763if test "${enable_ipv6+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015764 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015765 no)
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 ;;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015770 *) { echo "$as_me:$LINENO: result: yes" >&5
15771echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015772 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015773#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015774_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015775
15776 ipv6=yes
15777 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015778 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015779else
Martin v. Löwis11437992002-04-12 09:54:03 +000015780
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015781 if test "$cross_compiling" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015782 { echo "$as_me:$LINENO: result: no" >&5
15783echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015784 ipv6=no
15785
15786else
Martin v. Löwis11437992002-04-12 09:54:03 +000015787 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015788/* confdefs.h. */
15789_ACEOF
15790cat confdefs.h >>conftest.$ac_ext
15791cat >>conftest.$ac_ext <<_ACEOF
15792/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015793 /* AF_INET6 available check */
15794#include <sys/types.h>
15795#include <sys/socket.h>
15796main()
15797{
15798 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
15799 exit(1);
15800 else
15801 exit(0);
15802}
15803
Martin v. Löwis11437992002-04-12 09:54:03 +000015804_ACEOF
15805rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015806if { (ac_try="$ac_link"
15807case "(($ac_try" in
15808 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15809 *) ac_try_echo=$ac_try;;
15810esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015811eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015812 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015813 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015815 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015816 { (case "(($ac_try" in
15817 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15818 *) ac_try_echo=$ac_try;;
15819esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015820eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015821 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015822 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015824 (exit $ac_status); }; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015825 { echo "$as_me:$LINENO: result: yes" >&5
15826echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015827 ipv6=yes
15828else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015829 echo "$as_me: program exited with status $ac_status" >&5
15830echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015831sed 's/^/| /' conftest.$ac_ext >&5
15832
Martin v. Löwis11437992002-04-12 09:54:03 +000015833( exit $ac_status )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015834{ echo "$as_me:$LINENO: result: no" >&5
15835echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015836 ipv6=no
15837fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015838rm -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 +000015839fi
15840
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015841
15842
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015843if test "$ipv6" = "yes"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015844 { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
15845echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015846 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015847/* confdefs.h. */
15848_ACEOF
15849cat confdefs.h >>conftest.$ac_ext
15850cat >>conftest.$ac_ext <<_ACEOF
15851/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015852#include <sys/types.h>
15853#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015854int
15855main ()
15856{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015857struct sockaddr_in6 x;
15858x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000015859 ;
15860 return 0;
15861}
15862_ACEOF
15863rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015864if { (ac_try="$ac_compile"
15865case "(($ac_try" in
15866 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15867 *) ac_try_echo=$ac_try;;
15868esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015869eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015870 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015871 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015872 grep -v '^ *+' conftest.er1 >conftest.err
15873 rm -f conftest.er1
15874 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015876 (exit $ac_status); } && {
15877 test -z "$ac_c_werror_flag" ||
15878 test ! -s conftest.err
15879 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015880 { echo "$as_me:$LINENO: result: yes" >&5
15881echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015882 ipv6=yes
15883else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015884 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015885sed 's/^/| /' conftest.$ac_ext >&5
15886
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015887 { echo "$as_me:$LINENO: result: no" >&5
15888echo "${ECHO_T}no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015889 ipv6=no
15890fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015891
15892rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015893fi
15894
15895if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015896 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015897#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015898_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015899
15900fi
15901
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015902fi
15903
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015904
15905ipv6type=unknown
15906ipv6lib=none
15907ipv6trylibc=no
15908
15909if test "$ipv6" = "yes"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000015910 { echo "$as_me:$LINENO: checking ipv6 stack type" >&5
15911echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000015912 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
15913 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015914 case $i in
15915 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000015916 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015917/* confdefs.h. */
15918_ACEOF
15919cat confdefs.h >>conftest.$ac_ext
15920cat >>conftest.$ac_ext <<_ACEOF
15921/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015922
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015923#include <netinet/in.h>
15924#ifdef IPV6_INRIA_VERSION
15925yes
15926#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015927_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015928if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015929 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000015930 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015931fi
Benjamin Petersone7e59c22010-03-23 21:05:56 +000015932rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015933
15934 ;;
15935 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000015936 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015937/* confdefs.h. */
15938_ACEOF
15939cat confdefs.h >>conftest.$ac_ext
15940cat >>conftest.$ac_ext <<_ACEOF
15941/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015942
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015943#include <netinet/in.h>
15944#ifdef __KAME__
15945yes
15946#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015947_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015948if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015949 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015950 ipv6type=$i;
15951 ipv6lib=inet6
15952 ipv6libdir=/usr/local/v6/lib
15953 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015954fi
Benjamin Petersone7e59c22010-03-23 21:05:56 +000015955rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015956
15957 ;;
15958 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000015959 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015960/* confdefs.h. */
15961_ACEOF
15962cat confdefs.h >>conftest.$ac_ext
15963cat >>conftest.$ac_ext <<_ACEOF
15964/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015965
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015966#include <features.h>
15967#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
15968yes
15969#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015970_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015971if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015972 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015973 ipv6type=$i;
15974 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015975fi
Benjamin Petersone7e59c22010-03-23 21:05:56 +000015976rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015977
15978 ;;
15979 linux-inet6)
15980 if test -d /usr/inet6; then
15981 ipv6type=$i
15982 ipv6lib=inet6
15983 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000015984 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015985 fi
15986 ;;
15987 solaris)
15988 if test -f /etc/netconfig; then
15989 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
15990 ipv6type=$i
15991 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015992 fi
15993 fi
15994 ;;
15995 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000015996 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015997/* confdefs.h. */
15998_ACEOF
15999cat confdefs.h >>conftest.$ac_ext
16000cat >>conftest.$ac_ext <<_ACEOF
16001/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016002
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016003#include <sys/param.h>
16004#ifdef _TOSHIBA_INET6
16005yes
16006#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016007_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016008if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016009 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016010 ipv6type=$i;
16011 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000016012 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016013fi
Benjamin Petersone7e59c22010-03-23 21:05:56 +000016014rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016015
16016 ;;
16017 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000016018 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016019/* confdefs.h. */
16020_ACEOF
16021cat confdefs.h >>conftest.$ac_ext
16022cat >>conftest.$ac_ext <<_ACEOF
16023/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016024
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016025#include </usr/local/v6/include/sys/v6config.h>
16026#ifdef __V6D__
16027yes
16028#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016029_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016030if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016031 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016032 ipv6type=$i;
16033 ipv6lib=v6;
16034 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000016035 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016036fi
Benjamin Petersone7e59c22010-03-23 21:05:56 +000016037rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016038
16039 ;;
16040 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000016041 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016042/* confdefs.h. */
16043_ACEOF
16044cat confdefs.h >>conftest.$ac_ext
16045cat >>conftest.$ac_ext <<_ACEOF
16046/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016047
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016048#include <sys/param.h>
16049#ifdef _ZETA_MINAMI_INET6
16050yes
16051#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016052_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016053if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016054 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016055 ipv6type=$i;
16056 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000016057 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016058fi
Benjamin Petersone7e59c22010-03-23 21:05:56 +000016059rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016060
16061 ;;
16062 esac
16063 if test "$ipv6type" != "unknown"; then
16064 break
16065 fi
16066 done
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016067 { echo "$as_me:$LINENO: result: $ipv6type" >&5
16068echo "${ECHO_T}$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016069fi
16070
16071if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
16072 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
16073 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
16074 echo "using lib$ipv6lib"
16075 else
16076 if test $ipv6trylibc = "yes"; then
16077 echo "using libc"
16078 else
16079 echo 'Fatal: no $ipv6lib library found. cannot continue.'
16080 echo "You need to fetch lib$ipv6lib.a from appropriate"
16081 echo 'ipv6 kit and compile beforehand.'
16082 exit 1
16083 fi
16084 fi
16085fi
16086
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016087{ echo "$as_me:$LINENO: checking for OSX 10.5 SDK or later" >&5
16088echo $ECHO_N "checking for OSX 10.5 SDK or later... $ECHO_C" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000016089cat >conftest.$ac_ext <<_ACEOF
16090/* confdefs.h. */
16091_ACEOF
16092cat confdefs.h >>conftest.$ac_ext
16093cat >>conftest.$ac_ext <<_ACEOF
16094/* end confdefs.h. */
16095#include <Carbon/Carbon.h>
16096int
16097main ()
16098{
16099FSIORefNum fRef = 0
16100 ;
16101 return 0;
16102}
16103_ACEOF
16104rm -f conftest.$ac_objext
16105if { (ac_try="$ac_compile"
16106case "(($ac_try" in
16107 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16108 *) ac_try_echo=$ac_try;;
16109esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016110eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000016111 (eval "$ac_compile") 2>conftest.er1
16112 ac_status=$?
16113 grep -v '^ *+' conftest.er1 >conftest.err
16114 rm -f conftest.er1
16115 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016116 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000016117 (exit $ac_status); } && {
16118 test -z "$ac_c_werror_flag" ||
16119 test ! -s conftest.err
16120 } && test -s conftest.$ac_objext; then
16121
16122cat >>confdefs.h <<\_ACEOF
16123#define HAVE_OSX105_SDK 1
16124_ACEOF
16125
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016126 { echo "$as_me:$LINENO: result: yes" >&5
16127echo "${ECHO_T}yes" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000016128else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016129 echo "$as_me: failed program was:" >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000016130sed 's/^/| /' conftest.$ac_ext >&5
16131
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016132 { echo "$as_me:$LINENO: result: no" >&5
16133echo "${ECHO_T}no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000016134
16135fi
16136
16137rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16138
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016139# Check for --with-doc-strings
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016140{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
16141echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016142
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016143# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016144if test "${with_doc_strings+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016145 withval=$with_doc_strings;
16146fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016147
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016148
16149if test -z "$with_doc_strings"
16150then with_doc_strings="yes"
16151fi
16152if test "$with_doc_strings" != "no"
16153then
16154
16155cat >>confdefs.h <<\_ACEOF
16156#define WITH_DOC_STRINGS 1
16157_ACEOF
16158
16159fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016160{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
16161echo "${ECHO_T}$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016162
Neil Schemenauera35c6882001-02-27 04:45:05 +000016163# Check for Python-specific malloc support
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016164{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
16165echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016166
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016167# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016168if test "${with_tsc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016169 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016170if test "$withval" != no
16171then
16172
16173cat >>confdefs.h <<\_ACEOF
16174#define WITH_TSC 1
16175_ACEOF
16176
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016177 { echo "$as_me:$LINENO: result: yes" >&5
16178echo "${ECHO_T}yes" >&6; }
16179else { echo "$as_me:$LINENO: result: no" >&5
16180echo "${ECHO_T}no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016181fi
16182else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016183 { echo "$as_me:$LINENO: result: no" >&5
16184echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016185fi
16186
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016187
16188# Check for Python-specific malloc support
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016189{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
16190echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016191
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016192# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000016193if test "${with_pymalloc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016194 withval=$with_pymalloc;
16195fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016196
Neil Schemenauera35c6882001-02-27 04:45:05 +000016197
Neil Schemenauer16c22972002-03-22 15:34:49 +000016198if test -z "$with_pymalloc"
16199then with_pymalloc="yes"
16200fi
16201if test "$with_pymalloc" != "no"
16202then
Martin v. Löwis11437992002-04-12 09:54:03 +000016203
16204cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000016205#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016206_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000016207
16208fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016209{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
16210echo "${ECHO_T}$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000016211
Barry Warsawef82cd72000-06-30 16:21:01 +000016212# Check for --with-wctype-functions
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016213{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
16214echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016215
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016216# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000016217if test "${with_wctype_functions+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016218 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000016219if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000016220then
16221
16222cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000016223#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016224_ACEOF
16225
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016226 { echo "$as_me:$LINENO: result: yes" >&5
16227echo "${ECHO_T}yes" >&6; }
16228else { echo "$as_me:$LINENO: result: no" >&5
16229echo "${ECHO_T}no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000016230fi
16231else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016232 { echo "$as_me:$LINENO: result: no" >&5
16233echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016234fi
16235
Barry Warsawef82cd72000-06-30 16:21:01 +000016236
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016237# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000016238
Guido van Rossum98935bf2001-09-05 19:13:16 +000016239DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000016240
Guido van Rossume97ee181999-12-20 21:27:22 +000016241# the dlopen() function means we might want to use dynload_shlib.o. some
16242# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000016243
Thomas Wouters3a584202000-08-05 23:28:51 +000016244for ac_func in dlopen
16245do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016246as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16247{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16248echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016249if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016250 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000016251else
Martin v. Löwis11437992002-04-12 09:54:03 +000016252 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016253/* confdefs.h. */
16254_ACEOF
16255cat confdefs.h >>conftest.$ac_ext
16256cat >>conftest.$ac_ext <<_ACEOF
16257/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016258/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16259 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16260#define $ac_func innocuous_$ac_func
16261
Guido van Rossume97ee181999-12-20 21:27:22 +000016262/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016263 which can conflict with char $ac_func (); below.
16264 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016265 <limits.h> exists even on freestanding compilers. */
16266
16267#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016268# include <limits.h>
16269#else
16270# include <assert.h>
16271#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016272
16273#undef $ac_func
16274
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016275/* Override any GCC internal prototype to avoid an error.
16276 Use char because int might match the return type of a GCC
16277 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016278#ifdef __cplusplus
16279extern "C"
16280#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016281char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000016282/* The GNU C library defines this for functions which it implements
16283 to always fail with ENOSYS. Some functions are actually named
16284 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016285#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000016286choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000016287#endif
16288
Skip Montanaro6dead952003-09-25 14:50:04 +000016289int
16290main ()
16291{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016292return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016293 ;
16294 return 0;
16295}
16296_ACEOF
16297rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016298if { (ac_try="$ac_link"
16299case "(($ac_try" in
16300 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16301 *) ac_try_echo=$ac_try;;
16302esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016303eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016304 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016305 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016306 grep -v '^ *+' conftest.er1 >conftest.err
16307 rm -f conftest.er1
16308 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016310 (exit $ac_status); } && {
16311 test -z "$ac_c_werror_flag" ||
16312 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016313 } && test -s conftest$ac_exeext &&
16314 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016315 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016316else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016317 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016318sed 's/^/| /' conftest.$ac_ext >&5
16319
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016320 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016321fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016322
16323rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016324 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016325fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016326ac_res=`eval echo '${'$as_ac_var'}'`
16327 { echo "$as_me:$LINENO: result: $ac_res" >&5
16328echo "${ECHO_T}$ac_res" >&6; }
16329if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016330 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016331#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016332_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016333
Guido van Rossume97ee181999-12-20 21:27:22 +000016334fi
Thomas Wouters3a584202000-08-05 23:28:51 +000016335done
Guido van Rossume97ee181999-12-20 21:27:22 +000016336
Michael W. Hudson54241132001-12-07 15:38:26 +000016337
Guido van Rossume97ee181999-12-20 21:27:22 +000016338# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
16339# loading of modules.
16340
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016341{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
16342echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000016343if test -z "$DYNLOADFILE"
16344then
16345 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000016346 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
16347 if test "$ac_cv_func_dlopen" = yes
16348 then DYNLOADFILE="dynload_shlib.o"
16349 else DYNLOADFILE="dynload_aix.o"
16350 fi
16351 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000016352 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016353 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
16354 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016355 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000016356 *)
16357 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
16358 # out any dynamic loading
16359 if test "$ac_cv_func_dlopen" = yes
16360 then DYNLOADFILE="dynload_shlib.o"
16361 else DYNLOADFILE="dynload_stub.o"
16362 fi
16363 ;;
16364 esac
16365fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016366{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
16367echo "${ECHO_T}$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000016368if test "$DYNLOADFILE" != "dynload_stub.o"
16369then
Martin v. Löwis11437992002-04-12 09:54:03 +000016370
16371cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016372#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016373_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016374
16375fi
16376
Neil Schemenauer4e425612001-06-19 15:44:15 +000016377# MACHDEP_OBJS can be set to platform-specific object files needed by Python
16378
Michael W. Hudson54241132001-12-07 15:38:26 +000016379
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016380{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
16381echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000016382if test -z "$MACHDEP_OBJS"
16383then
Jack Jansene578a632001-08-15 01:27:14 +000016384 MACHDEP_OBJS=$extra_machdep_objs
16385else
16386 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000016387fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016388{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
16389echo "${ECHO_T}MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000016390
Guido van Rossum627b2d71993-12-24 10:39:16 +000016391# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000016392
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
16447
16448
16449
16450
16451
16452
16453
16454
16455
16456
16457
16458
16459
16460
16461
16462
Martin v. Löwisd6320502004-08-12 13:45:08 +000016463
Martin v. Löwisc3001752005-01-23 09:27:24 +000016464
16465
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016466
16467
Thomas Wouterscf297e42007-02-23 15:07:44 +000016468
16469
Gregory P. Smith25523d22007-09-03 16:44:55 +000016470
Christian Heimes4e30a842007-11-30 22:12:06 +000016471
Martin v. Löwis92fab752008-03-08 10:40:41 +000016472
Martin v. Löwis823725e2008-03-24 13:39:54 +000016473
16474
Benjamin Peterson965ce872009-04-05 21:24:58 +000016475
16476
16477
16478
Martin v. Löwis011e8422009-05-05 04:43:17 +000016479
Martin v. Löwis113a0852009-05-29 17:25:39 +000016480
Martin v. Löwis823725e2008-03-24 13:39:54 +000016481for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
16482 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000016483 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwisc3001752005-01-23 09:27:24 +000016484 getpriority getpwent getspnam getspent getsid getwd \
Martin v. Löwis011e8422009-05-05 04:43:17 +000016485 kill killpg lchmod lchown lstat mbrtowc mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000016486 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000016487 putenv readlink realpath \
Benjamin Peterson965ce872009-04-05 21:24:58 +000016488 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
16489 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000016490 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Gregory P. Smith25523d22007-09-03 16:44:55 +000016491 sigaction siginterrupt sigrelse strftime strlcpy \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000016492 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis113a0852009-05-29 17:25:39 +000016493 truncate uname unsetenv utimes waitpid wait3 wait4 \
16494 wcscoll wcsftime wcsxfrm _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000016495do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016496as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16497{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16498echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016499if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016500 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016501else
Martin v. Löwis11437992002-04-12 09:54:03 +000016502 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016503/* confdefs.h. */
16504_ACEOF
16505cat confdefs.h >>conftest.$ac_ext
16506cat >>conftest.$ac_ext <<_ACEOF
16507/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016508/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16509 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16510#define $ac_func innocuous_$ac_func
16511
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016512/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016513 which can conflict with char $ac_func (); below.
16514 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016515 <limits.h> exists even on freestanding compilers. */
16516
16517#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016518# include <limits.h>
16519#else
16520# include <assert.h>
16521#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016522
16523#undef $ac_func
16524
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016525/* Override any GCC internal prototype to avoid an error.
16526 Use char because int might match the return type of a GCC
16527 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016528#ifdef __cplusplus
16529extern "C"
16530#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016531char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000016532/* The GNU C library defines this for functions which it implements
16533 to always fail with ENOSYS. Some functions are actually named
16534 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016535#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000016536choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000016537#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016538
Skip Montanaro6dead952003-09-25 14:50:04 +000016539int
16540main ()
16541{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016542return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016543 ;
16544 return 0;
16545}
16546_ACEOF
16547rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016548if { (ac_try="$ac_link"
16549case "(($ac_try" in
16550 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16551 *) ac_try_echo=$ac_try;;
16552esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016553eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016554 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016555 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016556 grep -v '^ *+' conftest.er1 >conftest.err
16557 rm -f conftest.er1
16558 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016560 (exit $ac_status); } && {
16561 test -z "$ac_c_werror_flag" ||
16562 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016563 } && test -s conftest$ac_exeext &&
16564 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016565 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016566else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016567 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016568sed 's/^/| /' conftest.$ac_ext >&5
16569
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016570 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016571fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016572
16573rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016574 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016575fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016576ac_res=`eval echo '${'$as_ac_var'}'`
16577 { echo "$as_me:$LINENO: result: $ac_res" >&5
16578echo "${ECHO_T}$ac_res" >&6; }
16579if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016580 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016581#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016582_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000016583
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016584fi
16585done
16586
Michael W. Hudson54241132001-12-07 15:38:26 +000016587
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016588# For some functions, having a definition is not sufficient, since
16589# we want to take their address.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016590{ echo "$as_me:$LINENO: checking for chroot" >&5
16591echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016592cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016593/* confdefs.h. */
16594_ACEOF
16595cat confdefs.h >>conftest.$ac_ext
16596cat >>conftest.$ac_ext <<_ACEOF
16597/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016598#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016599int
16600main ()
16601{
16602void *x=chroot
16603 ;
16604 return 0;
16605}
16606_ACEOF
16607rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016608if { (ac_try="$ac_compile"
16609case "(($ac_try" in
16610 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16611 *) ac_try_echo=$ac_try;;
16612esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016613eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016614 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016615 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016616 grep -v '^ *+' conftest.er1 >conftest.err
16617 rm -f conftest.er1
16618 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016620 (exit $ac_status); } && {
16621 test -z "$ac_c_werror_flag" ||
16622 test ! -s conftest.err
16623 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016624
16625cat >>confdefs.h <<\_ACEOF
16626#define HAVE_CHROOT 1
16627_ACEOF
16628
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016629 { echo "$as_me:$LINENO: result: yes" >&5
16630echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016631else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016632 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016633sed 's/^/| /' conftest.$ac_ext >&5
16634
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016635 { echo "$as_me:$LINENO: result: no" >&5
16636echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016637
16638fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016639
16640rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016641{ echo "$as_me:$LINENO: checking for link" >&5
16642echo $ECHO_N "checking for link... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016643cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016644/* confdefs.h. */
16645_ACEOF
16646cat confdefs.h >>conftest.$ac_ext
16647cat >>conftest.$ac_ext <<_ACEOF
16648/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016649#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016650int
16651main ()
16652{
16653void *x=link
16654 ;
16655 return 0;
16656}
16657_ACEOF
16658rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016659if { (ac_try="$ac_compile"
16660case "(($ac_try" in
16661 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16662 *) ac_try_echo=$ac_try;;
16663esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016664eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016665 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016666 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016667 grep -v '^ *+' conftest.er1 >conftest.err
16668 rm -f conftest.er1
16669 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016671 (exit $ac_status); } && {
16672 test -z "$ac_c_werror_flag" ||
16673 test ! -s conftest.err
16674 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016675
16676cat >>confdefs.h <<\_ACEOF
16677#define HAVE_LINK 1
16678_ACEOF
16679
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016680 { echo "$as_me:$LINENO: result: yes" >&5
16681echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016682else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016683 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016684sed 's/^/| /' conftest.$ac_ext >&5
16685
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016686 { echo "$as_me:$LINENO: result: no" >&5
16687echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016688
16689fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016690
16691rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016692{ echo "$as_me:$LINENO: checking for symlink" >&5
16693echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016694cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016695/* confdefs.h. */
16696_ACEOF
16697cat confdefs.h >>conftest.$ac_ext
16698cat >>conftest.$ac_ext <<_ACEOF
16699/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016700#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016701int
16702main ()
16703{
16704void *x=symlink
16705 ;
16706 return 0;
16707}
16708_ACEOF
16709rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016710if { (ac_try="$ac_compile"
16711case "(($ac_try" in
16712 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16713 *) ac_try_echo=$ac_try;;
16714esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016715eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016716 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016717 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016718 grep -v '^ *+' conftest.er1 >conftest.err
16719 rm -f conftest.er1
16720 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016722 (exit $ac_status); } && {
16723 test -z "$ac_c_werror_flag" ||
16724 test ! -s conftest.err
16725 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016726
16727cat >>confdefs.h <<\_ACEOF
16728#define HAVE_SYMLINK 1
16729_ACEOF
16730
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016731 { echo "$as_me:$LINENO: result: yes" >&5
16732echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016733else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016734 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016735sed 's/^/| /' conftest.$ac_ext >&5
16736
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016737 { echo "$as_me:$LINENO: result: no" >&5
16738echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016739
16740fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016741
16742rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016743{ echo "$as_me:$LINENO: checking for fchdir" >&5
16744echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016745cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016746/* confdefs.h. */
16747_ACEOF
16748cat confdefs.h >>conftest.$ac_ext
16749cat >>conftest.$ac_ext <<_ACEOF
16750/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016751#include <unistd.h>
16752int
16753main ()
16754{
16755void *x=fchdir
16756 ;
16757 return 0;
16758}
16759_ACEOF
16760rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016761if { (ac_try="$ac_compile"
16762case "(($ac_try" in
16763 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16764 *) ac_try_echo=$ac_try;;
16765esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016766eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016767 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016768 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016769 grep -v '^ *+' conftest.er1 >conftest.err
16770 rm -f conftest.er1
16771 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016773 (exit $ac_status); } && {
16774 test -z "$ac_c_werror_flag" ||
16775 test ! -s conftest.err
16776 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016777
16778cat >>confdefs.h <<\_ACEOF
16779#define HAVE_FCHDIR 1
16780_ACEOF
16781
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016782 { echo "$as_me:$LINENO: result: yes" >&5
16783echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016784else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016785 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016786sed 's/^/| /' conftest.$ac_ext >&5
16787
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016788 { echo "$as_me:$LINENO: result: no" >&5
16789echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016790
16791fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016792
16793rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016794{ echo "$as_me:$LINENO: checking for fsync" >&5
16795echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016796cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016797/* confdefs.h. */
16798_ACEOF
16799cat confdefs.h >>conftest.$ac_ext
16800cat >>conftest.$ac_ext <<_ACEOF
16801/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016802#include <unistd.h>
16803int
16804main ()
16805{
16806void *x=fsync
16807 ;
16808 return 0;
16809}
16810_ACEOF
16811rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016812if { (ac_try="$ac_compile"
16813case "(($ac_try" in
16814 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16815 *) ac_try_echo=$ac_try;;
16816esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016817eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016818 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016819 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016820 grep -v '^ *+' conftest.er1 >conftest.err
16821 rm -f conftest.er1
16822 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016824 (exit $ac_status); } && {
16825 test -z "$ac_c_werror_flag" ||
16826 test ! -s conftest.err
16827 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016828
16829cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016830#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016831_ACEOF
16832
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016833 { echo "$as_me:$LINENO: result: yes" >&5
16834echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016835else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016836 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016837sed 's/^/| /' conftest.$ac_ext >&5
16838
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016839 { echo "$as_me:$LINENO: result: no" >&5
16840echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016841
16842fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016843
16844rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016845{ echo "$as_me:$LINENO: checking for fdatasync" >&5
16846echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016847cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016848/* confdefs.h. */
16849_ACEOF
16850cat confdefs.h >>conftest.$ac_ext
16851cat >>conftest.$ac_ext <<_ACEOF
16852/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016853#include <unistd.h>
16854int
16855main ()
16856{
16857void *x=fdatasync
16858 ;
16859 return 0;
16860}
16861_ACEOF
16862rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016863if { (ac_try="$ac_compile"
16864case "(($ac_try" in
16865 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16866 *) ac_try_echo=$ac_try;;
16867esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016868eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016869 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016870 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016871 grep -v '^ *+' conftest.er1 >conftest.err
16872 rm -f conftest.er1
16873 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016875 (exit $ac_status); } && {
16876 test -z "$ac_c_werror_flag" ||
16877 test ! -s conftest.err
16878 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016879
16880cat >>confdefs.h <<\_ACEOF
16881#define HAVE_FDATASYNC 1
16882_ACEOF
16883
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016884 { echo "$as_me:$LINENO: result: yes" >&5
16885echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016886else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016887 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016888sed 's/^/| /' conftest.$ac_ext >&5
16889
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016890 { echo "$as_me:$LINENO: result: no" >&5
16891echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016892
16893fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016894
16895rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016896{ echo "$as_me:$LINENO: checking for epoll" >&5
16897echo $ECHO_N "checking for epoll... $ECHO_C" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016898cat >conftest.$ac_ext <<_ACEOF
16899/* confdefs.h. */
16900_ACEOF
16901cat confdefs.h >>conftest.$ac_ext
16902cat >>conftest.$ac_ext <<_ACEOF
16903/* end confdefs.h. */
16904#include <sys/epoll.h>
16905int
16906main ()
16907{
16908void *x=epoll_create
16909 ;
16910 return 0;
16911}
16912_ACEOF
16913rm -f conftest.$ac_objext
16914if { (ac_try="$ac_compile"
16915case "(($ac_try" in
16916 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16917 *) ac_try_echo=$ac_try;;
16918esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016919eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016920 (eval "$ac_compile") 2>conftest.er1
16921 ac_status=$?
16922 grep -v '^ *+' conftest.er1 >conftest.err
16923 rm -f conftest.er1
16924 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016926 (exit $ac_status); } && {
16927 test -z "$ac_c_werror_flag" ||
16928 test ! -s conftest.err
16929 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016930
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016931cat >>confdefs.h <<\_ACEOF
16932#define HAVE_EPOLL 1
16933_ACEOF
16934
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016935 { echo "$as_me:$LINENO: result: yes" >&5
16936echo "${ECHO_T}yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016937else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016938 echo "$as_me: failed program was:" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016939sed 's/^/| /' conftest.$ac_ext >&5
16940
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016941 { echo "$as_me:$LINENO: result: no" >&5
16942echo "${ECHO_T}no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016943
16944fi
16945
16946rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016947{ echo "$as_me:$LINENO: checking for kqueue" >&5
16948echo $ECHO_N "checking for kqueue... $ECHO_C" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016949cat >conftest.$ac_ext <<_ACEOF
16950/* confdefs.h. */
16951_ACEOF
16952cat confdefs.h >>conftest.$ac_ext
16953cat >>conftest.$ac_ext <<_ACEOF
16954/* end confdefs.h. */
16955
16956#include <sys/types.h>
16957#include <sys/event.h>
16958
16959int
16960main ()
16961{
16962int x=kqueue()
16963 ;
16964 return 0;
16965}
16966_ACEOF
16967rm -f conftest.$ac_objext
16968if { (ac_try="$ac_compile"
16969case "(($ac_try" in
16970 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16971 *) ac_try_echo=$ac_try;;
16972esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016973eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016974 (eval "$ac_compile") 2>conftest.er1
16975 ac_status=$?
16976 grep -v '^ *+' conftest.er1 >conftest.err
16977 rm -f conftest.er1
16978 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016979 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016980 (exit $ac_status); } && {
16981 test -z "$ac_c_werror_flag" ||
16982 test ! -s conftest.err
16983 } && test -s conftest.$ac_objext; then
16984
16985cat >>confdefs.h <<\_ACEOF
16986#define HAVE_KQUEUE 1
16987_ACEOF
16988
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016989 { echo "$as_me:$LINENO: result: yes" >&5
16990echo "${ECHO_T}yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016991else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016992 echo "$as_me: failed program was:" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016993sed 's/^/| /' conftest.$ac_ext >&5
16994
Ronald Oussoren5644eb72009-09-20 20:10:02 +000016995 { echo "$as_me:$LINENO: result: no" >&5
16996echo "${ECHO_T}no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016997
16998fi
16999
17000rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000017001# On some systems (eg. FreeBSD 5), we would find a definition of the
17002# functions ctermid_r, setgroups in the library, but no prototype
17003# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
17004# address to avoid compiler warnings and potential miscompilations
17005# because of the missing prototypes.
17006
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017007{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
17008echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017009cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017010/* confdefs.h. */
17011_ACEOF
17012cat confdefs.h >>conftest.$ac_ext
17013cat >>conftest.$ac_ext <<_ACEOF
17014/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000017015
17016#include "confdefs.h"
17017#include <stdio.h>
17018
Martin v. Löwisd5843682002-11-21 20:41:28 +000017019int
17020main ()
17021{
17022void* p = ctermid_r
17023 ;
17024 return 0;
17025}
17026_ACEOF
17027rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017028if { (ac_try="$ac_compile"
17029case "(($ac_try" in
17030 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17031 *) ac_try_echo=$ac_try;;
17032esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017033eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017034 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000017035 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017036 grep -v '^ *+' conftest.er1 >conftest.err
17037 rm -f conftest.er1
17038 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017040 (exit $ac_status); } && {
17041 test -z "$ac_c_werror_flag" ||
17042 test ! -s conftest.err
17043 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000017044
17045cat >>confdefs.h <<\_ACEOF
17046#define HAVE_CTERMID_R 1
17047_ACEOF
17048
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017049 { echo "$as_me:$LINENO: result: yes" >&5
17050echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017051else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017052 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017053sed 's/^/| /' conftest.$ac_ext >&5
17054
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017055 { echo "$as_me:$LINENO: result: no" >&5
17056echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017057
17058fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017059
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017060rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17061
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017062{ echo "$as_me:$LINENO: checking for flock" >&5
17063echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017064cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017065/* confdefs.h. */
17066_ACEOF
17067cat confdefs.h >>conftest.$ac_ext
17068cat >>conftest.$ac_ext <<_ACEOF
17069/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017070
17071#include "confdefs.h"
17072#include <sys/file.h>
17073
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017074int
17075main ()
17076{
17077void* p = flock
17078 ;
17079 return 0;
17080}
17081_ACEOF
17082rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017083if { (ac_try="$ac_compile"
17084case "(($ac_try" in
17085 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17086 *) ac_try_echo=$ac_try;;
17087esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017088eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017089 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017090 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017091 grep -v '^ *+' conftest.er1 >conftest.err
17092 rm -f conftest.er1
17093 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017095 (exit $ac_status); } && {
17096 test -z "$ac_c_werror_flag" ||
17097 test ! -s conftest.err
17098 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017099
17100cat >>confdefs.h <<\_ACEOF
17101#define HAVE_FLOCK 1
17102_ACEOF
17103
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017104 { echo "$as_me:$LINENO: result: yes" >&5
17105echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017106else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017107 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017108sed 's/^/| /' conftest.$ac_ext >&5
17109
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017110 { echo "$as_me:$LINENO: result: no" >&5
17111echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017112
17113fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017114
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017115rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17116
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017117{ echo "$as_me:$LINENO: checking for getpagesize" >&5
17118echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017119cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017120/* confdefs.h. */
17121_ACEOF
17122cat confdefs.h >>conftest.$ac_ext
17123cat >>conftest.$ac_ext <<_ACEOF
17124/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017125
17126#include "confdefs.h"
17127#include <unistd.h>
17128
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017129int
17130main ()
17131{
17132void* p = getpagesize
17133 ;
17134 return 0;
17135}
17136_ACEOF
17137rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017138if { (ac_try="$ac_compile"
17139case "(($ac_try" in
17140 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17141 *) ac_try_echo=$ac_try;;
17142esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017143eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017144 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017145 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017146 grep -v '^ *+' conftest.er1 >conftest.err
17147 rm -f conftest.er1
17148 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017150 (exit $ac_status); } && {
17151 test -z "$ac_c_werror_flag" ||
17152 test ! -s conftest.err
17153 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017154
17155cat >>confdefs.h <<\_ACEOF
17156#define HAVE_GETPAGESIZE 1
17157_ACEOF
17158
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017159 { echo "$as_me:$LINENO: result: yes" >&5
17160echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017161else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017162 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017163sed 's/^/| /' conftest.$ac_ext >&5
17164
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017165 { echo "$as_me:$LINENO: result: no" >&5
17166echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017167
17168fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017169
17170rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017171
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017172for ac_prog in true
17173do
17174 # Extract the first word of "$ac_prog", so it can be a program name with args.
17175set dummy $ac_prog; ac_word=$2
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017176{ echo "$as_me:$LINENO: checking for $ac_word" >&5
17177echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017178if test "${ac_cv_prog_TRUE+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017179 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017180else
17181 if test -n "$TRUE"; then
17182 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
17183else
17184as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17185for as_dir in $PATH
17186do
17187 IFS=$as_save_IFS
17188 test -z "$as_dir" && as_dir=.
17189 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017190 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 +000017191 ac_cv_prog_TRUE="$ac_prog"
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017192 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017193 break 2
17194 fi
17195done
17196done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017197IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017198
17199fi
17200fi
17201TRUE=$ac_cv_prog_TRUE
17202if test -n "$TRUE"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017203 { echo "$as_me:$LINENO: result: $TRUE" >&5
17204echo "${ECHO_T}$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017205else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017206 { echo "$as_me:$LINENO: result: no" >&5
17207echo "${ECHO_T}no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017208fi
17209
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017210
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017211 test -n "$TRUE" && break
17212done
17213test -n "$TRUE" || TRUE="/bin/true"
17214
17215
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017216{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
17217echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017218if test "${ac_cv_lib_c_inet_aton+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017219 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017220else
17221 ac_check_lib_save_LIBS=$LIBS
17222LIBS="-lc $LIBS"
17223cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017224/* confdefs.h. */
17225_ACEOF
17226cat confdefs.h >>conftest.$ac_ext
17227cat >>conftest.$ac_ext <<_ACEOF
17228/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017229
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017230/* Override any GCC internal prototype to avoid an error.
17231 Use char because int might match the return type of a GCC
17232 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017233#ifdef __cplusplus
17234extern "C"
17235#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017236char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017237int
17238main ()
17239{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017240return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017241 ;
17242 return 0;
17243}
17244_ACEOF
17245rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017246if { (ac_try="$ac_link"
17247case "(($ac_try" in
17248 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17249 *) ac_try_echo=$ac_try;;
17250esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017251eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017252 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017253 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017254 grep -v '^ *+' conftest.er1 >conftest.err
17255 rm -f conftest.er1
17256 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017258 (exit $ac_status); } && {
17259 test -z "$ac_c_werror_flag" ||
17260 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017261 } && test -s conftest$ac_exeext &&
17262 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017263 ac_cv_lib_c_inet_aton=yes
17264else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017265 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017266sed 's/^/| /' conftest.$ac_ext >&5
17267
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017268 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017269fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017270
17271rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017272 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017273LIBS=$ac_check_lib_save_LIBS
17274fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017275{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
17276echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
17277if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017278 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017279else
17280
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017281{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
17282echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017283if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017284 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017285else
17286 ac_check_lib_save_LIBS=$LIBS
17287LIBS="-lresolv $LIBS"
17288cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017289/* confdefs.h. */
17290_ACEOF
17291cat confdefs.h >>conftest.$ac_ext
17292cat >>conftest.$ac_ext <<_ACEOF
17293/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017294
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017295/* Override any GCC internal prototype to avoid an error.
17296 Use char because int might match the return type of a GCC
17297 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017298#ifdef __cplusplus
17299extern "C"
17300#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017301char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017302int
17303main ()
17304{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017305return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017306 ;
17307 return 0;
17308}
17309_ACEOF
17310rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017311if { (ac_try="$ac_link"
17312case "(($ac_try" in
17313 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17314 *) ac_try_echo=$ac_try;;
17315esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017316eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017317 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017318 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017319 grep -v '^ *+' conftest.er1 >conftest.err
17320 rm -f conftest.er1
17321 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017323 (exit $ac_status); } && {
17324 test -z "$ac_c_werror_flag" ||
17325 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017326 } && test -s conftest$ac_exeext &&
17327 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017328 ac_cv_lib_resolv_inet_aton=yes
17329else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017330 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017331sed 's/^/| /' conftest.$ac_ext >&5
17332
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017333 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017334fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017335
17336rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017337 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017338LIBS=$ac_check_lib_save_LIBS
17339fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017340{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
17341echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
17342if test $ac_cv_lib_resolv_inet_aton = yes; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017343 cat >>confdefs.h <<_ACEOF
17344#define HAVE_LIBRESOLV 1
17345_ACEOF
17346
17347 LIBS="-lresolv $LIBS"
17348
17349fi
17350
17351
17352fi
17353
17354
Christian Heimesd0764e22007-12-04 15:00:33 +000017355# On Tru64, chflags seems to be present, but calling it will
17356# exit Python
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017357{ echo "$as_me:$LINENO: checking for chflags" >&5
17358echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017359if test "${ac_cv_have_chflags+set}" = set; then
17360 echo $ECHO_N "(cached) $ECHO_C" >&6
17361else
17362 if test "$cross_compiling" = yes; then
17363 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000017364else
17365 cat >conftest.$ac_ext <<_ACEOF
17366/* confdefs.h. */
17367_ACEOF
17368cat confdefs.h >>conftest.$ac_ext
17369cat >>conftest.$ac_ext <<_ACEOF
17370/* end confdefs.h. */
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017371[
Christian Heimesd0764e22007-12-04 15:00:33 +000017372#include <sys/stat.h>
17373#include <unistd.h>
17374int main(int argc, char*argv[])
17375{
17376 if(chflags(argv[0], 0) != 0)
17377 return 1;
17378 return 0;
17379}
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017380]
Christian Heimesd0764e22007-12-04 15:00:33 +000017381_ACEOF
17382rm -f conftest$ac_exeext
17383if { (ac_try="$ac_link"
17384case "(($ac_try" in
17385 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17386 *) ac_try_echo=$ac_try;;
17387esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017388eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017389 (eval "$ac_link") 2>&5
17390 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017392 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17393 { (case "(($ac_try" in
17394 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17395 *) ac_try_echo=$ac_try;;
17396esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017397eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017398 (eval "$ac_try") 2>&5
17399 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017401 (exit $ac_status); }; }; then
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017402 ac_cv_have_chflags=yes
Christian Heimesd0764e22007-12-04 15:00:33 +000017403else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017404 echo "$as_me: program exited with status $ac_status" >&5
17405echo "$as_me: failed program was:" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017406sed 's/^/| /' conftest.$ac_ext >&5
17407
17408( exit $ac_status )
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017409ac_cv_have_chflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000017410fi
17411rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17412fi
17413
17414
17415
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017416fi
17417{ echo "$as_me:$LINENO: result: $ac_cv_have_chflags" >&5
17418echo "${ECHO_T}$ac_cv_have_chflags" >&6; }
17419if test "$ac_cv_have_chflags" = cross ; then
17420 { echo "$as_me:$LINENO: checking for chflags" >&5
17421echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
17422if test "${ac_cv_func_chflags+set}" = set; then
17423 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimesd0764e22007-12-04 15:00:33 +000017424else
17425 cat >conftest.$ac_ext <<_ACEOF
17426/* confdefs.h. */
17427_ACEOF
17428cat confdefs.h >>conftest.$ac_ext
17429cat >>conftest.$ac_ext <<_ACEOF
17430/* end confdefs.h. */
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017431/* Define chflags to an innocuous variant, in case <limits.h> declares chflags.
17432 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17433#define chflags innocuous_chflags
Christian Heimesd0764e22007-12-04 15:00:33 +000017434
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017435/* System header to define __stub macros and hopefully few prototypes,
17436 which can conflict with char chflags (); below.
17437 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17438 <limits.h> exists even on freestanding compilers. */
17439
17440#ifdef __STDC__
17441# include <limits.h>
17442#else
17443# include <assert.h>
17444#endif
17445
17446#undef chflags
17447
17448/* Override any GCC internal prototype to avoid an error.
17449 Use char because int might match the return type of a GCC
17450 builtin and then its argument prototype would still apply. */
17451#ifdef __cplusplus
17452extern "C"
17453#endif
17454char chflags ();
17455/* The GNU C library defines this for functions which it implements
17456 to always fail with ENOSYS. Some functions are actually named
17457 something starting with __ and the normal name is an alias. */
17458#if defined __stub_chflags || defined __stub___chflags
17459choke me
17460#endif
17461
17462int
17463main ()
17464{
17465return chflags ();
17466 ;
17467 return 0;
17468}
17469_ACEOF
17470rm -f conftest.$ac_objext conftest$ac_exeext
17471if { (ac_try="$ac_link"
17472case "(($ac_try" in
17473 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17474 *) ac_try_echo=$ac_try;;
17475esac
17476eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17477 (eval "$ac_link") 2>conftest.er1
17478 ac_status=$?
17479 grep -v '^ *+' conftest.er1 >conftest.err
17480 rm -f conftest.er1
17481 cat conftest.err >&5
17482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17483 (exit $ac_status); } && {
17484 test -z "$ac_c_werror_flag" ||
17485 test ! -s conftest.err
17486 } && test -s conftest$ac_exeext &&
17487 $as_test_x conftest$ac_exeext; then
17488 ac_cv_func_chflags=yes
17489else
17490 echo "$as_me: failed program was:" >&5
17491sed 's/^/| /' conftest.$ac_ext >&5
17492
17493 ac_cv_func_chflags=no
17494fi
17495
17496rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17497 conftest$ac_exeext conftest.$ac_ext
17498fi
17499{ echo "$as_me:$LINENO: result: $ac_cv_func_chflags" >&5
17500echo "${ECHO_T}$ac_cv_func_chflags" >&6; }
17501if test $ac_cv_func_chflags = yes; then
17502 ac_cv_have_chflags="yes"
17503else
17504 ac_cv_have_chflags="no"
17505fi
17506
17507fi
17508if test "$ac_cv_have_chflags" = yes ; then
17509
17510cat >>confdefs.h <<\_ACEOF
17511#define HAVE_CHFLAGS 1
17512_ACEOF
17513
17514fi
17515
17516{ echo "$as_me:$LINENO: checking for lchflags" >&5
17517echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
17518if test "${ac_cv_have_lchflags+set}" = set; then
17519 echo $ECHO_N "(cached) $ECHO_C" >&6
17520else
17521 if test "$cross_compiling" = yes; then
17522 ac_cv_have_lchflags=cross
17523else
17524 cat >conftest.$ac_ext <<_ACEOF
17525/* confdefs.h. */
17526_ACEOF
17527cat confdefs.h >>conftest.$ac_ext
17528cat >>conftest.$ac_ext <<_ACEOF
17529/* end confdefs.h. */
17530[
Christian Heimesd0764e22007-12-04 15:00:33 +000017531#include <sys/stat.h>
17532#include <unistd.h>
17533int main(int argc, char*argv[])
17534{
17535 if(lchflags(argv[0], 0) != 0)
17536 return 1;
17537 return 0;
17538}
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017539]
Christian Heimesd0764e22007-12-04 15:00:33 +000017540_ACEOF
17541rm -f conftest$ac_exeext
17542if { (ac_try="$ac_link"
17543case "(($ac_try" in
17544 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17545 *) ac_try_echo=$ac_try;;
17546esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017547eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017548 (eval "$ac_link") 2>&5
17549 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017551 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17552 { (case "(($ac_try" in
17553 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17554 *) ac_try_echo=$ac_try;;
17555esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017556eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017557 (eval "$ac_try") 2>&5
17558 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017560 (exit $ac_status); }; }; then
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017561 ac_cv_have_lchflags=yes
Christian Heimesd0764e22007-12-04 15:00:33 +000017562else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017563 echo "$as_me: program exited with status $ac_status" >&5
17564echo "$as_me: failed program was:" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017565sed 's/^/| /' conftest.$ac_ext >&5
17566
17567( exit $ac_status )
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017568ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000017569fi
17570rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17571fi
17572
17573
17574
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017575fi
17576{ echo "$as_me:$LINENO: result: $ac_cv_have_lchflags" >&5
17577echo "${ECHO_T}$ac_cv_have_lchflags" >&6; }
17578if test "$ac_cv_have_lchflags" = cross ; then
17579 { echo "$as_me:$LINENO: checking for lchflags" >&5
17580echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
17581if test "${ac_cv_func_lchflags+set}" = set; then
17582 echo $ECHO_N "(cached) $ECHO_C" >&6
17583else
17584 cat >conftest.$ac_ext <<_ACEOF
17585/* confdefs.h. */
17586_ACEOF
17587cat confdefs.h >>conftest.$ac_ext
17588cat >>conftest.$ac_ext <<_ACEOF
17589/* end confdefs.h. */
17590/* Define lchflags to an innocuous variant, in case <limits.h> declares lchflags.
17591 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17592#define lchflags innocuous_lchflags
17593
17594/* System header to define __stub macros and hopefully few prototypes,
17595 which can conflict with char lchflags (); below.
17596 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17597 <limits.h> exists even on freestanding compilers. */
17598
17599#ifdef __STDC__
17600# include <limits.h>
17601#else
17602# include <assert.h>
17603#endif
17604
17605#undef lchflags
17606
17607/* Override any GCC internal prototype to avoid an error.
17608 Use char because int might match the return type of a GCC
17609 builtin and then its argument prototype would still apply. */
17610#ifdef __cplusplus
17611extern "C"
17612#endif
17613char lchflags ();
17614/* The GNU C library defines this for functions which it implements
17615 to always fail with ENOSYS. Some functions are actually named
17616 something starting with __ and the normal name is an alias. */
17617#if defined __stub_lchflags || defined __stub___lchflags
17618choke me
17619#endif
17620
17621int
17622main ()
17623{
17624return lchflags ();
17625 ;
17626 return 0;
17627}
17628_ACEOF
17629rm -f conftest.$ac_objext conftest$ac_exeext
17630if { (ac_try="$ac_link"
17631case "(($ac_try" in
17632 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17633 *) ac_try_echo=$ac_try;;
17634esac
17635eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17636 (eval "$ac_link") 2>conftest.er1
17637 ac_status=$?
17638 grep -v '^ *+' conftest.er1 >conftest.err
17639 rm -f conftest.er1
17640 cat conftest.err >&5
17641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17642 (exit $ac_status); } && {
17643 test -z "$ac_c_werror_flag" ||
17644 test ! -s conftest.err
17645 } && test -s conftest$ac_exeext &&
17646 $as_test_x conftest$ac_exeext; then
17647 ac_cv_func_lchflags=yes
17648else
17649 echo "$as_me: failed program was:" >&5
17650sed 's/^/| /' conftest.$ac_ext >&5
17651
17652 ac_cv_func_lchflags=no
17653fi
17654
17655rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17656 conftest$ac_exeext conftest.$ac_ext
17657fi
17658{ echo "$as_me:$LINENO: result: $ac_cv_func_lchflags" >&5
17659echo "${ECHO_T}$ac_cv_func_lchflags" >&6; }
17660if test $ac_cv_func_lchflags = yes; then
17661 ac_cv_have_lchflags="yes"
17662else
17663 ac_cv_have_lchflags="no"
17664fi
17665
17666fi
17667if test "$ac_cv_have_lchflags" = yes ; then
17668
17669cat >>confdefs.h <<\_ACEOF
17670#define HAVE_LCHFLAGS 1
17671_ACEOF
17672
17673fi
17674
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017675case $ac_sys_system/$ac_sys_release in
17676Darwin/*)
17677 _CUR_CFLAGS="${CFLAGS}"
17678 _CUR_LDFLAGS="${LDFLAGS}"
17679 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
17680 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
17681 ;;
17682esac
17683
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017684{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
17685echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017686if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017687 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017688else
17689 ac_check_lib_save_LIBS=$LIBS
17690LIBS="-lz $LIBS"
17691cat >conftest.$ac_ext <<_ACEOF
17692/* confdefs.h. */
17693_ACEOF
17694cat confdefs.h >>conftest.$ac_ext
17695cat >>conftest.$ac_ext <<_ACEOF
17696/* end confdefs.h. */
17697
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017698/* Override any GCC internal prototype to avoid an error.
17699 Use char because int might match the return type of a GCC
17700 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017701#ifdef __cplusplus
17702extern "C"
17703#endif
17704char inflateCopy ();
17705int
17706main ()
17707{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017708return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017709 ;
17710 return 0;
17711}
17712_ACEOF
17713rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017714if { (ac_try="$ac_link"
17715case "(($ac_try" in
17716 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17717 *) ac_try_echo=$ac_try;;
17718esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017719eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017720 (eval "$ac_link") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017721 ac_status=$?
17722 grep -v '^ *+' conftest.er1 >conftest.err
17723 rm -f conftest.er1
17724 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017726 (exit $ac_status); } && {
17727 test -z "$ac_c_werror_flag" ||
17728 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017729 } && test -s conftest$ac_exeext &&
17730 $as_test_x conftest$ac_exeext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017731 ac_cv_lib_z_inflateCopy=yes
17732else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017733 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017734sed 's/^/| /' conftest.$ac_ext >&5
17735
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017736 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017737fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017738
17739rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017740 conftest$ac_exeext conftest.$ac_ext
17741LIBS=$ac_check_lib_save_LIBS
17742fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017743{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
17744echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6; }
17745if test $ac_cv_lib_z_inflateCopy = yes; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017746
17747cat >>confdefs.h <<\_ACEOF
17748#define HAVE_ZLIB_COPY 1
17749_ACEOF
17750
17751fi
17752
17753
17754case $ac_sys_system/$ac_sys_release in
17755Darwin/*)
17756 CFLAGS="${_CUR_CFLAGS}"
17757 LDFLAGS="${_CUR_LDFLAGS}"
17758 ;;
17759esac
17760
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017761{ echo "$as_me:$LINENO: checking for hstrerror" >&5
17762echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017763cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017764/* confdefs.h. */
17765_ACEOF
17766cat confdefs.h >>conftest.$ac_ext
17767cat >>conftest.$ac_ext <<_ACEOF
17768/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000017769
17770#include "confdefs.h"
17771#include <netdb.h>
17772
Martin v. Löwise9416172003-05-03 10:12:45 +000017773int
17774main ()
17775{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017776void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000017777 ;
17778 return 0;
17779}
17780_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017781rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017782if { (ac_try="$ac_link"
17783case "(($ac_try" in
17784 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17785 *) ac_try_echo=$ac_try;;
17786esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017787eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017788 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000017789 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017790 grep -v '^ *+' conftest.er1 >conftest.err
17791 rm -f conftest.er1
17792 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017794 (exit $ac_status); } && {
17795 test -z "$ac_c_werror_flag" ||
17796 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017797 } && test -s conftest$ac_exeext &&
17798 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000017799
17800cat >>confdefs.h <<\_ACEOF
17801#define HAVE_HSTRERROR 1
17802_ACEOF
17803
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017804 { echo "$as_me:$LINENO: result: yes" >&5
17805echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017806else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017807 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017808sed 's/^/| /' conftest.$ac_ext >&5
17809
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017810 { echo "$as_me:$LINENO: result: no" >&5
17811echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017812
17813fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017814
17815rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017816 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000017817
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017818{ echo "$as_me:$LINENO: checking for inet_aton" >&5
17819echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017820cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017821/* confdefs.h. */
17822_ACEOF
17823cat confdefs.h >>conftest.$ac_ext
17824cat >>conftest.$ac_ext <<_ACEOF
17825/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000017826
17827#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000017828#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000017829#include <sys/socket.h>
17830#include <netinet/in.h>
17831#include <arpa/inet.h>
17832
Martin v. Löwise9416172003-05-03 10:12:45 +000017833int
17834main ()
17835{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017836void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000017837 ;
17838 return 0;
17839}
17840_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017841rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017842if { (ac_try="$ac_link"
17843case "(($ac_try" in
17844 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17845 *) ac_try_echo=$ac_try;;
17846esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017847eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017848 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000017849 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017850 grep -v '^ *+' conftest.er1 >conftest.err
17851 rm -f conftest.er1
17852 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017854 (exit $ac_status); } && {
17855 test -z "$ac_c_werror_flag" ||
17856 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017857 } && test -s conftest$ac_exeext &&
17858 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000017859
17860cat >>confdefs.h <<\_ACEOF
17861#define HAVE_INET_ATON 1
17862_ACEOF
17863
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017864 { echo "$as_me:$LINENO: result: yes" >&5
17865echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017866else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017867 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017868sed 's/^/| /' conftest.$ac_ext >&5
17869
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017870 { echo "$as_me:$LINENO: result: no" >&5
17871echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017872
17873fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017874
17875rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017876 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000017877
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017878{ echo "$as_me:$LINENO: checking for inet_pton" >&5
17879echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017880cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017881/* confdefs.h. */
17882_ACEOF
17883cat confdefs.h >>conftest.$ac_ext
17884cat >>conftest.$ac_ext <<_ACEOF
17885/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000017886
17887#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000017888#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000017889#include <sys/socket.h>
17890#include <netinet/in.h>
17891#include <arpa/inet.h>
17892
Martin v. Löwise9416172003-05-03 10:12:45 +000017893int
17894main ()
17895{
17896void* p = inet_pton
17897 ;
17898 return 0;
17899}
17900_ACEOF
17901rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017902if { (ac_try="$ac_compile"
17903case "(($ac_try" in
17904 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17905 *) ac_try_echo=$ac_try;;
17906esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017907eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017908 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000017909 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017910 grep -v '^ *+' conftest.er1 >conftest.err
17911 rm -f conftest.er1
17912 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017914 (exit $ac_status); } && {
17915 test -z "$ac_c_werror_flag" ||
17916 test ! -s conftest.err
17917 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000017918
17919cat >>confdefs.h <<\_ACEOF
17920#define HAVE_INET_PTON 1
17921_ACEOF
17922
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017923 { echo "$as_me:$LINENO: result: yes" >&5
17924echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017925else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017926 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017927sed 's/^/| /' conftest.$ac_ext >&5
17928
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017929 { echo "$as_me:$LINENO: result: no" >&5
17930echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017931
17932fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017933
17934rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000017935
Martin v. Löwisd6640d42003-07-06 09:29:52 +000017936# On some systems, setgroups is in unistd.h, on others, in grp.h
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017937{ echo "$as_me:$LINENO: checking for setgroups" >&5
17938echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017939cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017940/* confdefs.h. */
17941_ACEOF
17942cat confdefs.h >>conftest.$ac_ext
17943cat >>conftest.$ac_ext <<_ACEOF
17944/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000017945
17946#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000017947#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000017948#ifdef HAVE_GRP_H
17949#include <grp.h>
17950#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000017951
Martin v. Löwisd5843682002-11-21 20:41:28 +000017952int
17953main ()
17954{
17955void* p = setgroups
17956 ;
17957 return 0;
17958}
17959_ACEOF
17960rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017961if { (ac_try="$ac_compile"
17962case "(($ac_try" in
17963 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17964 *) ac_try_echo=$ac_try;;
17965esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017966eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017967 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000017968 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017969 grep -v '^ *+' conftest.er1 >conftest.err
17970 rm -f conftest.er1
17971 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017973 (exit $ac_status); } && {
17974 test -z "$ac_c_werror_flag" ||
17975 test ! -s conftest.err
17976 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000017977
17978cat >>confdefs.h <<\_ACEOF
17979#define HAVE_SETGROUPS 1
17980_ACEOF
17981
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017982 { echo "$as_me:$LINENO: result: yes" >&5
17983echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017984else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017985 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017986sed 's/^/| /' conftest.$ac_ext >&5
17987
Ronald Oussoren5644eb72009-09-20 20:10:02 +000017988 { echo "$as_me:$LINENO: result: no" >&5
17989echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017990
17991fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017992
17993rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000017994
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017995# check for openpty and forkpty
17996
Martin v. Löwis11437992002-04-12 09:54:03 +000017997
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017998for ac_func in openpty
17999do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018000as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18001{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18002echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018003if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018004 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018005else
Martin v. Löwis11437992002-04-12 09:54:03 +000018006 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018007/* confdefs.h. */
18008_ACEOF
18009cat confdefs.h >>conftest.$ac_ext
18010cat >>conftest.$ac_ext <<_ACEOF
18011/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018012/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18013 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18014#define $ac_func innocuous_$ac_func
18015
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018016/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018017 which can conflict with char $ac_func (); below.
18018 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018019 <limits.h> exists even on freestanding compilers. */
18020
18021#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018022# include <limits.h>
18023#else
18024# include <assert.h>
18025#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018026
18027#undef $ac_func
18028
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018029/* Override any GCC internal prototype to avoid an error.
18030 Use char because int might match the return type of a GCC
18031 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018032#ifdef __cplusplus
18033extern "C"
18034#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018035char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018036/* The GNU C library defines this for functions which it implements
18037 to always fail with ENOSYS. Some functions are actually named
18038 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018039#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018040choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018041#endif
18042
Skip Montanaro6dead952003-09-25 14:50:04 +000018043int
18044main ()
18045{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018046return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018047 ;
18048 return 0;
18049}
18050_ACEOF
18051rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018052if { (ac_try="$ac_link"
18053case "(($ac_try" in
18054 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18055 *) ac_try_echo=$ac_try;;
18056esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018057eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018058 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018059 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018060 grep -v '^ *+' conftest.er1 >conftest.err
18061 rm -f conftest.er1
18062 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018064 (exit $ac_status); } && {
18065 test -z "$ac_c_werror_flag" ||
18066 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018067 } && test -s conftest$ac_exeext &&
18068 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018069 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018070else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018071 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018072sed 's/^/| /' conftest.$ac_ext >&5
18073
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018074 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018075fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018076
18077rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018078 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018079fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018080ac_res=`eval echo '${'$as_ac_var'}'`
18081 { echo "$as_me:$LINENO: result: $ac_res" >&5
18082echo "${ECHO_T}$ac_res" >&6; }
18083if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018084 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018085#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018086_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018087
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018088else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018089 { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
18090echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018091if test "${ac_cv_lib_util_openpty+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018092 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000018093else
Martin v. Löwis11437992002-04-12 09:54:03 +000018094 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018095LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000018096cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018097/* confdefs.h. */
18098_ACEOF
18099cat confdefs.h >>conftest.$ac_ext
18100cat >>conftest.$ac_ext <<_ACEOF
18101/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018102
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018103/* Override any GCC internal prototype to avoid an error.
18104 Use char because int might match the return type of a GCC
18105 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018106#ifdef __cplusplus
18107extern "C"
18108#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018109char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018110int
18111main ()
18112{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018113return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018114 ;
18115 return 0;
18116}
18117_ACEOF
18118rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018119if { (ac_try="$ac_link"
18120case "(($ac_try" in
18121 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18122 *) ac_try_echo=$ac_try;;
18123esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018124eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018125 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018126 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018127 grep -v '^ *+' conftest.er1 >conftest.err
18128 rm -f conftest.er1
18129 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018131 (exit $ac_status); } && {
18132 test -z "$ac_c_werror_flag" ||
18133 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018134 } && test -s conftest$ac_exeext &&
18135 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018136 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000018137else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018138 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018139sed 's/^/| /' conftest.$ac_ext >&5
18140
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018141 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018142fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018143
18144rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018145 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018146LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018147fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018148{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
18149echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
18150if test $ac_cv_lib_util_openpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018151 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018152#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018153_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018154 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018155else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018156 { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
18157echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018158if test "${ac_cv_lib_bsd_openpty+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018159 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018160else
18161 ac_check_lib_save_LIBS=$LIBS
18162LIBS="-lbsd $LIBS"
18163cat >conftest.$ac_ext <<_ACEOF
18164/* confdefs.h. */
18165_ACEOF
18166cat confdefs.h >>conftest.$ac_ext
18167cat >>conftest.$ac_ext <<_ACEOF
18168/* end confdefs.h. */
18169
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018170/* Override any GCC internal prototype to avoid an error.
18171 Use char because int might match the return type of a GCC
18172 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018173#ifdef __cplusplus
18174extern "C"
18175#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018176char openpty ();
18177int
18178main ()
18179{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018180return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018181 ;
18182 return 0;
18183}
18184_ACEOF
18185rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018186if { (ac_try="$ac_link"
18187case "(($ac_try" in
18188 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18189 *) ac_try_echo=$ac_try;;
18190esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018191eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018192 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018193 ac_status=$?
18194 grep -v '^ *+' conftest.er1 >conftest.err
18195 rm -f conftest.er1
18196 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018198 (exit $ac_status); } && {
18199 test -z "$ac_c_werror_flag" ||
18200 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018201 } && test -s conftest$ac_exeext &&
18202 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018203 ac_cv_lib_bsd_openpty=yes
18204else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018205 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018206sed 's/^/| /' conftest.$ac_ext >&5
18207
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018208 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018209fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018210
18211rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018212 conftest$ac_exeext conftest.$ac_ext
18213LIBS=$ac_check_lib_save_LIBS
18214fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018215{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
18216echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
18217if test $ac_cv_lib_bsd_openpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018218 cat >>confdefs.h <<\_ACEOF
18219#define HAVE_OPENPTY 1
18220_ACEOF
18221 LIBS="$LIBS -lbsd"
18222fi
18223
18224
18225fi
18226
Fred Drake8cef4cf2000-06-28 16:40:38 +000018227
18228fi
18229done
18230
Martin v. Löwis11437992002-04-12 09:54:03 +000018231
Fred Drake8cef4cf2000-06-28 16:40:38 +000018232for ac_func in forkpty
18233do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018234as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18235{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18236echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018237if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018238 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000018239else
Martin v. Löwis11437992002-04-12 09:54:03 +000018240 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018241/* confdefs.h. */
18242_ACEOF
18243cat confdefs.h >>conftest.$ac_ext
18244cat >>conftest.$ac_ext <<_ACEOF
18245/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018246/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18247 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18248#define $ac_func innocuous_$ac_func
18249
Fred Drake8cef4cf2000-06-28 16:40:38 +000018250/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018251 which can conflict with char $ac_func (); below.
18252 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018253 <limits.h> exists even on freestanding compilers. */
18254
18255#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018256# include <limits.h>
18257#else
18258# include <assert.h>
18259#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018260
18261#undef $ac_func
18262
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018263/* Override any GCC internal prototype to avoid an error.
18264 Use char because int might match the return type of a GCC
18265 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018266#ifdef __cplusplus
18267extern "C"
18268#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018269char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000018270/* The GNU C library defines this for functions which it implements
18271 to always fail with ENOSYS. Some functions are actually named
18272 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018273#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000018274choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000018275#endif
18276
Skip Montanaro6dead952003-09-25 14:50:04 +000018277int
18278main ()
18279{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018280return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018281 ;
18282 return 0;
18283}
18284_ACEOF
18285rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018286if { (ac_try="$ac_link"
18287case "(($ac_try" in
18288 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18289 *) ac_try_echo=$ac_try;;
18290esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018291eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018292 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018293 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018294 grep -v '^ *+' conftest.er1 >conftest.err
18295 rm -f conftest.er1
18296 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018298 (exit $ac_status); } && {
18299 test -z "$ac_c_werror_flag" ||
18300 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018301 } && test -s conftest$ac_exeext &&
18302 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018303 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018304else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018305 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018306sed 's/^/| /' conftest.$ac_ext >&5
18307
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018308 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018309fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018310
18311rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018312 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018313fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018314ac_res=`eval echo '${'$as_ac_var'}'`
18315 { echo "$as_me:$LINENO: result: $ac_res" >&5
18316echo "${ECHO_T}$ac_res" >&6; }
18317if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018318 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018319#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018320_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018321
Fred Drake8cef4cf2000-06-28 16:40:38 +000018322else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018323 { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
18324echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018325if test "${ac_cv_lib_util_forkpty+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018326 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000018327else
Martin v. Löwis11437992002-04-12 09:54:03 +000018328 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018329LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000018330cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018331/* confdefs.h. */
18332_ACEOF
18333cat confdefs.h >>conftest.$ac_ext
18334cat >>conftest.$ac_ext <<_ACEOF
18335/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018336
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018337/* Override any GCC internal prototype to avoid an error.
18338 Use char because int might match the return type of a GCC
18339 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018340#ifdef __cplusplus
18341extern "C"
18342#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018343char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018344int
18345main ()
18346{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018347return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018348 ;
18349 return 0;
18350}
18351_ACEOF
18352rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018353if { (ac_try="$ac_link"
18354case "(($ac_try" in
18355 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18356 *) ac_try_echo=$ac_try;;
18357esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018358eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018359 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018360 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018361 grep -v '^ *+' conftest.er1 >conftest.err
18362 rm -f conftest.er1
18363 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018364 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018365 (exit $ac_status); } && {
18366 test -z "$ac_c_werror_flag" ||
18367 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018368 } && test -s conftest$ac_exeext &&
18369 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018370 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000018371else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018372 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018373sed 's/^/| /' conftest.$ac_ext >&5
18374
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018375 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018376fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018377
18378rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018379 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018380LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018381fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018382{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
18383echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
18384if test $ac_cv_lib_util_forkpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018385 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018386#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018387_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018388 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018389else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018390 { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
18391echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018392if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018393 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018394else
18395 ac_check_lib_save_LIBS=$LIBS
18396LIBS="-lbsd $LIBS"
18397cat >conftest.$ac_ext <<_ACEOF
18398/* confdefs.h. */
18399_ACEOF
18400cat confdefs.h >>conftest.$ac_ext
18401cat >>conftest.$ac_ext <<_ACEOF
18402/* end confdefs.h. */
18403
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018404/* Override any GCC internal prototype to avoid an error.
18405 Use char because int might match the return type of a GCC
18406 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018407#ifdef __cplusplus
18408extern "C"
18409#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018410char forkpty ();
18411int
18412main ()
18413{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018414return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018415 ;
18416 return 0;
18417}
18418_ACEOF
18419rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018420if { (ac_try="$ac_link"
18421case "(($ac_try" in
18422 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18423 *) ac_try_echo=$ac_try;;
18424esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018425eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018426 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018427 ac_status=$?
18428 grep -v '^ *+' conftest.er1 >conftest.err
18429 rm -f conftest.er1
18430 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018432 (exit $ac_status); } && {
18433 test -z "$ac_c_werror_flag" ||
18434 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018435 } && test -s conftest$ac_exeext &&
18436 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018437 ac_cv_lib_bsd_forkpty=yes
18438else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018439 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018440sed 's/^/| /' conftest.$ac_ext >&5
18441
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018442 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018443fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018444
18445rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018446 conftest$ac_exeext conftest.$ac_ext
18447LIBS=$ac_check_lib_save_LIBS
18448fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018449{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
18450echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
18451if test $ac_cv_lib_bsd_forkpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018452 cat >>confdefs.h <<\_ACEOF
18453#define HAVE_FORKPTY 1
18454_ACEOF
18455 LIBS="$LIBS -lbsd"
18456fi
18457
18458
18459fi
18460
Fred Drake8cef4cf2000-06-28 16:40:38 +000018461
18462fi
18463done
18464
Jack Jansendd19cf82001-12-06 22:36:17 +000018465
Christian Heimesb186d002008-03-18 15:15:01 +000018466# Stuff for expat.
18467
18468for ac_func in memmove
18469do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018470as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18471{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18472echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Christian Heimesb186d002008-03-18 15:15:01 +000018473if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018474 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimesb186d002008-03-18 15:15:01 +000018475else
18476 cat >conftest.$ac_ext <<_ACEOF
18477/* confdefs.h. */
18478_ACEOF
18479cat confdefs.h >>conftest.$ac_ext
18480cat >>conftest.$ac_ext <<_ACEOF
18481/* end confdefs.h. */
18482/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18483 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18484#define $ac_func innocuous_$ac_func
18485
18486/* System header to define __stub macros and hopefully few prototypes,
18487 which can conflict with char $ac_func (); below.
18488 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18489 <limits.h> exists even on freestanding compilers. */
18490
18491#ifdef __STDC__
18492# include <limits.h>
18493#else
18494# include <assert.h>
18495#endif
18496
18497#undef $ac_func
18498
18499/* Override any GCC internal prototype to avoid an error.
18500 Use char because int might match the return type of a GCC
18501 builtin and then its argument prototype would still apply. */
18502#ifdef __cplusplus
18503extern "C"
18504#endif
18505char $ac_func ();
18506/* The GNU C library defines this for functions which it implements
18507 to always fail with ENOSYS. Some functions are actually named
18508 something starting with __ and the normal name is an alias. */
18509#if defined __stub_$ac_func || defined __stub___$ac_func
18510choke me
18511#endif
18512
18513int
18514main ()
18515{
18516return $ac_func ();
18517 ;
18518 return 0;
18519}
18520_ACEOF
18521rm -f conftest.$ac_objext conftest$ac_exeext
18522if { (ac_try="$ac_link"
18523case "(($ac_try" in
18524 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18525 *) ac_try_echo=$ac_try;;
18526esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018527eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesb186d002008-03-18 15:15:01 +000018528 (eval "$ac_link") 2>conftest.er1
18529 ac_status=$?
18530 grep -v '^ *+' conftest.er1 >conftest.err
18531 rm -f conftest.er1
18532 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesb186d002008-03-18 15:15:01 +000018534 (exit $ac_status); } && {
18535 test -z "$ac_c_werror_flag" ||
18536 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018537 } && test -s conftest$ac_exeext &&
18538 $as_test_x conftest$ac_exeext; then
Christian Heimesb186d002008-03-18 15:15:01 +000018539 eval "$as_ac_var=yes"
18540else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018541 echo "$as_me: failed program was:" >&5
Christian Heimesb186d002008-03-18 15:15:01 +000018542sed 's/^/| /' conftest.$ac_ext >&5
18543
18544 eval "$as_ac_var=no"
18545fi
18546
18547rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18548 conftest$ac_exeext conftest.$ac_ext
18549fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018550ac_res=`eval echo '${'$as_ac_var'}'`
18551 { echo "$as_me:$LINENO: result: $ac_res" >&5
18552echo "${ECHO_T}$ac_res" >&6; }
18553if test `eval echo '${'$as_ac_var'}'` = yes; then
Christian Heimesb186d002008-03-18 15:15:01 +000018554 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018555#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimesb186d002008-03-18 15:15:01 +000018556_ACEOF
18557
18558fi
18559done
18560
18561
Michael W. Hudson54241132001-12-07 15:38:26 +000018562# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000018563
18564
18565
18566
18567
18568
Fred Drake8cef4cf2000-06-28 16:40:38 +000018569for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
18570do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018571as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18572{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18573echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018574if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018575 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018576else
Martin v. Löwis11437992002-04-12 09:54:03 +000018577 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018578/* confdefs.h. */
18579_ACEOF
18580cat confdefs.h >>conftest.$ac_ext
18581cat >>conftest.$ac_ext <<_ACEOF
18582/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018583/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18584 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18585#define $ac_func innocuous_$ac_func
18586
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018587/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018588 which can conflict with char $ac_func (); below.
18589 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018590 <limits.h> exists even on freestanding compilers. */
18591
18592#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018593# include <limits.h>
18594#else
18595# include <assert.h>
18596#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018597
18598#undef $ac_func
18599
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018600/* Override any GCC internal prototype to avoid an error.
18601 Use char because int might match the return type of a GCC
18602 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018603#ifdef __cplusplus
18604extern "C"
18605#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018606char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018607/* The GNU C library defines this for functions which it implements
18608 to always fail with ENOSYS. Some functions are actually named
18609 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018610#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018611choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018612#endif
18613
Skip Montanaro6dead952003-09-25 14:50:04 +000018614int
18615main ()
18616{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018617return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018618 ;
18619 return 0;
18620}
18621_ACEOF
18622rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018623if { (ac_try="$ac_link"
18624case "(($ac_try" in
18625 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18626 *) ac_try_echo=$ac_try;;
18627esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018628eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018629 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018630 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018631 grep -v '^ *+' conftest.er1 >conftest.err
18632 rm -f conftest.er1
18633 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018635 (exit $ac_status); } && {
18636 test -z "$ac_c_werror_flag" ||
18637 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018638 } && test -s conftest$ac_exeext &&
18639 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018640 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018641else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018642 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018643sed 's/^/| /' conftest.$ac_ext >&5
18644
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018645 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018646fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018647
18648rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018649 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018650fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018651ac_res=`eval echo '${'$as_ac_var'}'`
18652 { echo "$as_me:$LINENO: result: $ac_res" >&5
18653echo "${ECHO_T}$ac_res" >&6; }
18654if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018655 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018656#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018657_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000018658
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018659fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018660done
18661
Michael W. Hudson54241132001-12-07 15:38:26 +000018662
Martin v. Löwis11437992002-04-12 09:54:03 +000018663
18664
18665
Christian Heimesb186d002008-03-18 15:15:01 +000018666for ac_func in dup2 getcwd strdup
Thomas Wouters3a584202000-08-05 23:28:51 +000018667do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018668as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18669{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18670echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018671if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018672 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018673else
Martin v. Löwis11437992002-04-12 09:54:03 +000018674 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018675/* confdefs.h. */
18676_ACEOF
18677cat confdefs.h >>conftest.$ac_ext
18678cat >>conftest.$ac_ext <<_ACEOF
18679/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018680/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18681 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18682#define $ac_func innocuous_$ac_func
18683
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018684/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018685 which can conflict with char $ac_func (); below.
18686 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018687 <limits.h> exists even on freestanding compilers. */
18688
18689#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018690# include <limits.h>
18691#else
18692# include <assert.h>
18693#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018694
18695#undef $ac_func
18696
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018697/* Override any GCC internal prototype to avoid an error.
18698 Use char because int might match the return type of a GCC
18699 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018700#ifdef __cplusplus
18701extern "C"
18702#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018703char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000018704/* The GNU C library defines this for functions which it implements
18705 to always fail with ENOSYS. Some functions are actually named
18706 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018707#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000018708choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000018709#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018710
Skip Montanaro6dead952003-09-25 14:50:04 +000018711int
18712main ()
18713{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018714return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018715 ;
18716 return 0;
18717}
18718_ACEOF
18719rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018720if { (ac_try="$ac_link"
18721case "(($ac_try" in
18722 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18723 *) ac_try_echo=$ac_try;;
18724esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018725eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018726 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018727 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018728 grep -v '^ *+' conftest.er1 >conftest.err
18729 rm -f conftest.er1
18730 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018732 (exit $ac_status); } && {
18733 test -z "$ac_c_werror_flag" ||
18734 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018735 } && test -s conftest$ac_exeext &&
18736 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018737 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000018738else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018739 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018740sed 's/^/| /' conftest.$ac_ext >&5
18741
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018742 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000018743fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018744
18745rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018746 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000018747fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018748ac_res=`eval echo '${'$as_ac_var'}'`
18749 { echo "$as_me:$LINENO: result: $ac_res" >&5
18750echo "${ECHO_T}$ac_res" >&6; }
18751if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018752 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018753#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018754_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000018755
Martin v. Löwis1142de32002-03-29 16:28:31 +000018756else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018757 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000018758 *" $ac_func.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018759 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
18760 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000018761esac
18762
Martin v. Löwis1142de32002-03-29 16:28:31 +000018763fi
18764done
18765
18766
Martin v. Löwis11437992002-04-12 09:54:03 +000018767
Martin v. Löwis1142de32002-03-29 16:28:31 +000018768for ac_func in getpgrp
18769do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018770as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18771{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18772echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018773if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018774 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000018775else
Martin v. Löwis11437992002-04-12 09:54:03 +000018776 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018777/* confdefs.h. */
18778_ACEOF
18779cat confdefs.h >>conftest.$ac_ext
18780cat >>conftest.$ac_ext <<_ACEOF
18781/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018782/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18783 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18784#define $ac_func innocuous_$ac_func
18785
Martin v. Löwis1142de32002-03-29 16:28:31 +000018786/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018787 which can conflict with char $ac_func (); below.
18788 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018789 <limits.h> exists even on freestanding compilers. */
18790
18791#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018792# include <limits.h>
18793#else
18794# include <assert.h>
18795#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018796
18797#undef $ac_func
18798
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018799/* Override any GCC internal prototype to avoid an error.
18800 Use char because int might match the return type of a GCC
18801 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018802#ifdef __cplusplus
18803extern "C"
18804#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018805char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000018806/* The GNU C library defines this for functions which it implements
18807 to always fail with ENOSYS. Some functions are actually named
18808 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018809#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000018810choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000018811#endif
18812
Skip Montanaro6dead952003-09-25 14:50:04 +000018813int
18814main ()
18815{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018816return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018817 ;
18818 return 0;
18819}
18820_ACEOF
18821rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018822if { (ac_try="$ac_link"
18823case "(($ac_try" in
18824 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18825 *) ac_try_echo=$ac_try;;
18826esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018827eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018828 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018829 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018830 grep -v '^ *+' conftest.er1 >conftest.err
18831 rm -f conftest.er1
18832 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018834 (exit $ac_status); } && {
18835 test -z "$ac_c_werror_flag" ||
18836 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018837 } && test -s conftest$ac_exeext &&
18838 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018839 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018840else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018841 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018842sed 's/^/| /' conftest.$ac_ext >&5
18843
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018844 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018845fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018846
18847rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018848 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018849fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018850ac_res=`eval echo '${'$as_ac_var'}'`
18851 { echo "$as_me:$LINENO: result: $ac_res" >&5
18852echo "${ECHO_T}$ac_res" >&6; }
18853if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018854 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018855#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018856_ACEOF
18857 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018858/* confdefs.h. */
18859_ACEOF
18860cat confdefs.h >>conftest.$ac_ext
18861cat >>conftest.$ac_ext <<_ACEOF
18862/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018863#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018864int
18865main ()
18866{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018867getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000018868 ;
18869 return 0;
18870}
18871_ACEOF
18872rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018873if { (ac_try="$ac_compile"
18874case "(($ac_try" in
18875 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18876 *) ac_try_echo=$ac_try;;
18877esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018878eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018879 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018880 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018881 grep -v '^ *+' conftest.er1 >conftest.err
18882 rm -f conftest.er1
18883 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018885 (exit $ac_status); } && {
18886 test -z "$ac_c_werror_flag" ||
18887 test ! -s conftest.err
18888 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018889
18890cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018891#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018892_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000018893
Martin v. Löwis11437992002-04-12 09:54:03 +000018894
Guido van Rossumf78abae1997-01-21 22:02:36 +000018895else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018896 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018897sed 's/^/| /' conftest.$ac_ext >&5
18898
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018899
Guido van Rossum627b2d71993-12-24 10:39:16 +000018900fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018901
18902rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000018903
Guido van Rossum627b2d71993-12-24 10:39:16 +000018904fi
Thomas Wouters3a584202000-08-05 23:28:51 +000018905done
Guido van Rossum627b2d71993-12-24 10:39:16 +000018906
Jack Jansen150753c2003-03-29 22:07:47 +000018907
18908for ac_func in setpgrp
18909do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018910as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18911{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18912echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018913if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018914 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018915else
Martin v. Löwis11437992002-04-12 09:54:03 +000018916 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018917/* confdefs.h. */
18918_ACEOF
18919cat confdefs.h >>conftest.$ac_ext
18920cat >>conftest.$ac_ext <<_ACEOF
18921/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018922/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18923 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18924#define $ac_func innocuous_$ac_func
18925
Jack Jansen150753c2003-03-29 22:07:47 +000018926/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018927 which can conflict with char $ac_func (); below.
18928 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018929 <limits.h> exists even on freestanding compilers. */
18930
18931#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018932# include <limits.h>
18933#else
18934# include <assert.h>
18935#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018936
18937#undef $ac_func
18938
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018939/* Override any GCC internal prototype to avoid an error.
18940 Use char because int might match the return type of a GCC
18941 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000018942#ifdef __cplusplus
18943extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000018944#endif
Jack Jansen150753c2003-03-29 22:07:47 +000018945char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000018946/* The GNU C library defines this for functions which it implements
18947 to always fail with ENOSYS. Some functions are actually named
18948 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018949#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000018950choke me
Jack Jansen150753c2003-03-29 22:07:47 +000018951#endif
18952
Skip Montanaro6dead952003-09-25 14:50:04 +000018953int
18954main ()
18955{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018956return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018957 ;
18958 return 0;
18959}
18960_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000018961rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018962if { (ac_try="$ac_link"
18963case "(($ac_try" in
18964 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18965 *) ac_try_echo=$ac_try;;
18966esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018967eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018968 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018969 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018970 grep -v '^ *+' conftest.er1 >conftest.err
18971 rm -f conftest.er1
18972 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018974 (exit $ac_status); } && {
18975 test -z "$ac_c_werror_flag" ||
18976 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018977 } && test -s conftest$ac_exeext &&
18978 $as_test_x conftest$ac_exeext; then
Jack Jansen150753c2003-03-29 22:07:47 +000018979 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018980else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018981 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018982sed 's/^/| /' conftest.$ac_ext >&5
18983
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018984 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018985fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018986
18987rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018988 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018989fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018990ac_res=`eval echo '${'$as_ac_var'}'`
18991 { echo "$as_me:$LINENO: result: $ac_res" >&5
18992echo "${ECHO_T}$ac_res" >&6; }
18993if test `eval echo '${'$as_ac_var'}'` = yes; then
Jack Jansen150753c2003-03-29 22:07:47 +000018994 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000018995#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Jack Jansen150753c2003-03-29 22:07:47 +000018996_ACEOF
18997 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018998/* confdefs.h. */
18999_ACEOF
19000cat confdefs.h >>conftest.$ac_ext
19001cat >>conftest.$ac_ext <<_ACEOF
19002/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000019003#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000019004int
19005main ()
19006{
19007setpgrp(0,0);
19008 ;
19009 return 0;
19010}
19011_ACEOF
19012rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019013if { (ac_try="$ac_compile"
19014case "(($ac_try" in
19015 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19016 *) ac_try_echo=$ac_try;;
19017esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019018eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019019 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000019020 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019021 grep -v '^ *+' conftest.er1 >conftest.err
19022 rm -f conftest.er1
19023 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019025 (exit $ac_status); } && {
19026 test -z "$ac_c_werror_flag" ||
19027 test ! -s conftest.err
19028 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019029
19030cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000019031#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019032_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000019033
Jack Jansen150753c2003-03-29 22:07:47 +000019034
19035else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019036 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019037sed 's/^/| /' conftest.$ac_ext >&5
19038
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019039
Guido van Rossum8eee56f1994-10-20 22:18:37 +000019040fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019041
19042rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000019043
19044fi
19045done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000019046
Martin v. Löwis11437992002-04-12 09:54:03 +000019047
Thomas Wouters3a584202000-08-05 23:28:51 +000019048for ac_func in gettimeofday
19049do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019050as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19051{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19052echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019053if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019054 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019055else
Martin v. Löwis11437992002-04-12 09:54:03 +000019056 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019057/* confdefs.h. */
19058_ACEOF
19059cat confdefs.h >>conftest.$ac_ext
19060cat >>conftest.$ac_ext <<_ACEOF
19061/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019062/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19063 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19064#define $ac_func innocuous_$ac_func
19065
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000019066/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019067 which can conflict with char $ac_func (); below.
19068 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019069 <limits.h> exists even on freestanding compilers. */
19070
19071#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019072# include <limits.h>
19073#else
19074# include <assert.h>
19075#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019076
19077#undef $ac_func
19078
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019079/* Override any GCC internal prototype to avoid an error.
19080 Use char because int might match the return type of a GCC
19081 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019082#ifdef __cplusplus
19083extern "C"
19084#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019085char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019086/* The GNU C library defines this for functions which it implements
19087 to always fail with ENOSYS. Some functions are actually named
19088 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019089#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019090choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019091#endif
19092
Skip Montanaro6dead952003-09-25 14:50:04 +000019093int
19094main ()
19095{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019096return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019097 ;
19098 return 0;
19099}
19100_ACEOF
19101rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019102if { (ac_try="$ac_link"
19103case "(($ac_try" in
19104 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19105 *) ac_try_echo=$ac_try;;
19106esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019107eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019108 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019109 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019110 grep -v '^ *+' conftest.er1 >conftest.err
19111 rm -f conftest.er1
19112 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019114 (exit $ac_status); } && {
19115 test -z "$ac_c_werror_flag" ||
19116 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019117 } && test -s conftest$ac_exeext &&
19118 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019119 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019120else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019121 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019122sed 's/^/| /' conftest.$ac_ext >&5
19123
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019124 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019125fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019126
19127rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019128 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019129fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019130ac_res=`eval echo '${'$as_ac_var'}'`
19131 { echo "$as_me:$LINENO: result: $ac_res" >&5
19132echo "${ECHO_T}$ac_res" >&6; }
19133if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019134 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019135#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019136_ACEOF
19137 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019138/* confdefs.h. */
19139_ACEOF
19140cat confdefs.h >>conftest.$ac_ext
19141cat >>conftest.$ac_ext <<_ACEOF
19142/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000019143#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019144int
19145main ()
19146{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019147gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000019148 ;
19149 return 0;
19150}
19151_ACEOF
19152rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019153if { (ac_try="$ac_compile"
19154case "(($ac_try" in
19155 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19156 *) ac_try_echo=$ac_try;;
19157esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019158eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019159 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019160 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019161 grep -v '^ *+' conftest.er1 >conftest.err
19162 rm -f conftest.er1
19163 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019165 (exit $ac_status); } && {
19166 test -z "$ac_c_werror_flag" ||
19167 test ! -s conftest.err
19168 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000019169 :
19170else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019171 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019172sed 's/^/| /' conftest.$ac_ext >&5
19173
Martin v. Löwis11437992002-04-12 09:54:03 +000019174
19175cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019176#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019177_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019178
Martin v. Löwis11437992002-04-12 09:54:03 +000019179
Guido van Rossum627b2d71993-12-24 10:39:16 +000019180fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019181
19182rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019183
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019184fi
Thomas Wouters3a584202000-08-05 23:28:51 +000019185done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019186
Michael W. Hudson54241132001-12-07 15:38:26 +000019187
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019188{ echo "$as_me:$LINENO: checking for major" >&5
19189echo $ECHO_N "checking for major... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019190cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019191/* confdefs.h. */
19192_ACEOF
19193cat confdefs.h >>conftest.$ac_ext
19194cat >>conftest.$ac_ext <<_ACEOF
19195/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019196
Neal Norwitz6eb37f02003-02-23 23:28:15 +000019197#if defined(MAJOR_IN_MKDEV)
19198#include <sys/mkdev.h>
19199#elif defined(MAJOR_IN_SYSMACROS)
19200#include <sys/sysmacros.h>
19201#else
19202#include <sys/types.h>
19203#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019204
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019205int
19206main ()
19207{
19208
19209 makedev(major(0),minor(0));
19210
19211 ;
19212 return 0;
19213}
19214_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000019215rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019216if { (ac_try="$ac_link"
19217case "(($ac_try" in
19218 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19219 *) ac_try_echo=$ac_try;;
19220esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019221eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019222 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019223 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019224 grep -v '^ *+' conftest.er1 >conftest.err
19225 rm -f conftest.er1
19226 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019228 (exit $ac_status); } && {
19229 test -z "$ac_c_werror_flag" ||
19230 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019231 } && test -s conftest$ac_exeext &&
19232 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019233
19234
19235cat >>confdefs.h <<\_ACEOF
19236#define HAVE_DEVICE_MACROS 1
19237_ACEOF
19238
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019239 { echo "$as_me:$LINENO: result: yes" >&5
19240echo "${ECHO_T}yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019241
19242else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019243 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019244sed 's/^/| /' conftest.$ac_ext >&5
19245
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019246
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019247 { echo "$as_me:$LINENO: result: no" >&5
19248echo "${ECHO_T}no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019249
19250fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019251
19252rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019253 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019254
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019255# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000019256# for [no]getaddrinfo in netdb.h.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019257{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
19258echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019259cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019260/* confdefs.h. */
19261_ACEOF
19262cat confdefs.h >>conftest.$ac_ext
19263cat >>conftest.$ac_ext <<_ACEOF
19264/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019265
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000019266#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019267#include <sys/socket.h>
19268#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000019269#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019270
Martin v. Löwis11437992002-04-12 09:54:03 +000019271int
19272main ()
19273{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019274
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019275getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019276
Martin v. Löwis11437992002-04-12 09:54:03 +000019277 ;
19278 return 0;
19279}
19280_ACEOF
19281rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019282if { (ac_try="$ac_link"
19283case "(($ac_try" in
19284 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19285 *) ac_try_echo=$ac_try;;
19286esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019287eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019288 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019289 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019290 grep -v '^ *+' conftest.er1 >conftest.err
19291 rm -f conftest.er1
19292 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019293 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019294 (exit $ac_status); } && {
19295 test -z "$ac_c_werror_flag" ||
19296 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019297 } && test -s conftest$ac_exeext &&
19298 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019299
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019300{ echo "$as_me:$LINENO: result: yes" >&5
19301echo "${ECHO_T}yes" >&6; }
19302{ echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
19303echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019304if test "$cross_compiling" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019305 { echo "$as_me:$LINENO: result: buggy" >&5
19306echo "${ECHO_T}buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019307buggygetaddrinfo=yes
19308else
Martin v. Löwis11437992002-04-12 09:54:03 +000019309 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019310/* confdefs.h. */
19311_ACEOF
19312cat confdefs.h >>conftest.$ac_ext
19313cat >>conftest.$ac_ext <<_ACEOF
19314/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019315
19316#include <sys/types.h>
19317#include <netdb.h>
19318#include <string.h>
19319#include <sys/socket.h>
19320#include <netinet/in.h>
19321
19322main()
19323{
19324 int passive, gaierr, inet4 = 0, inet6 = 0;
19325 struct addrinfo hints, *ai, *aitop;
19326 char straddr[INET6_ADDRSTRLEN], strport[16];
19327
19328 for (passive = 0; passive <= 1; passive++) {
19329 memset(&hints, 0, sizeof(hints));
19330 hints.ai_family = AF_UNSPEC;
19331 hints.ai_flags = passive ? AI_PASSIVE : 0;
19332 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000019333 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019334 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
19335 (void)gai_strerror(gaierr);
19336 goto bad;
19337 }
19338 for (ai = aitop; ai; ai = ai->ai_next) {
19339 if (ai->ai_addr == NULL ||
19340 ai->ai_addrlen == 0 ||
19341 getnameinfo(ai->ai_addr, ai->ai_addrlen,
19342 straddr, sizeof(straddr), strport, sizeof(strport),
19343 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
19344 goto bad;
19345 }
19346 switch (ai->ai_family) {
19347 case AF_INET:
19348 if (strcmp(strport, "54321") != 0) {
19349 goto bad;
19350 }
19351 if (passive) {
19352 if (strcmp(straddr, "0.0.0.0") != 0) {
19353 goto bad;
19354 }
19355 } else {
19356 if (strcmp(straddr, "127.0.0.1") != 0) {
19357 goto bad;
19358 }
19359 }
19360 inet4++;
19361 break;
19362 case AF_INET6:
19363 if (strcmp(strport, "54321") != 0) {
19364 goto bad;
19365 }
19366 if (passive) {
19367 if (strcmp(straddr, "::") != 0) {
19368 goto bad;
19369 }
19370 } else {
19371 if (strcmp(straddr, "::1") != 0) {
19372 goto bad;
19373 }
19374 }
19375 inet6++;
19376 break;
19377 case AF_UNSPEC:
19378 goto bad;
19379 break;
19380 default:
19381 /* another family support? */
19382 break;
19383 }
19384 }
19385 }
19386
19387 if (!(inet4 == 0 || inet4 == 2))
19388 goto bad;
19389 if (!(inet6 == 0 || inet6 == 2))
19390 goto bad;
19391
19392 if (aitop)
19393 freeaddrinfo(aitop);
19394 exit(0);
19395
19396 bad:
19397 if (aitop)
19398 freeaddrinfo(aitop);
19399 exit(1);
19400}
19401
Martin v. Löwis11437992002-04-12 09:54:03 +000019402_ACEOF
19403rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019404if { (ac_try="$ac_link"
19405case "(($ac_try" in
19406 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19407 *) ac_try_echo=$ac_try;;
19408esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019409eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019410 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019411 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019413 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019414 { (case "(($ac_try" in
19415 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19416 *) ac_try_echo=$ac_try;;
19417esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019418eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019419 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019420 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019422 (exit $ac_status); }; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019423 { echo "$as_me:$LINENO: result: good" >&5
19424echo "${ECHO_T}good" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019425buggygetaddrinfo=no
19426else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019427 echo "$as_me: program exited with status $ac_status" >&5
19428echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019429sed 's/^/| /' conftest.$ac_ext >&5
19430
Martin v. Löwis11437992002-04-12 09:54:03 +000019431( exit $ac_status )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019432{ echo "$as_me:$LINENO: result: buggy" >&5
19433echo "${ECHO_T}buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019434buggygetaddrinfo=yes
19435fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019436rm -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 +000019437fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019438
19439
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019440else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019441 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019442sed 's/^/| /' conftest.$ac_ext >&5
19443
Martin v. Löwis11437992002-04-12 09:54:03 +000019444
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019445{ echo "$as_me:$LINENO: result: no" >&5
19446echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019447buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019448
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019449fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019450
19451rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019452 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019453
19454if test "$buggygetaddrinfo" = "yes"; then
19455 if test "$ipv6" = "yes"; then
19456 echo 'Fatal: You must get working getaddrinfo() function.'
19457 echo ' or you can specify "--disable-ipv6"'.
19458 exit 1
19459 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019460else
Martin v. Löwis11437992002-04-12 09:54:03 +000019461
19462cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019463#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019464_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019465
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019466fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019467
Jack Jansen9a66b6d2001-08-08 13:56:14 +000019468for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019469do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019470as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19471{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19472echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019473if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019474 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019475else
Martin v. Löwis11437992002-04-12 09:54:03 +000019476 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019477/* confdefs.h. */
19478_ACEOF
19479cat confdefs.h >>conftest.$ac_ext
19480cat >>conftest.$ac_ext <<_ACEOF
19481/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019482/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19483 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19484#define $ac_func innocuous_$ac_func
19485
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019486/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019487 which can conflict with char $ac_func (); below.
19488 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019489 <limits.h> exists even on freestanding compilers. */
19490
19491#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019492# include <limits.h>
19493#else
19494# include <assert.h>
19495#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019496
19497#undef $ac_func
19498
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019499/* Override any GCC internal prototype to avoid an error.
19500 Use char because int might match the return type of a GCC
19501 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019502#ifdef __cplusplus
19503extern "C"
19504#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019505char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019506/* The GNU C library defines this for functions which it implements
19507 to always fail with ENOSYS. Some functions are actually named
19508 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019509#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019510choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019511#endif
19512
Skip Montanaro6dead952003-09-25 14:50:04 +000019513int
19514main ()
19515{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019516return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019517 ;
19518 return 0;
19519}
19520_ACEOF
19521rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019522if { (ac_try="$ac_link"
19523case "(($ac_try" in
19524 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19525 *) ac_try_echo=$ac_try;;
19526esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019527eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019528 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019529 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019530 grep -v '^ *+' conftest.er1 >conftest.err
19531 rm -f conftest.er1
19532 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019534 (exit $ac_status); } && {
19535 test -z "$ac_c_werror_flag" ||
19536 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019537 } && test -s conftest$ac_exeext &&
19538 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019539 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019540else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019541 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019542sed 's/^/| /' conftest.$ac_ext >&5
19543
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019544 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019545fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019546
19547rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019548 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019549fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019550ac_res=`eval echo '${'$as_ac_var'}'`
19551 { echo "$as_me:$LINENO: result: $ac_res" >&5
19552echo "${ECHO_T}$ac_res" >&6; }
19553if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019554 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019555#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019556_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019557
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019558fi
19559done
19560
Michael W. Hudson54241132001-12-07 15:38:26 +000019561
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019562# checks for structures
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019563{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
19564echo $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 +000019565if test "${ac_cv_header_time+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019566 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019567else
Martin v. Löwis11437992002-04-12 09:54:03 +000019568 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019569/* confdefs.h. */
19570_ACEOF
19571cat confdefs.h >>conftest.$ac_ext
19572cat >>conftest.$ac_ext <<_ACEOF
19573/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019574#include <sys/types.h>
19575#include <sys/time.h>
19576#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019577
Martin v. Löwis11437992002-04-12 09:54:03 +000019578int
19579main ()
19580{
19581if ((struct tm *) 0)
19582return 0;
19583 ;
19584 return 0;
19585}
19586_ACEOF
19587rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019588if { (ac_try="$ac_compile"
19589case "(($ac_try" in
19590 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19591 *) ac_try_echo=$ac_try;;
19592esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019593eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019594 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019595 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019596 grep -v '^ *+' conftest.er1 >conftest.err
19597 rm -f conftest.er1
19598 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019599 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019600 (exit $ac_status); } && {
19601 test -z "$ac_c_werror_flag" ||
19602 test ! -s conftest.err
19603 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019604 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000019605else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019606 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019607sed 's/^/| /' conftest.$ac_ext >&5
19608
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019609 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000019610fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019611
19612rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019613fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019614{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
19615echo "${ECHO_T}$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019616if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019617
19618cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019619#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019620_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019621
19622fi
19623
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019624{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
19625echo $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 +000019626if test "${ac_cv_struct_tm+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019627 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019628else
Martin v. Löwis11437992002-04-12 09:54:03 +000019629 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019630/* confdefs.h. */
19631_ACEOF
19632cat confdefs.h >>conftest.$ac_ext
19633cat >>conftest.$ac_ext <<_ACEOF
19634/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019635#include <sys/types.h>
19636#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019637
Martin v. Löwis11437992002-04-12 09:54:03 +000019638int
19639main ()
19640{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019641struct tm tm;
19642 int *p = &tm.tm_sec;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019643 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000019644 ;
19645 return 0;
19646}
19647_ACEOF
19648rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019649if { (ac_try="$ac_compile"
19650case "(($ac_try" in
19651 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19652 *) ac_try_echo=$ac_try;;
19653esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019654eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019655 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019656 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019657 grep -v '^ *+' conftest.er1 >conftest.err
19658 rm -f conftest.er1
19659 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019661 (exit $ac_status); } && {
19662 test -z "$ac_c_werror_flag" ||
19663 test ! -s conftest.err
19664 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019665 ac_cv_struct_tm=time.h
19666else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019667 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019668sed 's/^/| /' conftest.$ac_ext >&5
19669
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019670 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019671fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019672
19673rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019674fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019675{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
19676echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019677if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019678
19679cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019680#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019681_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019682
19683fi
19684
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019685{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
19686echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019687if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019688 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019689else
Martin v. Löwis11437992002-04-12 09:54:03 +000019690 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019691/* confdefs.h. */
19692_ACEOF
19693cat confdefs.h >>conftest.$ac_ext
19694cat >>conftest.$ac_ext <<_ACEOF
19695/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019696#include <sys/types.h>
19697#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000019698
19699
Martin v. Löwis11437992002-04-12 09:54:03 +000019700int
19701main ()
19702{
19703static struct tm ac_aggr;
19704if (ac_aggr.tm_zone)
19705return 0;
19706 ;
19707 return 0;
19708}
19709_ACEOF
19710rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019711if { (ac_try="$ac_compile"
19712case "(($ac_try" in
19713 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19714 *) ac_try_echo=$ac_try;;
19715esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019716eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019717 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019718 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019719 grep -v '^ *+' conftest.er1 >conftest.err
19720 rm -f conftest.er1
19721 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019723 (exit $ac_status); } && {
19724 test -z "$ac_c_werror_flag" ||
19725 test ! -s conftest.err
19726 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019727 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000019728else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019729 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019730sed 's/^/| /' conftest.$ac_ext >&5
19731
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019732 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019733/* confdefs.h. */
19734_ACEOF
19735cat confdefs.h >>conftest.$ac_ext
19736cat >>conftest.$ac_ext <<_ACEOF
19737/* end confdefs.h. */
19738#include <sys/types.h>
19739#include <$ac_cv_struct_tm>
19740
19741
19742int
19743main ()
19744{
19745static struct tm ac_aggr;
19746if (sizeof ac_aggr.tm_zone)
19747return 0;
19748 ;
19749 return 0;
19750}
19751_ACEOF
19752rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019753if { (ac_try="$ac_compile"
19754case "(($ac_try" in
19755 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19756 *) ac_try_echo=$ac_try;;
19757esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019758eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019759 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000019760 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019761 grep -v '^ *+' conftest.er1 >conftest.err
19762 rm -f conftest.er1
19763 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019764 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019765 (exit $ac_status); } && {
19766 test -z "$ac_c_werror_flag" ||
19767 test ! -s conftest.err
19768 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019769 ac_cv_member_struct_tm_tm_zone=yes
19770else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019771 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019772sed 's/^/| /' conftest.$ac_ext >&5
19773
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019774 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000019775fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019776
19777rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019778fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019779
19780rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000019781fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019782{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
19783echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
19784if test $ac_cv_member_struct_tm_tm_zone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019785
19786cat >>confdefs.h <<_ACEOF
19787#define HAVE_STRUCT_TM_TM_ZONE 1
19788_ACEOF
19789
19790
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019791fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000019792
Martin v. Löwis11437992002-04-12 09:54:03 +000019793if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
19794
19795cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019796#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019797_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019798
19799else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019800 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
19801echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019802if test "${ac_cv_have_decl_tzname+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019803 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019804else
19805 cat >conftest.$ac_ext <<_ACEOF
19806/* confdefs.h. */
19807_ACEOF
19808cat confdefs.h >>conftest.$ac_ext
19809cat >>conftest.$ac_ext <<_ACEOF
19810/* end confdefs.h. */
19811#include <time.h>
19812
19813int
19814main ()
19815{
19816#ifndef tzname
19817 (void) tzname;
19818#endif
19819
19820 ;
19821 return 0;
19822}
19823_ACEOF
19824rm -f conftest.$ac_objext
19825if { (ac_try="$ac_compile"
19826case "(($ac_try" in
19827 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19828 *) ac_try_echo=$ac_try;;
19829esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019830eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019831 (eval "$ac_compile") 2>conftest.er1
19832 ac_status=$?
19833 grep -v '^ *+' conftest.er1 >conftest.err
19834 rm -f conftest.er1
19835 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019837 (exit $ac_status); } && {
19838 test -z "$ac_c_werror_flag" ||
19839 test ! -s conftest.err
19840 } && test -s conftest.$ac_objext; then
19841 ac_cv_have_decl_tzname=yes
19842else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019843 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019844sed 's/^/| /' conftest.$ac_ext >&5
19845
19846 ac_cv_have_decl_tzname=no
19847fi
19848
19849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19850fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019851{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
19852echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
19853if test $ac_cv_have_decl_tzname = yes; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019854
19855cat >>confdefs.h <<_ACEOF
19856#define HAVE_DECL_TZNAME 1
19857_ACEOF
19858
19859
19860else
19861 cat >>confdefs.h <<_ACEOF
19862#define HAVE_DECL_TZNAME 0
19863_ACEOF
19864
19865
19866fi
19867
19868
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019869 { echo "$as_me:$LINENO: checking for tzname" >&5
19870echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019871if test "${ac_cv_var_tzname+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019872 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019873else
Martin v. Löwis11437992002-04-12 09:54:03 +000019874 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019875/* confdefs.h. */
19876_ACEOF
19877cat confdefs.h >>conftest.$ac_ext
19878cat >>conftest.$ac_ext <<_ACEOF
19879/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000019880#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019881#if !HAVE_DECL_TZNAME
19882extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000019883#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019884
Martin v. Löwis11437992002-04-12 09:54:03 +000019885int
19886main ()
19887{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019888return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000019889 ;
19890 return 0;
19891}
19892_ACEOF
19893rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019894if { (ac_try="$ac_link"
19895case "(($ac_try" in
19896 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19897 *) ac_try_echo=$ac_try;;
19898esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019899eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019900 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019901 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019902 grep -v '^ *+' conftest.er1 >conftest.err
19903 rm -f conftest.er1
19904 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019906 (exit $ac_status); } && {
19907 test -z "$ac_c_werror_flag" ||
19908 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019909 } && test -s conftest$ac_exeext &&
19910 $as_test_x conftest$ac_exeext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019911 ac_cv_var_tzname=yes
19912else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019913 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019914sed 's/^/| /' conftest.$ac_ext >&5
19915
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019916 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000019917fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019918
19919rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019920 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000019921fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019922{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
19923echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019924 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019925
19926cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019927#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019928_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019929
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019930 fi
19931fi
19932
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019933{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
19934echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019935if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019936 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000019937else
19938 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019939/* confdefs.h. */
19940_ACEOF
19941cat confdefs.h >>conftest.$ac_ext
19942cat >>conftest.$ac_ext <<_ACEOF
19943/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019944$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000019945int
19946main ()
19947{
19948static struct stat ac_aggr;
19949if (ac_aggr.st_rdev)
19950return 0;
19951 ;
19952 return 0;
19953}
19954_ACEOF
19955rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019956if { (ac_try="$ac_compile"
19957case "(($ac_try" in
19958 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19959 *) ac_try_echo=$ac_try;;
19960esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019961eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019962 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019963 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019964 grep -v '^ *+' conftest.er1 >conftest.err
19965 rm -f conftest.er1
19966 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019968 (exit $ac_status); } && {
19969 test -z "$ac_c_werror_flag" ||
19970 test ! -s conftest.err
19971 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019972 ac_cv_member_struct_stat_st_rdev=yes
19973else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000019974 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019975sed 's/^/| /' conftest.$ac_ext >&5
19976
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019977 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019978/* confdefs.h. */
19979_ACEOF
19980cat confdefs.h >>conftest.$ac_ext
19981cat >>conftest.$ac_ext <<_ACEOF
19982/* end confdefs.h. */
19983$ac_includes_default
19984int
19985main ()
19986{
19987static struct stat ac_aggr;
19988if (sizeof ac_aggr.st_rdev)
19989return 0;
19990 ;
19991 return 0;
19992}
19993_ACEOF
19994rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019995if { (ac_try="$ac_compile"
19996case "(($ac_try" in
19997 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19998 *) ac_try_echo=$ac_try;;
19999esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020000eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020001 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020002 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020003 grep -v '^ *+' conftest.er1 >conftest.err
20004 rm -f conftest.er1
20005 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020007 (exit $ac_status); } && {
20008 test -z "$ac_c_werror_flag" ||
20009 test ! -s conftest.err
20010 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020011 ac_cv_member_struct_stat_st_rdev=yes
20012else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020013 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020014sed 's/^/| /' conftest.$ac_ext >&5
20015
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020016 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000020017fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020018
20019rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020020fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020021
20022rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020023fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020024{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
20025echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
20026if test $ac_cv_member_struct_stat_st_rdev = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020027
20028cat >>confdefs.h <<_ACEOF
20029#define HAVE_STRUCT_STAT_ST_RDEV 1
20030_ACEOF
20031
20032
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020033fi
20034
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020035{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
20036echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020037if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020038 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020039else
Martin v. Löwis11437992002-04-12 09:54:03 +000020040 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020041/* confdefs.h. */
20042_ACEOF
20043cat confdefs.h >>conftest.$ac_ext
20044cat >>conftest.$ac_ext <<_ACEOF
20045/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020046$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020047int
20048main ()
20049{
20050static struct stat ac_aggr;
20051if (ac_aggr.st_blksize)
20052return 0;
20053 ;
20054 return 0;
20055}
20056_ACEOF
20057rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020058if { (ac_try="$ac_compile"
20059case "(($ac_try" in
20060 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20061 *) ac_try_echo=$ac_try;;
20062esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020063eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020064 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020065 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020066 grep -v '^ *+' conftest.er1 >conftest.err
20067 rm -f conftest.er1
20068 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020070 (exit $ac_status); } && {
20071 test -z "$ac_c_werror_flag" ||
20072 test ! -s conftest.err
20073 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020074 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000020075else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020076 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020077sed 's/^/| /' conftest.$ac_ext >&5
20078
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020079 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020080/* confdefs.h. */
20081_ACEOF
20082cat confdefs.h >>conftest.$ac_ext
20083cat >>conftest.$ac_ext <<_ACEOF
20084/* end confdefs.h. */
20085$ac_includes_default
20086int
20087main ()
20088{
20089static struct stat ac_aggr;
20090if (sizeof ac_aggr.st_blksize)
20091return 0;
20092 ;
20093 return 0;
20094}
20095_ACEOF
20096rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020097if { (ac_try="$ac_compile"
20098case "(($ac_try" in
20099 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20100 *) ac_try_echo=$ac_try;;
20101esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020102eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020103 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020104 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020105 grep -v '^ *+' conftest.er1 >conftest.err
20106 rm -f conftest.er1
20107 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020109 (exit $ac_status); } && {
20110 test -z "$ac_c_werror_flag" ||
20111 test ! -s conftest.err
20112 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020113 ac_cv_member_struct_stat_st_blksize=yes
20114else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020115 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020116sed 's/^/| /' conftest.$ac_ext >&5
20117
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020118 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000020119fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020120
20121rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020122fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020123
20124rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020125fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020126{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
20127echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
20128if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000020129
Martin v. Löwis11437992002-04-12 09:54:03 +000020130cat >>confdefs.h <<_ACEOF
20131#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
20132_ACEOF
20133
20134
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020135fi
20136
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020137{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
20138echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020139if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020140 echo $ECHO_N "(cached) $ECHO_C" >&6
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020141else
20142 cat >conftest.$ac_ext <<_ACEOF
20143/* confdefs.h. */
20144_ACEOF
20145cat confdefs.h >>conftest.$ac_ext
20146cat >>conftest.$ac_ext <<_ACEOF
20147/* end confdefs.h. */
20148$ac_includes_default
20149int
20150main ()
20151{
20152static struct stat ac_aggr;
20153if (ac_aggr.st_flags)
20154return 0;
20155 ;
20156 return 0;
20157}
20158_ACEOF
20159rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020160if { (ac_try="$ac_compile"
20161case "(($ac_try" in
20162 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20163 *) ac_try_echo=$ac_try;;
20164esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020165eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020166 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020167 ac_status=$?
20168 grep -v '^ *+' conftest.er1 >conftest.err
20169 rm -f conftest.er1
20170 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020172 (exit $ac_status); } && {
20173 test -z "$ac_c_werror_flag" ||
20174 test ! -s conftest.err
20175 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020176 ac_cv_member_struct_stat_st_flags=yes
20177else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020178 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020179sed 's/^/| /' conftest.$ac_ext >&5
20180
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020181 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020182/* confdefs.h. */
20183_ACEOF
20184cat confdefs.h >>conftest.$ac_ext
20185cat >>conftest.$ac_ext <<_ACEOF
20186/* end confdefs.h. */
20187$ac_includes_default
20188int
20189main ()
20190{
20191static struct stat ac_aggr;
20192if (sizeof ac_aggr.st_flags)
20193return 0;
20194 ;
20195 return 0;
20196}
20197_ACEOF
20198rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020199if { (ac_try="$ac_compile"
20200case "(($ac_try" in
20201 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20202 *) ac_try_echo=$ac_try;;
20203esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020204eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020205 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020206 ac_status=$?
20207 grep -v '^ *+' conftest.er1 >conftest.err
20208 rm -f conftest.er1
20209 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020211 (exit $ac_status); } && {
20212 test -z "$ac_c_werror_flag" ||
20213 test ! -s conftest.err
20214 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020215 ac_cv_member_struct_stat_st_flags=yes
20216else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020217 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020218sed 's/^/| /' conftest.$ac_ext >&5
20219
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020220 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020221fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020222
20223rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020224fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020225
20226rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020227fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020228{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
20229echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
20230if test $ac_cv_member_struct_stat_st_flags = yes; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020231
20232cat >>confdefs.h <<_ACEOF
20233#define HAVE_STRUCT_STAT_ST_FLAGS 1
20234_ACEOF
20235
20236
20237fi
20238
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020239{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
20240echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020241if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020242 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020243else
20244 cat >conftest.$ac_ext <<_ACEOF
20245/* confdefs.h. */
20246_ACEOF
20247cat confdefs.h >>conftest.$ac_ext
20248cat >>conftest.$ac_ext <<_ACEOF
20249/* end confdefs.h. */
20250$ac_includes_default
20251int
20252main ()
20253{
20254static struct stat ac_aggr;
20255if (ac_aggr.st_gen)
20256return 0;
20257 ;
20258 return 0;
20259}
20260_ACEOF
20261rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020262if { (ac_try="$ac_compile"
20263case "(($ac_try" in
20264 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20265 *) ac_try_echo=$ac_try;;
20266esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020267eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020268 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020269 ac_status=$?
20270 grep -v '^ *+' conftest.er1 >conftest.err
20271 rm -f conftest.er1
20272 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020274 (exit $ac_status); } && {
20275 test -z "$ac_c_werror_flag" ||
20276 test ! -s conftest.err
20277 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020278 ac_cv_member_struct_stat_st_gen=yes
20279else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020280 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020281sed 's/^/| /' conftest.$ac_ext >&5
20282
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020283 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020284/* confdefs.h. */
20285_ACEOF
20286cat confdefs.h >>conftest.$ac_ext
20287cat >>conftest.$ac_ext <<_ACEOF
20288/* end confdefs.h. */
20289$ac_includes_default
20290int
20291main ()
20292{
20293static struct stat ac_aggr;
20294if (sizeof ac_aggr.st_gen)
20295return 0;
20296 ;
20297 return 0;
20298}
20299_ACEOF
20300rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020301if { (ac_try="$ac_compile"
20302case "(($ac_try" in
20303 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20304 *) ac_try_echo=$ac_try;;
20305esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020306eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020307 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020308 ac_status=$?
20309 grep -v '^ *+' conftest.er1 >conftest.err
20310 rm -f conftest.er1
20311 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020313 (exit $ac_status); } && {
20314 test -z "$ac_c_werror_flag" ||
20315 test ! -s conftest.err
20316 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020317 ac_cv_member_struct_stat_st_gen=yes
20318else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020319 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020320sed 's/^/| /' conftest.$ac_ext >&5
20321
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020322 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020323fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020324
20325rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020326fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020327
20328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020329fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020330{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
20331echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
20332if test $ac_cv_member_struct_stat_st_gen = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020333
20334cat >>confdefs.h <<_ACEOF
20335#define HAVE_STRUCT_STAT_ST_GEN 1
20336_ACEOF
20337
20338
20339fi
20340
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020341{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
20342echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020343if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020344 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020345else
20346 cat >conftest.$ac_ext <<_ACEOF
20347/* confdefs.h. */
20348_ACEOF
20349cat confdefs.h >>conftest.$ac_ext
20350cat >>conftest.$ac_ext <<_ACEOF
20351/* end confdefs.h. */
20352$ac_includes_default
20353int
20354main ()
20355{
20356static struct stat ac_aggr;
20357if (ac_aggr.st_birthtime)
20358return 0;
20359 ;
20360 return 0;
20361}
20362_ACEOF
20363rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020364if { (ac_try="$ac_compile"
20365case "(($ac_try" in
20366 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20367 *) ac_try_echo=$ac_try;;
20368esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020369eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020370 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020371 ac_status=$?
20372 grep -v '^ *+' conftest.er1 >conftest.err
20373 rm -f conftest.er1
20374 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020376 (exit $ac_status); } && {
20377 test -z "$ac_c_werror_flag" ||
20378 test ! -s conftest.err
20379 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020380 ac_cv_member_struct_stat_st_birthtime=yes
20381else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020382 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020383sed 's/^/| /' conftest.$ac_ext >&5
20384
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020385 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020386/* confdefs.h. */
20387_ACEOF
20388cat confdefs.h >>conftest.$ac_ext
20389cat >>conftest.$ac_ext <<_ACEOF
20390/* end confdefs.h. */
20391$ac_includes_default
20392int
20393main ()
20394{
20395static struct stat ac_aggr;
20396if (sizeof ac_aggr.st_birthtime)
20397return 0;
20398 ;
20399 return 0;
20400}
20401_ACEOF
20402rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020403if { (ac_try="$ac_compile"
20404case "(($ac_try" in
20405 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20406 *) ac_try_echo=$ac_try;;
20407esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020408eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020409 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020410 ac_status=$?
20411 grep -v '^ *+' conftest.er1 >conftest.err
20412 rm -f conftest.er1
20413 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020415 (exit $ac_status); } && {
20416 test -z "$ac_c_werror_flag" ||
20417 test ! -s conftest.err
20418 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020419 ac_cv_member_struct_stat_st_birthtime=yes
20420else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020421 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020422sed 's/^/| /' conftest.$ac_ext >&5
20423
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020424 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020425fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020426
20427rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020428fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020429
20430rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020431fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020432{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
20433echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
20434if test $ac_cv_member_struct_stat_st_birthtime = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020435
20436cat >>confdefs.h <<_ACEOF
20437#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
20438_ACEOF
20439
20440
20441fi
20442
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020443{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
20444echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020445if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020446 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020447else
Martin v. Löwis11437992002-04-12 09:54:03 +000020448 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020449/* confdefs.h. */
20450_ACEOF
20451cat confdefs.h >>conftest.$ac_ext
20452cat >>conftest.$ac_ext <<_ACEOF
20453/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020454$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020455int
20456main ()
20457{
20458static struct stat ac_aggr;
20459if (ac_aggr.st_blocks)
20460return 0;
20461 ;
20462 return 0;
20463}
20464_ACEOF
20465rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020466if { (ac_try="$ac_compile"
20467case "(($ac_try" in
20468 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20469 *) ac_try_echo=$ac_try;;
20470esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020471eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020472 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020473 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020474 grep -v '^ *+' conftest.er1 >conftest.err
20475 rm -f conftest.er1
20476 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020478 (exit $ac_status); } && {
20479 test -z "$ac_c_werror_flag" ||
20480 test ! -s conftest.err
20481 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020482 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000020483else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020484 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020485sed 's/^/| /' conftest.$ac_ext >&5
20486
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020487 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020488/* confdefs.h. */
20489_ACEOF
20490cat confdefs.h >>conftest.$ac_ext
20491cat >>conftest.$ac_ext <<_ACEOF
20492/* end confdefs.h. */
20493$ac_includes_default
20494int
20495main ()
20496{
20497static struct stat ac_aggr;
20498if (sizeof ac_aggr.st_blocks)
20499return 0;
20500 ;
20501 return 0;
20502}
20503_ACEOF
20504rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020505if { (ac_try="$ac_compile"
20506case "(($ac_try" in
20507 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20508 *) ac_try_echo=$ac_try;;
20509esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020510eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020511 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020512 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020513 grep -v '^ *+' conftest.er1 >conftest.err
20514 rm -f conftest.er1
20515 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020517 (exit $ac_status); } && {
20518 test -z "$ac_c_werror_flag" ||
20519 test ! -s conftest.err
20520 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020521 ac_cv_member_struct_stat_st_blocks=yes
20522else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020523 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020524sed 's/^/| /' conftest.$ac_ext >&5
20525
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020526 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000020527fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020528
20529rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020530fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020531
20532rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020533fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020534{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
20535echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
20536if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000020537
Martin v. Löwis11437992002-04-12 09:54:03 +000020538cat >>confdefs.h <<_ACEOF
20539#define HAVE_STRUCT_STAT_ST_BLOCKS 1
20540_ACEOF
20541
20542
20543cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020544#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020545_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020546
20547else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020548 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000020549 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020550 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
20551 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000020552esac
20553
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020554fi
20555
Michael W. Hudson54241132001-12-07 15:38:26 +000020556
Martin v. Löwis11437992002-04-12 09:54:03 +000020557
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020558{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
20559echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020560if test "${ac_cv_header_time_altzone+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020561 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020562else
Martin v. Löwis11437992002-04-12 09:54:03 +000020563 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020564/* confdefs.h. */
20565_ACEOF
20566cat confdefs.h >>conftest.$ac_ext
20567cat >>conftest.$ac_ext <<_ACEOF
20568/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020569#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020570int
20571main ()
20572{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020573return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000020574 ;
20575 return 0;
20576}
20577_ACEOF
20578rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020579if { (ac_try="$ac_compile"
20580case "(($ac_try" in
20581 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20582 *) ac_try_echo=$ac_try;;
20583esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020584eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020585 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020586 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020587 grep -v '^ *+' conftest.er1 >conftest.err
20588 rm -f conftest.er1
20589 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020591 (exit $ac_status); } && {
20592 test -z "$ac_c_werror_flag" ||
20593 test ! -s conftest.err
20594 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020595 ac_cv_header_time_altzone=yes
20596else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020597 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020598sed 's/^/| /' conftest.$ac_ext >&5
20599
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020600 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000020601fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020602
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020603rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20604fi
20605
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020606{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
20607echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020608if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020609
20610cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020611#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020612_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020613
20614fi
20615
Guido van Rossumda88dad1995-01-26 00:46:29 +000020616was_it_defined=no
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020617{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
20618echo $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 +000020619cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020620/* confdefs.h. */
20621_ACEOF
20622cat confdefs.h >>conftest.$ac_ext
20623cat >>conftest.$ac_ext <<_ACEOF
20624/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020625
20626#include <sys/types.h>
20627#include <sys/select.h>
20628#include <sys/time.h>
20629
Martin v. Löwis11437992002-04-12 09:54:03 +000020630int
20631main ()
20632{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020633;
Martin v. Löwis11437992002-04-12 09:54:03 +000020634 ;
20635 return 0;
20636}
20637_ACEOF
20638rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020639if { (ac_try="$ac_compile"
20640case "(($ac_try" in
20641 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20642 *) ac_try_echo=$ac_try;;
20643esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020644eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020645 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020646 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020647 grep -v '^ *+' conftest.er1 >conftest.err
20648 rm -f conftest.er1
20649 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020651 (exit $ac_status); } && {
20652 test -z "$ac_c_werror_flag" ||
20653 test ! -s conftest.err
20654 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020655
20656
20657cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020658#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020659_ACEOF
20660
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020661 was_it_defined=yes
20662
Guido van Rossumf78abae1997-01-21 22:02:36 +000020663else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020664 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020665sed 's/^/| /' conftest.$ac_ext >&5
20666
Thomas Wouters477c8d52006-05-27 19:21:47 +000020667
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020668fi
20669
20670rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020671{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
20672echo "${ECHO_T}$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020673
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020674{ echo "$as_me:$LINENO: checking for addrinfo" >&5
20675echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020676if test "${ac_cv_struct_addrinfo+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020677 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020678else
Martin v. Löwis11437992002-04-12 09:54:03 +000020679 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020680/* confdefs.h. */
20681_ACEOF
20682cat confdefs.h >>conftest.$ac_ext
20683cat >>conftest.$ac_ext <<_ACEOF
20684/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020685
20686# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020687int
20688main ()
20689{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020690struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000020691 ;
20692 return 0;
20693}
20694_ACEOF
20695rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020696if { (ac_try="$ac_compile"
20697case "(($ac_try" in
20698 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20699 *) ac_try_echo=$ac_try;;
20700esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020701eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020702 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020703 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020704 grep -v '^ *+' conftest.er1 >conftest.err
20705 rm -f conftest.er1
20706 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020708 (exit $ac_status); } && {
20709 test -z "$ac_c_werror_flag" ||
20710 test ! -s conftest.err
20711 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020712 ac_cv_struct_addrinfo=yes
20713else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020714 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020715sed 's/^/| /' conftest.$ac_ext >&5
20716
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020717 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020718fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020719
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020720rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20721fi
20722
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020723{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
20724echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020725if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020726
20727cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020728#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020729_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020730
20731fi
20732
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020733{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
20734echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020735if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020736 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020737else
Martin v. Löwis11437992002-04-12 09:54:03 +000020738 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020739/* confdefs.h. */
20740_ACEOF
20741cat confdefs.h >>conftest.$ac_ext
20742cat >>conftest.$ac_ext <<_ACEOF
20743/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020744
20745# include <sys/types.h>
20746# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020747int
20748main ()
20749{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020750struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000020751 ;
20752 return 0;
20753}
20754_ACEOF
20755rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020756if { (ac_try="$ac_compile"
20757case "(($ac_try" in
20758 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20759 *) ac_try_echo=$ac_try;;
20760esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020761eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020762 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020763 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020764 grep -v '^ *+' conftest.er1 >conftest.err
20765 rm -f conftest.er1
20766 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020768 (exit $ac_status); } && {
20769 test -z "$ac_c_werror_flag" ||
20770 test ! -s conftest.err
20771 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020772 ac_cv_struct_sockaddr_storage=yes
20773else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020774 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020775sed 's/^/| /' conftest.$ac_ext >&5
20776
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020777 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020778fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020779
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020780rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20781fi
20782
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020783{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
20784echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020785if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020786
20787cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020788#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020789_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020790
20791fi
20792
Guido van Rossum627b2d71993-12-24 10:39:16 +000020793# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000020794
Michael W. Hudson54241132001-12-07 15:38:26 +000020795
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020796{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
20797echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020798if test "${ac_cv_c_char_unsigned+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020799 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000020800else
Martin v. Löwis11437992002-04-12 09:54:03 +000020801 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020802/* confdefs.h. */
20803_ACEOF
20804cat confdefs.h >>conftest.$ac_ext
20805cat >>conftest.$ac_ext <<_ACEOF
20806/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020807$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020808int
20809main ()
20810{
20811static int test_array [1 - 2 * !(((char) -1) < 0)];
20812test_array [0] = 0
20813
20814 ;
20815 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000020816}
Martin v. Löwis11437992002-04-12 09:54:03 +000020817_ACEOF
20818rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020819if { (ac_try="$ac_compile"
20820case "(($ac_try" in
20821 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20822 *) ac_try_echo=$ac_try;;
20823esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020824eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020825 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020826 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020827 grep -v '^ *+' conftest.er1 >conftest.err
20828 rm -f conftest.er1
20829 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020831 (exit $ac_status); } && {
20832 test -z "$ac_c_werror_flag" ||
20833 test ! -s conftest.err
20834 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000020835 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000020836else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020837 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020838sed 's/^/| /' conftest.$ac_ext >&5
20839
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020840 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020841fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020842
20843rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020844fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020845{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
20846echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020847if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020848 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020849#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020850_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020851
20852fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000020853
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020854{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
20855echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020856if test "${ac_cv_c_const+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020857 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000020858else
20859 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020860/* confdefs.h. */
20861_ACEOF
20862cat confdefs.h >>conftest.$ac_ext
20863cat >>conftest.$ac_ext <<_ACEOF
20864/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020865
Martin v. Löwis11437992002-04-12 09:54:03 +000020866int
20867main ()
20868{
20869/* FIXME: Include the comments suggested by Paul. */
20870#ifndef __cplusplus
20871 /* Ultrix mips cc rejects this. */
20872 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020873 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000020874 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020875 char const *const *pcpcc;
20876 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000020877 /* NEC SVR4.0.2 mips cc rejects this. */
20878 struct point {int x, y;};
20879 static struct point const zero = {0,0};
20880 /* AIX XL C 1.02.0.0 rejects this.
20881 It does not let you subtract one const X* pointer from another in
20882 an arm of an if-expression whose if-part is not a constant
20883 expression */
20884 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020885 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020886 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020887 ++pcpcc;
20888 ppc = (char**) pcpcc;
20889 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000020890 { /* SCO 3.2v4 cc rejects this. */
20891 char *t;
20892 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020893
Martin v. Löwis11437992002-04-12 09:54:03 +000020894 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020895 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020896 }
20897 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
20898 int x[] = {25, 17};
20899 const int *foo = &x[0];
20900 ++foo;
20901 }
20902 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
20903 typedef const int *iptr;
20904 iptr p = 0;
20905 ++p;
20906 }
20907 { /* AIX XL C 1.02.0.0 rejects this saying
20908 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
20909 struct s { int j; const int *ap[3]; };
20910 struct s *b; b->j = 5;
20911 }
20912 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
20913 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020914 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020915 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020916 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000020917#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000020918
Martin v. Löwis11437992002-04-12 09:54:03 +000020919 ;
20920 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000020921}
Martin v. Löwis11437992002-04-12 09:54:03 +000020922_ACEOF
20923rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020924if { (ac_try="$ac_compile"
20925case "(($ac_try" in
20926 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20927 *) ac_try_echo=$ac_try;;
20928esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020929eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020930 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020931 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020932 grep -v '^ *+' conftest.er1 >conftest.err
20933 rm -f conftest.er1
20934 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020936 (exit $ac_status); } && {
20937 test -z "$ac_c_werror_flag" ||
20938 test ! -s conftest.err
20939 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020940 ac_cv_c_const=yes
20941else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020942 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020943sed 's/^/| /' conftest.$ac_ext >&5
20944
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020945 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020946fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020947
20948rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020949fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020950{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
20951echo "${ECHO_T}$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020952if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020953
20954cat >>confdefs.h <<\_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020955#define const
Martin v. Löwis11437992002-04-12 09:54:03 +000020956_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020957
20958fi
20959
Michael W. Hudson54241132001-12-07 15:38:26 +000020960
Guido van Rossumda88dad1995-01-26 00:46:29 +000020961works=no
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020962{ echo "$as_me:$LINENO: checking for working volatile" >&5
20963echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020964cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020965/* confdefs.h. */
20966_ACEOF
20967cat confdefs.h >>conftest.$ac_ext
20968cat >>conftest.$ac_ext <<_ACEOF
20969/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000020970
Martin v. Löwis11437992002-04-12 09:54:03 +000020971int
20972main ()
20973{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020974volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020975 ;
20976 return 0;
20977}
20978_ACEOF
20979rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020980if { (ac_try="$ac_compile"
20981case "(($ac_try" in
20982 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20983 *) ac_try_echo=$ac_try;;
20984esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020985eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020986 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020987 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020988 grep -v '^ *+' conftest.er1 >conftest.err
20989 rm -f conftest.er1
20990 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020992 (exit $ac_status); } && {
20993 test -z "$ac_c_werror_flag" ||
20994 test ! -s conftest.err
20995 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000020996 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000020997else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000020998 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020999sed 's/^/| /' conftest.$ac_ext >&5
21000
Martin v. Löwis11437992002-04-12 09:54:03 +000021001
21002cat >>confdefs.h <<\_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021003#define volatile
Martin v. Löwis11437992002-04-12 09:54:03 +000021004_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000021005
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021006
Guido van Rossum627b2d71993-12-24 10:39:16 +000021007fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021008
21009rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021010{ echo "$as_me:$LINENO: result: $works" >&5
21011echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021012
Guido van Rossumda88dad1995-01-26 00:46:29 +000021013works=no
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021014{ echo "$as_me:$LINENO: checking for working signed char" >&5
21015echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021016cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021017/* confdefs.h. */
21018_ACEOF
21019cat confdefs.h >>conftest.$ac_ext
21020cat >>conftest.$ac_ext <<_ACEOF
21021/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000021022
Martin v. Löwis11437992002-04-12 09:54:03 +000021023int
21024main ()
21025{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021026signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000021027 ;
21028 return 0;
21029}
21030_ACEOF
21031rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021032if { (ac_try="$ac_compile"
21033case "(($ac_try" in
21034 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21035 *) ac_try_echo=$ac_try;;
21036esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021037eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021038 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021039 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021040 grep -v '^ *+' conftest.er1 >conftest.err
21041 rm -f conftest.er1
21042 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021044 (exit $ac_status); } && {
21045 test -z "$ac_c_werror_flag" ||
21046 test ! -s conftest.err
21047 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000021048 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000021049else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021050 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021051sed 's/^/| /' conftest.$ac_ext >&5
21052
Martin v. Löwis11437992002-04-12 09:54:03 +000021053
21054cat >>confdefs.h <<\_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021055#define signed
Martin v. Löwis11437992002-04-12 09:54:03 +000021056_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000021057
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021058
Guido van Rossum7f43da71994-08-01 12:15:30 +000021059fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021060
21061rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021062{ echo "$as_me:$LINENO: result: $works" >&5
21063echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021064
Guido van Rossumda88dad1995-01-26 00:46:29 +000021065have_prototypes=no
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021066{ echo "$as_me:$LINENO: checking for prototypes" >&5
21067echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021068cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021069/* confdefs.h. */
21070_ACEOF
21071cat confdefs.h >>conftest.$ac_ext
21072cat >>conftest.$ac_ext <<_ACEOF
21073/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021074int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021075int
21076main ()
21077{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021078return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000021079 ;
21080 return 0;
21081}
21082_ACEOF
21083rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021084if { (ac_try="$ac_compile"
21085case "(($ac_try" in
21086 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21087 *) ac_try_echo=$ac_try;;
21088esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021089eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021090 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021091 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021092 grep -v '^ *+' conftest.er1 >conftest.err
21093 rm -f conftest.er1
21094 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021096 (exit $ac_status); } && {
21097 test -z "$ac_c_werror_flag" ||
21098 test ! -s conftest.err
21099 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021100
21101
21102cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021103#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021104_ACEOF
21105
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021106 have_prototypes=yes
21107
Guido van Rossumf78abae1997-01-21 22:02:36 +000021108else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021109 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021110sed 's/^/| /' conftest.$ac_ext >&5
21111
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021112
Guido van Rossum7f43da71994-08-01 12:15:30 +000021113fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021114
21115rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021116{ echo "$as_me:$LINENO: result: $have_prototypes" >&5
21117echo "${ECHO_T}$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021118
Guido van Rossumda88dad1995-01-26 00:46:29 +000021119works=no
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021120{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
21121echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021122cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021123/* confdefs.h. */
21124_ACEOF
21125cat confdefs.h >>conftest.$ac_ext
21126cat >>conftest.$ac_ext <<_ACEOF
21127/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021128
21129#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000021130int foo(int x, ...) {
21131 va_list va;
21132 va_start(va, x);
21133 va_arg(va, int);
21134 va_arg(va, char *);
21135 va_arg(va, double);
21136 return 0;
21137}
Guido van Rossum7f43da71994-08-01 12:15:30 +000021138
Martin v. Löwis11437992002-04-12 09:54:03 +000021139int
21140main ()
21141{
Guido van Rossum90eea071996-08-30 20:58:57 +000021142return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000021143 ;
21144 return 0;
21145}
21146_ACEOF
21147rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021148if { (ac_try="$ac_compile"
21149case "(($ac_try" in
21150 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21151 *) ac_try_echo=$ac_try;;
21152esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021153eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021154 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021155 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021156 grep -v '^ *+' conftest.er1 >conftest.err
21157 rm -f conftest.er1
21158 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021160 (exit $ac_status); } && {
21161 test -z "$ac_c_werror_flag" ||
21162 test ! -s conftest.err
21163 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021164
21165
21166cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021167#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021168_ACEOF
21169
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021170 works=yes
21171
Guido van Rossumf78abae1997-01-21 22:02:36 +000021172else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021173 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021174sed 's/^/| /' conftest.$ac_ext >&5
21175
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021176
Guido van Rossum627b2d71993-12-24 10:39:16 +000021177fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021178
21179rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021180{ echo "$as_me:$LINENO: result: $works" >&5
21181echo "${ECHO_T}$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021182
Martin v. Löwisd6320502004-08-12 13:45:08 +000021183# check for socketpair
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021184{ echo "$as_me:$LINENO: checking for socketpair" >&5
21185echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000021186cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000021187/* confdefs.h. */
21188_ACEOF
21189cat confdefs.h >>conftest.$ac_ext
21190cat >>conftest.$ac_ext <<_ACEOF
21191/* end confdefs.h. */
21192
21193#include <sys/types.h>
21194#include <sys/socket.h>
21195
21196int
21197main ()
21198{
21199void *x=socketpair
21200 ;
21201 return 0;
21202}
21203_ACEOF
21204rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021205if { (ac_try="$ac_compile"
21206case "(($ac_try" in
21207 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21208 *) ac_try_echo=$ac_try;;
21209esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021210eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021211 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000021212 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021213 grep -v '^ *+' conftest.er1 >conftest.err
21214 rm -f conftest.er1
21215 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021217 (exit $ac_status); } && {
21218 test -z "$ac_c_werror_flag" ||
21219 test ! -s conftest.err
21220 } && test -s conftest.$ac_objext; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000021221
21222cat >>confdefs.h <<\_ACEOF
21223#define HAVE_SOCKETPAIR 1
21224_ACEOF
21225
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021226 { echo "$as_me:$LINENO: result: yes" >&5
21227echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000021228else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021229 echo "$as_me: failed program was:" >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000021230sed 's/^/| /' conftest.$ac_ext >&5
21231
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021232 { echo "$as_me:$LINENO: result: no" >&5
21233echo "${ECHO_T}no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000021234
21235fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021236
21237rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000021238
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021239# check if sockaddr has sa_len member
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021240{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
21241echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021242cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021243/* confdefs.h. */
21244_ACEOF
21245cat confdefs.h >>conftest.$ac_ext
21246cat >>conftest.$ac_ext <<_ACEOF
21247/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021248#include <sys/types.h>
21249#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021250int
21251main ()
21252{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021253struct sockaddr x;
21254x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021255 ;
21256 return 0;
21257}
21258_ACEOF
21259rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021260if { (ac_try="$ac_compile"
21261case "(($ac_try" in
21262 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21263 *) ac_try_echo=$ac_try;;
21264esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021265eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021266 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021267 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021268 grep -v '^ *+' conftest.er1 >conftest.err
21269 rm -f conftest.er1
21270 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021272 (exit $ac_status); } && {
21273 test -z "$ac_c_werror_flag" ||
21274 test ! -s conftest.err
21275 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021276 { echo "$as_me:$LINENO: result: yes" >&5
21277echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021278
21279cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021280#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021281_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021282
21283else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021284 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021285sed 's/^/| /' conftest.$ac_ext >&5
21286
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021287 { echo "$as_me:$LINENO: result: no" >&5
21288echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021289fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021290
21291rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021292
Guido van Rossumda88dad1995-01-26 00:46:29 +000021293va_list_is_array=no
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021294{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
21295echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021296cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021297/* confdefs.h. */
21298_ACEOF
21299cat confdefs.h >>conftest.$ac_ext
21300cat >>conftest.$ac_ext <<_ACEOF
21301/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021302
21303#ifdef HAVE_STDARG_PROTOTYPES
21304#include <stdarg.h>
21305#else
21306#include <varargs.h>
21307#endif
21308
Martin v. Löwis11437992002-04-12 09:54:03 +000021309int
21310main ()
21311{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021312va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000021313 ;
21314 return 0;
21315}
21316_ACEOF
21317rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021318if { (ac_try="$ac_compile"
21319case "(($ac_try" in
21320 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21321 *) ac_try_echo=$ac_try;;
21322esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021323eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021324 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021325 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021326 grep -v '^ *+' conftest.er1 >conftest.err
21327 rm -f conftest.er1
21328 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021330 (exit $ac_status); } && {
21331 test -z "$ac_c_werror_flag" ||
21332 test ! -s conftest.err
21333 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021334 :
21335else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021336 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021337sed 's/^/| /' conftest.$ac_ext >&5
21338
Martin v. Löwis11437992002-04-12 09:54:03 +000021339
21340
21341cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021342#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021343_ACEOF
21344
Guido van Rossumda88dad1995-01-26 00:46:29 +000021345 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021346
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021347fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021348
21349rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021350{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
21351echo "${ECHO_T}$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021352
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021353# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000021354
21355
21356
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021357{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
21358echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021359if test "${ac_cv_func_gethostbyname_r+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021360 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021361else
Martin v. Löwis11437992002-04-12 09:54:03 +000021362 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021363/* confdefs.h. */
21364_ACEOF
21365cat confdefs.h >>conftest.$ac_ext
21366cat >>conftest.$ac_ext <<_ACEOF
21367/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021368/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
21369 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21370#define gethostbyname_r innocuous_gethostbyname_r
21371
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021372/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021373 which can conflict with char gethostbyname_r (); below.
21374 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021375 <limits.h> exists even on freestanding compilers. */
21376
21377#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021378# include <limits.h>
21379#else
21380# include <assert.h>
21381#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021382
21383#undef gethostbyname_r
21384
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021385/* Override any GCC internal prototype to avoid an error.
21386 Use char because int might match the return type of a GCC
21387 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021388#ifdef __cplusplus
21389extern "C"
21390#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021391char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021392/* The GNU C library defines this for functions which it implements
21393 to always fail with ENOSYS. Some functions are actually named
21394 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021395#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021396choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021397#endif
21398
Skip Montanaro6dead952003-09-25 14:50:04 +000021399int
21400main ()
21401{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021402return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021403 ;
21404 return 0;
21405}
21406_ACEOF
21407rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021408if { (ac_try="$ac_link"
21409case "(($ac_try" in
21410 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21411 *) ac_try_echo=$ac_try;;
21412esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021413eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021414 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021415 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021416 grep -v '^ *+' conftest.er1 >conftest.err
21417 rm -f conftest.er1
21418 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021420 (exit $ac_status); } && {
21421 test -z "$ac_c_werror_flag" ||
21422 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021423 } && test -s conftest$ac_exeext &&
21424 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021425 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021426else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021427 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021428sed 's/^/| /' conftest.$ac_ext >&5
21429
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021430 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021431fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021432
21433rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021434 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021435fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021436{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
21437echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
21438if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021439
Martin v. Löwis11437992002-04-12 09:54:03 +000021440 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021441#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021442_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021443
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021444 { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
21445echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021446 OLD_CFLAGS=$CFLAGS
21447 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000021448 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021449/* confdefs.h. */
21450_ACEOF
21451cat confdefs.h >>conftest.$ac_ext
21452cat >>conftest.$ac_ext <<_ACEOF
21453/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021454
21455# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021456
Martin v. Löwis11437992002-04-12 09:54:03 +000021457int
21458main ()
21459{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021460
21461 char *name;
21462 struct hostent *he, *res;
21463 char buffer[2048];
21464 int buflen = 2048;
21465 int h_errnop;
21466
21467 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000021468
21469 ;
21470 return 0;
21471}
21472_ACEOF
21473rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021474if { (ac_try="$ac_compile"
21475case "(($ac_try" in
21476 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21477 *) ac_try_echo=$ac_try;;
21478esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021479eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021480 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021481 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021482 grep -v '^ *+' conftest.er1 >conftest.err
21483 rm -f conftest.er1
21484 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021486 (exit $ac_status); } && {
21487 test -z "$ac_c_werror_flag" ||
21488 test ! -s conftest.err
21489 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021490
21491 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021492#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021493_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021494
Martin v. Löwis11437992002-04-12 09:54:03 +000021495
21496cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021497#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021498_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021499
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021500 { echo "$as_me:$LINENO: result: yes" >&5
21501echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021502
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021503else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021504 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021505sed 's/^/| /' conftest.$ac_ext >&5
21506
Martin v. Löwis11437992002-04-12 09:54:03 +000021507
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021508 { echo "$as_me:$LINENO: result: no" >&5
21509echo "${ECHO_T}no" >&6; }
21510 { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
21511echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021512 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021513/* confdefs.h. */
21514_ACEOF
21515cat confdefs.h >>conftest.$ac_ext
21516cat >>conftest.$ac_ext <<_ACEOF
21517/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021518
21519# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021520
Martin v. Löwis11437992002-04-12 09:54:03 +000021521int
21522main ()
21523{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021524
21525 char *name;
21526 struct hostent *he;
21527 char buffer[2048];
21528 int buflen = 2048;
21529 int h_errnop;
21530
21531 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000021532
21533 ;
21534 return 0;
21535}
21536_ACEOF
21537rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021538if { (ac_try="$ac_compile"
21539case "(($ac_try" in
21540 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21541 *) ac_try_echo=$ac_try;;
21542esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021543eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021544 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021545 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021546 grep -v '^ *+' conftest.er1 >conftest.err
21547 rm -f conftest.er1
21548 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021549 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021550 (exit $ac_status); } && {
21551 test -z "$ac_c_werror_flag" ||
21552 test ! -s conftest.err
21553 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021554
21555 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021556#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021557_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021558
Martin v. Löwis11437992002-04-12 09:54:03 +000021559
21560cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021561#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021562_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021563
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021564 { echo "$as_me:$LINENO: result: yes" >&5
21565echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021566
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021567else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021568 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021569sed 's/^/| /' conftest.$ac_ext >&5
21570
Martin v. Löwis11437992002-04-12 09:54:03 +000021571
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021572 { echo "$as_me:$LINENO: result: no" >&5
21573echo "${ECHO_T}no" >&6; }
21574 { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
21575echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021576 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021577/* confdefs.h. */
21578_ACEOF
21579cat confdefs.h >>conftest.$ac_ext
21580cat >>conftest.$ac_ext <<_ACEOF
21581/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021582
21583# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021584
Martin v. Löwis11437992002-04-12 09:54:03 +000021585int
21586main ()
21587{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021588
21589 char *name;
21590 struct hostent *he;
21591 struct hostent_data data;
21592
21593 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000021594
21595 ;
21596 return 0;
21597}
21598_ACEOF
21599rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021600if { (ac_try="$ac_compile"
21601case "(($ac_try" in
21602 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21603 *) ac_try_echo=$ac_try;;
21604esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021605eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021606 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021607 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021608 grep -v '^ *+' conftest.er1 >conftest.err
21609 rm -f conftest.er1
21610 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021612 (exit $ac_status); } && {
21613 test -z "$ac_c_werror_flag" ||
21614 test ! -s conftest.err
21615 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021616
21617 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021618#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021619_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021620
Martin v. Löwis11437992002-04-12 09:54:03 +000021621
21622cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021623#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021624_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021625
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021626 { echo "$as_me:$LINENO: result: yes" >&5
21627echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021628
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021629else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021630 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021631sed 's/^/| /' conftest.$ac_ext >&5
21632
Martin v. Löwis11437992002-04-12 09:54:03 +000021633
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021634 { echo "$as_me:$LINENO: result: no" >&5
21635echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021636
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021637fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021638
21639rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021640
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021641fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021642
21643rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021644
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021645fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021646
21647rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021648 CFLAGS=$OLD_CFLAGS
21649
21650else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021651
Martin v. Löwis11437992002-04-12 09:54:03 +000021652
21653for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000021654do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021655as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21656{ echo "$as_me:$LINENO: checking for $ac_func" >&5
21657echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021658if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021659 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021660else
Martin v. Löwis11437992002-04-12 09:54:03 +000021661 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021662/* confdefs.h. */
21663_ACEOF
21664cat confdefs.h >>conftest.$ac_ext
21665cat >>conftest.$ac_ext <<_ACEOF
21666/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021667/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21668 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21669#define $ac_func innocuous_$ac_func
21670
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021671/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021672 which can conflict with char $ac_func (); below.
21673 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021674 <limits.h> exists even on freestanding compilers. */
21675
21676#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021677# include <limits.h>
21678#else
21679# include <assert.h>
21680#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021681
21682#undef $ac_func
21683
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021684/* Override any GCC internal prototype to avoid an error.
21685 Use char because int might match the return type of a GCC
21686 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021687#ifdef __cplusplus
21688extern "C"
21689#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021690char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021691/* The GNU C library defines this for functions which it implements
21692 to always fail with ENOSYS. Some functions are actually named
21693 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021694#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021695choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021696#endif
21697
Skip Montanaro6dead952003-09-25 14:50:04 +000021698int
21699main ()
21700{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021701return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021702 ;
21703 return 0;
21704}
21705_ACEOF
21706rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021707if { (ac_try="$ac_link"
21708case "(($ac_try" in
21709 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21710 *) ac_try_echo=$ac_try;;
21711esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021712eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021713 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021714 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021715 grep -v '^ *+' conftest.er1 >conftest.err
21716 rm -f conftest.er1
21717 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021719 (exit $ac_status); } && {
21720 test -z "$ac_c_werror_flag" ||
21721 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021722 } && test -s conftest$ac_exeext &&
21723 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021724 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000021725else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021726 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021727sed 's/^/| /' conftest.$ac_ext >&5
21728
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021729 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000021730fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021731
21732rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021733 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021734fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021735ac_res=`eval echo '${'$as_ac_var'}'`
21736 { echo "$as_me:$LINENO: result: $ac_res" >&5
21737echo "${ECHO_T}$ac_res" >&6; }
21738if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021739 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021740#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021741_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021742
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021743fi
Thomas Wouters3a584202000-08-05 23:28:51 +000021744done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021745
Michael W. Hudson54241132001-12-07 15:38:26 +000021746
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021747fi
21748
Michael W. Hudson54241132001-12-07 15:38:26 +000021749
21750
21751
21752
21753
21754
Guido van Rossum627b2d71993-12-24 10:39:16 +000021755# checks for system services
21756# (none yet)
21757
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021758# Linux requires this for correct f.p. operations
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021759{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
21760echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021761if test "${ac_cv_func___fpu_control+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021762 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021763else
Martin v. Löwis11437992002-04-12 09:54:03 +000021764 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021765/* confdefs.h. */
21766_ACEOF
21767cat confdefs.h >>conftest.$ac_ext
21768cat >>conftest.$ac_ext <<_ACEOF
21769/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021770/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
21771 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21772#define __fpu_control innocuous___fpu_control
21773
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021774/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021775 which can conflict with char __fpu_control (); below.
21776 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021777 <limits.h> exists even on freestanding compilers. */
21778
21779#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021780# include <limits.h>
21781#else
21782# include <assert.h>
21783#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021784
21785#undef __fpu_control
21786
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021787/* Override any GCC internal prototype to avoid an error.
21788 Use char because int might match the return type of a GCC
21789 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021790#ifdef __cplusplus
21791extern "C"
21792#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021793char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021794/* The GNU C library defines this for functions which it implements
21795 to always fail with ENOSYS. Some functions are actually named
21796 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021797#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021798choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021799#endif
21800
Skip Montanaro6dead952003-09-25 14:50:04 +000021801int
21802main ()
21803{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021804return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021805 ;
21806 return 0;
21807}
21808_ACEOF
21809rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021810if { (ac_try="$ac_link"
21811case "(($ac_try" in
21812 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21813 *) ac_try_echo=$ac_try;;
21814esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021815eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021816 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021817 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021818 grep -v '^ *+' conftest.er1 >conftest.err
21819 rm -f conftest.er1
21820 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021822 (exit $ac_status); } && {
21823 test -z "$ac_c_werror_flag" ||
21824 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021825 } && test -s conftest$ac_exeext &&
21826 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021827 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021828else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021829 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021830sed 's/^/| /' conftest.$ac_ext >&5
21831
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021832 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021833fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021834
21835rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021836 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021837fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021838{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
21839echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
21840if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021841 :
21842else
Martin v. Löwis11437992002-04-12 09:54:03 +000021843
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021844{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
21845echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021846if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021847 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021848else
Martin v. Löwis11437992002-04-12 09:54:03 +000021849 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000021850LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000021851cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021852/* confdefs.h. */
21853_ACEOF
21854cat confdefs.h >>conftest.$ac_ext
21855cat >>conftest.$ac_ext <<_ACEOF
21856/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021857
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021858/* Override any GCC internal prototype to avoid an error.
21859 Use char because int might match the return type of a GCC
21860 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021861#ifdef __cplusplus
21862extern "C"
21863#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021864char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021865int
21866main ()
21867{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021868return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021869 ;
21870 return 0;
21871}
21872_ACEOF
21873rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021874if { (ac_try="$ac_link"
21875case "(($ac_try" in
21876 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21877 *) ac_try_echo=$ac_try;;
21878esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021879eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021880 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021881 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021882 grep -v '^ *+' conftest.er1 >conftest.err
21883 rm -f conftest.er1
21884 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021886 (exit $ac_status); } && {
21887 test -z "$ac_c_werror_flag" ||
21888 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021889 } && test -s conftest$ac_exeext &&
21890 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021891 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000021892else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021893 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021894sed 's/^/| /' conftest.$ac_ext >&5
21895
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021896 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000021897fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021898
21899rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021900 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021901LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021902fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021903{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
21904echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
21905if test $ac_cv_lib_ieee___fpu_control = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021906 cat >>confdefs.h <<_ACEOF
21907#define HAVE_LIBIEEE 1
21908_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021909
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000021910 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021911
Guido van Rossum627b2d71993-12-24 10:39:16 +000021912fi
21913
Michael W. Hudson54241132001-12-07 15:38:26 +000021914
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021915fi
21916
Michael W. Hudson54241132001-12-07 15:38:26 +000021917
Guido van Rossum7f253911997-05-09 02:42:48 +000021918# Check for --with-fpectl
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021919{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
21920echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021921
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021922# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000021923if test "${with_fpectl+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021924 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000021925if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000021926then
21927
21928cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000021929#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021930_ACEOF
21931
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021932 { echo "$as_me:$LINENO: result: yes" >&5
21933echo "${ECHO_T}yes" >&6; }
21934else { echo "$as_me:$LINENO: result: no" >&5
21935echo "${ECHO_T}no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000021936fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000021937else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021938 { echo "$as_me:$LINENO: result: no" >&5
21939echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021940fi
21941
Guido van Rossum7f253911997-05-09 02:42:48 +000021942
Guido van Rossum7f43da71994-08-01 12:15:30 +000021943# check for --with-libm=...
21944
Guido van Rossum563e7081996-09-10 18:20:48 +000021945case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000021946Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000021947*) LIBM=-lm
21948esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021949{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
21950echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021951
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021952# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000021953if test "${with_libm+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021954 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000021955if test "$withval" = no
21956then LIBM=
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021957 { echo "$as_me:$LINENO: result: force LIBM empty" >&5
21958echo "${ECHO_T}force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000021959elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000021960then LIBM=$withval
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021961 { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
21962echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
21963else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
21964echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000021965 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021966fi
Guido van Rossum7f253911997-05-09 02:42:48 +000021967else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021968 { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
21969echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021970fi
21971
Guido van Rossum7f43da71994-08-01 12:15:30 +000021972
21973# check for --with-libc=...
21974
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021975{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
21976echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021977
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021978# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000021979if test "${with_libc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021980 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000021981if test "$withval" = no
21982then LIBC=
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021983 { echo "$as_me:$LINENO: result: force LIBC empty" >&5
21984echo "${ECHO_T}force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000021985elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000021986then LIBC=$withval
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021987 { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
21988echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
21989else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
21990echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000021991 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021992fi
Guido van Rossum7f253911997-05-09 02:42:48 +000021993else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000021994 { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
21995echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021996fi
21997
Guido van Rossum7f43da71994-08-01 12:15:30 +000021998
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021999# **************************************************
22000# * Check for various properties of floating point *
22001# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022002
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022003{ echo "$as_me:$LINENO: checking whether C doubles are little-endian IEEE 754 binary64" >&5
22004echo $ECHO_N "checking whether C doubles are little-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022005if test "${ac_cv_little_endian_double+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022006 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022007else
22008
22009if test "$cross_compiling" = yes; then
22010 ac_cv_little_endian_double=no
22011else
22012 cat >conftest.$ac_ext <<_ACEOF
22013/* confdefs.h. */
22014_ACEOF
22015cat confdefs.h >>conftest.$ac_ext
22016cat >>conftest.$ac_ext <<_ACEOF
22017/* end confdefs.h. */
22018
22019#include <string.h>
22020int main() {
22021 double x = 9006104071832581.0;
22022 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
22023 return 0;
22024 else
22025 return 1;
22026}
22027
22028_ACEOF
22029rm -f conftest$ac_exeext
22030if { (ac_try="$ac_link"
22031case "(($ac_try" in
22032 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22033 *) ac_try_echo=$ac_try;;
22034esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022035eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022036 (eval "$ac_link") 2>&5
22037 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022039 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22040 { (case "(($ac_try" in
22041 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22042 *) ac_try_echo=$ac_try;;
22043esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022044eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022045 (eval "$ac_try") 2>&5
22046 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022048 (exit $ac_status); }; }; then
22049 ac_cv_little_endian_double=yes
22050else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022051 echo "$as_me: program exited with status $ac_status" >&5
22052echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022053sed 's/^/| /' conftest.$ac_ext >&5
22054
22055( exit $ac_status )
22056ac_cv_little_endian_double=no
22057fi
22058rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22059fi
22060
22061
22062fi
22063
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022064{ echo "$as_me:$LINENO: result: $ac_cv_little_endian_double" >&5
22065echo "${ECHO_T}$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022066if test "$ac_cv_little_endian_double" = yes
22067then
22068
22069cat >>confdefs.h <<\_ACEOF
22070#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1
22071_ACEOF
22072
22073fi
22074
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022075{ echo "$as_me:$LINENO: checking whether C doubles are big-endian IEEE 754 binary64" >&5
22076echo $ECHO_N "checking whether C doubles are big-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022077if test "${ac_cv_big_endian_double+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022078 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022079else
22080
22081if test "$cross_compiling" = yes; then
22082 ac_cv_big_endian_double=no
22083else
22084 cat >conftest.$ac_ext <<_ACEOF
22085/* confdefs.h. */
22086_ACEOF
22087cat confdefs.h >>conftest.$ac_ext
22088cat >>conftest.$ac_ext <<_ACEOF
22089/* end confdefs.h. */
22090
22091#include <string.h>
22092int main() {
22093 double x = 9006104071832581.0;
22094 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
22095 return 0;
22096 else
22097 return 1;
22098}
22099
22100_ACEOF
22101rm -f conftest$ac_exeext
22102if { (ac_try="$ac_link"
22103case "(($ac_try" in
22104 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22105 *) ac_try_echo=$ac_try;;
22106esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022107eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022108 (eval "$ac_link") 2>&5
22109 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022110 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022111 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22112 { (case "(($ac_try" in
22113 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22114 *) ac_try_echo=$ac_try;;
22115esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022116eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022117 (eval "$ac_try") 2>&5
22118 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022120 (exit $ac_status); }; }; then
22121 ac_cv_big_endian_double=yes
22122else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022123 echo "$as_me: program exited with status $ac_status" >&5
22124echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022125sed 's/^/| /' conftest.$ac_ext >&5
22126
22127( exit $ac_status )
22128ac_cv_big_endian_double=no
22129fi
22130rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22131fi
22132
22133
22134fi
22135
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022136{ echo "$as_me:$LINENO: result: $ac_cv_big_endian_double" >&5
22137echo "${ECHO_T}$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022138if test "$ac_cv_big_endian_double" = yes
22139then
22140
22141cat >>confdefs.h <<\_ACEOF
22142#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1
22143_ACEOF
22144
22145fi
22146
22147# Some ARM platforms use a mixed-endian representation for doubles.
22148# While Python doesn't currently have full support for these platforms
22149# (see e.g., issue 1762561), we can at least make sure that float <-> string
22150# conversions work.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022151{ echo "$as_me:$LINENO: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
22152echo $ECHO_N "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022153if test "${ac_cv_mixed_endian_double+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022154 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022155else
22156
22157if test "$cross_compiling" = yes; then
22158 ac_cv_mixed_endian_double=no
22159else
22160 cat >conftest.$ac_ext <<_ACEOF
22161/* confdefs.h. */
22162_ACEOF
22163cat confdefs.h >>conftest.$ac_ext
22164cat >>conftest.$ac_ext <<_ACEOF
22165/* end confdefs.h. */
22166
22167#include <string.h>
22168int main() {
22169 double x = 9006104071832581.0;
22170 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
22171 return 0;
22172 else
22173 return 1;
22174}
22175
22176_ACEOF
22177rm -f conftest$ac_exeext
22178if { (ac_try="$ac_link"
22179case "(($ac_try" in
22180 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22181 *) ac_try_echo=$ac_try;;
22182esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022183eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022184 (eval "$ac_link") 2>&5
22185 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022186 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022187 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22188 { (case "(($ac_try" in
22189 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22190 *) ac_try_echo=$ac_try;;
22191esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022192eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022193 (eval "$ac_try") 2>&5
22194 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022195 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022196 (exit $ac_status); }; }; then
22197 ac_cv_mixed_endian_double=yes
22198else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022199 echo "$as_me: program exited with status $ac_status" >&5
22200echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022201sed 's/^/| /' conftest.$ac_ext >&5
22202
22203( exit $ac_status )
22204ac_cv_mixed_endian_double=no
22205fi
22206rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22207fi
22208
22209
22210fi
22211
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022212{ echo "$as_me:$LINENO: result: $ac_cv_mixed_endian_double" >&5
22213echo "${ECHO_T}$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022214if test "$ac_cv_mixed_endian_double" = yes
22215then
22216
22217cat >>confdefs.h <<\_ACEOF
22218#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1
22219_ACEOF
22220
22221fi
22222
Mark Dickinson7abf8d42009-04-18 20:17:52 +000022223# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000022224# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000022225# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000022226# rounding; this is a problem on x86, where the x87 FPU has a default
22227# rounding precision of 64 bits. For gcc/x86, we try to fix this by
22228# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022229if test "$GCC" = yes && test -n "`$CC -dM -E - </dev/null | grep i386`"
22230then
Mark Dickinson7abf8d42009-04-18 20:17:52 +000022231 # Check that it's okay to use gcc inline assembler to get and set
Mark Dickinson10683072009-04-18 21:18:19 +000022232 # x87 control word. It should be, but you never know...
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022233 { echo "$as_me:$LINENO: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
22234echo $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 +000022235 cat >conftest.$ac_ext <<_ACEOF
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022236/* confdefs.h. */
22237_ACEOF
22238cat confdefs.h >>conftest.$ac_ext
22239cat >>conftest.$ac_ext <<_ACEOF
22240/* end confdefs.h. */
22241
22242int
22243main ()
22244{
22245
Mark Dickinson7abf8d42009-04-18 20:17:52 +000022246 unsigned short cw;
22247 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
22248 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022249
22250 ;
22251 return 0;
22252}
22253_ACEOF
22254rm -f conftest.$ac_objext
22255if { (ac_try="$ac_compile"
22256case "(($ac_try" in
22257 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22258 *) ac_try_echo=$ac_try;;
22259esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022260eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022261 (eval "$ac_compile") 2>conftest.er1
22262 ac_status=$?
22263 grep -v '^ *+' conftest.er1 >conftest.err
22264 rm -f conftest.er1
22265 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022267 (exit $ac_status); } && {
22268 test -z "$ac_c_werror_flag" ||
22269 test ! -s conftest.err
22270 } && test -s conftest.$ac_objext; then
22271 have_gcc_asm_for_x87=yes
22272else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022273 echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022274sed 's/^/| /' conftest.$ac_ext >&5
22275
22276 have_gcc_asm_for_x87=no
22277fi
22278
22279rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022280 { echo "$as_me:$LINENO: result: $have_gcc_asm_for_x87" >&5
22281echo "${ECHO_T}$have_gcc_asm_for_x87" >&6; }
Mark Dickinson7abf8d42009-04-18 20:17:52 +000022282 if test "$have_gcc_asm_for_x87" = yes
22283 then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022284
22285cat >>confdefs.h <<\_ACEOF
22286#define HAVE_GCC_ASM_FOR_X87 1
22287_ACEOF
22288
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022289 fi
22290fi
Martin v. Löwis11437992002-04-12 09:54:03 +000022291
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022292# Detect whether system arithmetic is subject to x87-style double
22293# rounding issues. The result of this test has little meaning on non
22294# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
22295# mode is round-to-nearest and double rounding issues are present, and
22296# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022297{ echo "$as_me:$LINENO: checking for x87-style double rounding" >&5
22298echo $ECHO_N "checking for x87-style double rounding... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022299# $BASECFLAGS may affect the result
22300ac_save_cc="$CC"
22301CC="$CC $BASECFLAGS"
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022302if test "$cross_compiling" = yes; then
22303 ac_cv_x87_double_rounding=no
22304else
22305 cat >conftest.$ac_ext <<_ACEOF
22306/* confdefs.h. */
22307_ACEOF
22308cat confdefs.h >>conftest.$ac_ext
22309cat >>conftest.$ac_ext <<_ACEOF
22310/* end confdefs.h. */
22311
22312#include <stdlib.h>
22313#include <math.h>
22314int main() {
22315 volatile double x, y, z;
22316 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
22317 x = 0.99999999999999989; /* 1-2**-53 */
22318 y = 1./x;
22319 if (y != 1.)
22320 exit(0);
22321 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
22322 x = 1e16;
22323 y = 2.99999;
22324 z = x + y;
22325 if (z != 1e16+4.)
22326 exit(0);
22327 /* both tests show evidence of double rounding */
22328 exit(1);
22329}
22330
22331_ACEOF
22332rm -f conftest$ac_exeext
22333if { (ac_try="$ac_link"
22334case "(($ac_try" in
22335 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22336 *) ac_try_echo=$ac_try;;
22337esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022338eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022339 (eval "$ac_link") 2>&5
22340 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022342 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22343 { (case "(($ac_try" in
22344 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22345 *) ac_try_echo=$ac_try;;
22346esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022347eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022348 (eval "$ac_try") 2>&5
22349 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022351 (exit $ac_status); }; }; then
22352 ac_cv_x87_double_rounding=no
22353else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022354 echo "$as_me: program exited with status $ac_status" >&5
22355echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022356sed 's/^/| /' conftest.$ac_ext >&5
22357
22358( exit $ac_status )
22359ac_cv_x87_double_rounding=yes
22360fi
22361rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22362fi
22363
22364
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022365CC="$ac_save_cc"
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022366{ echo "$as_me:$LINENO: result: $ac_cv_x87_double_rounding" >&5
22367echo "${ECHO_T}$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022368if test "$ac_cv_x87_double_rounding" = yes
22369then
22370
22371cat >>confdefs.h <<\_ACEOF
22372#define X87_DOUBLE_ROUNDING 1
22373_ACEOF
22374
22375fi
22376
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022377# ************************************
22378# * Check for mathematical functions *
22379# ************************************
22380
22381LIBS_SAVE=$LIBS
22382LIBS="$LIBS $LIBM"
22383
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022384# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
22385# -0. on some architectures.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022386{ echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5
22387echo $ECHO_N "checking whether tanh preserves the sign of zero... $ECHO_C" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022388if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022389 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022390else
22391
22392if test "$cross_compiling" = yes; then
22393 ac_cv_tanh_preserves_zero_sign=no
22394else
22395 cat >conftest.$ac_ext <<_ACEOF
22396/* confdefs.h. */
22397_ACEOF
22398cat confdefs.h >>conftest.$ac_ext
22399cat >>conftest.$ac_ext <<_ACEOF
22400/* end confdefs.h. */
22401
22402#include <math.h>
22403#include <stdlib.h>
22404int main() {
22405 /* return 0 if either negative zeros don't exist
22406 on this platform or if negative zeros exist
22407 and tanh(-0.) == -0. */
22408 if (atan2(0., -1.) == atan2(-0., -1.) ||
22409 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
22410 else exit(1);
22411}
22412
22413_ACEOF
22414rm -f conftest$ac_exeext
22415if { (ac_try="$ac_link"
22416case "(($ac_try" in
22417 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22418 *) ac_try_echo=$ac_try;;
22419esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022420eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022421 (eval "$ac_link") 2>&5
22422 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022424 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22425 { (case "(($ac_try" in
22426 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22427 *) ac_try_echo=$ac_try;;
22428esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022429eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022430 (eval "$ac_try") 2>&5
22431 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022433 (exit $ac_status); }; }; then
22434 ac_cv_tanh_preserves_zero_sign=yes
22435else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022436 echo "$as_me: program exited with status $ac_status" >&5
22437echo "$as_me: failed program was:" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022438sed 's/^/| /' conftest.$ac_ext >&5
22439
22440( exit $ac_status )
22441ac_cv_tanh_preserves_zero_sign=no
22442fi
22443rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22444fi
22445
22446
22447fi
22448
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022449{ echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5
22450echo "${ECHO_T}$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022451if test "$ac_cv_tanh_preserves_zero_sign" = yes
22452then
22453
22454cat >>confdefs.h <<\_ACEOF
22455#define TANH_PRESERVES_ZERO_SIGN 1
22456_ACEOF
22457
22458fi
22459
22460
Guido van Rossum2b3ac691996-08-30 15:18:41 +000022461
Michael W. Hudson54241132001-12-07 15:38:26 +000022462
Christian Heimes99170a52007-12-19 02:07:34 +000022463
22464
22465
22466
22467
Mark Dickinsonf2537862009-04-18 13:58:18 +000022468
22469for ac_func in acosh asinh atanh copysign expm1 finite hypot log1p round
Christian Heimes99170a52007-12-19 02:07:34 +000022470do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022471as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
22472{ echo "$as_me:$LINENO: checking for $ac_func" >&5
22473echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Christian Heimes99170a52007-12-19 02:07:34 +000022474if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022475 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes99170a52007-12-19 02:07:34 +000022476else
22477 cat >conftest.$ac_ext <<_ACEOF
22478/* confdefs.h. */
22479_ACEOF
22480cat confdefs.h >>conftest.$ac_ext
22481cat >>conftest.$ac_ext <<_ACEOF
22482/* end confdefs.h. */
22483/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22484 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22485#define $ac_func innocuous_$ac_func
22486
22487/* System header to define __stub macros and hopefully few prototypes,
22488 which can conflict with char $ac_func (); below.
22489 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22490 <limits.h> exists even on freestanding compilers. */
22491
22492#ifdef __STDC__
22493# include <limits.h>
22494#else
22495# include <assert.h>
22496#endif
22497
22498#undef $ac_func
22499
22500/* Override any GCC internal prototype to avoid an error.
22501 Use char because int might match the return type of a GCC
22502 builtin and then its argument prototype would still apply. */
22503#ifdef __cplusplus
22504extern "C"
22505#endif
22506char $ac_func ();
22507/* The GNU C library defines this for functions which it implements
22508 to always fail with ENOSYS. Some functions are actually named
22509 something starting with __ and the normal name is an alias. */
22510#if defined __stub_$ac_func || defined __stub___$ac_func
22511choke me
22512#endif
22513
22514int
22515main ()
22516{
22517return $ac_func ();
22518 ;
22519 return 0;
22520}
22521_ACEOF
22522rm -f conftest.$ac_objext conftest$ac_exeext
22523if { (ac_try="$ac_link"
22524case "(($ac_try" in
22525 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22526 *) ac_try_echo=$ac_try;;
22527esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022528eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes99170a52007-12-19 02:07:34 +000022529 (eval "$ac_link") 2>conftest.er1
22530 ac_status=$?
22531 grep -v '^ *+' conftest.er1 >conftest.err
22532 rm -f conftest.er1
22533 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes99170a52007-12-19 02:07:34 +000022535 (exit $ac_status); } && {
22536 test -z "$ac_c_werror_flag" ||
22537 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022538 } && test -s conftest$ac_exeext &&
22539 $as_test_x conftest$ac_exeext; then
Christian Heimes99170a52007-12-19 02:07:34 +000022540 eval "$as_ac_var=yes"
22541else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022542 echo "$as_me: failed program was:" >&5
Christian Heimes99170a52007-12-19 02:07:34 +000022543sed 's/^/| /' conftest.$ac_ext >&5
22544
22545 eval "$as_ac_var=no"
22546fi
22547
22548rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
22549 conftest$ac_exeext conftest.$ac_ext
22550fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022551ac_res=`eval echo '${'$as_ac_var'}'`
22552 { echo "$as_me:$LINENO: result: $ac_res" >&5
22553echo "${ECHO_T}$ac_res" >&6; }
22554if test `eval echo '${'$as_ac_var'}'` = yes; then
Christian Heimes99170a52007-12-19 02:07:34 +000022555 cat >>confdefs.h <<_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022556#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes99170a52007-12-19 02:07:34 +000022557_ACEOF
22558
22559fi
22560done
22561
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022562{ echo "$as_me:$LINENO: checking whether isinf is declared" >&5
22563echo $ECHO_N "checking whether isinf is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022564if test "${ac_cv_have_decl_isinf+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022565 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022566else
22567 cat >conftest.$ac_ext <<_ACEOF
22568/* confdefs.h. */
22569_ACEOF
22570cat confdefs.h >>conftest.$ac_ext
22571cat >>conftest.$ac_ext <<_ACEOF
22572/* end confdefs.h. */
22573#include <math.h>
22574
22575int
22576main ()
22577{
22578#ifndef isinf
22579 (void) isinf;
22580#endif
22581
22582 ;
22583 return 0;
22584}
22585_ACEOF
22586rm -f conftest.$ac_objext
22587if { (ac_try="$ac_compile"
22588case "(($ac_try" in
22589 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22590 *) ac_try_echo=$ac_try;;
22591esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022592eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022593 (eval "$ac_compile") 2>conftest.er1
22594 ac_status=$?
22595 grep -v '^ *+' conftest.er1 >conftest.err
22596 rm -f conftest.er1
22597 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022598 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022599 (exit $ac_status); } && {
22600 test -z "$ac_c_werror_flag" ||
22601 test ! -s conftest.err
22602 } && test -s conftest.$ac_objext; then
22603 ac_cv_have_decl_isinf=yes
22604else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022605 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022606sed 's/^/| /' conftest.$ac_ext >&5
22607
22608 ac_cv_have_decl_isinf=no
22609fi
22610
22611rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22612fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022613{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isinf" >&5
22614echo "${ECHO_T}$ac_cv_have_decl_isinf" >&6; }
22615if test $ac_cv_have_decl_isinf = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022616
22617cat >>confdefs.h <<_ACEOF
22618#define HAVE_DECL_ISINF 1
22619_ACEOF
22620
22621
22622else
22623 cat >>confdefs.h <<_ACEOF
22624#define HAVE_DECL_ISINF 0
22625_ACEOF
22626
22627
22628fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022629{ echo "$as_me:$LINENO: checking whether isnan is declared" >&5
22630echo $ECHO_N "checking whether isnan is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022631if test "${ac_cv_have_decl_isnan+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022632 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022633else
22634 cat >conftest.$ac_ext <<_ACEOF
22635/* confdefs.h. */
22636_ACEOF
22637cat confdefs.h >>conftest.$ac_ext
22638cat >>conftest.$ac_ext <<_ACEOF
22639/* end confdefs.h. */
22640#include <math.h>
22641
22642int
22643main ()
22644{
22645#ifndef isnan
22646 (void) isnan;
22647#endif
22648
22649 ;
22650 return 0;
22651}
22652_ACEOF
22653rm -f conftest.$ac_objext
22654if { (ac_try="$ac_compile"
22655case "(($ac_try" in
22656 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22657 *) ac_try_echo=$ac_try;;
22658esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022659eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022660 (eval "$ac_compile") 2>conftest.er1
22661 ac_status=$?
22662 grep -v '^ *+' conftest.er1 >conftest.err
22663 rm -f conftest.er1
22664 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022666 (exit $ac_status); } && {
22667 test -z "$ac_c_werror_flag" ||
22668 test ! -s conftest.err
22669 } && test -s conftest.$ac_objext; then
22670 ac_cv_have_decl_isnan=yes
22671else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022672 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022673sed 's/^/| /' conftest.$ac_ext >&5
22674
22675 ac_cv_have_decl_isnan=no
22676fi
22677
22678rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22679fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022680{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isnan" >&5
22681echo "${ECHO_T}$ac_cv_have_decl_isnan" >&6; }
22682if test $ac_cv_have_decl_isnan = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022683
22684cat >>confdefs.h <<_ACEOF
22685#define HAVE_DECL_ISNAN 1
22686_ACEOF
22687
22688
22689else
22690 cat >>confdefs.h <<_ACEOF
22691#define HAVE_DECL_ISNAN 0
22692_ACEOF
22693
22694
22695fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022696{ echo "$as_me:$LINENO: checking whether isfinite is declared" >&5
22697echo $ECHO_N "checking whether isfinite is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022698if test "${ac_cv_have_decl_isfinite+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022699 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022700else
22701 cat >conftest.$ac_ext <<_ACEOF
22702/* confdefs.h. */
22703_ACEOF
22704cat confdefs.h >>conftest.$ac_ext
22705cat >>conftest.$ac_ext <<_ACEOF
22706/* end confdefs.h. */
22707#include <math.h>
22708
22709int
22710main ()
22711{
22712#ifndef isfinite
22713 (void) isfinite;
22714#endif
22715
22716 ;
22717 return 0;
22718}
22719_ACEOF
22720rm -f conftest.$ac_objext
22721if { (ac_try="$ac_compile"
22722case "(($ac_try" in
22723 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22724 *) ac_try_echo=$ac_try;;
22725esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022726eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022727 (eval "$ac_compile") 2>conftest.er1
22728 ac_status=$?
22729 grep -v '^ *+' conftest.er1 >conftest.err
22730 rm -f conftest.er1
22731 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022733 (exit $ac_status); } && {
22734 test -z "$ac_c_werror_flag" ||
22735 test ! -s conftest.err
22736 } && test -s conftest.$ac_objext; then
22737 ac_cv_have_decl_isfinite=yes
22738else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022739 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022740sed 's/^/| /' conftest.$ac_ext >&5
22741
22742 ac_cv_have_decl_isfinite=no
22743fi
22744
22745rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22746fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022747{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isfinite" >&5
22748echo "${ECHO_T}$ac_cv_have_decl_isfinite" >&6; }
22749if test $ac_cv_have_decl_isfinite = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022750
22751cat >>confdefs.h <<_ACEOF
22752#define HAVE_DECL_ISFINITE 1
22753_ACEOF
22754
22755
22756else
22757 cat >>confdefs.h <<_ACEOF
22758#define HAVE_DECL_ISFINITE 0
22759_ACEOF
22760
22761
22762fi
22763
22764
Christian Heimes99170a52007-12-19 02:07:34 +000022765
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000022766LIBS=$LIBS_SAVE
22767
Mark Dickinson875ada42009-11-28 12:52:39 +000022768# For multiprocessing module, check that sem_open
22769# actually works. For FreeBSD versions <= 7.2,
22770# the kernel module that provides POSIX semaphores
22771# isn't loaded by default, so an attempt to call
22772# sem_open results in a 'Signal 12' error.
22773{ echo "$as_me:$LINENO: checking whether POSIX semaphores are enabled" >&5
22774echo $ECHO_N "checking whether POSIX semaphores are enabled... $ECHO_C" >&6; }
22775if test "${ac_cv_posix_semaphores_enabled+set}" = set; then
22776 echo $ECHO_N "(cached) $ECHO_C" >&6
22777else
22778 if test "$cross_compiling" = yes; then
22779 ac_cv_posix_semaphores_enabled=yes
22780else
22781 cat >conftest.$ac_ext <<_ACEOF
22782/* confdefs.h. */
22783_ACEOF
22784cat confdefs.h >>conftest.$ac_ext
22785cat >>conftest.$ac_ext <<_ACEOF
22786/* end confdefs.h. */
22787
22788#include <unistd.h>
22789#include <fcntl.h>
22790#include <stdio.h>
22791#include <semaphore.h>
22792#include <sys/stat.h>
22793
22794int main(void) {
22795 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
22796 if (a == SEM_FAILED) {
22797 perror("sem_open");
22798 return 1;
22799 }
22800 sem_close(a);
Mark Dickinson62eda4d2009-12-13 21:18:16 +000022801 sem_unlink("/autoconf");
Mark Dickinson875ada42009-11-28 12:52:39 +000022802 return 0;
22803}
22804
22805_ACEOF
22806rm -f conftest$ac_exeext
22807if { (ac_try="$ac_link"
22808case "(($ac_try" in
22809 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22810 *) ac_try_echo=$ac_try;;
22811esac
22812eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22813 (eval "$ac_link") 2>&5
22814 ac_status=$?
22815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22816 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22817 { (case "(($ac_try" in
22818 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22819 *) ac_try_echo=$ac_try;;
22820esac
22821eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22822 (eval "$ac_try") 2>&5
22823 ac_status=$?
22824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22825 (exit $ac_status); }; }; then
22826 ac_cv_posix_semaphores_enabled=yes
22827else
22828 echo "$as_me: program exited with status $ac_status" >&5
22829echo "$as_me: failed program was:" >&5
22830sed 's/^/| /' conftest.$ac_ext >&5
22831
22832( exit $ac_status )
22833ac_cv_posix_semaphores_enabled=no
22834fi
22835rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22836fi
22837
22838
22839
22840fi
22841
22842{ echo "$as_me:$LINENO: result: $ac_cv_posix_semaphores_enabled" >&5
22843echo "${ECHO_T}$ac_cv_posix_semaphores_enabled" >&6; }
22844if test $ac_cv_posix_semaphores_enabled = no
22845then
22846
22847cat >>confdefs.h <<\_ACEOF
22848#define POSIX_SEMAPHORES_NOT_ENABLED 1
22849_ACEOF
22850
22851fi
22852
Mark Dickinson10683072009-04-18 21:18:19 +000022853# Multiprocessing check for broken sem_getvalue
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022854{ echo "$as_me:$LINENO: checking for broken sem_getvalue" >&5
22855echo $ECHO_N "checking for broken sem_getvalue... $ECHO_C" >&6; }
Mark Dickinson10683072009-04-18 21:18:19 +000022856if test "$cross_compiling" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022857 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
Mark Dickinson10683072009-04-18 21:18:19 +000022858See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022859echo "$as_me: error: cannot run test program while cross compiling
Mark Dickinson10683072009-04-18 21:18:19 +000022860See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022861 { (exit 1); exit 1; }; }
Mark Dickinson10683072009-04-18 21:18:19 +000022862else
22863 cat >conftest.$ac_ext <<_ACEOF
22864/* confdefs.h. */
22865_ACEOF
22866cat confdefs.h >>conftest.$ac_ext
22867cat >>conftest.$ac_ext <<_ACEOF
22868/* end confdefs.h. */
22869
22870#include <unistd.h>
22871#include <fcntl.h>
22872#include <stdio.h>
22873#include <semaphore.h>
22874#include <sys/stat.h>
22875
22876int main(void){
Mark Dickinson62eda4d2009-12-13 21:18:16 +000022877 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000022878 int count;
22879 int res;
22880 if(a==SEM_FAILED){
22881 perror("sem_open");
22882 return 1;
22883
22884 }
22885 res = sem_getvalue(a, &count);
22886 sem_close(a);
Mark Dickinson62eda4d2009-12-13 21:18:16 +000022887 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000022888 return res==-1 ? 1 : 0;
22889}
22890
22891
22892_ACEOF
22893rm -f conftest$ac_exeext
22894if { (ac_try="$ac_link"
22895case "(($ac_try" in
22896 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22897 *) ac_try_echo=$ac_try;;
22898esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022899eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson10683072009-04-18 21:18:19 +000022900 (eval "$ac_link") 2>&5
22901 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000022903 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22904 { (case "(($ac_try" in
22905 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22906 *) ac_try_echo=$ac_try;;
22907esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022908eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson10683072009-04-18 21:18:19 +000022909 (eval "$ac_try") 2>&5
22910 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000022912 (exit $ac_status); }; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022913 { echo "$as_me:$LINENO: result: no" >&5
22914echo "${ECHO_T}no" >&6; }
Mark Dickinson10683072009-04-18 21:18:19 +000022915else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022916 echo "$as_me: program exited with status $ac_status" >&5
22917echo "$as_me: failed program was:" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000022918sed 's/^/| /' conftest.$ac_ext >&5
22919
22920( exit $ac_status )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022921{ echo "$as_me:$LINENO: result: yes" >&5
22922echo "${ECHO_T}yes" >&6; }
Mark Dickinson10683072009-04-18 21:18:19 +000022923
22924cat >>confdefs.h <<\_ACEOF
22925#define HAVE_BROKEN_SEM_GETVALUE 1
22926_ACEOF
22927
22928
22929fi
22930rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22931fi
22932
22933
22934
Mark Dickinsonbd792642009-03-18 20:06:12 +000022935# determine what size digit to use for Python's longs
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022936{ echo "$as_me:$LINENO: checking digit size for Python's longs" >&5
22937echo $ECHO_N "checking digit size for Python's longs... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000022938# Check whether --enable-big-digits was given.
22939if test "${enable_big_digits+set}" = set; then
22940 enableval=$enable_big_digits; case $enable_big_digits in
22941yes)
22942 enable_big_digits=30 ;;
22943no)
22944 enable_big_digits=15 ;;
2294515|30)
22946 ;;
22947*)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022948 { { echo "$as_me:$LINENO: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&5
22949echo "$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 +000022950 { (exit 1); exit 1; }; } ;;
22951esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022952{ echo "$as_me:$LINENO: result: $enable_big_digits" >&5
22953echo "${ECHO_T}$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000022954
22955cat >>confdefs.h <<_ACEOF
22956#define PYLONG_BITS_IN_DIGIT $enable_big_digits
22957_ACEOF
22958
22959
22960else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022961 { echo "$as_me:$LINENO: result: no value specified" >&5
22962echo "${ECHO_T}no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000022963fi
22964
22965
Guido van Rossumef2255b2000-03-10 22:30:29 +000022966# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000022967if test "${ac_cv_header_wchar_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022968 { echo "$as_me:$LINENO: checking for wchar.h" >&5
22969echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022970if test "${ac_cv_header_wchar_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022971 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000022972fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022973{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
22974echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000022975else
Martin v. Löwis11437992002-04-12 09:54:03 +000022976 # Is the header compilable?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022977{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
22978echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022979cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022980/* confdefs.h. */
22981_ACEOF
22982cat confdefs.h >>conftest.$ac_ext
22983cat >>conftest.$ac_ext <<_ACEOF
22984/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022985$ac_includes_default
22986#include <wchar.h>
22987_ACEOF
22988rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022989if { (ac_try="$ac_compile"
22990case "(($ac_try" in
22991 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22992 *) ac_try_echo=$ac_try;;
22993esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000022994eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022995 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022996 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022997 grep -v '^ *+' conftest.er1 >conftest.err
22998 rm -f conftest.er1
22999 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023000 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023001 (exit $ac_status); } && {
23002 test -z "$ac_c_werror_flag" ||
23003 test ! -s conftest.err
23004 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023005 ac_header_compiler=yes
23006else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023007 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023008sed 's/^/| /' conftest.$ac_ext >&5
23009
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023010 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000023011fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023012
23013rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023014{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
23015echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023016
23017# Is the header present?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023018{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
23019echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023020cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023021/* confdefs.h. */
23022_ACEOF
23023cat confdefs.h >>conftest.$ac_ext
23024cat >>conftest.$ac_ext <<_ACEOF
23025/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000023026#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023027_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023028if { (ac_try="$ac_cpp conftest.$ac_ext"
23029case "(($ac_try" in
23030 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23031 *) ac_try_echo=$ac_try;;
23032esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023033eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023034 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023035 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000023036 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000023037 rm -f conftest.er1
23038 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023040 (exit $ac_status); } >/dev/null && {
23041 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23042 test ! -s conftest.err
23043 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023044 ac_header_preproc=yes
23045else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023046 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023047sed 's/^/| /' conftest.$ac_ext >&5
23048
Martin v. Löwis11437992002-04-12 09:54:03 +000023049 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000023050fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023051
Martin v. Löwis11437992002-04-12 09:54:03 +000023052rm -f conftest.err conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023053{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
23054echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023055
23056# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023057case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
23058 yes:no: )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023059 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
23060echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
23061 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
23062echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000023063 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023064 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000023065 no:yes:* )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023066 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
23067echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
23068 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
23069echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
23070 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
23071echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
23072 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
23073echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
23074 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
23075echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
23076 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
23077echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023078 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000023079## -------------------------------------- ##
23080## Report this to http://bugs.python.org/ ##
23081## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000023082_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023083 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000023084 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000023085esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023086{ echo "$as_me:$LINENO: checking for wchar.h" >&5
23087echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023088if test "${ac_cv_header_wchar_h+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023089 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000023090else
23091 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000023092fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023093{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
23094echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023095
23096fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023097if test $ac_cv_header_wchar_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023098
23099
23100cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000023101#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023102_ACEOF
23103
Martin v. Löwisc45929e2002-04-06 10:10:49 +000023104 wchar_h="yes"
23105
Guido van Rossumef2255b2000-03-10 22:30:29 +000023106else
Martin v. Löwis11437992002-04-12 09:54:03 +000023107 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000023108
23109fi
23110
Michael W. Hudson54241132001-12-07 15:38:26 +000023111
Martin v. Löwis11437992002-04-12 09:54:03 +000023112
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023113# determine wchar_t size
23114if test "$wchar_h" = yes
23115then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023116 { echo "$as_me:$LINENO: checking for wchar_t" >&5
23117echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
23118if test "${ac_cv_type_wchar_t+set}" = set; then
23119 echo $ECHO_N "(cached) $ECHO_C" >&6
23120else
23121 cat >conftest.$ac_ext <<_ACEOF
23122/* confdefs.h. */
23123_ACEOF
23124cat confdefs.h >>conftest.$ac_ext
23125cat >>conftest.$ac_ext <<_ACEOF
23126/* end confdefs.h. */
23127#include <wchar.h>
23128
23129typedef wchar_t ac__type_new_;
23130int
23131main ()
23132{
23133if ((ac__type_new_ *) 0)
23134 return 0;
23135if (sizeof (ac__type_new_))
23136 return 0;
23137 ;
23138 return 0;
23139}
23140_ACEOF
23141rm -f conftest.$ac_objext
23142if { (ac_try="$ac_compile"
23143case "(($ac_try" in
23144 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23145 *) ac_try_echo=$ac_try;;
23146esac
23147eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23148 (eval "$ac_compile") 2>conftest.er1
23149 ac_status=$?
23150 grep -v '^ *+' conftest.er1 >conftest.err
23151 rm -f conftest.er1
23152 cat conftest.err >&5
23153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23154 (exit $ac_status); } && {
23155 test -z "$ac_c_werror_flag" ||
23156 test ! -s conftest.err
23157 } && test -s conftest.$ac_objext; then
23158 ac_cv_type_wchar_t=yes
23159else
23160 echo "$as_me: failed program was:" >&5
23161sed 's/^/| /' conftest.$ac_ext >&5
23162
23163 ac_cv_type_wchar_t=no
23164fi
23165
23166rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23167fi
23168{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
23169echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
23170
23171# The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023172# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
23173# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
23174# This bug is HP SR number 8606223364.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023175{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
23176echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023177if test "${ac_cv_sizeof_wchar_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023178 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000023179else
Martin v. Löwis11437992002-04-12 09:54:03 +000023180 if test "$cross_compiling" = yes; then
23181 # Depending upon the size, compute the lo and hi bounds.
23182cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023183/* confdefs.h. */
23184_ACEOF
23185cat confdefs.h >>conftest.$ac_ext
23186cat >>conftest.$ac_ext <<_ACEOF
23187/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023188#include <wchar.h>
23189
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023190 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000023191int
23192main ()
23193{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023194static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000023195test_array [0] = 0
23196
23197 ;
23198 return 0;
23199}
23200_ACEOF
23201rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023202if { (ac_try="$ac_compile"
23203case "(($ac_try" in
23204 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23205 *) ac_try_echo=$ac_try;;
23206esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023207eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023208 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023209 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023210 grep -v '^ *+' conftest.er1 >conftest.err
23211 rm -f conftest.er1
23212 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023214 (exit $ac_status); } && {
23215 test -z "$ac_c_werror_flag" ||
23216 test ! -s conftest.err
23217 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023218 ac_lo=0 ac_mid=0
23219 while :; do
23220 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023221/* confdefs.h. */
23222_ACEOF
23223cat confdefs.h >>conftest.$ac_ext
23224cat >>conftest.$ac_ext <<_ACEOF
23225/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023226#include <wchar.h>
23227
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023228 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000023229int
23230main ()
23231{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023232static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000023233test_array [0] = 0
23234
23235 ;
23236 return 0;
23237}
23238_ACEOF
23239rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023240if { (ac_try="$ac_compile"
23241case "(($ac_try" in
23242 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23243 *) ac_try_echo=$ac_try;;
23244esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023245eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023246 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023247 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023248 grep -v '^ *+' conftest.er1 >conftest.err
23249 rm -f conftest.er1
23250 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023251 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023252 (exit $ac_status); } && {
23253 test -z "$ac_c_werror_flag" ||
23254 test ! -s conftest.err
23255 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023256 ac_hi=$ac_mid; break
23257else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023258 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023259sed 's/^/| /' conftest.$ac_ext >&5
23260
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023261 ac_lo=`expr $ac_mid + 1`
23262 if test $ac_lo -le $ac_mid; then
23263 ac_lo= ac_hi=
23264 break
23265 fi
23266 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000023267fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023268
23269rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023270 done
23271else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023272 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023273sed 's/^/| /' conftest.$ac_ext >&5
23274
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023275 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023276/* confdefs.h. */
23277_ACEOF
23278cat confdefs.h >>conftest.$ac_ext
23279cat >>conftest.$ac_ext <<_ACEOF
23280/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023281#include <wchar.h>
23282
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023283 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000023284int
23285main ()
23286{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023287static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000023288test_array [0] = 0
23289
23290 ;
23291 return 0;
23292}
23293_ACEOF
23294rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023295if { (ac_try="$ac_compile"
23296case "(($ac_try" in
23297 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23298 *) ac_try_echo=$ac_try;;
23299esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023300eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023301 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023302 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023303 grep -v '^ *+' conftest.er1 >conftest.err
23304 rm -f conftest.er1
23305 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023307 (exit $ac_status); } && {
23308 test -z "$ac_c_werror_flag" ||
23309 test ! -s conftest.err
23310 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023311 ac_hi=-1 ac_mid=-1
23312 while :; do
23313 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023314/* confdefs.h. */
23315_ACEOF
23316cat confdefs.h >>conftest.$ac_ext
23317cat >>conftest.$ac_ext <<_ACEOF
23318/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023319#include <wchar.h>
23320
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023321 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000023322int
23323main ()
23324{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023325static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000023326test_array [0] = 0
23327
23328 ;
23329 return 0;
23330}
23331_ACEOF
23332rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023333if { (ac_try="$ac_compile"
23334case "(($ac_try" in
23335 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23336 *) ac_try_echo=$ac_try;;
23337esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023338eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023339 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023340 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023341 grep -v '^ *+' conftest.er1 >conftest.err
23342 rm -f conftest.er1
23343 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023345 (exit $ac_status); } && {
23346 test -z "$ac_c_werror_flag" ||
23347 test ! -s conftest.err
23348 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023349 ac_lo=$ac_mid; break
23350else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023351 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023352sed 's/^/| /' conftest.$ac_ext >&5
23353
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023354 ac_hi=`expr '(' $ac_mid ')' - 1`
23355 if test $ac_mid -le $ac_hi; then
23356 ac_lo= ac_hi=
23357 break
23358 fi
23359 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000023360fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023361
23362rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023363 done
23364else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023365 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023366sed 's/^/| /' conftest.$ac_ext >&5
23367
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023368 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000023369fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023370
23371rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023372fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023373
23374rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023375# Binary search between lo and hi bounds.
23376while test "x$ac_lo" != "x$ac_hi"; do
23377 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
23378 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023379/* confdefs.h. */
23380_ACEOF
23381cat confdefs.h >>conftest.$ac_ext
23382cat >>conftest.$ac_ext <<_ACEOF
23383/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023384#include <wchar.h>
23385
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023386 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000023387int
23388main ()
23389{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023390static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000023391test_array [0] = 0
23392
23393 ;
23394 return 0;
23395}
23396_ACEOF
23397rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023398if { (ac_try="$ac_compile"
23399case "(($ac_try" in
23400 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23401 *) ac_try_echo=$ac_try;;
23402esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023403eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023404 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023405 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023406 grep -v '^ *+' conftest.er1 >conftest.err
23407 rm -f conftest.er1
23408 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023410 (exit $ac_status); } && {
23411 test -z "$ac_c_werror_flag" ||
23412 test ! -s conftest.err
23413 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023414 ac_hi=$ac_mid
23415else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023416 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023417sed 's/^/| /' conftest.$ac_ext >&5
23418
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023419 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000023420fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023421
23422rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023423done
23424case $ac_lo in
23425?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023426'') if test "$ac_cv_type_wchar_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023427 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000023428See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023429echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000023430See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023431 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023432 else
23433 ac_cv_sizeof_wchar_t=0
23434 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000023435esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023436else
Martin v. Löwis11437992002-04-12 09:54:03 +000023437 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023438/* confdefs.h. */
23439_ACEOF
23440cat confdefs.h >>conftest.$ac_ext
23441cat >>conftest.$ac_ext <<_ACEOF
23442/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023443#include <wchar.h>
23444
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023445 typedef wchar_t ac__type_sizeof_;
23446static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
23447static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000023448#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023449#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023450int
23451main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023452{
Martin v. Löwis11437992002-04-12 09:54:03 +000023453
23454 FILE *f = fopen ("conftest.val", "w");
23455 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023456 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023457 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000023458 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023459 long int i = longval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023460 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023461 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023462 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000023463 }
23464 else
23465 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023466 unsigned long int i = ulongval ();
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023467 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023468 return 1;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023469 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000023470 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023471 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000023472
23473 ;
23474 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000023475}
Martin v. Löwis11437992002-04-12 09:54:03 +000023476_ACEOF
23477rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023478if { (ac_try="$ac_link"
23479case "(($ac_try" in
23480 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23481 *) ac_try_echo=$ac_try;;
23482esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023483eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023484 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023485 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023487 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023488 { (case "(($ac_try" in
23489 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23490 *) ac_try_echo=$ac_try;;
23491esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023492eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023493 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023494 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023496 (exit $ac_status); }; }; then
23497 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000023498else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023499 echo "$as_me: program exited with status $ac_status" >&5
23500echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023501sed 's/^/| /' conftest.$ac_ext >&5
23502
Martin v. Löwis11437992002-04-12 09:54:03 +000023503( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023504if test "$ac_cv_type_wchar_t" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023505 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000023506See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023507echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000023508See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023509 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023510 else
23511 ac_cv_sizeof_wchar_t=0
23512 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000023513fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023514rm -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 +000023515fi
23516rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000023517fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023518{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
23519echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023520
23521
23522
Martin v. Löwis11437992002-04-12 09:54:03 +000023523cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023524#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000023525_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023526
Michael W. Hudson54241132001-12-07 15:38:26 +000023527
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023528fi
23529
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023530{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
23531echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023532have_ucs4_tcl=no
23533cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023534/* confdefs.h. */
23535_ACEOF
23536cat confdefs.h >>conftest.$ac_ext
23537cat >>conftest.$ac_ext <<_ACEOF
23538/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023539
23540#include <tcl.h>
23541#if TCL_UTF_MAX != 6
23542# error "NOT UCS4_TCL"
23543#endif
23544int
23545main ()
23546{
23547
23548 ;
23549 return 0;
23550}
23551_ACEOF
23552rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023553if { (ac_try="$ac_compile"
23554case "(($ac_try" in
23555 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23556 *) ac_try_echo=$ac_try;;
23557esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023558eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023559 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023560 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023561 grep -v '^ *+' conftest.er1 >conftest.err
23562 rm -f conftest.er1
23563 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023565 (exit $ac_status); } && {
23566 test -z "$ac_c_werror_flag" ||
23567 test ! -s conftest.err
23568 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023569
23570
23571cat >>confdefs.h <<\_ACEOF
23572#define HAVE_UCS4_TCL 1
23573_ACEOF
23574
23575 have_ucs4_tcl=yes
23576
23577else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023578 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023579sed 's/^/| /' conftest.$ac_ext >&5
23580
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023581
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023582fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023583
23584rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023585{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
23586echo "${ECHO_T}$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023587
Skip Montanaro6dead952003-09-25 14:50:04 +000023588# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023589if test "$wchar_h" = yes
23590then
23591 # check whether wchar_t is signed or not
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023592 { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
23593echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023594 if test "${ac_cv_wchar_t_signed+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023595 echo $ECHO_N "(cached) $ECHO_C" >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023596else
23597
23598 if test "$cross_compiling" = yes; then
23599 ac_cv_wchar_t_signed=yes
23600else
23601 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023602/* confdefs.h. */
23603_ACEOF
23604cat confdefs.h >>conftest.$ac_ext
23605cat >>conftest.$ac_ext <<_ACEOF
23606/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023607
23608 #include <wchar.h>
23609 int main()
23610 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000023611 /* Success: exit code 0 */
23612 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023613 }
23614
23615_ACEOF
23616rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023617if { (ac_try="$ac_link"
23618case "(($ac_try" in
23619 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23620 *) ac_try_echo=$ac_try;;
23621esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023622eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023623 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023624 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023626 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023627 { (case "(($ac_try" in
23628 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23629 *) ac_try_echo=$ac_try;;
23630esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023631eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023632 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023633 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023635 (exit $ac_status); }; }; then
23636 ac_cv_wchar_t_signed=yes
23637else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023638 echo "$as_me: program exited with status $ac_status" >&5
23639echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023640sed 's/^/| /' conftest.$ac_ext >&5
23641
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023642( exit $ac_status )
23643ac_cv_wchar_t_signed=no
23644fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023645rm -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 +000023646fi
23647
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023648
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023649fi
23650
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023651 { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
23652echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023653fi
23654
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023655{ echo "$as_me:$LINENO: checking what type to use for str" >&5
23656echo $ECHO_N "checking what type to use for str... $ECHO_C" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000023657
23658# Check whether --with-wide-unicode was given.
23659if test "${with_wide_unicode+set}" = set; then
23660 withval=$with_wide_unicode;
23661if test "$withval" != no
23662then unicode_size="4"
23663else unicode_size="2"
23664fi
23665
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023666else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023667
Georg Brandl52d168a2008-01-07 18:10:24 +000023668case "$have_ucs4_tcl" in
23669 yes) unicode_size="4" ;;
23670 *) unicode_size="2" ;;
23671esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023672
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023673fi
23674
Martin v. Löwis0036cba2002-04-12 09:58:45 +000023675
23676
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023677
Georg Brandl52d168a2008-01-07 18:10:24 +000023678case "$unicode_size" in
23679 4) cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023680#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000023681_ACEOF
Georg Brandl52d168a2008-01-07 18:10:24 +000023682 ;;
23683 *) cat >>confdefs.h <<\_ACEOF
23684#define Py_UNICODE_SIZE 2
23685_ACEOF
23686 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023687esac
23688
Michael W. Hudson54241132001-12-07 15:38:26 +000023689
Martin v. Löwis11437992002-04-12 09:54:03 +000023690
23691
Georg Brandl52d168a2008-01-07 18:10:24 +000023692# wchar_t is only usable if it maps to an unsigned type
23693if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000023694 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000023695then
23696 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023697
Martin v. Löwis11437992002-04-12 09:54:03 +000023698cat >>confdefs.h <<\_ACEOF
23699#define HAVE_USABLE_WCHAR_T 1
23700_ACEOF
23701
Georg Brandl52d168a2008-01-07 18:10:24 +000023702 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023703#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000023704_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023705
Georg Brandl52d168a2008-01-07 18:10:24 +000023706elif test "$ac_cv_sizeof_short" = "$unicode_size"
23707then
23708 PY_UNICODE_TYPE="unsigned short"
23709 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023710#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000023711_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023712
Georg Brandl52d168a2008-01-07 18:10:24 +000023713elif test "$ac_cv_sizeof_long" = "$unicode_size"
23714then
23715 PY_UNICODE_TYPE="unsigned long"
23716 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023717#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000023718_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023719
Georg Brandl52d168a2008-01-07 18:10:24 +000023720else
23721 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023722fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023723{ echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
23724echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000023725
23726# check for endianness
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023727{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
23728echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023729if test "${ac_cv_c_bigendian+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023730 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000023731else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023732 # See if sys/param.h defines the BYTE_ORDER macro.
23733cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023734/* confdefs.h. */
23735_ACEOF
23736cat confdefs.h >>conftest.$ac_ext
23737cat >>conftest.$ac_ext <<_ACEOF
23738/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000023739#include <sys/types.h>
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023740#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000023741
Martin v. Löwis11437992002-04-12 09:54:03 +000023742int
23743main ()
23744{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023745#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
23746 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
23747 bogus endian macros
23748#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023749
23750 ;
23751 return 0;
23752}
23753_ACEOF
23754rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023755if { (ac_try="$ac_compile"
23756case "(($ac_try" in
23757 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23758 *) ac_try_echo=$ac_try;;
23759esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023760eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023761 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023762 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023763 grep -v '^ *+' conftest.er1 >conftest.err
23764 rm -f conftest.er1
23765 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023766 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023767 (exit $ac_status); } && {
23768 test -z "$ac_c_werror_flag" ||
23769 test ! -s conftest.err
23770 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000023771 # It does; now see whether it defined to BIG_ENDIAN or not.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023772cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023773/* confdefs.h. */
23774_ACEOF
23775cat confdefs.h >>conftest.$ac_ext
23776cat >>conftest.$ac_ext <<_ACEOF
23777/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000023778#include <sys/types.h>
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023779#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000023780
Martin v. Löwis11437992002-04-12 09:54:03 +000023781int
23782main ()
23783{
Guido van Rossumef2255b2000-03-10 22:30:29 +000023784#if BYTE_ORDER != BIG_ENDIAN
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023785 not big endian
23786#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023787
23788 ;
23789 return 0;
23790}
23791_ACEOF
23792rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023793if { (ac_try="$ac_compile"
23794case "(($ac_try" in
23795 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23796 *) ac_try_echo=$ac_try;;
23797esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023798eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023799 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023800 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023801 grep -v '^ *+' conftest.er1 >conftest.err
23802 rm -f conftest.er1
23803 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023805 (exit $ac_status); } && {
23806 test -z "$ac_c_werror_flag" ||
23807 test ! -s conftest.err
23808 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000023809 ac_cv_c_bigendian=yes
23810else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023811 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023812sed 's/^/| /' conftest.$ac_ext >&5
23813
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023814 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000023815fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023816
23817rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000023818else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023819 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023820sed 's/^/| /' conftest.$ac_ext >&5
23821
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023822 # It does not; compile a test program.
23823if test "$cross_compiling" = yes; then
23824 # try to guess the endianness by grepping values into an object file
23825 ac_cv_c_bigendian=unknown
23826 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023827/* confdefs.h. */
23828_ACEOF
23829cat confdefs.h >>conftest.$ac_ext
23830cat >>conftest.$ac_ext <<_ACEOF
23831/* end confdefs.h. */
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023832short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
23833short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
23834void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
23835short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
23836short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
23837void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023838int
23839main ()
23840{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023841 _ascii (); _ebcdic ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023842 ;
23843 return 0;
23844}
23845_ACEOF
23846rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023847if { (ac_try="$ac_compile"
23848case "(($ac_try" in
23849 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23850 *) ac_try_echo=$ac_try;;
23851esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023852eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023853 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023854 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023855 grep -v '^ *+' conftest.er1 >conftest.err
23856 rm -f conftest.er1
23857 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023859 (exit $ac_status); } && {
23860 test -z "$ac_c_werror_flag" ||
23861 test ! -s conftest.err
23862 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023863 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023864 ac_cv_c_bigendian=yes
Benjamin Petersona8332062009-09-11 22:36:27 +000023865fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023866if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
23867 if test "$ac_cv_c_bigendian" = unknown; then
23868 ac_cv_c_bigendian=no
23869 else
23870 # finding both strings is unlikely to happen, but who knows?
23871 ac_cv_c_bigendian=unknown
23872 fi
Benjamin Petersona8332062009-09-11 22:36:27 +000023873fi
Benjamin Petersona8332062009-09-11 22:36:27 +000023874else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023875 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023876sed 's/^/| /' conftest.$ac_ext >&5
23877
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023878
Martin v. Löwis11437992002-04-12 09:54:03 +000023879fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023880
23881rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023882else
23883 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023884/* confdefs.h. */
23885_ACEOF
23886cat confdefs.h >>conftest.$ac_ext
23887cat >>conftest.$ac_ext <<_ACEOF
23888/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023889$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000023890int
23891main ()
23892{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023893
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023894 /* Are we little or big endian? From Harbison&Steele. */
23895 union
23896 {
23897 long int l;
23898 char c[sizeof (long int)];
23899 } u;
23900 u.l = 1;
23901 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023902
23903 ;
23904 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000023905}
Martin v. Löwis11437992002-04-12 09:54:03 +000023906_ACEOF
23907rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023908if { (ac_try="$ac_link"
23909case "(($ac_try" in
23910 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23911 *) ac_try_echo=$ac_try;;
23912esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023913eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023914 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023915 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023917 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023918 { (case "(($ac_try" in
23919 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23920 *) ac_try_echo=$ac_try;;
23921esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023922eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023923 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023924 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023926 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000023927 ac_cv_c_bigendian=no
23928else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023929 echo "$as_me: program exited with status $ac_status" >&5
23930echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023931sed 's/^/| /' conftest.$ac_ext >&5
23932
Martin v. Löwis11437992002-04-12 09:54:03 +000023933( exit $ac_status )
23934ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000023935fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023936rm -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 +000023937fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023938
23939
Martin v. Löwis11437992002-04-12 09:54:03 +000023940fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023941
23942rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23943fi
23944{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
23945echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
23946case $ac_cv_c_bigendian in
23947 yes)
Benjamin Petersona8332062009-09-11 22:36:27 +000023948
23949cat >>confdefs.h <<\_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023950#define WORDS_BIGENDIAN 1
Benjamin Petersona8332062009-09-11 22:36:27 +000023951_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023952 ;;
23953 no)
23954 ;;
23955 *)
23956 { { echo "$as_me:$LINENO: error: unknown endianness
23957presetting ac_cv_c_bigendian=no (or yes) will help" >&5
23958echo "$as_me: error: unknown endianness
23959presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023960 { (exit 1); exit 1; }; } ;;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023961esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000023962
Michael W. Hudson54241132001-12-07 15:38:26 +000023963
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023964# Check whether right shifting a negative integer extends the sign bit
23965# or fills with zeros (like the Cray J90, according to Tim Peters).
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023966{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
23967echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023968if test "${ac_cv_rshift_extends_sign+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023969 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000023970else
Martin v. Löwis11437992002-04-12 09:54:03 +000023971
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023972if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000023973 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023974else
Martin v. Löwis11437992002-04-12 09:54:03 +000023975 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023976/* confdefs.h. */
23977_ACEOF
23978cat confdefs.h >>conftest.$ac_ext
23979cat >>conftest.$ac_ext <<_ACEOF
23980/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023981
23982int main()
23983{
Vladimir Marangozova6180282000-07-12 05:05:06 +000023984 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023985}
23986
Martin v. Löwis11437992002-04-12 09:54:03 +000023987_ACEOF
23988rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023989if { (ac_try="$ac_link"
23990case "(($ac_try" in
23991 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23992 *) ac_try_echo=$ac_try;;
23993esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023994eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023995 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023996 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000023997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023998 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023999 { (case "(($ac_try" in
24000 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24001 *) ac_try_echo=$ac_try;;
24002esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024003eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024004 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024005 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024007 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000024008 ac_cv_rshift_extends_sign=yes
24009else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024010 echo "$as_me: program exited with status $ac_status" >&5
24011echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024012sed 's/^/| /' conftest.$ac_ext >&5
24013
Martin v. Löwis11437992002-04-12 09:54:03 +000024014( exit $ac_status )
24015ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000024016fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024017rm -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 +000024018fi
24019
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024020
24021fi
24022
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024023{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
24024echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000024025if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024026then
Martin v. Löwis11437992002-04-12 09:54:03 +000024027
24028cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024029#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024030_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024031
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024032fi
24033
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024034# check for getc_unlocked and related locking functions
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024035{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
24036echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024037if test "${ac_cv_have_getc_unlocked+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024038 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024039else
Martin v. Löwis11437992002-04-12 09:54:03 +000024040
24041cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024042/* confdefs.h. */
24043_ACEOF
24044cat confdefs.h >>conftest.$ac_ext
24045cat >>conftest.$ac_ext <<_ACEOF
24046/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024047#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024048int
24049main ()
24050{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024051
24052 FILE *f = fopen("/dev/null", "r");
24053 flockfile(f);
24054 getc_unlocked(f);
24055 funlockfile(f);
24056
Martin v. Löwis11437992002-04-12 09:54:03 +000024057 ;
24058 return 0;
24059}
24060_ACEOF
24061rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024062if { (ac_try="$ac_link"
24063case "(($ac_try" in
24064 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24065 *) ac_try_echo=$ac_try;;
24066esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024067eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024068 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024069 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024070 grep -v '^ *+' conftest.er1 >conftest.err
24071 rm -f conftest.er1
24072 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024074 (exit $ac_status); } && {
24075 test -z "$ac_c_werror_flag" ||
24076 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024077 } && test -s conftest$ac_exeext &&
24078 $as_test_x conftest$ac_exeext; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024079 ac_cv_have_getc_unlocked=yes
24080else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024081 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024082sed 's/^/| /' conftest.$ac_ext >&5
24083
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024084 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024085fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024086
24087rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024088 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024089fi
24090
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024091{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
24092echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024093if test "$ac_cv_have_getc_unlocked" = yes
24094then
Martin v. Löwis11437992002-04-12 09:54:03 +000024095
24096cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024097#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024098_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024099
24100fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024101
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024102# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000024103# save the value of LIBS so we don't actually link Python with readline
24104LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024105
Gregory P. Smith18820942008-09-07 06:24:49 +000024106# On some systems we need to link readline to a termcap compatible
24107# library. NOTE: Keep the precedence of listed libraries synchronised
24108# with setup.py.
24109py_cv_lib_readline=no
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024110{ echo "$as_me:$LINENO: checking how to link readline libs" >&5
24111echo $ECHO_N "checking how to link readline libs... $ECHO_C" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000024112for py_libtermcap in "" ncursesw ncurses curses termcap; do
24113 if test -z "$py_libtermcap"; then
24114 READLINE_LIBS="-lreadline"
24115 else
24116 READLINE_LIBS="-lreadline -l$py_libtermcap"
24117 fi
24118 LIBS="$READLINE_LIBS $LIBS_no_readline"
24119 cat >conftest.$ac_ext <<_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024120/* confdefs.h. */
24121_ACEOF
24122cat confdefs.h >>conftest.$ac_ext
24123cat >>conftest.$ac_ext <<_ACEOF
24124/* end confdefs.h. */
24125
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024126/* Override any GCC internal prototype to avoid an error.
24127 Use char because int might match the return type of a GCC
24128 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024129#ifdef __cplusplus
24130extern "C"
24131#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024132char readline ();
24133int
24134main ()
24135{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024136return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024137 ;
24138 return 0;
24139}
24140_ACEOF
24141rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024142if { (ac_try="$ac_link"
24143case "(($ac_try" in
24144 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24145 *) ac_try_echo=$ac_try;;
24146esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024147eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024148 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024149 ac_status=$?
24150 grep -v '^ *+' conftest.er1 >conftest.err
24151 rm -f conftest.er1
24152 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024154 (exit $ac_status); } && {
24155 test -z "$ac_c_werror_flag" ||
24156 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024157 } && test -s conftest$ac_exeext &&
24158 $as_test_x conftest$ac_exeext; then
Gregory P. Smith18820942008-09-07 06:24:49 +000024159 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024160else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024161 echo "$as_me: failed program was:" >&5
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024162sed 's/^/| /' conftest.$ac_ext >&5
24163
Gregory P. Smith18820942008-09-07 06:24:49 +000024164
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024165fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024166
24167rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024168 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000024169 if test $py_cv_lib_readline = yes; then
24170 break
24171 fi
24172done
24173# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
24174#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000024175if test $py_cv_lib_readline = no; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024176 { echo "$as_me:$LINENO: result: none" >&5
24177echo "${ECHO_T}none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000024178else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024179 { echo "$as_me:$LINENO: result: $READLINE_LIBS" >&5
24180echo "${ECHO_T}$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000024181
24182cat >>confdefs.h <<\_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024183#define HAVE_LIBREADLINE 1
24184_ACEOF
24185
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024186fi
24187
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024188# check for readline 2.1
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024189{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
24190echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024191if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024192 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024193else
24194 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000024195LIBS="-lreadline $READLINE_LIBS $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024196cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024197/* confdefs.h. */
24198_ACEOF
24199cat confdefs.h >>conftest.$ac_ext
24200cat >>conftest.$ac_ext <<_ACEOF
24201/* end confdefs.h. */
24202
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024203/* Override any GCC internal prototype to avoid an error.
24204 Use char because int might match the return type of a GCC
24205 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024206#ifdef __cplusplus
24207extern "C"
24208#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024209char rl_callback_handler_install ();
24210int
24211main ()
24212{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024213return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024214 ;
24215 return 0;
24216}
24217_ACEOF
24218rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024219if { (ac_try="$ac_link"
24220case "(($ac_try" in
24221 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24222 *) ac_try_echo=$ac_try;;
24223esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024224eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024225 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024226 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024227 grep -v '^ *+' conftest.er1 >conftest.err
24228 rm -f conftest.er1
24229 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024230 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024231 (exit $ac_status); } && {
24232 test -z "$ac_c_werror_flag" ||
24233 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024234 } && test -s conftest$ac_exeext &&
24235 $as_test_x conftest$ac_exeext; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024236 ac_cv_lib_readline_rl_callback_handler_install=yes
24237else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024238 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024239sed 's/^/| /' conftest.$ac_ext >&5
24240
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024241 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024242fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024243
24244rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024245 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024246LIBS=$ac_check_lib_save_LIBS
24247fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024248{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
24249echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
24250if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024251
24252cat >>confdefs.h <<\_ACEOF
24253#define HAVE_RL_CALLBACK 1
24254_ACEOF
24255
24256fi
24257
24258
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024259# check for readline 2.2
24260cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024261/* confdefs.h. */
24262_ACEOF
24263cat confdefs.h >>conftest.$ac_ext
24264cat >>conftest.$ac_ext <<_ACEOF
24265/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024266#include <readline/readline.h>
24267_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024268if { (ac_try="$ac_cpp conftest.$ac_ext"
24269case "(($ac_try" in
24270 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24271 *) ac_try_echo=$ac_try;;
24272esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024273eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024274 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024275 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000024276 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024277 rm -f conftest.er1
24278 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024280 (exit $ac_status); } >/dev/null && {
24281 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
24282 test ! -s conftest.err
24283 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024284 have_readline=yes
24285else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024286 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024287sed 's/^/| /' conftest.$ac_ext >&5
24288
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024289 have_readline=no
24290fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024291
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024292rm -f conftest.err conftest.$ac_ext
24293if test $have_readline = yes
24294then
24295 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024296/* confdefs.h. */
24297_ACEOF
24298cat confdefs.h >>conftest.$ac_ext
24299cat >>conftest.$ac_ext <<_ACEOF
24300/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024301#include <readline/readline.h>
24302
24303_ACEOF
24304if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000024305 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024306
24307cat >>confdefs.h <<\_ACEOF
24308#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
24309_ACEOF
24310
24311fi
Benjamin Petersone7e59c22010-03-23 21:05:56 +000024312rm -f conftest*
Antoine Pitrou37276002009-10-26 19:32:51 +000024313
24314 cat >conftest.$ac_ext <<_ACEOF
24315/* confdefs.h. */
24316_ACEOF
24317cat confdefs.h >>conftest.$ac_ext
24318cat >>conftest.$ac_ext <<_ACEOF
24319/* end confdefs.h. */
24320#include <readline/readline.h>
24321
24322_ACEOF
24323if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
24324 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then
24325
24326cat >>confdefs.h <<\_ACEOF
24327#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1
24328_ACEOF
24329
24330fi
Benjamin Petersone7e59c22010-03-23 21:05:56 +000024331rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024332
24333fi
24334
Martin v. Löwis0daad592001-09-30 21:09:59 +000024335# check for readline 4.0
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024336{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
24337echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024338if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024339 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000024340else
Martin v. Löwis11437992002-04-12 09:54:03 +000024341 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000024342LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000024343cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024344/* confdefs.h. */
24345_ACEOF
24346cat confdefs.h >>conftest.$ac_ext
24347cat >>conftest.$ac_ext <<_ACEOF
24348/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024349
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024350/* Override any GCC internal prototype to avoid an error.
24351 Use char because int might match the return type of a GCC
24352 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024353#ifdef __cplusplus
24354extern "C"
24355#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000024356char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000024357int
24358main ()
24359{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024360return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000024361 ;
24362 return 0;
24363}
24364_ACEOF
24365rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024366if { (ac_try="$ac_link"
24367case "(($ac_try" in
24368 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24369 *) ac_try_echo=$ac_try;;
24370esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024371eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024372 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024373 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024374 grep -v '^ *+' conftest.er1 >conftest.err
24375 rm -f conftest.er1
24376 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024377 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024378 (exit $ac_status); } && {
24379 test -z "$ac_c_werror_flag" ||
24380 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024381 } && test -s conftest$ac_exeext &&
24382 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024383 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000024384else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024385 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024386sed 's/^/| /' conftest.$ac_ext >&5
24387
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024388 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000024389fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024390
24391rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024392 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024393LIBS=$ac_check_lib_save_LIBS
24394fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024395{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
24396echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
24397if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000024398
Martin v. Löwis11437992002-04-12 09:54:03 +000024399cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000024400#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024401_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000024402
Martin v. Löwis0daad592001-09-30 21:09:59 +000024403fi
24404
Michael W. Hudson54241132001-12-07 15:38:26 +000024405
Thomas Wouters89d996e2007-09-08 17:39:28 +000024406# also in 4.0
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024407{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
24408echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; }
Thomas Wouters89d996e2007-09-08 17:39:28 +000024409if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024410 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000024411else
24412 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000024413LIBS="-lreadline $READLINE_LIBS $LIBS"
Thomas Wouters89d996e2007-09-08 17:39:28 +000024414cat >conftest.$ac_ext <<_ACEOF
24415/* confdefs.h. */
24416_ACEOF
24417cat confdefs.h >>conftest.$ac_ext
24418cat >>conftest.$ac_ext <<_ACEOF
24419/* end confdefs.h. */
24420
24421/* Override any GCC internal prototype to avoid an error.
24422 Use char because int might match the return type of a GCC
24423 builtin and then its argument prototype would still apply. */
24424#ifdef __cplusplus
24425extern "C"
24426#endif
24427char rl_completion_display_matches_hook ();
24428int
24429main ()
24430{
24431return rl_completion_display_matches_hook ();
24432 ;
24433 return 0;
24434}
24435_ACEOF
24436rm -f conftest.$ac_objext conftest$ac_exeext
24437if { (ac_try="$ac_link"
24438case "(($ac_try" in
24439 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24440 *) ac_try_echo=$ac_try;;
24441esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024442eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000024443 (eval "$ac_link") 2>conftest.er1
24444 ac_status=$?
24445 grep -v '^ *+' conftest.er1 >conftest.err
24446 rm -f conftest.er1
24447 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000024449 (exit $ac_status); } && {
24450 test -z "$ac_c_werror_flag" ||
24451 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024452 } && test -s conftest$ac_exeext &&
24453 $as_test_x conftest$ac_exeext; then
Thomas Wouters89d996e2007-09-08 17:39:28 +000024454 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
24455else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024456 echo "$as_me: failed program was:" >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000024457sed 's/^/| /' conftest.$ac_ext >&5
24458
24459 ac_cv_lib_readline_rl_completion_display_matches_hook=no
24460fi
24461
24462rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
24463 conftest$ac_exeext conftest.$ac_ext
24464LIBS=$ac_check_lib_save_LIBS
24465fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024466{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
24467echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
24468if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then
Thomas Wouters89d996e2007-09-08 17:39:28 +000024469
24470cat >>confdefs.h <<\_ACEOF
24471#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
24472_ACEOF
24473
24474fi
24475
24476
Martin v. Löwis0daad592001-09-30 21:09:59 +000024477# check for readline 4.2
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024478{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
24479echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024480if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024481 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000024482else
Martin v. Löwis11437992002-04-12 09:54:03 +000024483 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000024484LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000024485cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024486/* confdefs.h. */
24487_ACEOF
24488cat confdefs.h >>conftest.$ac_ext
24489cat >>conftest.$ac_ext <<_ACEOF
24490/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024491
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024492/* Override any GCC internal prototype to avoid an error.
24493 Use char because int might match the return type of a GCC
24494 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024495#ifdef __cplusplus
24496extern "C"
24497#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000024498char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000024499int
24500main ()
24501{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024502return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000024503 ;
24504 return 0;
24505}
24506_ACEOF
24507rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024508if { (ac_try="$ac_link"
24509case "(($ac_try" in
24510 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24511 *) ac_try_echo=$ac_try;;
24512esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024513eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024514 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024515 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024516 grep -v '^ *+' conftest.er1 >conftest.err
24517 rm -f conftest.er1
24518 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024520 (exit $ac_status); } && {
24521 test -z "$ac_c_werror_flag" ||
24522 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024523 } && test -s conftest$ac_exeext &&
24524 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024525 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000024526else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024527 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024528sed 's/^/| /' conftest.$ac_ext >&5
24529
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024530 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000024531fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024532
24533rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024534 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024535LIBS=$ac_check_lib_save_LIBS
24536fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024537{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
24538echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
24539if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000024540
Martin v. Löwis11437992002-04-12 09:54:03 +000024541cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000024542#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024543_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000024544
Guido van Rossum353ae582001-07-10 16:45:32 +000024545fi
24546
Jack Jansendd19cf82001-12-06 22:36:17 +000024547
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024548# also in readline 4.2
24549cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024550/* confdefs.h. */
24551_ACEOF
24552cat confdefs.h >>conftest.$ac_ext
24553cat >>conftest.$ac_ext <<_ACEOF
24554/* end confdefs.h. */
24555#include <readline/readline.h>
24556_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024557if { (ac_try="$ac_cpp conftest.$ac_ext"
24558case "(($ac_try" in
24559 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24560 *) ac_try_echo=$ac_try;;
24561esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024562eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024563 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024564 ac_status=$?
24565 grep -v '^ *+' conftest.er1 >conftest.err
24566 rm -f conftest.er1
24567 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024569 (exit $ac_status); } >/dev/null && {
24570 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
24571 test ! -s conftest.err
24572 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024573 have_readline=yes
24574else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024575 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024576sed 's/^/| /' conftest.$ac_ext >&5
24577
24578 have_readline=no
24579fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024580
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024581rm -f conftest.err conftest.$ac_ext
24582if test $have_readline = yes
24583then
24584 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024585/* confdefs.h. */
24586_ACEOF
24587cat confdefs.h >>conftest.$ac_ext
24588cat >>conftest.$ac_ext <<_ACEOF
24589/* end confdefs.h. */
24590#include <readline/readline.h>
24591
24592_ACEOF
24593if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
24594 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
24595
24596cat >>confdefs.h <<\_ACEOF
24597#define HAVE_RL_CATCH_SIGNAL 1
24598_ACEOF
24599
24600fi
Benjamin Petersone7e59c22010-03-23 21:05:56 +000024601rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024602
24603fi
24604
Martin v. Löwis82bca632006-02-10 20:49:30 +000024605# End of readline checks: restore LIBS
24606LIBS=$LIBS_no_readline
24607
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024608{ echo "$as_me:$LINENO: checking for broken nice()" >&5
24609echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024610if test "${ac_cv_broken_nice+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024611 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000024612else
Martin v. Löwis11437992002-04-12 09:54:03 +000024613
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024614if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000024615 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024616else
Martin v. Löwis11437992002-04-12 09:54:03 +000024617 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024618/* confdefs.h. */
24619_ACEOF
24620cat confdefs.h >>conftest.$ac_ext
24621cat >>conftest.$ac_ext <<_ACEOF
24622/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024623
24624int main()
24625{
24626 int val1 = nice(1);
24627 if (val1 != -1 && val1 == nice(2))
24628 exit(0);
24629 exit(1);
24630}
24631
Martin v. Löwis11437992002-04-12 09:54:03 +000024632_ACEOF
24633rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024634if { (ac_try="$ac_link"
24635case "(($ac_try" in
24636 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24637 *) ac_try_echo=$ac_try;;
24638esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024639eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024640 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024641 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024643 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024644 { (case "(($ac_try" in
24645 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24646 *) ac_try_echo=$ac_try;;
24647esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024648eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024649 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024650 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024652 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024653 ac_cv_broken_nice=yes
24654else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024655 echo "$as_me: program exited with status $ac_status" >&5
24656echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024657sed 's/^/| /' conftest.$ac_ext >&5
24658
Martin v. Löwis11437992002-04-12 09:54:03 +000024659( exit $ac_status )
24660ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024661fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024662rm -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 +000024663fi
24664
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024665
24666fi
24667
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024668{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
24669echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024670if test "$ac_cv_broken_nice" = yes
24671then
Martin v. Löwis11437992002-04-12 09:54:03 +000024672
24673cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024674#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024675_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024676
24677fi
24678
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024679{ echo "$as_me:$LINENO: checking for broken poll()" >&5
24680echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024681if test "$cross_compiling" = yes; then
24682 ac_cv_broken_poll=no
24683else
24684 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024685/* confdefs.h. */
24686_ACEOF
24687cat confdefs.h >>conftest.$ac_ext
24688cat >>conftest.$ac_ext <<_ACEOF
24689/* end confdefs.h. */
24690
24691#include <poll.h>
24692
24693int main (void)
24694 {
24695 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
24696
24697 close (42);
24698
24699 int poll_test = poll (&poll_struct, 1, 0);
24700
24701 if (poll_test < 0)
24702 {
24703 exit(0);
24704 }
24705 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
24706 {
24707 exit(0);
24708 }
24709 else
24710 {
24711 exit(1);
24712 }
24713 }
24714
24715_ACEOF
24716rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024717if { (ac_try="$ac_link"
24718case "(($ac_try" in
24719 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24720 *) ac_try_echo=$ac_try;;
24721esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024722eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024723 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024724 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024726 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024727 { (case "(($ac_try" in
24728 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24729 *) ac_try_echo=$ac_try;;
24730esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024731eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024732 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024733 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024735 (exit $ac_status); }; }; then
24736 ac_cv_broken_poll=yes
24737else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024738 echo "$as_me: program exited with status $ac_status" >&5
24739echo "$as_me: failed program was:" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024740sed 's/^/| /' conftest.$ac_ext >&5
24741
24742( exit $ac_status )
24743ac_cv_broken_poll=no
24744fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024745rm -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 +000024746fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024747
24748
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024749{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
24750echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024751if test "$ac_cv_broken_poll" = yes
24752then
24753
24754cat >>confdefs.h <<\_ACEOF
24755#define HAVE_BROKEN_POLL 1
24756_ACEOF
24757
24758fi
24759
Brett Cannon43802422005-02-10 20:48:03 +000024760# 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 +000024761# (which is not required by ISO C or UNIX spec) and/or if we support
24762# tzname[]
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024763{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
24764echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000024765if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024766 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000024767else
24768 cat >conftest.$ac_ext <<_ACEOF
24769/* confdefs.h. */
24770_ACEOF
24771cat confdefs.h >>conftest.$ac_ext
24772cat >>conftest.$ac_ext <<_ACEOF
24773/* end confdefs.h. */
24774#include <sys/types.h>
24775#include <$ac_cv_struct_tm>
24776
24777
24778int
24779main ()
24780{
24781static struct tm ac_aggr;
24782if (ac_aggr.tm_zone)
24783return 0;
24784 ;
24785 return 0;
24786}
24787_ACEOF
24788rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024789if { (ac_try="$ac_compile"
24790case "(($ac_try" in
24791 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24792 *) ac_try_echo=$ac_try;;
24793esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024794eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024795 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000024796 ac_status=$?
24797 grep -v '^ *+' conftest.er1 >conftest.err
24798 rm -f conftest.er1
24799 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024801 (exit $ac_status); } && {
24802 test -z "$ac_c_werror_flag" ||
24803 test ! -s conftest.err
24804 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000024805 ac_cv_member_struct_tm_tm_zone=yes
24806else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024807 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000024808sed 's/^/| /' conftest.$ac_ext >&5
24809
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024810 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000024811/* confdefs.h. */
24812_ACEOF
24813cat confdefs.h >>conftest.$ac_ext
24814cat >>conftest.$ac_ext <<_ACEOF
24815/* end confdefs.h. */
24816#include <sys/types.h>
24817#include <$ac_cv_struct_tm>
24818
24819
24820int
24821main ()
24822{
24823static struct tm ac_aggr;
24824if (sizeof ac_aggr.tm_zone)
24825return 0;
24826 ;
24827 return 0;
24828}
24829_ACEOF
24830rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024831if { (ac_try="$ac_compile"
24832case "(($ac_try" in
24833 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24834 *) ac_try_echo=$ac_try;;
24835esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024836eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024837 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000024838 ac_status=$?
24839 grep -v '^ *+' conftest.er1 >conftest.err
24840 rm -f conftest.er1
24841 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024843 (exit $ac_status); } && {
24844 test -z "$ac_c_werror_flag" ||
24845 test ! -s conftest.err
24846 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000024847 ac_cv_member_struct_tm_tm_zone=yes
24848else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024849 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000024850sed 's/^/| /' conftest.$ac_ext >&5
24851
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024852 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000024853fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024854
24855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000024856fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024857
24858rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000024859fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024860{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
24861echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
24862if test $ac_cv_member_struct_tm_tm_zone = yes; then
Brett Cannon43802422005-02-10 20:48:03 +000024863
24864cat >>confdefs.h <<_ACEOF
24865#define HAVE_STRUCT_TM_TM_ZONE 1
24866_ACEOF
24867
24868
24869fi
24870
24871if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
24872
24873cat >>confdefs.h <<\_ACEOF
24874#define HAVE_TM_ZONE 1
24875_ACEOF
24876
24877else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024878 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
24879echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024880if test "${ac_cv_have_decl_tzname+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024881 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024882else
24883 cat >conftest.$ac_ext <<_ACEOF
24884/* confdefs.h. */
24885_ACEOF
24886cat confdefs.h >>conftest.$ac_ext
24887cat >>conftest.$ac_ext <<_ACEOF
24888/* end confdefs.h. */
24889#include <time.h>
24890
24891int
24892main ()
24893{
24894#ifndef tzname
24895 (void) tzname;
24896#endif
24897
24898 ;
24899 return 0;
24900}
24901_ACEOF
24902rm -f conftest.$ac_objext
24903if { (ac_try="$ac_compile"
24904case "(($ac_try" in
24905 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24906 *) ac_try_echo=$ac_try;;
24907esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024908eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024909 (eval "$ac_compile") 2>conftest.er1
24910 ac_status=$?
24911 grep -v '^ *+' conftest.er1 >conftest.err
24912 rm -f conftest.er1
24913 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024915 (exit $ac_status); } && {
24916 test -z "$ac_c_werror_flag" ||
24917 test ! -s conftest.err
24918 } && test -s conftest.$ac_objext; then
24919 ac_cv_have_decl_tzname=yes
24920else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024921 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024922sed 's/^/| /' conftest.$ac_ext >&5
24923
24924 ac_cv_have_decl_tzname=no
24925fi
24926
24927rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24928fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024929{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
24930echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
24931if test $ac_cv_have_decl_tzname = yes; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024932
24933cat >>confdefs.h <<_ACEOF
24934#define HAVE_DECL_TZNAME 1
24935_ACEOF
24936
24937
24938else
24939 cat >>confdefs.h <<_ACEOF
24940#define HAVE_DECL_TZNAME 0
24941_ACEOF
24942
24943
24944fi
24945
24946
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024947 { echo "$as_me:$LINENO: checking for tzname" >&5
24948echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000024949if test "${ac_cv_var_tzname+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024950 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000024951else
24952 cat >conftest.$ac_ext <<_ACEOF
24953/* confdefs.h. */
24954_ACEOF
24955cat confdefs.h >>conftest.$ac_ext
24956cat >>conftest.$ac_ext <<_ACEOF
24957/* end confdefs.h. */
24958#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024959#if !HAVE_DECL_TZNAME
24960extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000024961#endif
24962
24963int
24964main ()
24965{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024966return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000024967 ;
24968 return 0;
24969}
24970_ACEOF
24971rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024972if { (ac_try="$ac_link"
24973case "(($ac_try" in
24974 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24975 *) ac_try_echo=$ac_try;;
24976esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024977eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024978 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000024979 ac_status=$?
24980 grep -v '^ *+' conftest.er1 >conftest.err
24981 rm -f conftest.er1
24982 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024984 (exit $ac_status); } && {
24985 test -z "$ac_c_werror_flag" ||
24986 test ! -s conftest.err
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024987 } && test -s conftest$ac_exeext &&
24988 $as_test_x conftest$ac_exeext; then
Brett Cannon43802422005-02-10 20:48:03 +000024989 ac_cv_var_tzname=yes
24990else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024991 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000024992sed 's/^/| /' conftest.$ac_ext >&5
24993
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024994 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000024995fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024996
24997rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000024998 conftest$ac_exeext conftest.$ac_ext
24999fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025000{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
25001echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000025002 if test $ac_cv_var_tzname = yes; then
25003
25004cat >>confdefs.h <<\_ACEOF
25005#define HAVE_TZNAME 1
25006_ACEOF
25007
25008 fi
25009fi
25010
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025011
Martin v. Löwis1d459062005-03-14 21:23:33 +000025012# check tzset(3) exists and works like we expect it to
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025013{ echo "$as_me:$LINENO: checking for working tzset()" >&5
25014echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025015if test "${ac_cv_working_tzset+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025016 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025017else
25018
25019if test "$cross_compiling" = yes; then
25020 ac_cv_working_tzset=no
25021else
25022 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025023/* confdefs.h. */
25024_ACEOF
25025cat confdefs.h >>conftest.$ac_ext
25026cat >>conftest.$ac_ext <<_ACEOF
25027/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025028
25029#include <stdlib.h>
25030#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000025031#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000025032
25033#if HAVE_TZNAME
25034extern char *tzname[];
25035#endif
25036
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025037int main()
25038{
Brett Cannon18367812003-09-19 00:59:16 +000025039 /* Note that we need to ensure that not only does tzset(3)
25040 do 'something' with localtime, but it works as documented
25041 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000025042 This includes making sure that tzname is set properly if
25043 tm->tm_zone does not exist since it is the alternative way
25044 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000025045
25046 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000025047 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000025048 */
25049
Martin v. Löwis1d459062005-03-14 21:23:33 +000025050 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000025051 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
25052
Neal Norwitz7f2588c2003-04-11 15:35:53 +000025053 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025054 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000025055 if (localtime(&groundhogday)->tm_hour != 0)
25056 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025057#if HAVE_TZNAME
25058 /* For UTC, tzname[1] is sometimes "", sometimes " " */
25059 if (strcmp(tzname[0], "UTC") ||
25060 (tzname[1][0] != 0 && tzname[1][0] != ' '))
25061 exit(1);
25062#endif
Brett Cannon18367812003-09-19 00:59:16 +000025063
Neal Norwitz7f2588c2003-04-11 15:35:53 +000025064 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025065 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000025066 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025067 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025068#if HAVE_TZNAME
25069 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
25070 exit(1);
25071#endif
Brett Cannon18367812003-09-19 00:59:16 +000025072
25073 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
25074 tzset();
25075 if (localtime(&groundhogday)->tm_hour != 11)
25076 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025077#if HAVE_TZNAME
25078 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
25079 exit(1);
25080#endif
25081
25082#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000025083 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
25084 exit(1);
25085 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
25086 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025087#endif
Brett Cannon18367812003-09-19 00:59:16 +000025088
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025089 exit(0);
25090}
25091
25092_ACEOF
25093rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025094if { (ac_try="$ac_link"
25095case "(($ac_try" in
25096 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25097 *) ac_try_echo=$ac_try;;
25098esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025099eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025100 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025101 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025103 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025104 { (case "(($ac_try" in
25105 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25106 *) ac_try_echo=$ac_try;;
25107esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025108eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025109 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025110 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025112 (exit $ac_status); }; }; then
25113 ac_cv_working_tzset=yes
25114else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025115 echo "$as_me: program exited with status $ac_status" >&5
25116echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025117sed 's/^/| /' conftest.$ac_ext >&5
25118
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025119( exit $ac_status )
25120ac_cv_working_tzset=no
25121fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025122rm -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 +000025123fi
25124
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025125
25126fi
25127
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025128{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
25129echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025130if test "$ac_cv_working_tzset" = yes
25131then
25132
25133cat >>confdefs.h <<\_ACEOF
25134#define HAVE_WORKING_TZSET 1
25135_ACEOF
25136
25137fi
25138
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025139# Look for subsecond timestamps in struct stat
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025140{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
25141echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025142if test "${ac_cv_stat_tv_nsec+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025143 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025144else
25145 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025146/* confdefs.h. */
25147_ACEOF
25148cat confdefs.h >>conftest.$ac_ext
25149cat >>conftest.$ac_ext <<_ACEOF
25150/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025151#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025152int
25153main ()
25154{
25155
25156struct stat st;
25157st.st_mtim.tv_nsec = 1;
25158
25159 ;
25160 return 0;
25161}
25162_ACEOF
25163rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025164if { (ac_try="$ac_compile"
25165case "(($ac_try" in
25166 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25167 *) ac_try_echo=$ac_try;;
25168esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025169eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025170 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025171 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025172 grep -v '^ *+' conftest.er1 >conftest.err
25173 rm -f conftest.er1
25174 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025176 (exit $ac_status); } && {
25177 test -z "$ac_c_werror_flag" ||
25178 test ! -s conftest.err
25179 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000025180 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025181else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025182 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025183sed 's/^/| /' conftest.$ac_ext >&5
25184
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025185 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025186fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000025187
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025188rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25189fi
25190
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025191{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
25192echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025193if test "$ac_cv_stat_tv_nsec" = yes
25194then
25195
25196cat >>confdefs.h <<\_ACEOF
25197#define HAVE_STAT_TV_NSEC 1
25198_ACEOF
25199
25200fi
25201
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025202# Look for BSD style subsecond timestamps in struct stat
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025203{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
25204echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025205if test "${ac_cv_stat_tv_nsec2+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025206 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025207else
25208 cat >conftest.$ac_ext <<_ACEOF
25209/* confdefs.h. */
25210_ACEOF
25211cat confdefs.h >>conftest.$ac_ext
25212cat >>conftest.$ac_ext <<_ACEOF
25213/* end confdefs.h. */
25214#include <sys/stat.h>
25215int
25216main ()
25217{
25218
25219struct stat st;
25220st.st_mtimespec.tv_nsec = 1;
25221
25222 ;
25223 return 0;
25224}
25225_ACEOF
25226rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025227if { (ac_try="$ac_compile"
25228case "(($ac_try" in
25229 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25230 *) ac_try_echo=$ac_try;;
25231esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025232eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025233 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025234 ac_status=$?
25235 grep -v '^ *+' conftest.er1 >conftest.err
25236 rm -f conftest.er1
25237 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025238 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025239 (exit $ac_status); } && {
25240 test -z "$ac_c_werror_flag" ||
25241 test ! -s conftest.err
25242 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025243 ac_cv_stat_tv_nsec2=yes
25244else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025245 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025246sed 's/^/| /' conftest.$ac_ext >&5
25247
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025248 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025249fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000025250
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025251rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25252fi
25253
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025254{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
25255echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025256if test "$ac_cv_stat_tv_nsec2" = yes
25257then
25258
25259cat >>confdefs.h <<\_ACEOF
25260#define HAVE_STAT_TV_NSEC2 1
25261_ACEOF
25262
25263fi
25264
Jack Jansen666b1e72001-10-31 12:11:48 +000025265# On HP/UX 11.0, mvwdelch is a block with a return statement
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025266{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
25267echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025268if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025269 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000025270else
Martin v. Löwis11437992002-04-12 09:54:03 +000025271 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025272/* confdefs.h. */
25273_ACEOF
25274cat confdefs.h >>conftest.$ac_ext
25275cat >>conftest.$ac_ext <<_ACEOF
25276/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000025277#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025278int
25279main ()
25280{
Jack Jansen666b1e72001-10-31 12:11:48 +000025281
25282 int rtn;
25283 rtn = mvwdelch(0,0,0);
25284
Martin v. Löwis11437992002-04-12 09:54:03 +000025285 ;
25286 return 0;
25287}
25288_ACEOF
25289rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025290if { (ac_try="$ac_compile"
25291case "(($ac_try" in
25292 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25293 *) ac_try_echo=$ac_try;;
25294esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025295eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025296 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025297 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025298 grep -v '^ *+' conftest.er1 >conftest.err
25299 rm -f conftest.er1
25300 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025302 (exit $ac_status); } && {
25303 test -z "$ac_c_werror_flag" ||
25304 test ! -s conftest.err
25305 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000025306 ac_cv_mvwdelch_is_expression=yes
25307else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025308 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025309sed 's/^/| /' conftest.$ac_ext >&5
25310
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025311 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000025312fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000025313
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025314rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25315fi
25316
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025317{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
25318echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000025319
25320if test "$ac_cv_mvwdelch_is_expression" = yes
25321then
Martin v. Löwis11437992002-04-12 09:54:03 +000025322
25323cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000025324#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025325_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000025326
25327fi
25328
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025329{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
25330echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025331if test "${ac_cv_window_has_flags+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025332 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000025333else
Martin v. Löwis11437992002-04-12 09:54:03 +000025334 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025335/* confdefs.h. */
25336_ACEOF
25337cat confdefs.h >>conftest.$ac_ext
25338cat >>conftest.$ac_ext <<_ACEOF
25339/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000025340#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025341int
25342main ()
25343{
Jack Jansen666b1e72001-10-31 12:11:48 +000025344
25345 WINDOW *w;
25346 w->_flags = 0;
25347
Martin v. Löwis11437992002-04-12 09:54:03 +000025348 ;
25349 return 0;
25350}
25351_ACEOF
25352rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025353if { (ac_try="$ac_compile"
25354case "(($ac_try" in
25355 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25356 *) ac_try_echo=$ac_try;;
25357esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025358eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025359 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025360 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025361 grep -v '^ *+' conftest.er1 >conftest.err
25362 rm -f conftest.er1
25363 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025364 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025365 (exit $ac_status); } && {
25366 test -z "$ac_c_werror_flag" ||
25367 test ! -s conftest.err
25368 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000025369 ac_cv_window_has_flags=yes
25370else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025371 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025372sed 's/^/| /' conftest.$ac_ext >&5
25373
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025374 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000025375fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000025376
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025377rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25378fi
25379
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025380{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
25381echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000025382
Jack Jansen666b1e72001-10-31 12:11:48 +000025383
25384if test "$ac_cv_window_has_flags" = yes
25385then
Martin v. Löwis11437992002-04-12 09:54:03 +000025386
25387cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000025388#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025389_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000025390
25391fi
25392
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025393{ echo "$as_me:$LINENO: checking for is_term_resized" >&5
25394echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025395cat >conftest.$ac_ext <<_ACEOF
25396/* confdefs.h. */
25397_ACEOF
25398cat confdefs.h >>conftest.$ac_ext
25399cat >>conftest.$ac_ext <<_ACEOF
25400/* end confdefs.h. */
25401#include <curses.h>
25402int
25403main ()
25404{
25405void *x=is_term_resized
25406 ;
25407 return 0;
25408}
25409_ACEOF
25410rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025411if { (ac_try="$ac_compile"
25412case "(($ac_try" in
25413 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25414 *) ac_try_echo=$ac_try;;
25415esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025416eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025417 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025418 ac_status=$?
25419 grep -v '^ *+' conftest.er1 >conftest.err
25420 rm -f conftest.er1
25421 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025423 (exit $ac_status); } && {
25424 test -z "$ac_c_werror_flag" ||
25425 test ! -s conftest.err
25426 } && test -s conftest.$ac_objext; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000025427
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025428cat >>confdefs.h <<\_ACEOF
25429#define HAVE_CURSES_IS_TERM_RESIZED 1
25430_ACEOF
25431
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025432 { echo "$as_me:$LINENO: result: yes" >&5
25433echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025434else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025435 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025436sed 's/^/| /' conftest.$ac_ext >&5
25437
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025438 { echo "$as_me:$LINENO: result: no" >&5
25439echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025440
25441fi
25442
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025443rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25444
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025445{ echo "$as_me:$LINENO: checking for resize_term" >&5
25446echo $ECHO_N "checking for resize_term... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025447cat >conftest.$ac_ext <<_ACEOF
25448/* confdefs.h. */
25449_ACEOF
25450cat confdefs.h >>conftest.$ac_ext
25451cat >>conftest.$ac_ext <<_ACEOF
25452/* end confdefs.h. */
25453#include <curses.h>
25454int
25455main ()
25456{
25457void *x=resize_term
25458 ;
25459 return 0;
25460}
25461_ACEOF
25462rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025463if { (ac_try="$ac_compile"
25464case "(($ac_try" in
25465 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25466 *) ac_try_echo=$ac_try;;
25467esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025468eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025469 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025470 ac_status=$?
25471 grep -v '^ *+' conftest.er1 >conftest.err
25472 rm -f conftest.er1
25473 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025475 (exit $ac_status); } && {
25476 test -z "$ac_c_werror_flag" ||
25477 test ! -s conftest.err
25478 } && test -s conftest.$ac_objext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025479
25480cat >>confdefs.h <<\_ACEOF
25481#define HAVE_CURSES_RESIZE_TERM 1
25482_ACEOF
25483
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025484 { echo "$as_me:$LINENO: result: yes" >&5
25485echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025486else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025487 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025488sed 's/^/| /' conftest.$ac_ext >&5
25489
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025490 { echo "$as_me:$LINENO: result: no" >&5
25491echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025492
25493fi
25494
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025495rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25496
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025497{ echo "$as_me:$LINENO: checking for resizeterm" >&5
25498echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025499cat >conftest.$ac_ext <<_ACEOF
25500/* confdefs.h. */
25501_ACEOF
25502cat confdefs.h >>conftest.$ac_ext
25503cat >>conftest.$ac_ext <<_ACEOF
25504/* end confdefs.h. */
25505#include <curses.h>
25506int
25507main ()
25508{
25509void *x=resizeterm
25510 ;
25511 return 0;
25512}
25513_ACEOF
25514rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025515if { (ac_try="$ac_compile"
25516case "(($ac_try" in
25517 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25518 *) ac_try_echo=$ac_try;;
25519esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025520eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025521 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025522 ac_status=$?
25523 grep -v '^ *+' conftest.er1 >conftest.err
25524 rm -f conftest.er1
25525 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025527 (exit $ac_status); } && {
25528 test -z "$ac_c_werror_flag" ||
25529 test ! -s conftest.err
25530 } && test -s conftest.$ac_objext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025531
25532cat >>confdefs.h <<\_ACEOF
25533#define HAVE_CURSES_RESIZETERM 1
25534_ACEOF
25535
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025536 { echo "$as_me:$LINENO: result: yes" >&5
25537echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025538else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025539 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025540sed 's/^/| /' conftest.$ac_ext >&5
25541
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025542 { echo "$as_me:$LINENO: result: no" >&5
25543echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025544
25545fi
25546
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025547rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25548
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025549{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
25550echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000025551
25552if test -r /dev/ptmx
25553then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025554 { echo "$as_me:$LINENO: result: yes" >&5
25555echo "${ECHO_T}yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000025556
25557cat >>confdefs.h <<\_ACEOF
25558#define HAVE_DEV_PTMX 1
25559_ACEOF
25560
Thomas Wouters89f507f2006-12-13 04:49:30 +000025561else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025562 { echo "$as_me:$LINENO: result: no" >&5
25563echo "${ECHO_T}no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000025564fi
25565
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025566{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
25567echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000025568
25569if test -r /dev/ptc
25570then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025571 { echo "$as_me:$LINENO: result: yes" >&5
25572echo "${ECHO_T}yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000025573
25574cat >>confdefs.h <<\_ACEOF
25575#define HAVE_DEV_PTC 1
25576_ACEOF
25577
Thomas Wouters89f507f2006-12-13 04:49:30 +000025578else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025579 { echo "$as_me:$LINENO: result: no" >&5
25580echo "${ECHO_T}no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000025581fi
25582
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025583{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
25584echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000025585if test "$cross_compiling" = yes; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025586 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
Thomas Wouters477c8d52006-05-27 19:21:47 +000025587See \`config.log' for more details." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025588echo "$as_me: error: cannot run test program while cross compiling
Thomas Wouters477c8d52006-05-27 19:21:47 +000025589See \`config.log' for more details." >&2;}
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025590 { (exit 1); exit 1; }; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000025591else
25592 cat >conftest.$ac_ext <<_ACEOF
25593/* confdefs.h. */
25594_ACEOF
25595cat confdefs.h >>conftest.$ac_ext
25596cat >>conftest.$ac_ext <<_ACEOF
25597/* end confdefs.h. */
25598#include <stdio.h>
25599#include <stddef.h>
25600#include <string.h>
25601
Christian Heimes2c181612007-12-17 20:04:13 +000025602#ifdef HAVE_SYS_TYPES_H
25603#include <sys/types.h>
25604#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000025605
25606#ifdef HAVE_SSIZE_T
25607typedef ssize_t Py_ssize_t;
25608#elif SIZEOF_VOID_P == SIZEOF_LONG
25609typedef long Py_ssize_t;
25610#else
25611typedef int Py_ssize_t;
25612#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000025613
Christian Heimes2c181612007-12-17 20:04:13 +000025614int main()
25615{
25616 char buffer[256];
25617
Thomas Wouters477c8d52006-05-27 19:21:47 +000025618 if(sprintf(buffer, "%zd", (size_t)123) < 0)
25619 return 1;
25620
Thomas Wouters89f507f2006-12-13 04:49:30 +000025621 if (strcmp(buffer, "123"))
25622 return 1;
25623
25624 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
25625 return 1;
25626
25627 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000025628 return 1;
25629
25630 return 0;
25631}
25632_ACEOF
25633rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025634if { (ac_try="$ac_link"
25635case "(($ac_try" in
25636 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25637 *) ac_try_echo=$ac_try;;
25638esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025639eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025640 (eval "$ac_link") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000025641 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000025643 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025644 { (case "(($ac_try" in
25645 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25646 *) ac_try_echo=$ac_try;;
25647esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025648eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025649 (eval "$ac_try") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000025650 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000025652 (exit $ac_status); }; }; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025653 { echo "$as_me:$LINENO: result: yes" >&5
25654echo "${ECHO_T}yes" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000025655
25656cat >>confdefs.h <<\_ACEOF
25657#define PY_FORMAT_SIZE_T "z"
25658_ACEOF
25659
25660else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025661 echo "$as_me: program exited with status $ac_status" >&5
25662echo "$as_me: failed program was:" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000025663sed 's/^/| /' conftest.$ac_ext >&5
25664
25665( exit $ac_status )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025666{ echo "$as_me:$LINENO: result: no" >&5
25667echo "${ECHO_T}no" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000025668fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025669rm -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 +000025670fi
25671
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025672
25673
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025674{ echo "$as_me:$LINENO: checking for socklen_t" >&5
25675echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025676if test "${ac_cv_type_socklen_t+set}" = set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025677 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000025678else
Martin v. Löwis11437992002-04-12 09:54:03 +000025679 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025680/* confdefs.h. */
25681_ACEOF
25682cat confdefs.h >>conftest.$ac_ext
25683cat >>conftest.$ac_ext <<_ACEOF
25684/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000025685
25686#ifdef HAVE_SYS_TYPES_H
25687#include <sys/types.h>
25688#endif
25689#ifdef HAVE_SYS_SOCKET_H
25690#include <sys/socket.h>
25691#endif
25692
25693
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025694typedef socklen_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000025695int
25696main ()
25697{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025698if ((ac__type_new_ *) 0)
25699 return 0;
25700if (sizeof (ac__type_new_))
25701 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000025702 ;
25703 return 0;
25704}
25705_ACEOF
25706rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025707if { (ac_try="$ac_compile"
25708case "(($ac_try" in
25709 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25710 *) ac_try_echo=$ac_try;;
25711esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025712eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025713 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025714 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025715 grep -v '^ *+' conftest.er1 >conftest.err
25716 rm -f conftest.er1
25717 cat conftest.err >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025719 (exit $ac_status); } && {
25720 test -z "$ac_c_werror_flag" ||
25721 test ! -s conftest.err
25722 } && test -s conftest.$ac_objext; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025723 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000025724else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025725 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025726sed 's/^/| /' conftest.$ac_ext >&5
25727
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025728 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000025729fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025730
25731rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025732fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025733{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
25734echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
25735if test $ac_cv_type_socklen_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025736 :
25737else
Guido van Rossum95713eb2000-05-18 20:53:31 +000025738
Martin v. Löwis01c04012002-11-11 14:58:44 +000025739cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000025740#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000025741_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000025742
25743fi
25744
Michael W. Hudson54241132001-12-07 15:38:26 +000025745
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025746{ echo "$as_me:$LINENO: checking for broken mbstowcs" >&5
25747echo $ECHO_N "checking for broken mbstowcs... $ECHO_C" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000025748if test "$cross_compiling" = yes; then
25749 ac_cv_broken_mbstowcs=no
25750else
25751 cat >conftest.$ac_ext <<_ACEOF
25752/* confdefs.h. */
25753_ACEOF
25754cat confdefs.h >>conftest.$ac_ext
25755cat >>conftest.$ac_ext <<_ACEOF
25756/* end confdefs.h. */
25757
25758#include<stdlib.h>
25759int main() {
25760 size_t len = -1;
25761 const char *str = "text";
25762 len = mbstowcs(NULL, str, 0);
25763 return (len != 4);
25764}
25765
25766_ACEOF
25767rm -f conftest$ac_exeext
25768if { (ac_try="$ac_link"
25769case "(($ac_try" in
25770 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25771 *) ac_try_echo=$ac_try;;
25772esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025773eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000025774 (eval "$ac_link") 2>&5
25775 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000025777 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
25778 { (case "(($ac_try" in
25779 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25780 *) ac_try_echo=$ac_try;;
25781esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025782eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000025783 (eval "$ac_try") 2>&5
25784 ac_status=$?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025785 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000025786 (exit $ac_status); }; }; then
25787 ac_cv_broken_mbstowcs=no
25788else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025789 echo "$as_me: program exited with status $ac_status" >&5
25790echo "$as_me: failed program was:" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000025791sed 's/^/| /' conftest.$ac_ext >&5
25792
25793( exit $ac_status )
25794ac_cv_broken_mbstowcs=yes
25795fi
25796rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
25797fi
25798
25799
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025800{ echo "$as_me:$LINENO: result: $ac_cv_broken_mbstowcs" >&5
25801echo "${ECHO_T}$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000025802if test "$ac_cv_broken_mbstowcs" = yes
25803then
25804
25805cat >>confdefs.h <<\_ACEOF
25806#define HAVE_BROKEN_MBSTOWCS 1
25807_ACEOF
25808
25809fi
25810
Antoine Pitroub52ec782009-01-25 16:34:23 +000025811# Check for --with-computed-gotos
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025812{ echo "$as_me:$LINENO: checking for --with-computed-gotos" >&5
25813echo $ECHO_N "checking for --with-computed-gotos... $ECHO_C" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000025814
25815# Check whether --with-computed-gotos was given.
25816if test "${with_computed_gotos+set}" = set; then
25817 withval=$with_computed_gotos;
25818if test "$withval" != no
25819then
25820
25821cat >>confdefs.h <<\_ACEOF
25822#define USE_COMPUTED_GOTOS 1
25823_ACEOF
25824
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025825 { echo "$as_me:$LINENO: result: yes" >&5
25826echo "${ECHO_T}yes" >&6; }
25827else { echo "$as_me:$LINENO: result: no" >&5
25828echo "${ECHO_T}no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000025829fi
25830else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025831 { echo "$as_me:$LINENO: result: no" >&5
25832echo "${ECHO_T}no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000025833fi
25834
25835
Ronald Oussoren1b2cad02009-11-19 17:30:05 +000025836if test $ac_sys_system = Darwin
25837then
25838 LIBS="$LIBS -framework CoreFoundation"
25839fi
25840
25841
Antoine Pitroub52ec782009-01-25 16:34:23 +000025842
Michael W. Hudson54241132001-12-07 15:38:26 +000025843
25844
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000025845for h in `(cd $srcdir;echo Python/thread_*.h)`
25846do
25847 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
25848done
25849
Michael W. Hudson54241132001-12-07 15:38:26 +000025850
Neal Norwitzd24499d2005-12-18 21:36:39 +000025851SRCDIRS="Parser Grammar Objects Python Modules Mac"
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025852{ echo "$as_me:$LINENO: checking for build directories" >&5
25853echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000025854for dir in $SRCDIRS; do
25855 if test ! -d $dir; then
25856 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000025857 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000025858done
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025859{ echo "$as_me:$LINENO: result: done" >&5
25860echo "${ECHO_T}done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000025861
Guido van Rossum627b2d71993-12-24 10:39:16 +000025862# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000025863ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000025864
Martin v. Löwis11437992002-04-12 09:54:03 +000025865cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025866# This file is a shell script that caches the results of configure
25867# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000025868# scripts and configure runs, see configure's option --config-cache.
25869# It is not useful on other systems. If it contains results you don't
25870# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025871#
Martin v. Löwis11437992002-04-12 09:54:03 +000025872# config.status only pays attention to the cache file if you give it
25873# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025874#
Skip Montanaro6dead952003-09-25 14:50:04 +000025875# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000025876# loading this file, other *unset* `ac_cv_foo' will be assigned the
25877# following values.
25878
25879_ACEOF
25880
Guido van Rossumf78abae1997-01-21 22:02:36 +000025881# The following way of writing the cache mishandles newlines in values,
25882# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025883# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000025884# Ultrix sh set writes to stderr and can't be redirected directly,
25885# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025886(
25887 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
25888 eval ac_val=\$$ac_var
25889 case $ac_val in #(
25890 *${as_nl}*)
25891 case $ac_var in #(
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025892 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
25893echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025894 esac
25895 case $ac_var in #(
25896 _ | IFS | as_nl) ;; #(
25897 *) $as_unset $ac_var ;;
25898 esac ;;
25899 esac
25900 done
25901
Martin v. Löwis11437992002-04-12 09:54:03 +000025902 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025903 case $as_nl`(ac_space=' '; set) 2>&1` in #(
25904 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000025905 # `set' does not quote correctly, so add quotes (double-quote
25906 # substitution turns \\\\ into \\, and sed turns \\ into \).
25907 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025908 "s/'/'\\\\''/g;
25909 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025910 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000025911 *)
25912 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025913 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000025914 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025915 esac |
25916 sort
25917) |
Martin v. Löwis11437992002-04-12 09:54:03 +000025918 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025919 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000025920 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025921 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000025922 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
25923 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025924 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
25925 :end' >>confcache
25926if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
25927 if test -w "$cache_file"; then
25928 test "x$cache_file" != "x/dev/null" &&
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025929 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
25930echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000025931 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000025932 else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025933 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
25934echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000025935 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025936fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000025937rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000025938
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025939test "x$prefix" = xNONE && prefix=$ac_default_prefix
25940# Let make expand exec_prefix.
25941test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000025942
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025943DEFS=-DHAVE_CONFIG_H
25944
Skip Montanaro6dead952003-09-25 14:50:04 +000025945ac_libobjs=
25946ac_ltlibobjs=
25947for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
25948 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025949 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025950 ac_i=`echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025951 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
25952 # will be set to the directory where LIBOBJS objects are built.
25953 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
25954 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000025955done
25956LIBOBJS=$ac_libobjs
25957
25958LTLIBOBJS=$ac_ltlibobjs
25959
25960
Martin v. Löwis11437992002-04-12 09:54:03 +000025961
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025962: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000025963ac_clean_files_save=$ac_clean_files
25964ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025965{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
25966echo "$as_me: creating $CONFIG_STATUS" >&6;}
25967cat >$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025968#! $SHELL
25969# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000025970# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025971# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000025972# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000025973
Martin v. Löwis11437992002-04-12 09:54:03 +000025974debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000025975ac_cs_recheck=false
25976ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000025977SHELL=\${CONFIG_SHELL-$SHELL}
25978_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000025979
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025980cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025981## --------------------- ##
25982## M4sh Initialization. ##
25983## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000025984
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025985# Be more Bourne compatible
25986DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000025987if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
25988 emulate sh
25989 NULLCMD=:
Ronald Oussoren5644eb72009-09-20 20:10:02 +000025990 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000025991 # is contrary to our usage. Disable this feature.
25992 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025993 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000025994else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025995 case `(set -o) 2>/dev/null` in
25996 *posix*) set -o posix ;;
25997esac
25998
Michael W. Hudson54241132001-12-07 15:38:26 +000025999fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000026000
26001
Michael W. Hudson54241132001-12-07 15:38:26 +000026002
Michael W. Hudson54241132001-12-07 15:38:26 +000026003
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026004# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000026005# Avoid depending upon Character Ranges.
26006as_cr_letters='abcdefghijklmnopqrstuvwxyz'
26007as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
26008as_cr_Letters=$as_cr_letters$as_cr_LETTERS
26009as_cr_digits='0123456789'
26010as_cr_alnum=$as_cr_Letters$as_cr_digits
26011
26012# The user is always right.
26013if test "${PATH_SEPARATOR+set}" != set; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026014 echo "#! /bin/sh" >conf$$.sh
26015 echo "exit 0" >>conf$$.sh
26016 chmod +x conf$$.sh
26017 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
26018 PATH_SEPARATOR=';'
26019 else
26020 PATH_SEPARATOR=:
26021 fi
26022 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000026023fi
26024
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026025# Support unset when possible.
26026if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
26027 as_unset=unset
26028else
26029 as_unset=false
26030fi
Martin v. Löwis11437992002-04-12 09:54:03 +000026031
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026032
26033# IFS
26034# We need space, tab and new line, in precisely that order. Quoting is
26035# there to prevent editors from complaining about space-tab.
26036# (If _AS_PATH_WALK were called with IFS unset, it would disable word
26037# splitting by setting IFS to empty value.)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026038as_nl='
26039'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026040IFS=" "" $as_nl"
26041
26042# Find who we are. Look in the path if we contain no directory separator.
26043case $0 in
26044 *[\\/]* ) as_myself=$0 ;;
26045 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000026046for as_dir in $PATH
26047do
26048 IFS=$as_save_IFS
26049 test -z "$as_dir" && as_dir=.
26050 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
26051done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026052IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000026053
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026054 ;;
26055esac
26056# We did not find ourselves, most probably we were run as `sh COMMAND'
26057# in which case we are not to be found in the path.
26058if test "x$as_myself" = x; then
26059 as_myself=$0
26060fi
26061if test ! -f "$as_myself"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026062 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026063 { (exit 1); exit 1; }
26064fi
26065
26066# Work around bugs in pre-3.0 UWIN ksh.
26067for as_var in ENV MAIL MAILPATH
26068do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
26069done
26070PS1='$ '
26071PS2='> '
26072PS4='+ '
26073
26074# NLS nuisances.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026075for as_var in \
26076 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
26077 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
26078 LC_TELEPHONE LC_TIME
26079do
26080 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
26081 eval $as_var=C; export $as_var
26082 else
26083 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
26084 fi
26085done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026086
26087# Required to use basename.
26088if expr a : '\(a\)' >/dev/null 2>&1 &&
26089 test "X`expr 00001 : '.*\(...\)'`" = X001; then
26090 as_expr=expr
26091else
26092 as_expr=false
26093fi
26094
26095if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
26096 as_basename=basename
26097else
26098 as_basename=false
26099fi
26100
26101
26102# Name of the executable.
26103as_me=`$as_basename -- "$0" ||
26104$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
26105 X"$0" : 'X\(//\)$' \| \
26106 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026107echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026108 sed '/^.*\/\([^/][^/]*\)\/*$/{
26109 s//\1/
26110 q
26111 }
26112 /^X\/\(\/\/\)$/{
26113 s//\1/
26114 q
26115 }
26116 /^X\/\(\/\).*/{
26117 s//\1/
26118 q
26119 }
26120 s/.*/./; q'`
26121
26122# CDPATH.
26123$as_unset CDPATH
26124
26125
26126
Martin v. Löwis11437992002-04-12 09:54:03 +000026127 as_lineno_1=$LINENO
26128 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000026129 test "x$as_lineno_1" != "x$as_lineno_2" &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026130 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000026131
Martin v. Löwis11437992002-04-12 09:54:03 +000026132 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
26133 # uniformly replaced by the line number. The first 'sed' inserts a
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026134 # line-number line after each line using $LINENO; the second 'sed'
26135 # does the real work. The second script uses 'N' to pair each
26136 # line-number line with the line containing $LINENO, and appends
26137 # trailing '-' during substitution so that $LINENO is not a special
26138 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000026139 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026140 # scripts with optimization help from Paolo Bonzini. Blame Lee
26141 # E. McMahon (1931-1989) for sed's syntax. :-)
26142 sed -n '
26143 p
26144 /[$]LINENO/=
26145 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000026146 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026147 s/[$]LINENO.*/&-/
26148 t lineno
26149 b
26150 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000026151 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026152 :loop
26153 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000026154 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026155 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000026156 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026157 chmod +x "$as_me.lineno" ||
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026158 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000026159 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000026160
Martin v. Löwis11437992002-04-12 09:54:03 +000026161 # Don't try to exec as it changes $[0], causing all sort of problems
26162 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026163 # original and so on. Autoconf is especially sensitive to this).
26164 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000026165 # Exit status is that of the last command.
26166 exit
26167}
26168
26169
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026170if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
26171 as_dirname=dirname
26172else
26173 as_dirname=false
26174fi
26175
26176ECHO_C= ECHO_N= ECHO_T=
26177case `echo -n x` in
26178-n*)
26179 case `echo 'x\c'` in
26180 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
26181 *) ECHO_C='\c';;
26182 esac;;
26183*)
26184 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000026185esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026186
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026187if expr a : '\(a\)' >/dev/null 2>&1 &&
26188 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026189 as_expr=expr
26190else
26191 as_expr=false
26192fi
26193
26194rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026195if test -d conf$$.dir; then
26196 rm -f conf$$.dir/conf$$.file
26197else
26198 rm -f conf$$.dir
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026199 mkdir conf$$.dir
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026200fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026201echo >conf$$.file
26202if ln -s conf$$.file conf$$ 2>/dev/null; then
26203 as_ln_s='ln -s'
26204 # ... but there are two gotchas:
26205 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
26206 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
26207 # In both cases, we have to default to `cp -p'.
26208 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +000026209 as_ln_s='cp -p'
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026210elif ln conf$$.file conf$$ 2>/dev/null; then
26211 as_ln_s=ln
Martin v. Löwis11437992002-04-12 09:54:03 +000026212else
26213 as_ln_s='cp -p'
26214fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026215rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
26216rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000026217
Skip Montanaro6dead952003-09-25 14:50:04 +000026218if mkdir -p . 2>/dev/null; then
26219 as_mkdir_p=:
26220else
Skip Montanarof0d5f792004-08-15 14:08:23 +000026221 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000026222 as_mkdir_p=false
26223fi
26224
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026225if test -x / >/dev/null 2>&1; then
26226 as_test_x='test -x'
26227else
26228 if ls -dL / >/dev/null 2>&1; then
26229 as_ls_L_option=L
26230 else
26231 as_ls_L_option=
26232 fi
26233 as_test_x='
26234 eval sh -c '\''
26235 if test -d "$1"; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026236 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026237 else
26238 case $1 in
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026239 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026240 esac;
26241 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
26242 ???[sx]*):;;*)false;;esac;fi
26243 '\'' sh
26244 '
26245fi
26246as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000026247
26248# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000026249as_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 +000026250
26251# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000026252as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000026253
26254
Martin v. Löwis11437992002-04-12 09:54:03 +000026255exec 6>&1
26256
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026257# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000026258# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026259# values after options handling.
26260ac_log="
Christian Heimes70e5cab2008-12-03 18:18:23 +000026261This file was extended by python $as_me 3.1, which was
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026262generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000026263
26264 CONFIG_FILES = $CONFIG_FILES
26265 CONFIG_HEADERS = $CONFIG_HEADERS
26266 CONFIG_LINKS = $CONFIG_LINKS
26267 CONFIG_COMMANDS = $CONFIG_COMMANDS
26268 $ $0 $@
26269
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026270on `(hostname || uname -n) 2>/dev/null | sed 1q`
26271"
26272
Martin v. Löwis11437992002-04-12 09:54:03 +000026273_ACEOF
26274
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026275cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026276# Files that config.status was made for.
Martin v. Löwis113a0852009-05-29 17:25:39 +000026277config_files="$ac_config_files"
26278config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000026279
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026280_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026281
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026282cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026283ac_cs_usage="\
26284\`$as_me' instantiates files from templates according to the
26285current configuration.
26286
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026287Usage: $0 [OPTIONS] [FILE]...
Martin v. Löwis11437992002-04-12 09:54:03 +000026288
26289 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026290 -V, --version print version number and configuration settings, then exit
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026291 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000026292 -d, --debug don't remove temporary files
26293 --recheck update $as_me by reconfiguring in the same conditions
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026294 --file=FILE[:TEMPLATE]
26295 instantiate the configuration file FILE
26296 --header=FILE[:TEMPLATE]
26297 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000026298
26299Configuration files:
26300$config_files
26301
26302Configuration headers:
26303$config_headers
26304
26305Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000026306
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026307_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026308cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026309ac_cs_version="\\
Christian Heimes70e5cab2008-12-03 18:18:23 +000026310python config.status 3.1
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026311configured by $0, generated by GNU Autoconf 2.61,
26312 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000026313
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026314Copyright (C) 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000026315This config.status script is free software; the Free Software Foundation
26316gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026317
26318ac_pwd='$ac_pwd'
26319srcdir='$srcdir'
26320INSTALL='$INSTALL'
Martin v. Löwis11437992002-04-12 09:54:03 +000026321_ACEOF
26322
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026323cat >>$CONFIG_STATUS <<\_ACEOF
26324# If no file are specified by the user, then we need to provide default
26325# value. By we need to know if files were specified by the user.
Martin v. Löwis11437992002-04-12 09:54:03 +000026326ac_need_defaults=:
26327while test $# != 0
26328do
26329 case $1 in
26330 --*=*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026331 ac_option=`expr "X$1" : 'X\([^=]*\)='`
26332 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000026333 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000026334 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026335 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000026336 ac_option=$1
26337 ac_optarg=$2
26338 ac_shift=shift
26339 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026340 esac
26341
Skip Montanaro6dead952003-09-25 14:50:04 +000026342 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000026343 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000026344 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
26345 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026346 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026347 echo "$ac_cs_version"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026348 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000026349 debug=: ;;
26350 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000026351 $ac_shift
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026352 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000026353 ac_need_defaults=false;;
26354 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000026355 $ac_shift
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026356 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000026357 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026358 --he | --h)
26359 # Conflict between --help and --header
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026360 { echo "$as_me: error: ambiguous option: $1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026361Try \`$0 --help' for more information." >&2
26362 { (exit 1); exit 1; }; };;
26363 --help | --hel | -h )
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026364 echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000026365 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
26366 | -silent | --silent | --silen | --sile | --sil | --si | --s)
26367 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026368
26369 # This is an error.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026370 -*) { echo "$as_me: error: unrecognized option: $1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026371Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000026372 { (exit 1); exit 1; }; } ;;
26373
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026374 *) ac_config_targets="$ac_config_targets $1"
26375 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026376
26377 esac
26378 shift
26379done
26380
Skip Montanaro6dead952003-09-25 14:50:04 +000026381ac_configure_extra_args=
26382
26383if $ac_cs_silent; then
26384 exec 6>/dev/null
26385 ac_configure_extra_args="$ac_configure_extra_args --silent"
26386fi
26387
26388_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026389cat >>$CONFIG_STATUS <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026390if \$ac_cs_recheck; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026391 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
26392 CONFIG_SHELL=$SHELL
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026393 export CONFIG_SHELL
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026394 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000026395fi
26396
Martin v. Löwis11437992002-04-12 09:54:03 +000026397_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026398cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026399exec 5>>config.log
26400{
26401 echo
26402 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
26403## Running $as_me. ##
26404_ASBOX
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026405 echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026406} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026407
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026408_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026409cat >>$CONFIG_STATUS <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026410_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026411
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026412cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026413
26414# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000026415for ac_config_target in $ac_config_targets
26416do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026417 case $ac_config_target in
26418 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
26419 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
26420 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000026421 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
26422 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026423 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
26424 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000026425 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026426
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026427 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
26428echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000026429 { (exit 1); exit 1; }; };;
26430 esac
26431done
26432
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026433
Martin v. Löwis11437992002-04-12 09:54:03 +000026434# If the user did not use the arguments to specify the items to instantiate,
26435# then the envvar interface is used. Set only those that are not.
26436# We use the long form for the default assignment because of an extremely
26437# bizarre bug on SunOS 4.1.3.
26438if $ac_need_defaults; then
26439 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
26440 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
26441fi
26442
Skip Montanaro6dead952003-09-25 14:50:04 +000026443# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026444# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000026445# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026446# Hook for its removal unless debugging.
26447# Note that there is a small window in which the directory will not be cleaned:
26448# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000026449$debug ||
26450{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026451 tmp=
26452 trap 'exit_status=$?
26453 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
26454' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000026455 trap '{ (exit 1); exit 1; }' 1 2 13 15
26456}
Martin v. Löwis11437992002-04-12 09:54:03 +000026457# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000026458
Martin v. Löwis11437992002-04-12 09:54:03 +000026459{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026460 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000026461 test -n "$tmp" && test -d "$tmp"
26462} ||
26463{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026464 tmp=./conf$$-$RANDOM
26465 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000026466} ||
26467{
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026468 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000026469 { (exit 1); exit 1; }
26470}
26471
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026472#
26473# Set up the sed scripts for CONFIG_FILES section.
26474#
26475
26476# No need to generate the scripts if there are no CONFIG_FILES.
26477# This happens for instance when ./config.status config.h
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026478if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026479
26480_ACEOF
26481
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026482
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026483
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026484ac_delim='%!_!# '
26485for ac_last_try in false false false false false :; do
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026486 cat >conf$$subs.sed <<_ACEOF
26487SHELL!$SHELL$ac_delim
26488PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
26489PACKAGE_NAME!$PACKAGE_NAME$ac_delim
26490PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
26491PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
26492PACKAGE_STRING!$PACKAGE_STRING$ac_delim
26493PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
26494exec_prefix!$exec_prefix$ac_delim
26495prefix!$prefix$ac_delim
26496program_transform_name!$program_transform_name$ac_delim
26497bindir!$bindir$ac_delim
26498sbindir!$sbindir$ac_delim
26499libexecdir!$libexecdir$ac_delim
26500datarootdir!$datarootdir$ac_delim
26501datadir!$datadir$ac_delim
26502sysconfdir!$sysconfdir$ac_delim
26503sharedstatedir!$sharedstatedir$ac_delim
26504localstatedir!$localstatedir$ac_delim
26505includedir!$includedir$ac_delim
26506oldincludedir!$oldincludedir$ac_delim
26507docdir!$docdir$ac_delim
26508infodir!$infodir$ac_delim
26509htmldir!$htmldir$ac_delim
26510dvidir!$dvidir$ac_delim
26511pdfdir!$pdfdir$ac_delim
26512psdir!$psdir$ac_delim
26513libdir!$libdir$ac_delim
26514localedir!$localedir$ac_delim
26515mandir!$mandir$ac_delim
26516DEFS!$DEFS$ac_delim
26517ECHO_C!$ECHO_C$ac_delim
26518ECHO_N!$ECHO_N$ac_delim
26519ECHO_T!$ECHO_T$ac_delim
26520LIBS!$LIBS$ac_delim
26521build_alias!$build_alias$ac_delim
26522host_alias!$host_alias$ac_delim
26523target_alias!$target_alias$ac_delim
26524VERSION!$VERSION$ac_delim
26525SOVERSION!$SOVERSION$ac_delim
26526CONFIG_ARGS!$CONFIG_ARGS$ac_delim
26527UNIVERSALSDK!$UNIVERSALSDK$ac_delim
26528ARCH_RUN_32BIT!$ARCH_RUN_32BIT$ac_delim
Benjamin Petersone7e59c22010-03-23 21:05:56 +000026529LIPO_32BIT_FLAGS!$LIPO_32BIT_FLAGS$ac_delim
26530LIPO_64BIT_FLAGS!$LIPO_64BIT_FLAGS$ac_delim
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026531PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
26532PYTHONFRAMEWORKIDENTIFIER!$PYTHONFRAMEWORKIDENTIFIER$ac_delim
26533PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
26534PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
26535PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
26536FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
26537FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
26538FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
26539FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
26540FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
26541MACHDEP!$MACHDEP$ac_delim
26542SGI_ABI!$SGI_ABI$ac_delim
26543CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
26544EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim
26545CC!$CC$ac_delim
26546CFLAGS!$CFLAGS$ac_delim
26547LDFLAGS!$LDFLAGS$ac_delim
26548CPPFLAGS!$CPPFLAGS$ac_delim
26549ac_ct_CC!$ac_ct_CC$ac_delim
26550EXEEXT!$EXEEXT$ac_delim
26551OBJEXT!$OBJEXT$ac_delim
26552CXX!$CXX$ac_delim
26553MAINCC!$MAINCC$ac_delim
26554CPP!$CPP$ac_delim
26555GREP!$GREP$ac_delim
26556EGREP!$EGREP$ac_delim
26557BUILDEXEEXT!$BUILDEXEEXT$ac_delim
26558LIBRARY!$LIBRARY$ac_delim
26559LDLIBRARY!$LDLIBRARY$ac_delim
26560DLLLIBRARY!$DLLLIBRARY$ac_delim
26561BLDLIBRARY!$BLDLIBRARY$ac_delim
26562LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
26563INSTSONAME!$INSTSONAME$ac_delim
26564RUNSHARED!$RUNSHARED$ac_delim
26565LINKCC!$LINKCC$ac_delim
26566GNULD!$GNULD$ac_delim
26567RANLIB!$RANLIB$ac_delim
26568AR!$AR$ac_delim
26569ARFLAGS!$ARFLAGS$ac_delim
26570SVNVERSION!$SVNVERSION$ac_delim
26571INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
26572INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
26573INSTALL_DATA!$INSTALL_DATA$ac_delim
26574LN!$LN$ac_delim
26575OPT!$OPT$ac_delim
26576BASECFLAGS!$BASECFLAGS$ac_delim
26577UNIVERSAL_ARCH_FLAGS!$UNIVERSAL_ARCH_FLAGS$ac_delim
26578OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
26579LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
26580SO!$SO$ac_delim
26581LDSHARED!$LDSHARED$ac_delim
26582BLDSHARED!$BLDSHARED$ac_delim
26583CCSHARED!$CCSHARED$ac_delim
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026584_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026585
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026586 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026587 break
26588 elif $ac_last_try; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026589 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
26590echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026591 { (exit 1); exit 1; }; }
26592 else
26593 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000026594 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026595done
26596
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026597ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
26598if test -n "$ac_eof"; then
26599 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
26600 ac_eof=`expr $ac_eof + 1`
26601fi
26602
26603cat >>$CONFIG_STATUS <<_ACEOF
26604cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
26605/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026606_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026607sed '
26608s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
26609s/^/s,@/; s/!/@,|#_!!_#|/
26610:n
26611t n
26612s/'"$ac_delim"'$/,g/; t
26613s/$/\\/; p
26614N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
26615' >>$CONFIG_STATUS <conf$$subs.sed
26616rm -f conf$$subs.sed
26617cat >>$CONFIG_STATUS <<_ACEOF
26618CEOF$ac_eof
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026619_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026620
26621
26622ac_delim='%!_!# '
26623for ac_last_try in false false false false false :; do
26624 cat >conf$$subs.sed <<_ACEOF
Benjamin Petersone7e59c22010-03-23 21:05:56 +000026625LINKFORSHARED!$LINKFORSHARED$ac_delim
26626CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026627SHLIBS!$SHLIBS$ac_delim
26628USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
26629SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
26630USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
26631LDLAST!$LDLAST$ac_delim
26632THREADOBJ!$THREADOBJ$ac_delim
26633DLINCLDIR!$DLINCLDIR$ac_delim
26634DYNLOADFILE!$DYNLOADFILE$ac_delim
26635MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
26636TRUE!$TRUE$ac_delim
26637LIBOBJS!$LIBOBJS$ac_delim
26638HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
26639HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
26640HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
26641HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
26642HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
26643LIBM!$LIBM$ac_delim
26644LIBC!$LIBC$ac_delim
26645THREADHEADERS!$THREADHEADERS$ac_delim
26646SRCDIRS!$SRCDIRS$ac_delim
26647LTLIBOBJS!$LTLIBOBJS$ac_delim
26648_ACEOF
26649
Benjamin Petersone7e59c22010-03-23 21:05:56 +000026650 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 23; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026651 break
26652 elif $ac_last_try; then
26653 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
26654echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026655 { (exit 1); exit 1; }; }
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026656 else
26657 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
26658 fi
26659done
26660
26661ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
26662if test -n "$ac_eof"; then
26663 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
26664 ac_eof=`expr $ac_eof + 1`
26665fi
26666
26667cat >>$CONFIG_STATUS <<_ACEOF
26668cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
26669/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026670_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026671sed '
26672s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
26673s/^/s,@/; s/!/@,|#_!!_#|/
26674:n
26675t n
26676s/'"$ac_delim"'$/,g/; t
26677s/$/\\/; p
26678N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
26679' >>$CONFIG_STATUS <conf$$subs.sed
26680rm -f conf$$subs.sed
26681cat >>$CONFIG_STATUS <<_ACEOF
26682:end
26683s/|#_!!_#|//g
26684CEOF$ac_eof
26685_ACEOF
26686
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026687
26688# VPATH may cause trouble with some makes, so we remove $(srcdir),
26689# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
26690# trailing colons and then remove the whole line if VPATH becomes empty
26691# (actually we leave an empty line to preserve line numbers).
26692if test "x$srcdir" = x.; then
26693 ac_vpsub='/^[ ]*VPATH[ ]*=/{
26694s/:*\$(srcdir):*/:/
26695s/:*\${srcdir}:*/:/
26696s/:*@srcdir@:*/:/
26697s/^\([^=]*=[ ]*\):*/\1/
26698s/:*$//
26699s/^[^=]*=[ ]*$//
26700}'
26701fi
26702
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026703cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026704fi # test -n "$CONFIG_FILES"
26705
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026706
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026707for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026708do
26709 case $ac_tag in
26710 :[FHLC]) ac_mode=$ac_tag; continue;;
26711 esac
26712 case $ac_mode$ac_tag in
26713 :[FHL]*:*);;
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026714 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
26715echo "$as_me: error: Invalid tag $ac_tag." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026716 { (exit 1); exit 1; }; };;
26717 :[FH]-) ac_tag=-:-;;
26718 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
26719 esac
26720 ac_save_IFS=$IFS
26721 IFS=:
26722 set x $ac_tag
26723 IFS=$ac_save_IFS
26724 shift
26725 ac_file=$1
26726 shift
26727
26728 case $ac_mode in
26729 :L) ac_source=$1;;
26730 :[FH])
26731 ac_file_inputs=
26732 for ac_f
26733 do
26734 case $ac_f in
26735 -) ac_f="$tmp/stdin";;
26736 *) # Look for the file first in the build tree, then in the source tree
26737 # (if the path is not absolute). The absolute path cannot be DOS-style,
26738 # because $ac_f cannot contain `:'.
26739 test -f "$ac_f" ||
26740 case $ac_f in
26741 [\\/$]*) false;;
26742 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
26743 esac ||
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026744 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
26745echo "$as_me: error: cannot find input file: $ac_f" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026746 { (exit 1); exit 1; }; };;
26747 esac
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026748 ac_file_inputs="$ac_file_inputs $ac_f"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026749 done
26750
26751 # Let's still pretend it is `configure' which instantiates (i.e., don't
26752 # use $as_me), people would be surprised to read:
26753 # /* config.h. Generated by config.status. */
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026754 configure_input="Generated from "`IFS=:
26755 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026756 if test x"$ac_file" != x-; then
26757 configure_input="$ac_file. $configure_input"
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026758 { echo "$as_me:$LINENO: creating $ac_file" >&5
26759echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026760 fi
26761
26762 case $ac_tag in
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026763 *:-:* | *:-) cat >"$tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026764 esac
26765 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026766 esac
26767
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026768 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000026769$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026770 X"$ac_file" : 'X\(//\)[^/]' \| \
26771 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026772 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026773echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026774 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26775 s//\1/
26776 q
26777 }
26778 /^X\(\/\/\)[^/].*/{
26779 s//\1/
26780 q
26781 }
26782 /^X\(\/\/\)$/{
26783 s//\1/
26784 q
26785 }
26786 /^X\(\/\).*/{
26787 s//\1/
26788 q
26789 }
26790 s/.*/./; q'`
26791 { as_dir="$ac_dir"
26792 case $as_dir in #(
26793 -*) as_dir=./$as_dir;;
26794 esac
26795 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000026796 as_dirs=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026797 while :; do
26798 case $as_dir in #(
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026799 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026800 *) as_qdir=$as_dir;;
26801 esac
26802 as_dirs="'$as_qdir' $as_dirs"
26803 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000026804$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026805 X"$as_dir" : 'X\(//\)[^/]' \| \
26806 X"$as_dir" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026807 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026808echo X"$as_dir" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026809 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26810 s//\1/
26811 q
26812 }
26813 /^X\(\/\/\)[^/].*/{
26814 s//\1/
26815 q
26816 }
26817 /^X\(\/\/\)$/{
26818 s//\1/
26819 q
26820 }
26821 /^X\(\/\).*/{
26822 s//\1/
26823 q
26824 }
26825 s/.*/./; q'`
26826 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000026827 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026828 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026829 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
26830echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000026831 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026832 ac_builddir=.
26833
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026834case "$ac_dir" in
26835.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
26836*)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026837 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026838 # A ".." for each directory in $ac_dir_suffix.
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026839 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026840 case $ac_top_builddir_sub in
26841 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
26842 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
26843 esac ;;
26844esac
26845ac_abs_top_builddir=$ac_pwd
26846ac_abs_builddir=$ac_pwd$ac_dir_suffix
26847# for backward compatibility:
26848ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000026849
26850case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026851 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000026852 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026853 ac_top_srcdir=$ac_top_builddir_sub
26854 ac_abs_top_srcdir=$ac_pwd ;;
26855 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000026856 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026857 ac_top_srcdir=$srcdir
26858 ac_abs_top_srcdir=$srcdir ;;
26859 *) # Relative name.
26860 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
26861 ac_top_srcdir=$ac_top_build_prefix$srcdir
26862 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026863esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026864ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000026865
Martin v. Löwis11437992002-04-12 09:54:03 +000026866
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026867 case $ac_mode in
26868 :F)
26869 #
26870 # CONFIG_FILE
26871 #
Martin v. Löwis11437992002-04-12 09:54:03 +000026872
26873 case $INSTALL in
26874 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026875 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026876 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000026877_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026878
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026879cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026880# If the template does not know about datarootdir, expand it.
26881# FIXME: This hack should be removed a few years after 2.60.
26882ac_datarootdir_hack=; ac_datarootdir_seen=
26883
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026884case `sed -n '/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026885 p
26886 q
26887}
26888/@datadir@/p
26889/@docdir@/p
26890/@infodir@/p
26891/@localedir@/p
26892/@mandir@/p
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026893' $ac_file_inputs` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026894*datarootdir*) ac_datarootdir_seen=yes;;
26895*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026896 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
26897echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026898_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026899cat >>$CONFIG_STATUS <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026900 ac_datarootdir_hack='
26901 s&@datadir@&$datadir&g
26902 s&@docdir@&$docdir&g
26903 s&@infodir@&$infodir&g
26904 s&@localedir@&$localedir&g
26905 s&@mandir@&$mandir&g
26906 s&\\\${datarootdir}&$datarootdir&g' ;;
26907esac
26908_ACEOF
26909
26910# Neutralize VPATH when `$srcdir' = `.'.
26911# Shell code in configure.ac might set extrasub.
26912# FIXME: do we really want to maintain this feature?
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026913cat >>$CONFIG_STATUS <<_ACEOF
26914 sed "$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000026915$extrasub
26916_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026917cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026918:t
26919/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026920s&@configure_input@&$configure_input&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026921s&@top_builddir@&$ac_top_builddir_sub&;t t
26922s&@srcdir@&$ac_srcdir&;t t
26923s&@abs_srcdir@&$ac_abs_srcdir&;t t
26924s&@top_srcdir@&$ac_top_srcdir&;t t
26925s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
26926s&@builddir@&$ac_builddir&;t t
26927s&@abs_builddir@&$ac_abs_builddir&;t t
26928s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
26929s&@INSTALL@&$ac_INSTALL&;t t
26930$ac_datarootdir_hack
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026931" $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 +000026932
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026933test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
26934 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
26935 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026936 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026937which seems to be undefined. Please make sure it is defined." >&5
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026938echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026939which seems to be undefined. Please make sure it is defined." >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000026940
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026941 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000026942 case $ac_file in
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026943 -) cat "$tmp/out"; rm -f "$tmp/out";;
26944 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
26945 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026946 ;;
26947 :H)
26948 #
26949 # CONFIG_HEADER
26950 #
Ronald Oussoren5644eb72009-09-20 20:10:02 +000026951_ACEOF
26952
26953# Transform confdefs.h into a sed script `conftest.defines', that
26954# substitutes the proper values into config.h.in to produce config.h.
26955rm -f conftest.defines conftest.tail
26956# First, append a space to every undef/define line, to ease matching.
26957echo 's/$/ /' >conftest.defines
26958# Then, protect against being on the right side of a sed subst, or in
26959# an unquoted here document, in config.status. If some macros were
26960# called several times there might be several #defines for the same
26961# symbol, which is useless. But do not sort them, since the last
26962# AC_DEFINE must be honored.
26963ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
26964# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
26965# NAME is the cpp macro being defined, VALUE is the value it is being given.
26966# PARAMS is the parameter list in the macro definition--in most cases, it's
26967# just an empty string.
26968ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
26969ac_dB='\\)[ (].*,\\1define\\2'
26970ac_dC=' '
26971ac_dD=' ,'
26972
26973uniq confdefs.h |
26974 sed -n '
26975 t rset
26976 :rset
26977 s/^[ ]*#[ ]*define[ ][ ]*//
26978 t ok
26979 d
26980 :ok
26981 s/[\\&,]/\\&/g
26982 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
26983 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
26984 ' >>conftest.defines
26985
26986# Remove the space that was appended to ease matching.
26987# Then replace #undef with comments. This is necessary, for
26988# example, in the case of _POSIX_SOURCE, which is predefined and required
26989# on some systems where configure will not decide to define it.
26990# (The regexp can be short, since the line contains either #define or #undef.)
26991echo 's/ $//
26992s,^[ #]*u.*,/* & */,' >>conftest.defines
26993
26994# Break up conftest.defines:
26995ac_max_sed_lines=50
26996
26997# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
26998# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
26999# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
27000# et cetera.
27001ac_in='$ac_file_inputs'
27002ac_out='"$tmp/out1"'
27003ac_nxt='"$tmp/out2"'
27004
27005while :
27006do
27007 # Write a here document:
27008 cat >>$CONFIG_STATUS <<_ACEOF
27009 # First, check the format of the line:
27010 cat >"\$tmp/defines.sed" <<\\CEOF
27011/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
27012/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
27013b
27014:def
27015_ACEOF
27016 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
27017 echo 'CEOF
27018 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
27019 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
27020 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
27021 grep . conftest.tail >/dev/null || break
27022 rm -f conftest.defines
27023 mv conftest.tail conftest.defines
27024done
27025rm -f conftest.defines conftest.tail
27026
27027echo "ac_result=$ac_in" >>$CONFIG_STATUS
27028cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027029 if test x"$ac_file" != x-; then
Ronald Oussoren5644eb72009-09-20 20:10:02 +000027030 echo "/* $configure_input */" >"$tmp/config.h"
27031 cat "$ac_result" >>"$tmp/config.h"
27032 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
27033 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
27034echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027035 else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000027036 rm -f $ac_file
27037 mv "$tmp/config.h" $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000027038 fi
27039 else
Ronald Oussoren5644eb72009-09-20 20:10:02 +000027040 echo "/* $configure_input */"
27041 cat "$ac_result"
Martin v. Löwis11437992002-04-12 09:54:03 +000027042 fi
Ronald Oussoren5644eb72009-09-20 20:10:02 +000027043 rm -f "$tmp/out12"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027044 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000027045
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027046
27047 esac
27048
27049done # for ac_tag
27050
Guido van Rossum627b2d71993-12-24 10:39:16 +000027051
Martin v. Löwis11437992002-04-12 09:54:03 +000027052{ (exit 0); exit 0; }
27053_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027054chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000027055ac_clean_files=$ac_clean_files_save
27056
27057
27058# configure is writing to config.log, and then calls config.status.
27059# config.status does its own redirection, appending to config.log.
27060# Unfortunately, on DOS this fails, as config.log is still kept open
27061# by configure, so config.status won't be able to write to it; its
27062# output is simply discarded. So we exec the FD to /dev/null,
27063# effectively closing config.log, so it can be properly (re)opened and
27064# appended to by config.status. When coming back to configure, we
27065# need to make the FD available again.
27066if test "$no_create" != yes; then
27067 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000027068 ac_config_status_args=
27069 test "$silent" = yes &&
27070 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000027071 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000027072 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000027073 exec 5>>config.log
27074 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
27075 # would make configure fail if this is the last instruction.
27076 $ac_cs_success || { (exit 1); exit 1; }
27077fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000027078
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000027079
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000027080echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000027081if test ! -f Modules/Setup
27082then
27083 cp $srcdir/Modules/Setup.dist Modules/Setup
27084fi
27085
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000027086echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000027087if test ! -f Modules/Setup.local
27088then
27089 echo "# Edit this file for local setup changes" >Modules/Setup.local
27090fi
27091
27092echo "creating Makefile"
27093$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
27094 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000027095 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000027096mv config.c Modules