blob: fa63d5fd37438f79bace0583a54776c8243a66e7 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Benjamin Petersone6c9d242010-03-30 17:34:47 +00002# From configure.in Revision: 79401 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004# Generated by GNU Autoconf 2.61 for python 3.2.
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 Oussoren74f29b42009-09-20 20:09:26 +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 Oussoren74f29b42009-09-20 20:09:26 +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 Oussoren74f29b42009-09-20 20:09:26 +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 Oussoren74f29b42009-09-20 20:09:26 +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 Oussoren74f29b42009-09-20 20:09:26 +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 Oussoren74f29b42009-09-20 20:09:26 +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 Oussoren74f29b42009-09-20 20:09:26 +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 Oussoren74f29b42009-09-20 20:09:26 +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 Oussoren74f29b42009-09-20 20:09:26 +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 Oussoren74f29b42009-09-20 20:09:26 +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 Oussoren74f29b42009-09-20 20:09:26 +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 Oussoren74f29b42009-09-20 20:09:26 +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 Oussoren74f29b42009-09-20 20:09:26 +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 Oussoren74f29b42009-09-20 20:09:26 +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 Oussoren74f29b42009-09-20 20:09:26 +0000498 mkdir conf$$.dir
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000499fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +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 Oussoren74f29b42009-09-20 20:09:26 +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 Oussoren74f29b42009-09-20 20:09:26 +0000535 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000536 else
537 case $1 in
Ronald Oussoren74f29b42009-09-20 20:09:26 +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'
Benjamin Peterson46ea4f72009-06-27 21:40:27 +0000578PACKAGE_VERSION='3.2'
579PACKAGE_STRING='python 3.2'
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 Oussoren74f29b42009-09-20 20:09:26 +0000619ac_subst_vars='SHELL
Benjamin Peterson8719ad52009-09-11 22:24:02 +0000620PATH_SEPARATOR
Ronald Oussoren74f29b42009-09-20 20:09:26 +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
Ronald Oussoren6f6c5622009-12-24 14:03:19 +0000661LIPO_32BIT_FLAGS
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000662PYTHONFRAMEWORK
663PYTHONFRAMEWORKIDENTIFIER
664PYTHONFRAMEWORKDIR
665PYTHONFRAMEWORKPREFIX
666PYTHONFRAMEWORKINSTALLDIR
667FRAMEWORKINSTALLFIRST
668FRAMEWORKINSTALLLAST
669FRAMEWORKALTINSTALLFIRST
670FRAMEWORKALTINSTALLLAST
671FRAMEWORKUNIXTOOLSPREFIX
672MACHDEP
673SGI_ABI
674CONFIGURE_MACOSX_DEPLOYMENT_TARGET
675EXPORT_MACOSX_DEPLOYMENT_TARGET
676CC
677CFLAGS
678LDFLAGS
679CPPFLAGS
680ac_ct_CC
681EXEEXT
682OBJEXT
683CXX
684MAINCC
685CPP
686GREP
687EGREP
688BUILDEXEEXT
689LIBRARY
690LDLIBRARY
691DLLLIBRARY
692BLDLIBRARY
693LDLIBRARYDIR
694INSTSONAME
695RUNSHARED
696LINKCC
697GNULD
698RANLIB
699AR
700ARFLAGS
701SVNVERSION
702INSTALL_PROGRAM
703INSTALL_SCRIPT
704INSTALL_DATA
705LN
706OPT
707BASECFLAGS
708UNIVERSAL_ARCH_FLAGS
709OTHER_LIBTOOL_OPT
710LIBTOOL_CRUFT
711SO
712LDSHARED
713BLDSHARED
714CCSHARED
715LINKFORSHARED
716CFLAGSFORSHARED
717SHLIBS
Benjamin Petersond78735d2010-01-01 16:04:23 +0000718PKG_CONFIG
719LIBFFI_INCLUDEDIR
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000720USE_SIGNAL_MODULE
721SIGNAL_OBJS
722USE_THREAD_MODULE
723LDLAST
724THREADOBJ
725DLINCLDIR
726DYNLOADFILE
727MACHDEP_OBJS
728TRUE
729LIBOBJS
730HAVE_GETHOSTBYNAME_R_6_ARG
731HAVE_GETHOSTBYNAME_R_5_ARG
732HAVE_GETHOSTBYNAME_R_3_ARG
733HAVE_GETHOSTBYNAME_R
734HAVE_GETHOSTBYNAME
735LIBM
736LIBC
737THREADHEADERS
738SRCDIRS
739LTLIBOBJS'
Skip Montanaro6dead952003-09-25 14:50:04 +0000740ac_subst_files=''
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000741 ac_precious_vars='build_alias
742host_alias
743target_alias
744CC
745CFLAGS
746LDFLAGS
747LIBS
748CPPFLAGS
749CPP'
750
Guido van Rossum627b2d71993-12-24 10:39:16 +0000751
Guido van Rossum7f43da71994-08-01 12:15:30 +0000752# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000753ac_init_help=
754ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000755# The variables have the same names as the options, with
756# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000757cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000758exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000759no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000760no_recursion=
761prefix=NONE
762program_prefix=NONE
763program_suffix=NONE
764program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000765silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000766site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000767srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000768verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000769x_includes=NONE
770x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000771
772# Installation directory options.
773# These are left unexpanded so users can "make install exec_prefix=/foo"
774# and all the variables that are supposed to be based on exec_prefix
775# by default will actually change.
776# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000777# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000778bindir='${exec_prefix}/bin'
779sbindir='${exec_prefix}/sbin'
780libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000781datarootdir='${prefix}/share'
782datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000783sysconfdir='${prefix}/etc'
784sharedstatedir='${prefix}/com'
785localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000786includedir='${prefix}/include'
787oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000788docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
789infodir='${datarootdir}/info'
790htmldir='${docdir}'
791dvidir='${docdir}'
792pdfdir='${docdir}'
793psdir='${docdir}'
794libdir='${exec_prefix}/lib'
795localedir='${datarootdir}/locale'
796mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000797
Guido van Rossum7f43da71994-08-01 12:15:30 +0000798ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000799ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000800for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000801do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000802 # If the previous option needs an argument, assign it.
803 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000804 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000805 ac_prev=
806 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000807 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000808
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000809 case $ac_option in
810 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
811 *) ac_optarg=yes ;;
812 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000813
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000814 # Accept the important Cygnus configure options, so we can diagnose typos.
815
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000816 case $ac_dashdash$ac_option in
817 --)
818 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000819
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000820 -bindir | --bindir | --bindi | --bind | --bin | --bi)
821 ac_prev=bindir ;;
822 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000823 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000824
825 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000826 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000827 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000828 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000829
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000830 -cache-file | --cache-file | --cache-fil | --cache-fi \
831 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
832 ac_prev=cache_file ;;
833 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
834 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000835 cache_file=$ac_optarg ;;
836
837 --config-cache | -C)
838 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000839
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000840 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000841 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000842 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000843 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000844
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000845 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
846 | --dataroo | --dataro | --datar)
847 ac_prev=datarootdir ;;
848 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
849 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
850 datarootdir=$ac_optarg ;;
851
Guido van Rossum7f43da71994-08-01 12:15:30 +0000852 -disable-* | --disable-*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000853 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000854 # Reject names that are not valid shell variable names.
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000855 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
856 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000857 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000858 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
859 eval enable_$ac_feature=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000860
861 -docdir | --docdir | --docdi | --doc | --do)
862 ac_prev=docdir ;;
863 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
864 docdir=$ac_optarg ;;
865
866 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
867 ac_prev=dvidir ;;
868 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
869 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000870
871 -enable-* | --enable-*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000872 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000873 # Reject names that are not valid shell variable names.
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000874 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
875 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000876 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000877 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
878 eval enable_$ac_feature=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000879
Guido van Rossum7f43da71994-08-01 12:15:30 +0000880 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
881 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
882 | --exec | --exe | --ex)
883 ac_prev=exec_prefix ;;
884 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
885 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
886 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000887 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000888
889 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000890 # Obsolete; use --with-gas.
891 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000892
Martin v. Löwis11437992002-04-12 09:54:03 +0000893 -help | --help | --hel | --he | -h)
894 ac_init_help=long ;;
895 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
896 ac_init_help=recursive ;;
897 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
898 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000899
900 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000901 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000902 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000903 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000904
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000905 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
906 ac_prev=htmldir ;;
907 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
908 | --ht=*)
909 htmldir=$ac_optarg ;;
910
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000911 -includedir | --includedir | --includedi | --included | --include \
912 | --includ | --inclu | --incl | --inc)
913 ac_prev=includedir ;;
914 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
915 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000916 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000917
918 -infodir | --infodir | --infodi | --infod | --info | --inf)
919 ac_prev=infodir ;;
920 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000921 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000922
923 -libdir | --libdir | --libdi | --libd)
924 ac_prev=libdir ;;
925 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000926 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000927
928 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
929 | --libexe | --libex | --libe)
930 ac_prev=libexecdir ;;
931 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
932 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000933 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000934
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000935 -localedir | --localedir | --localedi | --localed | --locale)
936 ac_prev=localedir ;;
937 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
938 localedir=$ac_optarg ;;
939
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000940 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000941 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000942 ac_prev=localstatedir ;;
943 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000944 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000945 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000946
947 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
948 ac_prev=mandir ;;
949 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000950 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000951
Guido van Rossum7f43da71994-08-01 12:15:30 +0000952 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000953 # Obsolete; use --without-fp.
954 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000955
956 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000957 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000958 no_create=yes ;;
959
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000960 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
961 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
962 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000963
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000964 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
965 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
966 | --oldin | --oldi | --old | --ol | --o)
967 ac_prev=oldincludedir ;;
968 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
969 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
970 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000971 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000972
Guido van Rossum7f43da71994-08-01 12:15:30 +0000973 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
974 ac_prev=prefix ;;
975 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000976 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000977
978 -program-prefix | --program-prefix | --program-prefi | --program-pref \
979 | --program-pre | --program-pr | --program-p)
980 ac_prev=program_prefix ;;
981 -program-prefix=* | --program-prefix=* | --program-prefi=* \
982 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000983 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000984
985 -program-suffix | --program-suffix | --program-suffi | --program-suff \
986 | --program-suf | --program-su | --program-s)
987 ac_prev=program_suffix ;;
988 -program-suffix=* | --program-suffix=* | --program-suffi=* \
989 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000990 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000991
992 -program-transform-name | --program-transform-name \
993 | --program-transform-nam | --program-transform-na \
994 | --program-transform-n | --program-transform- \
995 | --program-transform | --program-transfor \
996 | --program-transfo | --program-transf \
997 | --program-trans | --program-tran \
998 | --progr-tra | --program-tr | --program-t)
999 ac_prev=program_transform_name ;;
1000 -program-transform-name=* | --program-transform-name=* \
1001 | --program-transform-nam=* | --program-transform-na=* \
1002 | --program-transform-n=* | --program-transform-=* \
1003 | --program-transform=* | --program-transfor=* \
1004 | --program-transfo=* | --program-transf=* \
1005 | --program-trans=* | --program-tran=* \
1006 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001007 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001008
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001009 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1010 ac_prev=pdfdir ;;
1011 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1012 pdfdir=$ac_optarg ;;
1013
1014 -psdir | --psdir | --psdi | --psd | --ps)
1015 ac_prev=psdir ;;
1016 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1017 psdir=$ac_optarg ;;
1018
Guido van Rossum7f43da71994-08-01 12:15:30 +00001019 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1020 | -silent | --silent | --silen | --sile | --sil)
1021 silent=yes ;;
1022
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001023 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1024 ac_prev=sbindir ;;
1025 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1026 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001027 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001028
1029 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1030 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1031 | --sharedst | --shareds | --shared | --share | --shar \
1032 | --sha | --sh)
1033 ac_prev=sharedstatedir ;;
1034 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1035 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1036 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1037 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001038 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001039
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001040 -site | --site | --sit)
1041 ac_prev=site ;;
1042 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001043 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001044
Guido van Rossum7f43da71994-08-01 12:15:30 +00001045 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1046 ac_prev=srcdir ;;
1047 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001048 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001049
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001050 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1051 | --syscon | --sysco | --sysc | --sys | --sy)
1052 ac_prev=sysconfdir ;;
1053 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1054 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001055 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001056
Guido van Rossum7f43da71994-08-01 12:15:30 +00001057 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001058 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001059 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001060 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001061
1062 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1063 verbose=yes ;;
1064
Martin v. Löwis11437992002-04-12 09:54:03 +00001065 -version | --version | --versio | --versi | --vers | -V)
1066 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001067
1068 -with-* | --with-*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001069 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001070 # Reject names that are not valid shell variable names.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001071 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1072 { echo "$as_me: error: invalid package name: $ac_package" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001073 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001074 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1075 eval with_$ac_package=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001076
1077 -without-* | --without-*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001078 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001079 # Reject names that are not valid shell variable names.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001080 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1081 { echo "$as_me: error: invalid package name: $ac_package" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001082 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001083 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1084 eval with_$ac_package=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001085
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001086 --x)
1087 # Obsolete; use --with-x.
1088 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001089
1090 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1091 | --x-incl | --x-inc | --x-in | --x-i)
1092 ac_prev=x_includes ;;
1093 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1094 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001095 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001096
1097 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1098 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1099 ac_prev=x_libraries ;;
1100 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1101 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001102 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001103
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001104 -*) { echo "$as_me: error: unrecognized option: $ac_option
Martin v. Löwis11437992002-04-12 09:54:03 +00001105Try \`$0 --help' for more information." >&2
1106 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001107 ;;
1108
Martin v. Löwis11437992002-04-12 09:54:03 +00001109 *=*)
1110 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1111 # Reject names that are not valid shell variable names.
1112 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001113 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001114 { (exit 1); exit 1; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001115 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001116 export $ac_envvar ;;
1117
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001118 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001119 # FIXME: should be removed in autoconf 3.0.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001120 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001121 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001122 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001123 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001124 ;;
1125
1126 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001127done
1128
Guido van Rossum7f43da71994-08-01 12:15:30 +00001129if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001130 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001131 { echo "$as_me: error: missing argument to $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001132 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001133fi
1134
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001135# Be sure to have absolute directory names.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001136for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1137 datadir sysconfdir sharedstatedir localstatedir includedir \
1138 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1139 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001140do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001141 eval ac_val=\$$ac_var
Martin v. Löwis11437992002-04-12 09:54:03 +00001142 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001143 [\\/$]* | ?:[\\/]* ) continue;;
1144 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001145 esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001146 { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001147 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001148done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001149
Martin v. Löwis11437992002-04-12 09:54:03 +00001150# There might be people who depend on the old broken behavior: `$host'
1151# used to hold the argument of --host etc.
1152# FIXME: To remove some day.
1153build=$build_alias
1154host=$host_alias
1155target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001156
Martin v. Löwis11437992002-04-12 09:54:03 +00001157# FIXME: To remove some day.
1158if test "x$host_alias" != x; then
1159 if test "x$build_alias" = x; then
1160 cross_compiling=maybe
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001161 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 +00001162 If a cross compiler is detected then cross compile mode will be used." >&2
1163 elif test "x$build_alias" != "x$host_alias"; then
1164 cross_compiling=yes
1165 fi
1166fi
1167
1168ac_tool_prefix=
1169test -n "$host_alias" && ac_tool_prefix=$host_alias-
1170
1171test "$silent" = yes && exec 6>/dev/null
1172
Guido van Rossum627b2d71993-12-24 10:39:16 +00001173
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001174ac_pwd=`pwd` && test -n "$ac_pwd" &&
1175ac_ls_di=`ls -di .` &&
1176ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001177 { echo "$as_me: error: Working directory cannot be determined" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001178 { (exit 1); exit 1; }; }
1179test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001180 { echo "$as_me: error: pwd does not report name of working directory" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001181 { (exit 1); exit 1; }; }
1182
1183
Guido van Rossum627b2d71993-12-24 10:39:16 +00001184# Find the source files, if location was not specified.
1185if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001186 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001187 # Try the directory containing this script, then the parent directory.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001188 ac_confdir=`$as_dirname -- "$0" ||
1189$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1190 X"$0" : 'X\(//\)[^/]' \| \
1191 X"$0" : 'X\(//\)$' \| \
1192 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
1193echo X"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001194 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1195 s//\1/
1196 q
1197 }
1198 /^X\(\/\/\)[^/].*/{
1199 s//\1/
1200 q
1201 }
1202 /^X\(\/\/\)$/{
1203 s//\1/
1204 q
1205 }
1206 /^X\(\/\).*/{
1207 s//\1/
1208 q
1209 }
1210 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001211 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001212 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001213 srcdir=..
1214 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001215else
1216 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001217fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001218if test ! -r "$srcdir/$ac_unique_file"; then
1219 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001220 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001221 { (exit 1); exit 1; }; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00001222fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001223ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1224ac_abs_confdir=`(
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001225 cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001226 { (exit 1); exit 1; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001227 pwd)`
1228# When building in place, set srcdir=.
1229if test "$ac_abs_confdir" = "$ac_pwd"; then
1230 srcdir=.
1231fi
1232# Remove unnecessary trailing slashes from srcdir.
1233# Double slashes in file names in object file debugging info
1234# mess up M-x gdb in Emacs.
1235case $srcdir in
1236*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1237esac
1238for ac_var in $ac_precious_vars; do
1239 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1240 eval ac_env_${ac_var}_value=\$${ac_var}
1241 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1242 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1243done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001244
Martin v. Löwis11437992002-04-12 09:54:03 +00001245#
1246# Report the --help message.
1247#
1248if test "$ac_init_help" = "long"; then
1249 # Omit some internal or obsolete options to make the list less imposing.
1250 # This message is too long to be a string in the A/UX 3.1 sh.
1251 cat <<_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001252\`configure' configures python 3.2 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001253
1254Usage: $0 [OPTION]... [VAR=VALUE]...
1255
1256To assign environment variables (e.g., CC, CFLAGS...), specify them as
1257VAR=VALUE. See below for descriptions of some of the useful variables.
1258
1259Defaults for the options are specified in brackets.
1260
1261Configuration:
1262 -h, --help display this help and exit
1263 --help=short display options specific to this package
1264 --help=recursive display the short help of all the included packages
1265 -V, --version display version information and exit
1266 -q, --quiet, --silent do not print \`checking...' messages
1267 --cache-file=FILE cache test results in FILE [disabled]
1268 -C, --config-cache alias for \`--cache-file=config.cache'
1269 -n, --no-create do not create output files
1270 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1271
Martin v. Löwis11437992002-04-12 09:54:03 +00001272Installation directories:
1273 --prefix=PREFIX install architecture-independent files in PREFIX
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001274 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001275 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001276 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001277
1278By default, \`make install' will install all the files in
1279\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1280an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1281for instance \`--prefix=\$HOME'.
1282
1283For better control, use the options below.
1284
1285Fine tuning of the installation directories:
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001286 --bindir=DIR user executables [EPREFIX/bin]
1287 --sbindir=DIR system admin executables [EPREFIX/sbin]
1288 --libexecdir=DIR program executables [EPREFIX/libexec]
1289 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1290 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1291 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1292 --libdir=DIR object code libraries [EPREFIX/lib]
1293 --includedir=DIR C header files [PREFIX/include]
1294 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1295 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1296 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1297 --infodir=DIR info documentation [DATAROOTDIR/info]
1298 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1299 --mandir=DIR man documentation [DATAROOTDIR/man]
1300 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1301 --htmldir=DIR html documentation [DOCDIR]
1302 --dvidir=DIR dvi documentation [DOCDIR]
1303 --pdfdir=DIR pdf documentation [DOCDIR]
1304 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001305_ACEOF
1306
1307 cat <<\_ACEOF
1308_ACEOF
1309fi
1310
1311if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001312 case $ac_init_help in
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001313 short | recursive ) echo "Configuration of python 3.2:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001314 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001315 cat <<\_ACEOF
1316
1317Optional Features:
1318 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1319 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001320 --enable-universalsdk[=SDKDIR]
Christian Heimes292d3512008-02-03 16:51:08 +00001321 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001322 --enable-framework[=INSTALLDIR]
1323 Build (MacOSX|Darwin) framework
1324 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001325 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001326 --enable-ipv6 Enable ipv6 (with ipv4) support
1327 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001328 --enable-big-digits[=BITS]
1329 use big digits for Python longs [BITS=30]
Martin v. Löwis11437992002-04-12 09:54:03 +00001330
1331Optional Packages:
1332 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1333 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001334 --with-universal-archs=ARCH
1335 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001336 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001337 --with-framework-name=FRAMEWORK
1338 specify an alternate name of the framework built
1339 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001340 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001341 --with-cxx-main=<compiler>
1342 compile main() and link python executable with C++
1343 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001344 --with-suffix=.exe set executable suffix
1345 --with-pydebug build with Py_DEBUG defined
1346 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001347 --with-system-expat build pyexpat module using an installed expat
1348 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001349 --with-system-ffi build _ctypes module using an installed ffi library
Matthias Klose55708cc2009-04-30 08:06:49 +00001350 --with-dbmliborder=db1:db2:...
1351 order to check db backends for dbm. Valid value is a
1352 colon separated string with the backend names
1353 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001354 --with-signal-module disable/enable signal module
1355 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1356 --with(out)-threads[=DIRECTORY]
1357 disable/enable thread support
1358 --with(out)-thread[=DIRECTORY]
1359 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001360 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001361 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001362 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001363 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001364 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001365 --with-fpectl enable SIGFPE catching
1366 --with-libm=STRING math library
1367 --with-libc=STRING C library
Georg Brandl52d168a2008-01-07 18:10:24 +00001368 --with-wide-unicode Use 4-byte Unicode characters (default is 2 bytes)
Antoine Pitroub52ec782009-01-25 16:34:23 +00001369 --with-computed-gotos Use computed gotos / threaded dispatch in evaluation
1370 loop (not available on all compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001371
1372Some influential environment variables:
1373 CC C compiler command
1374 CFLAGS C compiler flags
1375 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1376 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001377 LIBS libraries to pass to the linker, e.g. -l<library>
1378 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1379 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001380 CPP C preprocessor
1381
1382Use these variables to override the choices made by `configure' or to help
1383it to find libraries and programs with nonstandard names/locations.
1384
Georg Brandle2e15612009-05-20 18:25:10 +00001385Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001386_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001387ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001388fi
1389
1390if test "$ac_init_help" = "recursive"; then
1391 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001392 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001393 test -d "$ac_dir" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001394 ac_builddir=.
1395
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001396case "$ac_dir" in
1397.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1398*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001399 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001400 # A ".." for each directory in $ac_dir_suffix.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001401 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001402 case $ac_top_builddir_sub in
1403 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1404 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1405 esac ;;
1406esac
1407ac_abs_top_builddir=$ac_pwd
1408ac_abs_builddir=$ac_pwd$ac_dir_suffix
1409# for backward compatibility:
1410ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001411
1412case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001413 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001414 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001415 ac_top_srcdir=$ac_top_builddir_sub
1416 ac_abs_top_srcdir=$ac_pwd ;;
1417 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001418 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001419 ac_top_srcdir=$srcdir
1420 ac_abs_top_srcdir=$srcdir ;;
1421 *) # Relative name.
1422 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1423 ac_top_srcdir=$ac_top_build_prefix$srcdir
1424 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001425esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001426ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001427
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001428 cd "$ac_dir" || { ac_status=$?; continue; }
1429 # Check for guested configure.
1430 if test -f "$ac_srcdir/configure.gnu"; then
1431 echo &&
1432 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1433 elif test -f "$ac_srcdir/configure"; then
1434 echo &&
1435 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001436 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001437 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001438 fi || ac_status=$?
1439 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001440 done
1441fi
1442
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001443test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001444if $ac_init_version; then
1445 cat <<\_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001446python configure 3.2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001447generated by GNU Autoconf 2.61
Martin v. Löwis11437992002-04-12 09:54:03 +00001448
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001449Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014502002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001451This configure script is free software; the Free Software Foundation
1452gives unlimited permission to copy, distribute and modify it.
1453_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001454 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001455fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001456cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00001457This file contains any messages produced by compilers while
1458running configure, to aid debugging if configure makes a mistake.
1459
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001460It was created by python $as_me 3.2, which was
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001461generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00001462
1463 $ $0 $@
1464
1465_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001466exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00001467{
1468cat <<_ASUNAME
1469## --------- ##
1470## Platform. ##
1471## --------- ##
1472
1473hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1474uname -m = `(uname -m) 2>/dev/null || echo unknown`
1475uname -r = `(uname -r) 2>/dev/null || echo unknown`
1476uname -s = `(uname -s) 2>/dev/null || echo unknown`
1477uname -v = `(uname -v) 2>/dev/null || echo unknown`
1478
1479/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1480/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1481
1482/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1483/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1484/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001485/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00001486/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1487/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1488/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1489
1490_ASUNAME
1491
1492as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1493for as_dir in $PATH
1494do
1495 IFS=$as_save_IFS
1496 test -z "$as_dir" && as_dir=.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001497 echo "PATH: $as_dir"
Martin v. Löwis11437992002-04-12 09:54:03 +00001498done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001499IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00001500
1501} >&5
1502
1503cat >&5 <<_ACEOF
1504
1505
1506## ----------- ##
1507## Core tests. ##
1508## ----------- ##
1509
1510_ACEOF
1511
1512
1513# Keep a trace of the command line.
1514# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001515# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001516# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001517# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001518ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001519ac_configure_args0=
1520ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00001521ac_must_keep_next=false
1522for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001523do
Skip Montanaro6dead952003-09-25 14:50:04 +00001524 for ac_arg
1525 do
1526 case $ac_arg in
1527 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1528 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1529 | -silent | --silent | --silen | --sile | --sil)
1530 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001531 *\'*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001532 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00001533 esac
1534 case $ac_pass in
1535 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1536 2)
1537 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1538 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001539 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00001540 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00001541 case $ac_arg in
1542 *=* | --config-cache | -C | -disable-* | --disable-* \
1543 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1544 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1545 | -with-* | --with-* | -without-* | --without-* | --x)
1546 case "$ac_configure_args0 " in
1547 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1548 esac
1549 ;;
1550 -* ) ac_must_keep_next=true ;;
1551 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00001552 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001553 ac_configure_args="$ac_configure_args '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00001554 ;;
1555 esac
1556 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001557done
Skip Montanaro6dead952003-09-25 14:50:04 +00001558$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1559$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 +00001560
1561# When interrupted or exit'd, cleanup temporary files, and complete
1562# config.log. We remove comments because anyway the quotes in there
1563# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001564# WARNING: Use '\'' to represent an apostrophe within the trap.
1565# 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 +00001566trap 'exit_status=$?
1567 # Save into config.log some information that might help in debugging.
1568 {
1569 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001570
Martin v. Löwis11437992002-04-12 09:54:03 +00001571 cat <<\_ASBOX
1572## ---------------- ##
1573## Cache variables. ##
1574## ---------------- ##
1575_ASBOX
1576 echo
1577 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001578(
1579 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1580 eval ac_val=\$$ac_var
1581 case $ac_val in #(
1582 *${as_nl}*)
1583 case $ac_var in #(
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001584 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1585echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001586 esac
1587 case $ac_var in #(
1588 _ | IFS | as_nl) ;; #(
1589 *) $as_unset $ac_var ;;
1590 esac ;;
1591 esac
1592 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001593 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001594 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1595 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001596 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001597 "s/'\''/'\''\\\\'\'''\''/g;
1598 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1599 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001600 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001601 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001602 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001603 esac |
1604 sort
1605)
Martin v. Löwis11437992002-04-12 09:54:03 +00001606 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001607
1608 cat <<\_ASBOX
1609## ----------------- ##
1610## Output variables. ##
1611## ----------------- ##
1612_ASBOX
1613 echo
1614 for ac_var in $ac_subst_vars
1615 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001616 eval ac_val=\$$ac_var
1617 case $ac_val in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001618 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001619 esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001620 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001621 done | sort
1622 echo
1623
1624 if test -n "$ac_subst_files"; then
1625 cat <<\_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001626## ------------------- ##
1627## File substitutions. ##
1628## ------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00001629_ASBOX
1630 echo
1631 for ac_var in $ac_subst_files
1632 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001633 eval ac_val=\$$ac_var
1634 case $ac_val in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001635 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001636 esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001637 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001638 done | sort
1639 echo
1640 fi
1641
Martin v. Löwis11437992002-04-12 09:54:03 +00001642 if test -s confdefs.h; then
1643 cat <<\_ASBOX
1644## ----------- ##
1645## confdefs.h. ##
1646## ----------- ##
1647_ASBOX
1648 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001649 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001650 echo
1651 fi
1652 test "$ac_signal" != 0 &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001653 echo "$as_me: caught signal $ac_signal"
1654 echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00001655 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001656 rm -f core *.core core.conftest.* &&
1657 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001658 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001659' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00001660for ac_signal in 1 2 13 15; do
1661 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1662done
1663ac_signal=0
1664
1665# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001666rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001667
1668# Predefined preprocessor variables.
1669
1670cat >>confdefs.h <<_ACEOF
1671#define PACKAGE_NAME "$PACKAGE_NAME"
1672_ACEOF
1673
1674
1675cat >>confdefs.h <<_ACEOF
1676#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1677_ACEOF
1678
1679
1680cat >>confdefs.h <<_ACEOF
1681#define PACKAGE_VERSION "$PACKAGE_VERSION"
1682_ACEOF
1683
1684
1685cat >>confdefs.h <<_ACEOF
1686#define PACKAGE_STRING "$PACKAGE_STRING"
1687_ACEOF
1688
1689
1690cat >>confdefs.h <<_ACEOF
1691#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1692_ACEOF
1693
1694
1695# Let the site file select an alternate cache file if it wants to.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001696# Prefer explicitly selected file to automatically selected ones.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001697if test -n "$CONFIG_SITE"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001698 set x "$CONFIG_SITE"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001699elif test "x$prefix" != xNONE; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001700 set x "$prefix/share/config.site" "$prefix/etc/config.site"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001701else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001702 set x "$ac_default_prefix/share/config.site" \
1703 "$ac_default_prefix/etc/config.site"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001704fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001705shift
1706for ac_site_file
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001707do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001708 if test -r "$ac_site_file"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001709 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1710echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001711 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001712 . "$ac_site_file"
1713 fi
1714done
1715
1716if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001717 # Some versions of bash will fail to source /dev/null (special
1718 # files actually), so we avoid doing that.
1719 if test -f "$cache_file"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001720 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1721echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001722 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001723 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1724 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00001725 esac
1726 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001727else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001728 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1729echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001730 >$cache_file
1731fi
1732
1733# Check that the precious variables saved in the cache have kept the same
1734# value.
1735ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001736for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001737 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1738 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001739 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1740 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00001741 case $ac_old_set,$ac_new_set in
1742 set,)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001743 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1744echo "$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 +00001745 ac_cache_corrupted=: ;;
1746 ,set)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001747 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1748echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001749 ac_cache_corrupted=: ;;
1750 ,);;
1751 *)
1752 if test "x$ac_old_val" != "x$ac_new_val"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001753 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1754echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1755 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1756echo "$as_me: former value: $ac_old_val" >&2;}
1757 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1758echo "$as_me: current value: $ac_new_val" >&2;}
1759 ac_cache_corrupted=:
Martin v. Löwis11437992002-04-12 09:54:03 +00001760 fi;;
1761 esac
1762 # Pass precious variables to config.status.
1763 if test "$ac_new_set" = set; then
1764 case $ac_new_val in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001765 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001766 *) ac_arg=$ac_var=$ac_new_val ;;
1767 esac
1768 case " $ac_configure_args " in
1769 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1770 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1771 esac
1772 fi
1773done
1774if $ac_cache_corrupted; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001775 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1776echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1777 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1778echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001779 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001780fi
1781
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
Guido van Rossum7f43da71994-08-01 12:15:30 +00001806ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001807ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001808ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1809ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1810ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001811
Guido van Rossum627b2d71993-12-24 10:39:16 +00001812
Michael W. Hudson54241132001-12-07 15:38:26 +00001813
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001814ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001815
1816
Martin v. Löwis11437992002-04-12 09:54:03 +00001817
Benjamin Petersond23f8222009-04-05 19:13:16 +00001818if test "$prefix" != "/"; then
1819 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
1820fi
1821
1822
Martin v. Löwis11437992002-04-12 09:54:03 +00001823
1824
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001825
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001826
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001827# We don't use PACKAGE_ variables, and they cause conflicts
1828# with other autoconf-based packages that include Python.h
1829grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1830rm confdefs.h
1831mv confdefs.h.new confdefs.h
1832
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001833
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001834VERSION=3.2
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001835
Martin v. Löwis1142de32002-03-29 16:28:31 +00001836
1837SOVERSION=1.0
1838
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001839# The later defininition of _XOPEN_SOURCE disables certain features
1840# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1841
1842cat >>confdefs.h <<\_ACEOF
1843#define _GNU_SOURCE 1
1844_ACEOF
1845
1846
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001847# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1848# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1849# them.
1850
1851cat >>confdefs.h <<\_ACEOF
1852#define _NETBSD_SOURCE 1
1853_ACEOF
1854
1855
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001856# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1857# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1858# them.
1859
1860cat >>confdefs.h <<\_ACEOF
1861#define __BSD_VISIBLE 1
1862_ACEOF
1863
1864
Martin v. Löwisd6320502004-08-12 13:45:08 +00001865# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1866# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
1867
1868cat >>confdefs.h <<\_ACEOF
1869#define _BSD_TYPES 1
1870_ACEOF
1871
1872
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001873# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1874# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
1875# them.
1876
1877cat >>confdefs.h <<\_ACEOF
1878#define _DARWIN_C_SOURCE 1
1879_ACEOF
1880
1881
1882
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001883define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001884
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001885# Arguments passed to configure.
1886
1887CONFIG_ARGS="$ac_configure_args"
1888
Ronald Oussoren8af24c12010-02-07 12:03:42 +00001889{ echo "$as_me:$LINENO: checking for --enable-universalsdk" >&5
1890echo $ECHO_N "checking for --enable-universalsdk... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001891# Check whether --enable-universalsdk was given.
Thomas Wouters477c8d52006-05-27 19:21:47 +00001892if test "${enable_universalsdk+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001893 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00001894 case $enableval in
1895 yes)
1896 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren8af24c12010-02-07 12:03:42 +00001897 if test ! -d "${enableval}"
1898 then
1899 enableval=/
1900 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00001901 ;;
1902 esac
1903 case $enableval in
1904 no)
1905 UNIVERSALSDK=
1906 enable_universalsdk=
1907 ;;
1908 *)
1909 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00001910 if test ! -d "${UNIVERSALSDK}"
1911 then
1912 { { echo "$as_me:$LINENO: error: --enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" >&5
1913echo "$as_me: error: --enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" >&2;}
1914 { (exit 1); exit 1; }; }
1915 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00001916 ;;
1917 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001918
Ronald Oussoren8af24c12010-02-07 12:03:42 +00001919
Thomas Wouters477c8d52006-05-27 19:21:47 +00001920else
1921
1922 UNIVERSALSDK=
1923 enable_universalsdk=
1924
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001925fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00001926
Ronald Oussoren8af24c12010-02-07 12:03:42 +00001927if test -n "${UNIVERSALSDK}"
1928then
1929 { echo "$as_me:$LINENO: result: ${UNIVERSALSDK}" >&5
1930echo "${ECHO_T}${UNIVERSALSDK}" >&6; }
1931else
1932 { echo "$as_me:$LINENO: result: no" >&5
1933echo "${ECHO_T}no" >&6; }
1934fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00001935
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001936
Benjamin Peterson6794aa32008-07-16 20:33:37 +00001937
1938
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001939UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00001940
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001941{ echo "$as_me:$LINENO: checking for --with-universal-archs" >&5
1942echo $ECHO_N "checking for --with-universal-archs... $ECHO_C" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001943
1944# Check whether --with-universal-archs was given.
1945if test "${with_universal_archs+set}" = set; then
1946 withval=$with_universal_archs;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001947 { echo "$as_me:$LINENO: result: $withval" >&5
1948echo "${ECHO_T}$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001949 UNIVERSAL_ARCHS="$withval"
1950
1951else
1952
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001953 { echo "$as_me:$LINENO: result: 32-bit" >&5
1954echo "${ECHO_T}32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001955
1956fi
1957
1958
1959
1960
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001961
1962# Check whether --with-framework-name was given.
1963if test "${with_framework_name+set}" = set; then
1964 withval=$with_framework_name;
1965 PYTHONFRAMEWORK=${withval}
1966 PYTHONFRAMEWORKDIR=${withval}.framework
1967 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
1968
1969else
1970
1971 PYTHONFRAMEWORK=Python
1972 PYTHONFRAMEWORKDIR=Python.framework
1973 PYTHONFRAMEWORKIDENTIFIER=org.python.python
1974
1975fi
1976
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001977# Check whether --enable-framework was given.
Thomas Wouters477c8d52006-05-27 19:21:47 +00001978if test "${enable_framework+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001979 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00001980 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001981 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001982 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001983 esac
1984 case $enableval in
1985 no)
1986 PYTHONFRAMEWORK=
1987 PYTHONFRAMEWORKDIR=no-framework
1988 PYTHONFRAMEWORKPREFIX=
1989 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00001990 FRAMEWORKINSTALLFIRST=
1991 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00001992 FRAMEWORKALTINSTALLFIRST=
1993 FRAMEWORKALTINSTALLLAST=
1994 if test "x${prefix}" = "xNONE"; then
1995 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1996 else
1997 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1998 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001999 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00002000 ;;
2001 *)
2002 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00002003 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00002004 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00002005 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002006 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
2007 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002008
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002009 if test "x${prefix}" = "xNONE" ; then
2010 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2011 else
2012 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2013 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002014 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00002015
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002016 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00002017 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002018 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002019
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002020 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002021
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002022 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2023
2024 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2025
Jack Jansene578a632001-08-15 01:27:14 +00002026 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002027
Guido van Rossum563e7081996-09-10 18:20:48 +00002028else
Martin v. Löwis11437992002-04-12 09:54:03 +00002029
Jack Jansene578a632001-08-15 01:27:14 +00002030 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002031 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002032 PYTHONFRAMEWORKPREFIX=
2033 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002034 FRAMEWORKINSTALLFIRST=
2035 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002036 FRAMEWORKALTINSTALLFIRST=
2037 FRAMEWORKALTINSTALLLAST=
2038 if test "x${prefix}" = "xNONE" ; then
2039 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2040 else
2041 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2042 fi
Jack Jansene578a632001-08-15 01:27:14 +00002043 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002044
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002045
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002046fi
2047
Thomas Wouters477c8d52006-05-27 19:21:47 +00002048
2049
Michael W. Hudson54241132001-12-07 15:38:26 +00002050
2051
2052
2053
Jack Jansene578a632001-08-15 01:27:14 +00002054
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002055
2056
2057
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002058
Jack Jansene578a632001-08-15 01:27:14 +00002059##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00002060## AC_HELP_STRING(--with-dyld,
2061## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00002062##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002063# Set name for machine-dependent library files
2064
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002065{ echo "$as_me:$LINENO: checking MACHDEP" >&5
2066echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002067if test -z "$MACHDEP"
2068then
Guido van Rossum563e7081996-09-10 18:20:48 +00002069 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002070 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002071 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002072 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002073 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002074 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002075 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002076 ac_md_system=`echo $ac_sys_system |
2077 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2078 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002079 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002080 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002081
Guido van Rossum07397971997-04-29 21:49:50 +00002082 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002083 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002084 darwin*) MACHDEP="darwin";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002085 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002086 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002087 esac
2088fi
Guido van Rossum91922671997-10-09 20:24:13 +00002089
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002090# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2091# disable features if it is defined, without any means to access these
2092# features as extensions. For these systems, we skip the definition of
2093# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2094# some feature, make sure there is no alternative way to access this
2095# feature. Also, when using wildcards, make sure you have verified the
2096# need for not defining _XOPEN_SOURCE on all systems matching the
2097# wildcard, and that the wildcard does not include future systems
2098# (which may remove their limitations).
2099case $ac_sys_system/$ac_sys_release in
2100 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2101 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002102 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00002103 # In addition, Stefan Krah confirms that issue #1244610 exists through
2104 # OpenBSD 4.6, but is fixed in 4.7.
2105 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00002106 define_xopen_source=no
2107 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2108 # also defined. This can be overridden by defining _BSD_SOURCE
2109 # As this has a different meaning on Linux, only define it on OpenBSD
2110
2111cat >>confdefs.h <<\_ACEOF
2112#define _BSD_SOURCE 1
2113_ACEOF
2114
2115 ;;
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00002116 OpenBSD/4.[789])
Martin v. Löwis7671efc2010-02-15 08:35:16 +00002117 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2118 # also defined. This can be overridden by defining _BSD_SOURCE
2119 # As this has a different meaning on Linux, only define it on OpenBSD
2120
2121cat >>confdefs.h <<\_ACEOF
2122#define _BSD_SOURCE 1
2123_ACEOF
2124
2125 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00002126 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
2127 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
2128 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00002129 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 +00002130 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00002131 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
2132 # of union __?sigval. Reported by Stuart Bishop.
2133 SunOS/5.6)
2134 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002135 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
2136 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00002137 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00002138 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002139 define_xopen_source=no;;
2140 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002141 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002142 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002143 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00002144 # On FreeBSD 4, the math functions C89 does not cover are never defined
2145 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
2146 FreeBSD/4.*)
2147 define_xopen_source=no;;
2148 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
2149 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
2150 # identifies itself as Darwin/7.*
2151 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2152 # disables platform specific features beyond repair.
2153 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2154 # has no effect, don't bother defining them
2155 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00002156 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00002157 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00002158 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002159 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
2160 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
2161 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00002162 AIX/4)
2163 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002164 AIX/5)
2165 if test `uname -r` -eq 1; then
2166 define_xopen_source=no
2167 fi
2168 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00002169 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
2170 # defining NI_NUMERICHOST.
2171 QNX/6.3.2)
2172 define_xopen_source=no
2173 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002174
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002175esac
2176
2177if test $define_xopen_source = yes
2178then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002179 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
2180 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00002181 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
2182 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00002183 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00002184 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00002185
2186cat >>confdefs.h <<\_ACEOF
2187#define _XOPEN_SOURCE 500
2188_ACEOF
2189
2190 ;;
2191 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002192
2193cat >>confdefs.h <<\_ACEOF
2194#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002195_ACEOF
2196
Skip Montanarof0d5f792004-08-15 14:08:23 +00002197 ;;
2198 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002199
2200 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
2201 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
2202 # several APIs are not declared. Since this is also needed in some
2203 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00002204 # except for Solaris 10, where it must not be defined,
2205 # as it implies XPG4.2
2206 case $ac_sys_system/$ac_sys_release in
2207 SunOS/5.10)
2208 ;;
2209 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002210
2211cat >>confdefs.h <<\_ACEOF
2212#define _XOPEN_SOURCE_EXTENDED 1
2213_ACEOF
2214
Martin v. Löwis7dece662005-11-26 11:38:24 +00002215 ;;
2216 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002217
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002218
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002219cat >>confdefs.h <<\_ACEOF
2220#define _POSIX_C_SOURCE 200112L
2221_ACEOF
2222
2223
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002224fi
2225
Guido van Rossum91922671997-10-09 20:24:13 +00002226#
2227# SGI compilers allow the specification of the both the ABI and the
2228# ISA on the command line. Depending on the values of these switches,
2229# different and often incompatable code will be generated.
2230#
2231# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
2232# thus supply support for various ABI/ISA combinations. The MACHDEP
2233# variable is also adjusted.
2234#
2235
2236if test ! -z "$SGI_ABI"
2237then
2238 CC="cc $SGI_ABI"
2239 LDFLAGS="$SGI_ABI $LDFLAGS"
2240 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
2241fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002242{ echo "$as_me:$LINENO: result: $MACHDEP" >&5
2243echo "${ECHO_T}$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002244
Jack Jansen6b08a402004-06-03 12:41:45 +00002245# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
2246# it may influence the way we can build extensions, so distutils
2247# needs to check it
2248
Thomas Wouters477c8d52006-05-27 19:21:47 +00002249
Jack Jansen6b08a402004-06-03 12:41:45 +00002250CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002251EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00002252
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002253{ echo "$as_me:$LINENO: checking machine type as reported by uname -m" >&5
2254echo $ECHO_N "checking machine type as reported by uname -m... $ECHO_C" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00002255ac_sys_machine=`uname -m`
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002256{ echo "$as_me:$LINENO: result: $ac_sys_machine" >&5
2257echo "${ECHO_T}$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00002258
Guido van Rossum627b2d71993-12-24 10:39:16 +00002259# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00002260
2261# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
2262# for debug/optimization stuff. BASECFLAGS is for flags that are required
2263# just to get things to compile and link. Users are free to override OPT
2264# when running configure or make. The build should not break if they do.
2265# BASECFLAGS should generally not be messed with, however.
2266
2267# XXX shouldn't some/most/all of this code be merged with the stuff later
2268# on that fiddles with OPT and BASECFLAGS?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002269{ echo "$as_me:$LINENO: checking for --without-gcc" >&5
2270echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002271
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002272# Check whether --with-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002273if test "${with_gcc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002274 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002275 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00002276 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00002277 without_gcc=yes;;
2278 yes) CC=gcc
2279 without_gcc=no;;
2280 *) CC=$withval
2281 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002282 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00002283else
Martin v. Löwis11437992002-04-12 09:54:03 +00002284
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002285 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002286 AIX*) CC=cc_r
2287 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00002288 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00002289 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002290fi
2291
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002292{ echo "$as_me:$LINENO: result: $without_gcc" >&5
2293echo "${ECHO_T}$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002294
Guido van Rossum8b131c51995-03-09 14:10:13 +00002295# If the user switches compilers, we can't believe the cache
2296if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
2297then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002298 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002299(it is also a good idea to do 'make clean' before compiling)" >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002300echo "$as_me: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002301(it is also a good idea to do 'make clean' before compiling)" >&2;}
2302 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00002303fi
2304
Victor Stinner00d6a1d2010-03-25 01:02:29 +00002305save_CFLAGS=$CFLAGS
Martin v. Löwis11437992002-04-12 09:54:03 +00002306ac_ext=c
2307ac_cpp='$CPP $CPPFLAGS'
2308ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2309ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2310ac_compiler_gnu=$ac_cv_c_compiler_gnu
2311if test -n "$ac_tool_prefix"; then
2312 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2313set dummy ${ac_tool_prefix}gcc; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002314{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2315echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002316if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002317 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002318else
2319 if test -n "$CC"; then
2320 ac_cv_prog_CC="$CC" # Let the user override the test.
2321else
Martin v. Löwis11437992002-04-12 09:54:03 +00002322as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2323for as_dir in $PATH
2324do
2325 IFS=$as_save_IFS
2326 test -z "$as_dir" && as_dir=.
2327 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002328 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 +00002329 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002330 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002331 break 2
2332 fi
2333done
2334done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002335IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002336
Jack Jansendd19cf82001-12-06 22:36:17 +00002337fi
2338fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002339CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00002340if test -n "$CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002341 { echo "$as_me:$LINENO: result: $CC" >&5
2342echo "${ECHO_T}$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002343else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002344 { echo "$as_me:$LINENO: result: no" >&5
2345echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002346fi
2347
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002348
Martin v. Löwis11437992002-04-12 09:54:03 +00002349fi
2350if test -z "$ac_cv_prog_CC"; then
2351 ac_ct_CC=$CC
2352 # Extract the first word of "gcc", so it can be a program name with args.
2353set dummy gcc; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002354{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2355echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002356if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002357 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002358else
2359 if test -n "$ac_ct_CC"; then
2360 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2361else
2362as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2363for as_dir in $PATH
2364do
2365 IFS=$as_save_IFS
2366 test -z "$as_dir" && as_dir=.
2367 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002368 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 +00002369 ac_cv_prog_ac_ct_CC="gcc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002370 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002371 break 2
2372 fi
2373done
2374done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002375IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002376
2377fi
2378fi
2379ac_ct_CC=$ac_cv_prog_ac_ct_CC
2380if test -n "$ac_ct_CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002381 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2382echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002383else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002384 { echo "$as_me:$LINENO: result: no" >&5
2385echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002386fi
2387
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002388 if test "x$ac_ct_CC" = x; then
2389 CC=""
2390 else
2391 case $cross_compiling:$ac_tool_warned in
2392yes:)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002393{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2394whose name does not start with the host triplet. If you think this
2395configuration is useful to you, please write to autoconf@gnu.org." >&5
2396echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2397whose name does not start with the host triplet. If you think this
2398configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002399ac_tool_warned=yes ;;
2400esac
2401 CC=$ac_ct_CC
2402 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002403else
2404 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002405fi
2406
Jack Jansendd19cf82001-12-06 22:36:17 +00002407if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002408 if test -n "$ac_tool_prefix"; then
2409 # 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 +00002410set dummy ${ac_tool_prefix}cc; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002411{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2412echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002413if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002414 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002415else
2416 if test -n "$CC"; then
2417 ac_cv_prog_CC="$CC" # Let the user override the test.
2418else
Martin v. Löwis11437992002-04-12 09:54:03 +00002419as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2420for as_dir in $PATH
2421do
2422 IFS=$as_save_IFS
2423 test -z "$as_dir" && as_dir=.
2424 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002425 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 +00002426 ac_cv_prog_CC="${ac_tool_prefix}cc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002427 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002428 break 2
2429 fi
2430done
2431done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002432IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002433
2434fi
2435fi
2436CC=$ac_cv_prog_CC
2437if test -n "$CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002438 { echo "$as_me:$LINENO: result: $CC" >&5
2439echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002440else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002441 { echo "$as_me:$LINENO: result: no" >&5
2442echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002443fi
2444
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002445
Martin v. Löwis11437992002-04-12 09:54:03 +00002446 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002447fi
2448if test -z "$CC"; then
2449 # Extract the first word of "cc", so it can be a program name with args.
2450set dummy cc; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002451{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2452echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002453if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002454 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002455else
2456 if test -n "$CC"; then
2457 ac_cv_prog_CC="$CC" # Let the user override the test.
2458else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002459 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002460as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2461for as_dir in $PATH
2462do
2463 IFS=$as_save_IFS
2464 test -z "$as_dir" && as_dir=.
2465 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002466 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 +00002467 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2468 ac_prog_rejected=yes
2469 continue
2470 fi
2471 ac_cv_prog_CC="cc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002472 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002473 break 2
2474 fi
2475done
2476done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002477IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002478
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002479if test $ac_prog_rejected = yes; then
2480 # We found a bogon in the path, so make sure we never use it.
2481 set dummy $ac_cv_prog_CC
2482 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002483 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002484 # We chose a different compiler from the bogus one.
2485 # However, it has the same basename, so the bogon will be chosen
2486 # first if we set CC to just the basename; use the full file name.
2487 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002488 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002489 fi
2490fi
2491fi
2492fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002493CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002494if test -n "$CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002495 { echo "$as_me:$LINENO: result: $CC" >&5
2496echo "${ECHO_T}$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002497else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002498 { echo "$as_me:$LINENO: result: no" >&5
2499echo "${ECHO_T}no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002500fi
2501
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002502
Martin v. Löwis11437992002-04-12 09:54:03 +00002503fi
2504if test -z "$CC"; then
2505 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002506 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002507 do
2508 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2509set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002510{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2511echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002512if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002513 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002514else
2515 if test -n "$CC"; then
2516 ac_cv_prog_CC="$CC" # Let the user override the test.
2517else
Martin v. Löwis11437992002-04-12 09:54:03 +00002518as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2519for as_dir in $PATH
2520do
2521 IFS=$as_save_IFS
2522 test -z "$as_dir" && as_dir=.
2523 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002524 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 +00002525 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002526 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002527 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002528 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002529done
2530done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002531IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002532
2533fi
2534fi
2535CC=$ac_cv_prog_CC
2536if test -n "$CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002537 { echo "$as_me:$LINENO: result: $CC" >&5
2538echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002539else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002540 { echo "$as_me:$LINENO: result: no" >&5
2541echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002542fi
2543
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002544
Martin v. Löwis11437992002-04-12 09:54:03 +00002545 test -n "$CC" && break
2546 done
2547fi
2548if test -z "$CC"; then
2549 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002550 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002551do
2552 # Extract the first word of "$ac_prog", so it can be a program name with args.
2553set dummy $ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002554{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2555echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002556if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002557 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002558else
2559 if test -n "$ac_ct_CC"; then
2560 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2561else
2562as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2563for as_dir in $PATH
2564do
2565 IFS=$as_save_IFS
2566 test -z "$as_dir" && as_dir=.
2567 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002568 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 +00002569 ac_cv_prog_ac_ct_CC="$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002570 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002571 break 2
2572 fi
2573done
2574done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002575IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00002576
Martin v. Löwis11437992002-04-12 09:54:03 +00002577fi
2578fi
2579ac_ct_CC=$ac_cv_prog_ac_ct_CC
2580if test -n "$ac_ct_CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002581 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2582echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002583else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002584 { echo "$as_me:$LINENO: result: no" >&5
2585echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002586fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002587
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002588
Martin v. Löwis11437992002-04-12 09:54:03 +00002589 test -n "$ac_ct_CC" && break
2590done
Michael W. Hudson54241132001-12-07 15:38:26 +00002591
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002592 if test "x$ac_ct_CC" = x; then
2593 CC=""
2594 else
2595 case $cross_compiling:$ac_tool_warned in
2596yes:)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002597{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2598whose name does not start with the host triplet. If you think this
2599configuration is useful to you, please write to autoconf@gnu.org." >&5
2600echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2601whose name does not start with the host triplet. If you think this
2602configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002603ac_tool_warned=yes ;;
2604esac
2605 CC=$ac_ct_CC
2606 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002607fi
2608
2609fi
2610
2611
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002612test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002613See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002614echo "$as_me: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002615See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002616 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002617
2618# Provide some information about the compiler.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002619echo "$as_me:$LINENO: checking for C compiler version" >&5
2620ac_compiler=`set X $ac_compile; echo $2`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002621{ (ac_try="$ac_compiler --version >&5"
2622case "(($ac_try" in
2623 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2624 *) ac_try_echo=$ac_try;;
2625esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002626eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002627 (eval "$ac_compiler --version >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002628 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002630 (exit $ac_status); }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002631{ (ac_try="$ac_compiler -v >&5"
2632case "(($ac_try" in
2633 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2634 *) ac_try_echo=$ac_try;;
2635esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002636eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002637 (eval "$ac_compiler -v >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002638 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002640 (exit $ac_status); }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002641{ (ac_try="$ac_compiler -V >&5"
2642case "(($ac_try" in
2643 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2644 *) ac_try_echo=$ac_try;;
2645esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002646eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002647 (eval "$ac_compiler -V >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002648 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002650 (exit $ac_status); }
2651
2652cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002653/* confdefs.h. */
2654_ACEOF
2655cat confdefs.h >>conftest.$ac_ext
2656cat >>conftest.$ac_ext <<_ACEOF
2657/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002658
Martin v. Löwis11437992002-04-12 09:54:03 +00002659int
2660main ()
2661{
2662
2663 ;
2664 return 0;
2665}
2666_ACEOF
2667ac_clean_files_save=$ac_clean_files
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002668ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002669# Try to create an executable without -o first, disregard a.out.
2670# It will help us diagnose broken compilers, and finding out an intuition
2671# of exeext.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002672{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2673echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
2674ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2675#
2676# List of possible output files, starting from the most likely.
2677# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2678# only as a last resort. b.out is created by i960 compilers.
2679ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2680#
2681# The IRIX 6 linker writes into existing files which may not be
2682# executable, retaining their permissions. Remove them first so a
2683# subsequent execution test works.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002684ac_rmfiles=
2685for ac_file in $ac_files
2686do
2687 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002688 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002689 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2690 esac
2691done
2692rm -f $ac_rmfiles
2693
2694if { (ac_try="$ac_link_default"
2695case "(($ac_try" in
2696 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2697 *) ac_try_echo=$ac_try;;
2698esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002699eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002700 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002701 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002703 (exit $ac_status); }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002704 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2705# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2706# in a Makefile. We should not override ac_cv_exeext if it was cached,
2707# so that the user can short-circuit this test for compilers unknown to
2708# Autoconf.
2709for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00002710do
2711 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002712 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002713 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002714 ;;
2715 [ab].out )
2716 # We found the default executable, but exeext='' is most
2717 # certainly right.
2718 break;;
2719 *.* )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002720 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2721 then :; else
2722 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2723 fi
2724 # We set ac_cv_exeext here because the later test for it is not
2725 # safe: cross compilers may not add the suffix if given an `-o'
2726 # argument, so we may need to know it at that point already.
2727 # Even if this section looks crufty: it has the advantage of
2728 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002729 break;;
2730 * )
2731 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002732 esac
2733done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002734test "$ac_cv_exeext" = no && ac_cv_exeext=
2735
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002736else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002737 ac_file=''
2738fi
2739
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002740{ echo "$as_me:$LINENO: result: $ac_file" >&5
2741echo "${ECHO_T}$ac_file" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002742if test -z "$ac_file"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002743 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002744sed 's/^/| /' conftest.$ac_ext >&5
2745
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002746{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002747See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002748echo "$as_me: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002749See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002750 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002751fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002752
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002753ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002754
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002755# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002756# the compiler is broken, or we cross compile.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002757{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2758echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002759# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2760# If not cross compiling, check that we can run a simple program.
2761if test "$cross_compiling" != yes; then
2762 if { ac_try='./$ac_file'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002763 { (case "(($ac_try" in
2764 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2765 *) ac_try_echo=$ac_try;;
2766esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002767eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002768 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002769 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002771 (exit $ac_status); }; }; then
2772 cross_compiling=no
2773 else
2774 if test "$cross_compiling" = maybe; then
2775 cross_compiling=yes
2776 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002777 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002778If you meant to cross compile, use \`--host'.
2779See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002780echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002781If you meant to cross compile, use \`--host'.
2782See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002783 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002784 fi
2785 fi
2786fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002787{ echo "$as_me:$LINENO: result: yes" >&5
2788echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002789
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002790rm -f a.out a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002791ac_clean_files=$ac_clean_files_save
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002792# Check that the compiler produces executables we can run. If not, either
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002793# the compiler is broken, or we cross compile.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002794{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2795echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2796{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2797echo "${ECHO_T}$cross_compiling" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00002798
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002799{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2800echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002801if { (ac_try="$ac_link"
2802case "(($ac_try" in
2803 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2804 *) ac_try_echo=$ac_try;;
2805esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002806eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002807 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002808 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002810 (exit $ac_status); }; then
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002811 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2812# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2813# work properly (i.e., refer to `conftest.exe'), while it won't with
2814# `rm'.
2815for ac_file in conftest.exe conftest conftest.*; do
2816 test -f "$ac_file" || continue
2817 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002818 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002819 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2820 break;;
2821 * ) break;;
2822 esac
2823done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002824else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002825 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002826See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002827echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002828See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002829 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002830fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002831
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002832rm -f conftest$ac_cv_exeext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002833{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2834echo "${ECHO_T}$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002835
2836rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002837EXEEXT=$ac_cv_exeext
2838ac_exeext=$EXEEXT
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002839{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
2840echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002841if test "${ac_cv_objext+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002842 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002843else
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002844 cat >conftest.$ac_ext <<_ACEOF
2845/* confdefs.h. */
2846_ACEOF
2847cat confdefs.h >>conftest.$ac_ext
2848cat >>conftest.$ac_ext <<_ACEOF
2849/* end confdefs.h. */
2850
2851int
2852main ()
2853{
2854
2855 ;
2856 return 0;
2857}
2858_ACEOF
2859rm -f conftest.o conftest.obj
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002860if { (ac_try="$ac_compile"
2861case "(($ac_try" in
2862 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2863 *) ac_try_echo=$ac_try;;
2864esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002865eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002866 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002867 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002869 (exit $ac_status); }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002870 for ac_file in conftest.o conftest.obj conftest.*; do
2871 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00002872 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002873 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002874 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2875 break;;
2876 esac
2877done
2878else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002879 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002880sed 's/^/| /' conftest.$ac_ext >&5
2881
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002882{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002883See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002884echo "$as_me: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002885See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002886 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002887fi
2888
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002889rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002890fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002891{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2892echo "${ECHO_T}$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002893OBJEXT=$ac_cv_objext
2894ac_objext=$OBJEXT
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002895{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2896echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002897if test "${ac_cv_c_compiler_gnu+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002898 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002899else
2900 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002901/* confdefs.h. */
2902_ACEOF
2903cat confdefs.h >>conftest.$ac_ext
2904cat >>conftest.$ac_ext <<_ACEOF
2905/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002906
Martin v. Löwis11437992002-04-12 09:54:03 +00002907int
2908main ()
2909{
2910#ifndef __GNUC__
2911 choke me
2912#endif
2913
2914 ;
2915 return 0;
2916}
2917_ACEOF
2918rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002919if { (ac_try="$ac_compile"
2920case "(($ac_try" in
2921 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2922 *) ac_try_echo=$ac_try;;
2923esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002924eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002925 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002926 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002927 grep -v '^ *+' conftest.er1 >conftest.err
2928 rm -f conftest.er1
2929 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002931 (exit $ac_status); } && {
2932 test -z "$ac_c_werror_flag" ||
2933 test ! -s conftest.err
2934 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002935 ac_compiler_gnu=yes
2936else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002937 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002938sed 's/^/| /' conftest.$ac_ext >&5
2939
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002940 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002941fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002942
2943rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002944ac_cv_c_compiler_gnu=$ac_compiler_gnu
2945
2946fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002947{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2948echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
2949GCC=`test $ac_compiler_gnu = yes && echo yes`
Martin v. Löwis11437992002-04-12 09:54:03 +00002950ac_test_CFLAGS=${CFLAGS+set}
2951ac_save_CFLAGS=$CFLAGS
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002952{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2953echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002954if test "${ac_cv_prog_cc_g+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002955 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002956else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002957 ac_save_c_werror_flag=$ac_c_werror_flag
2958 ac_c_werror_flag=yes
2959 ac_cv_prog_cc_g=no
2960 CFLAGS="-g"
2961 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002962/* confdefs.h. */
2963_ACEOF
2964cat confdefs.h >>conftest.$ac_ext
2965cat >>conftest.$ac_ext <<_ACEOF
2966/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002967
Martin v. Löwis11437992002-04-12 09:54:03 +00002968int
2969main ()
2970{
2971
2972 ;
2973 return 0;
2974}
2975_ACEOF
2976rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002977if { (ac_try="$ac_compile"
2978case "(($ac_try" in
2979 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2980 *) ac_try_echo=$ac_try;;
2981esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002982eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002983 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002984 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002985 grep -v '^ *+' conftest.er1 >conftest.err
2986 rm -f conftest.er1
2987 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002989 (exit $ac_status); } && {
2990 test -z "$ac_c_werror_flag" ||
2991 test ! -s conftest.err
2992 } && test -s conftest.$ac_objext; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002993 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002994else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002995 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002996sed 's/^/| /' conftest.$ac_ext >&5
2997
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002998 CFLAGS=""
2999 cat >conftest.$ac_ext <<_ACEOF
3000/* confdefs.h. */
3001_ACEOF
3002cat confdefs.h >>conftest.$ac_ext
3003cat >>conftest.$ac_ext <<_ACEOF
3004/* end confdefs.h. */
3005
3006int
3007main ()
3008{
3009
3010 ;
3011 return 0;
3012}
3013_ACEOF
3014rm -f conftest.$ac_objext
3015if { (ac_try="$ac_compile"
3016case "(($ac_try" in
3017 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3018 *) ac_try_echo=$ac_try;;
3019esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003020eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003021 (eval "$ac_compile") 2>conftest.er1
3022 ac_status=$?
3023 grep -v '^ *+' conftest.er1 >conftest.err
3024 rm -f conftest.er1
3025 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003027 (exit $ac_status); } && {
3028 test -z "$ac_c_werror_flag" ||
3029 test ! -s conftest.err
3030 } && test -s conftest.$ac_objext; then
3031 :
3032else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003033 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003034sed 's/^/| /' conftest.$ac_ext >&5
3035
3036 ac_c_werror_flag=$ac_save_c_werror_flag
3037 CFLAGS="-g"
3038 cat >conftest.$ac_ext <<_ACEOF
3039/* confdefs.h. */
3040_ACEOF
3041cat confdefs.h >>conftest.$ac_ext
3042cat >>conftest.$ac_ext <<_ACEOF
3043/* end confdefs.h. */
3044
3045int
3046main ()
3047{
3048
3049 ;
3050 return 0;
3051}
3052_ACEOF
3053rm -f conftest.$ac_objext
3054if { (ac_try="$ac_compile"
3055case "(($ac_try" in
3056 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3057 *) ac_try_echo=$ac_try;;
3058esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003059eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003060 (eval "$ac_compile") 2>conftest.er1
3061 ac_status=$?
3062 grep -v '^ *+' conftest.er1 >conftest.err
3063 rm -f conftest.er1
3064 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003066 (exit $ac_status); } && {
3067 test -z "$ac_c_werror_flag" ||
3068 test ! -s conftest.err
3069 } && test -s conftest.$ac_objext; then
3070 ac_cv_prog_cc_g=yes
3071else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003072 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003073sed 's/^/| /' conftest.$ac_ext >&5
3074
3075
Guido van Rossum627b2d71993-12-24 10:39:16 +00003076fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003077
3078rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003079fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003080
3081rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3082fi
3083
3084rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3085 ac_c_werror_flag=$ac_save_c_werror_flag
3086fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003087{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3088echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003089if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003090 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003091elif test $ac_cv_prog_cc_g = yes; then
3092 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003093 CFLAGS="-g -O2"
3094 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003095 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003096 fi
3097else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003098 if test "$GCC" = yes; then
3099 CFLAGS="-O2"
3100 else
3101 CFLAGS=
3102 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003103fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003104{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3105echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003106if test "${ac_cv_prog_cc_c89+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003107 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003108else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003109 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003110ac_save_CC=$CC
3111cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003112/* confdefs.h. */
3113_ACEOF
3114cat confdefs.h >>conftest.$ac_ext
3115cat >>conftest.$ac_ext <<_ACEOF
3116/* end confdefs.h. */
3117#include <stdarg.h>
3118#include <stdio.h>
3119#include <sys/types.h>
3120#include <sys/stat.h>
3121/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3122struct buf { int x; };
3123FILE * (*rcsopen) (struct buf *, struct stat *, int);
3124static char *e (p, i)
3125 char **p;
3126 int i;
3127{
3128 return p[i];
3129}
3130static char *f (char * (*g) (char **, int), char **p, ...)
3131{
3132 char *s;
3133 va_list v;
3134 va_start (v,p);
3135 s = g (p, va_arg (v,int));
3136 va_end (v);
3137 return s;
3138}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003139
3140/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3141 function prototypes and stuff, but not '\xHH' hex character constants.
3142 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003143 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003144 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3145 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003146 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003147int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3148
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003149/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3150 inside strings and character constants. */
3151#define FOO(x) 'x'
3152int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3153
Skip Montanaro6dead952003-09-25 14:50:04 +00003154int test (int i, double x);
3155struct s1 {int (*f) (int a);};
3156struct s2 {int (*f) (double a);};
3157int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3158int argc;
3159char **argv;
3160int
3161main ()
3162{
3163return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3164 ;
3165 return 0;
3166}
3167_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003168for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3169 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003170do
3171 CC="$ac_save_CC $ac_arg"
3172 rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003173if { (ac_try="$ac_compile"
3174case "(($ac_try" in
3175 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3176 *) ac_try_echo=$ac_try;;
3177esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003178eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003179 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00003180 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003181 grep -v '^ *+' conftest.er1 >conftest.err
3182 rm -f conftest.er1
3183 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003185 (exit $ac_status); } && {
3186 test -z "$ac_c_werror_flag" ||
3187 test ! -s conftest.err
3188 } && test -s conftest.$ac_objext; then
3189 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003190else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003191 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003192sed 's/^/| /' conftest.$ac_ext >&5
3193
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003194
Skip Montanaro6dead952003-09-25 14:50:04 +00003195fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003196
3197rm -f core conftest.err conftest.$ac_objext
3198 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003199done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003200rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003201CC=$ac_save_CC
3202
3203fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003204# AC_CACHE_VAL
3205case "x$ac_cv_prog_cc_c89" in
3206 x)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003207 { echo "$as_me:$LINENO: result: none needed" >&5
3208echo "${ECHO_T}none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003209 xno)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003210 { echo "$as_me:$LINENO: result: unsupported" >&5
3211echo "${ECHO_T}unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003212 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003213 CC="$CC $ac_cv_prog_cc_c89"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003214 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3215echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003216esac
3217
Skip Montanaro6dead952003-09-25 14:50:04 +00003218
Martin v. Löwis11437992002-04-12 09:54:03 +00003219ac_ext=c
3220ac_cpp='$CPP $CPPFLAGS'
3221ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3222ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3223ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003224
Victor Stinner00d6a1d2010-03-25 01:02:29 +00003225CFLAGS=$save_CFLAGS
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003226
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003227
3228
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003229{ echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
3230echo $ECHO_N "checking for --with-cxx-main=<compiler>... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003231
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003232# Check whether --with-cxx_main was given.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003233if test "${with_cxx_main+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003234 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003235
3236 case $withval in
3237 no) with_cxx_main=no
3238 MAINCC='$(CC)';;
3239 yes) with_cxx_main=yes
3240 MAINCC='$(CXX)';;
3241 *) with_cxx_main=yes
3242 MAINCC=$withval
3243 if test -z "$CXX"
3244 then
3245 CXX=$withval
3246 fi;;
3247 esac
3248else
3249
3250 with_cxx_main=no
3251 MAINCC='$(CC)'
3252
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003253fi
3254
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003255{ echo "$as_me:$LINENO: result: $with_cxx_main" >&5
3256echo "${ECHO_T}$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003257
3258preset_cxx="$CXX"
3259if test -z "$CXX"
3260then
3261 case "$CC" in
3262 gcc) # Extract the first word of "g++", so it can be a program name with args.
3263set dummy g++; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003264{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3265echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003266if test "${ac_cv_path_CXX+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003267 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003268else
3269 case $CXX in
3270 [\\/]* | ?:[\\/]*)
3271 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3272 ;;
3273 *)
3274 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3275for as_dir in notfound
3276do
3277 IFS=$as_save_IFS
3278 test -z "$as_dir" && as_dir=.
3279 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003280 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003281 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003282 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003283 break 2
3284 fi
3285done
3286done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003287IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003288
3289 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
3290 ;;
3291esac
3292fi
3293CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003294if test -n "$CXX"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003295 { echo "$as_me:$LINENO: result: $CXX" >&5
3296echo "${ECHO_T}$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003297else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003298 { echo "$as_me:$LINENO: result: no" >&5
3299echo "${ECHO_T}no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003300fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003301
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003302 ;;
3303 cc) # Extract the first word of "c++", so it can be a program name with args.
3304set dummy c++; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003305{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3306echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003307if test "${ac_cv_path_CXX+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003308 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003309else
3310 case $CXX in
3311 [\\/]* | ?:[\\/]*)
3312 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3313 ;;
3314 *)
3315 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3316for as_dir in notfound
3317do
3318 IFS=$as_save_IFS
3319 test -z "$as_dir" && as_dir=.
3320 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003321 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003322 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003323 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003324 break 2
3325 fi
3326done
3327done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003328IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003329
3330 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
3331 ;;
3332esac
3333fi
3334CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003335if test -n "$CXX"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003336 { echo "$as_me:$LINENO: result: $CXX" >&5
3337echo "${ECHO_T}$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003338else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003339 { echo "$as_me:$LINENO: result: no" >&5
3340echo "${ECHO_T}no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003341fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003342
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003343 ;;
3344 esac
3345 if test "$CXX" = "notfound"
3346 then
3347 CXX=""
3348 fi
3349fi
3350if test -z "$CXX"
3351then
3352 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
3353do
3354 # Extract the first word of "$ac_prog", so it can be a program name with args.
3355set dummy $ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003356{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3357echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003358if test "${ac_cv_prog_CXX+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003359 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003360else
3361 if test -n "$CXX"; then
3362 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3363else
3364as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3365for as_dir in $PATH
3366do
3367 IFS=$as_save_IFS
3368 test -z "$as_dir" && as_dir=.
3369 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003370 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003371 ac_cv_prog_CXX="$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003372 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003373 break 2
3374 fi
3375done
3376done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003377IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003378
3379fi
3380fi
3381CXX=$ac_cv_prog_CXX
3382if test -n "$CXX"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003383 { echo "$as_me:$LINENO: result: $CXX" >&5
3384echo "${ECHO_T}$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003385else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003386 { echo "$as_me:$LINENO: result: no" >&5
3387echo "${ECHO_T}no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003388fi
3389
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003390
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003391 test -n "$CXX" && break
3392done
3393test -n "$CXX" || CXX="notfound"
3394
3395 if test "$CXX" = "notfound"
3396 then
3397 CXX=""
3398 fi
3399fi
3400if test "$preset_cxx" != "$CXX"
3401then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003402 { echo "$as_me:$LINENO: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003403
3404 By default, distutils will build C++ extension modules with \"$CXX\".
3405 If this is not intended, then set CXX on the configure command line.
3406 " >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003407echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003408
3409 By default, distutils will build C++ extension modules with \"$CXX\".
3410 If this is not intended, then set CXX on the configure command line.
3411 " >&2;}
3412fi
3413
3414
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003415# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00003416
3417ac_ext=c
3418ac_cpp='$CPP $CPPFLAGS'
3419ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3420ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3421ac_compiler_gnu=$ac_cv_c_compiler_gnu
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003422{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3423echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003424# On Suns, sometimes $CPP names a directory.
3425if test -n "$CPP" && test -d "$CPP"; then
3426 CPP=
3427fi
3428if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003429 if test "${ac_cv_prog_CPP+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003430 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003431else
Martin v. Löwis11437992002-04-12 09:54:03 +00003432 # Double quotes because CPP needs to be expanded
3433 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3434 do
3435 ac_preproc_ok=false
3436for ac_c_preproc_warn_flag in '' yes
3437do
3438 # Use a header file that comes with gcc, so configuring glibc
3439 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003440 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3441 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003442 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00003443 # not just through cpp. "Syntax error" is here to catch this case.
3444 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003445/* confdefs.h. */
3446_ACEOF
3447cat confdefs.h >>conftest.$ac_ext
3448cat >>conftest.$ac_ext <<_ACEOF
3449/* end confdefs.h. */
3450#ifdef __STDC__
3451# include <limits.h>
3452#else
3453# include <assert.h>
3454#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003455 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003456_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003457if { (ac_try="$ac_cpp conftest.$ac_ext"
3458case "(($ac_try" in
3459 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3460 *) ac_try_echo=$ac_try;;
3461esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003462eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003463 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003464 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003465 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003466 rm -f conftest.er1
3467 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003469 (exit $ac_status); } >/dev/null && {
3470 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3471 test ! -s conftest.err
3472 }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003473 :
3474else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003475 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003476sed 's/^/| /' conftest.$ac_ext >&5
3477
Martin v. Löwis11437992002-04-12 09:54:03 +00003478 # Broken: fails on valid input.
3479continue
Jack Jansendd19cf82001-12-06 22:36:17 +00003480fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003481
Martin v. Löwis11437992002-04-12 09:54:03 +00003482rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00003483
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003484 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003485 # can be detected and how.
3486 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003487/* confdefs.h. */
3488_ACEOF
3489cat confdefs.h >>conftest.$ac_ext
3490cat >>conftest.$ac_ext <<_ACEOF
3491/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003492#include <ac_nonexistent.h>
3493_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003494if { (ac_try="$ac_cpp conftest.$ac_ext"
3495case "(($ac_try" in
3496 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3497 *) ac_try_echo=$ac_try;;
3498esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003499eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003500 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003501 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003502 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003503 rm -f conftest.er1
3504 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003506 (exit $ac_status); } >/dev/null && {
3507 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3508 test ! -s conftest.err
3509 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003510 # Broken: success on invalid input.
3511continue
3512else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003513 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003514sed 's/^/| /' conftest.$ac_ext >&5
3515
Martin v. Löwis11437992002-04-12 09:54:03 +00003516 # Passes both tests.
3517ac_preproc_ok=:
3518break
3519fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003520
Martin v. Löwis11437992002-04-12 09:54:03 +00003521rm -f conftest.err conftest.$ac_ext
3522
3523done
3524# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3525rm -f conftest.err conftest.$ac_ext
3526if $ac_preproc_ok; then
3527 break
3528fi
3529
3530 done
3531 ac_cv_prog_CPP=$CPP
3532
3533fi
3534 CPP=$ac_cv_prog_CPP
3535else
3536 ac_cv_prog_CPP=$CPP
3537fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003538{ echo "$as_me:$LINENO: result: $CPP" >&5
3539echo "${ECHO_T}$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003540ac_preproc_ok=false
3541for ac_c_preproc_warn_flag in '' yes
3542do
3543 # Use a header file that comes with gcc, so configuring glibc
3544 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003545 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3546 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003547 # On the NeXT, cc -E runs the code through the compiler's parser,
3548 # not just through cpp. "Syntax error" is here to catch this case.
3549 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003550/* confdefs.h. */
3551_ACEOF
3552cat confdefs.h >>conftest.$ac_ext
3553cat >>conftest.$ac_ext <<_ACEOF
3554/* end confdefs.h. */
3555#ifdef __STDC__
3556# include <limits.h>
3557#else
3558# include <assert.h>
3559#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003560 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003561_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003562if { (ac_try="$ac_cpp conftest.$ac_ext"
3563case "(($ac_try" in
3564 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3565 *) ac_try_echo=$ac_try;;
3566esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003567eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003568 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003569 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003570 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003571 rm -f conftest.er1
3572 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003574 (exit $ac_status); } >/dev/null && {
3575 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3576 test ! -s conftest.err
3577 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003578 :
3579else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003580 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003581sed 's/^/| /' conftest.$ac_ext >&5
3582
Martin v. Löwis11437992002-04-12 09:54:03 +00003583 # Broken: fails on valid input.
3584continue
3585fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003586
Martin v. Löwis11437992002-04-12 09:54:03 +00003587rm -f conftest.err conftest.$ac_ext
3588
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003589 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003590 # can be detected and how.
3591 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003592/* confdefs.h. */
3593_ACEOF
3594cat confdefs.h >>conftest.$ac_ext
3595cat >>conftest.$ac_ext <<_ACEOF
3596/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003597#include <ac_nonexistent.h>
3598_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003599if { (ac_try="$ac_cpp conftest.$ac_ext"
3600case "(($ac_try" in
3601 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3602 *) ac_try_echo=$ac_try;;
3603esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003604eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003605 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003606 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003607 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003608 rm -f conftest.er1
3609 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003611 (exit $ac_status); } >/dev/null && {
3612 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3613 test ! -s conftest.err
3614 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003615 # Broken: success on invalid input.
3616continue
3617else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003618 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003619sed 's/^/| /' conftest.$ac_ext >&5
3620
Martin v. Löwis11437992002-04-12 09:54:03 +00003621 # Passes both tests.
3622ac_preproc_ok=:
3623break
3624fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003625
Martin v. Löwis11437992002-04-12 09:54:03 +00003626rm -f conftest.err conftest.$ac_ext
3627
3628done
3629# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3630rm -f conftest.err conftest.$ac_ext
3631if $ac_preproc_ok; then
3632 :
3633else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003634 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003635See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003636echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003637See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003638 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003639fi
3640
3641ac_ext=c
3642ac_cpp='$CPP $CPPFLAGS'
3643ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3644ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3645ac_compiler_gnu=$ac_cv_c_compiler_gnu
3646
3647
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003648{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3649echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003650if test "${ac_cv_path_GREP+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003651 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003652else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003653 # Extract the first word of "grep ggrep" to use in msg output
3654if test -z "$GREP"; then
3655set dummy grep ggrep; ac_prog_name=$2
3656if test "${ac_cv_path_GREP+set}" = set; then
3657 echo $ECHO_N "(cached) $ECHO_C" >&6
3658else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003659 ac_path_GREP_found=false
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003660# Loop through the user's path and test for each of PROGNAME-LIST
3661as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003662for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3663do
3664 IFS=$as_save_IFS
3665 test -z "$as_dir" && as_dir=.
3666 for ac_prog in grep ggrep; do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003667 for ac_exec_ext in '' $ac_executable_extensions; do
3668 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3669 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3670 # Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003671 # Check for GNU $ac_path_GREP
3672case `"$ac_path_GREP" --version 2>&1` in
3673*GNU*)
3674 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3675*)
3676 ac_count=0
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003677 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003678 while :
3679 do
3680 cat "conftest.in" "conftest.in" >"conftest.tmp"
3681 mv "conftest.tmp" "conftest.in"
3682 cp "conftest.in" "conftest.nl"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003683 echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003684 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3685 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3686 ac_count=`expr $ac_count + 1`
3687 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3688 # Best one so far, save it but keep looking for a better one
3689 ac_cv_path_GREP="$ac_path_GREP"
3690 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00003691 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003692 # 10*(2^10) chars as input seems more than enough
3693 test $ac_count -gt 10 && break
3694 done
3695 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3696esac
3697
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003698
3699 $ac_path_GREP_found && break 3
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003700 done
3701done
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003702
3703done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003704IFS=$as_save_IFS
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003705
3706
3707fi
3708
3709GREP="$ac_cv_path_GREP"
3710if test -z "$GREP"; then
3711 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3712echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003713 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003714fi
3715
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003716else
3717 ac_cv_path_GREP=$GREP
3718fi
3719
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003720
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003721fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003722{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3723echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003724 GREP="$ac_cv_path_GREP"
3725
3726
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003727{ echo "$as_me:$LINENO: checking for egrep" >&5
3728echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003729if test "${ac_cv_path_EGREP+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003730 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003731else
3732 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3733 then ac_cv_path_EGREP="$GREP -E"
3734 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003735 # Extract the first word of "egrep" to use in msg output
3736if test -z "$EGREP"; then
3737set dummy egrep; ac_prog_name=$2
3738if test "${ac_cv_path_EGREP+set}" = set; then
3739 echo $ECHO_N "(cached) $ECHO_C" >&6
3740else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003741 ac_path_EGREP_found=false
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003742# Loop through the user's path and test for each of PROGNAME-LIST
3743as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003744for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3745do
3746 IFS=$as_save_IFS
3747 test -z "$as_dir" && as_dir=.
3748 for ac_prog in egrep; do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003749 for ac_exec_ext in '' $ac_executable_extensions; do
3750 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3751 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3752 # Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003753 # Check for GNU $ac_path_EGREP
3754case `"$ac_path_EGREP" --version 2>&1` in
3755*GNU*)
3756 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3757*)
3758 ac_count=0
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003759 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003760 while :
3761 do
3762 cat "conftest.in" "conftest.in" >"conftest.tmp"
3763 mv "conftest.tmp" "conftest.in"
3764 cp "conftest.in" "conftest.nl"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003765 echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003766 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3767 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3768 ac_count=`expr $ac_count + 1`
3769 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3770 # Best one so far, save it but keep looking for a better one
3771 ac_cv_path_EGREP="$ac_path_EGREP"
3772 ac_path_EGREP_max=$ac_count
3773 fi
3774 # 10*(2^10) chars as input seems more than enough
3775 test $ac_count -gt 10 && break
3776 done
3777 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3778esac
3779
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003780
3781 $ac_path_EGREP_found && break 3
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003782 done
3783done
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003784
3785done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003786IFS=$as_save_IFS
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003787
3788
3789fi
3790
3791EGREP="$ac_cv_path_EGREP"
3792if test -z "$EGREP"; then
3793 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3794echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003795 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003796fi
3797
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003798else
3799 ac_cv_path_EGREP=$EGREP
3800fi
3801
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003802
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003803 fi
3804fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003805{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3806echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003807 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00003808
3809
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003810
3811{ echo "$as_me:$LINENO: checking for AIX" >&5
3812echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
3813cat >conftest.$ac_ext <<_ACEOF
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003814/* confdefs.h. */
3815_ACEOF
3816cat confdefs.h >>conftest.$ac_ext
3817cat >>conftest.$ac_ext <<_ACEOF
3818/* end confdefs.h. */
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003819#ifdef _AIX
3820 yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003821#endif
3822
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003823_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003824if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3825 $EGREP "yes" >/dev/null 2>&1; then
3826 { echo "$as_me:$LINENO: result: yes" >&5
3827echo "${ECHO_T}yes" >&6; }
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003828cat >>confdefs.h <<\_ACEOF
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003829#define _ALL_SOURCE 1
3830_ACEOF
3831
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003832else
3833 { echo "$as_me:$LINENO: result: no" >&5
3834echo "${ECHO_T}no" >&6; }
3835fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00003836rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003837
3838
3839
3840# Check for unsupported systems
3841case $ac_sys_system/$ac_sys_release in
3842atheos*|Linux*/1*)
3843 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3844 echo See README for details.
3845 exit 1;;
3846esac
3847
3848
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003849{ echo "$as_me:$LINENO: checking for --with-suffix" >&5
3850echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003851
3852# Check whether --with-suffix was given.
3853if test "${with_suffix+set}" = set; then
3854 withval=$with_suffix;
3855 case $withval in
3856 no) EXEEXT=;;
3857 yes) EXEEXT=.exe;;
3858 *) EXEEXT=$withval;;
3859 esac
3860fi
3861
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003862{ echo "$as_me:$LINENO: result: $EXEEXT" >&5
3863echo "${ECHO_T}$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003864
3865# Test whether we're running on a non-case-sensitive system, in which
3866# case we give a warning if no ext is given
3867
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003868{ echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3869echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003870if test ! -d CaseSensitiveTestDir; then
3871mkdir CaseSensitiveTestDir
3872fi
3873
3874if test -d casesensitivetestdir
3875then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003876 { echo "$as_me:$LINENO: result: yes" >&5
3877echo "${ECHO_T}yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003878 BUILDEXEEXT=.exe
3879else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003880 { echo "$as_me:$LINENO: result: no" >&5
3881echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003882 BUILDEXEEXT=$EXEEXT
3883fi
3884rmdir CaseSensitiveTestDir
3885
3886case $MACHDEP in
3887bsdos*)
3888 case $CC in
3889 gcc) CC="$CC -D_HAVE_BSDI";;
3890 esac;;
3891esac
3892
3893case $ac_sys_system in
3894hp*|HP*)
3895 case $CC in
3896 cc|*/cc) CC="$CC -Ae";;
3897 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003898SunOS*)
3899 # Some functions have a prototype only with that define, e.g. confstr
3900
3901cat >>confdefs.h <<\_ACEOF
3902#define __EXTENSIONS__ 1
3903_ACEOF
3904
3905 ;;
3906esac
3907
3908
3909
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003910{ echo "$as_me:$LINENO: checking LIBRARY" >&5
3911echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003912if test -z "$LIBRARY"
3913then
3914 LIBRARY='libpython$(VERSION).a'
3915fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003916{ echo "$as_me:$LINENO: result: $LIBRARY" >&5
3917echo "${ECHO_T}$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003918
3919# LDLIBRARY is the name of the library to link against (as opposed to the
3920# name of the library into which to insert object files). BLDLIBRARY is also
3921# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3922# is blank as the main program is not linked directly against LDLIBRARY.
3923# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3924# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3925# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3926# DLLLIBRARY is the shared (i.e., DLL) library.
3927#
3928# RUNSHARED is used to run shared python without installed libraries
3929#
3930# INSTSONAME is the name of the shared library that will be use to install
3931# on the system - some systems like version suffix, others don't
3932
3933
3934
3935
3936
3937
3938LDLIBRARY="$LIBRARY"
3939BLDLIBRARY='$(LDLIBRARY)'
3940INSTSONAME='$(LDLIBRARY)'
3941DLLLIBRARY=''
3942LDLIBRARYDIR=''
3943RUNSHARED=''
3944
3945# LINKCC is the command that links the python executable -- default is $(CC).
3946# If CXX is set, and if it is needed to link a main function that was
3947# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3948# python might then depend on the C++ runtime
3949# This is altered for AIX in order to build the export list before
3950# linking.
3951
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003952{ echo "$as_me:$LINENO: checking LINKCC" >&5
3953echo $ECHO_N "checking LINKCC... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003954if test -z "$LINKCC"
3955then
3956 LINKCC='$(PURIFY) $(MAINCC)'
3957 case $ac_sys_system in
3958 AIX*)
3959 exp_extra="\"\""
3960 if test $ac_sys_release -ge 5 -o \
3961 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3962 exp_extra="."
3963 fi
3964 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003965 QNX*)
3966 # qcc must be used because the other compilers do not
3967 # support -N.
3968 LINKCC=qcc;;
3969 esac
3970fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003971{ echo "$as_me:$LINENO: result: $LINKCC" >&5
3972echo "${ECHO_T}$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003973
3974# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
3975# make sure we default having it set to "no": this is used by
3976# distutils.unixccompiler to know if it should add --enable-new-dtags
3977# to linker command lines, and failing to detect GNU ld simply results
3978# in the same bahaviour as before.
3979
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003980{ echo "$as_me:$LINENO: checking for GNU ld" >&5
3981echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003982ac_prog=ld
3983if test "$GCC" = yes; then
3984 ac_prog=`$CC -print-prog-name=ld`
3985fi
3986case `"$ac_prog" -V 2>&1 < /dev/null` in
3987 *GNU*)
3988 GNULD=yes;;
3989 *)
3990 GNULD=no;;
3991esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003992{ echo "$as_me:$LINENO: result: $GNULD" >&5
3993echo "${ECHO_T}$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003994
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003995{ echo "$as_me:$LINENO: checking for --enable-shared" >&5
3996echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003997# Check whether --enable-shared was given.
3998if test "${enable_shared+set}" = set; then
3999 enableval=$enable_shared;
4000fi
4001
4002
4003if test -z "$enable_shared"
4004then
4005 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00004006 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004007 enable_shared="yes";;
4008 *)
4009 enable_shared="no";;
4010 esac
4011fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004012{ echo "$as_me:$LINENO: result: $enable_shared" >&5
4013echo "${ECHO_T}$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004014
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004015{ echo "$as_me:$LINENO: checking for --enable-profiling" >&5
4016echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004017# Check whether --enable-profiling was given.
4018if test "${enable_profiling+set}" = set; then
4019 enableval=$enable_profiling; ac_save_cc="$CC"
4020 CC="$CC -pg"
4021 if test "$cross_compiling" = yes; then
4022 ac_enable_profiling="no"
4023else
4024 cat >conftest.$ac_ext <<_ACEOF
4025/* confdefs.h. */
4026_ACEOF
4027cat confdefs.h >>conftest.$ac_ext
4028cat >>conftest.$ac_ext <<_ACEOF
4029/* end confdefs.h. */
4030int main() { return 0; }
4031_ACEOF
4032rm -f conftest$ac_exeext
4033if { (ac_try="$ac_link"
4034case "(($ac_try" in
4035 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4036 *) ac_try_echo=$ac_try;;
4037esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004038eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004039 (eval "$ac_link") 2>&5
4040 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004042 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4043 { (case "(($ac_try" in
4044 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4045 *) ac_try_echo=$ac_try;;
4046esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004047eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004048 (eval "$ac_try") 2>&5
4049 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004051 (exit $ac_status); }; }; then
4052 ac_enable_profiling="yes"
4053else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004054 echo "$as_me: program exited with status $ac_status" >&5
4055echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004056sed 's/^/| /' conftest.$ac_ext >&5
4057
4058( exit $ac_status )
4059ac_enable_profiling="no"
4060fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004061rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4062fi
4063
4064
4065 CC="$ac_save_cc"
4066fi
4067
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004068{ echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
4069echo "${ECHO_T}$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004070
4071case "$ac_enable_profiling" in
4072 "yes")
4073 BASECFLAGS="-pg $BASECFLAGS"
4074 LDFLAGS="-pg $LDFLAGS"
4075 ;;
4076esac
4077
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004078{ echo "$as_me:$LINENO: checking LDLIBRARY" >&5
4079echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004080
4081# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4082# library that we build, but we do not want to link against it (we
4083# will find it with a -framework option). For this reason there is an
4084# extra variable BLDLIBRARY against which Python and the extension
4085# modules are linked, BLDLIBRARY. This is normally the same as
4086# LDLIBRARY, but empty for MacOSX framework builds.
4087if test "$enable_framework"
4088then
4089 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4090 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4091 BLDLIBRARY=''
4092else
4093 BLDLIBRARY='$(LDLIBRARY)'
4094fi
4095
4096# Other platforms follow
4097if test $enable_shared = "yes"; then
4098
4099cat >>confdefs.h <<\_ACEOF
4100#define Py_ENABLE_SHARED 1
4101_ACEOF
4102
4103 case $ac_sys_system in
4104 CYGWIN*)
4105 LDLIBRARY='libpython$(VERSION).dll.a'
4106 DLLLIBRARY='libpython$(VERSION).dll'
4107 ;;
4108 SunOS*)
4109 LDLIBRARY='libpython$(VERSION).so'
4110 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
4111 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4112 INSTSONAME="$LDLIBRARY".$SOVERSION
4113 ;;
4114 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
4115 LDLIBRARY='libpython$(VERSION).so'
4116 BLDLIBRARY='-L. -lpython$(VERSION)'
4117 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4118 case $ac_sys_system in
4119 FreeBSD*)
4120 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4121 ;;
4122 esac
4123 INSTSONAME="$LDLIBRARY".$SOVERSION
4124 ;;
4125 hp*|HP*)
4126 case `uname -m` in
4127 ia64)
4128 LDLIBRARY='libpython$(VERSION).so'
4129 ;;
4130 *)
4131 LDLIBRARY='libpython$(VERSION).sl'
4132 ;;
4133 esac
4134 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
4135 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4136 ;;
4137 OSF*)
4138 LDLIBRARY='libpython$(VERSION).so'
4139 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
4140 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4141 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004142 Darwin*)
4143 LDLIBRARY='libpython$(VERSION).dylib'
4144 BLDLIBRARY='-L. -lpython$(VERSION)'
4145 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4146 ;;
4147
4148 esac
4149else # shared is disabled
4150 case $ac_sys_system in
4151 CYGWIN*)
4152 BLDLIBRARY='$(LIBRARY)'
4153 LDLIBRARY='libpython$(VERSION).dll.a'
4154 ;;
4155 esac
4156fi
4157
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004158{ echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
4159echo "${ECHO_T}$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004160
4161if test -n "$ac_tool_prefix"; then
4162 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4163set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004164{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4165echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004166if test "${ac_cv_prog_RANLIB+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004167 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004168else
4169 if test -n "$RANLIB"; then
4170 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4171else
4172as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4173for as_dir in $PATH
4174do
4175 IFS=$as_save_IFS
4176 test -z "$as_dir" && as_dir=.
4177 for ac_exec_ext in '' $ac_executable_extensions; do
4178 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4179 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004180 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004181 break 2
4182 fi
4183done
4184done
4185IFS=$as_save_IFS
4186
4187fi
4188fi
4189RANLIB=$ac_cv_prog_RANLIB
4190if test -n "$RANLIB"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004191 { echo "$as_me:$LINENO: result: $RANLIB" >&5
4192echo "${ECHO_T}$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004193else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004194 { echo "$as_me:$LINENO: result: no" >&5
4195echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004196fi
4197
4198
4199fi
4200if test -z "$ac_cv_prog_RANLIB"; then
4201 ac_ct_RANLIB=$RANLIB
4202 # Extract the first word of "ranlib", so it can be a program name with args.
4203set dummy ranlib; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004204{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4205echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004206if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004207 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004208else
4209 if test -n "$ac_ct_RANLIB"; then
4210 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4211else
4212as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4213for as_dir in $PATH
4214do
4215 IFS=$as_save_IFS
4216 test -z "$as_dir" && as_dir=.
4217 for ac_exec_ext in '' $ac_executable_extensions; do
4218 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4219 ac_cv_prog_ac_ct_RANLIB="ranlib"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004220 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004221 break 2
4222 fi
4223done
4224done
4225IFS=$as_save_IFS
4226
4227fi
4228fi
4229ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4230if test -n "$ac_ct_RANLIB"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004231 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4232echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004233else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004234 { echo "$as_me:$LINENO: result: no" >&5
4235echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004236fi
4237
4238 if test "x$ac_ct_RANLIB" = x; then
4239 RANLIB=":"
4240 else
4241 case $cross_compiling:$ac_tool_warned in
4242yes:)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004243{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
4244whose name does not start with the host triplet. If you think this
4245configuration is useful to you, please write to autoconf@gnu.org." >&5
4246echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
4247whose name does not start with the host triplet. If you think this
4248configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004249ac_tool_warned=yes ;;
4250esac
4251 RANLIB=$ac_ct_RANLIB
4252 fi
4253else
4254 RANLIB="$ac_cv_prog_RANLIB"
4255fi
4256
4257
4258for ac_prog in ar aal
4259do
4260 # Extract the first word of "$ac_prog", so it can be a program name with args.
4261set dummy $ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004262{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4263echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004264if test "${ac_cv_prog_AR+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004265 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004266else
4267 if test -n "$AR"; then
4268 ac_cv_prog_AR="$AR" # Let the user override the test.
4269else
4270as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4271for as_dir in $PATH
4272do
4273 IFS=$as_save_IFS
4274 test -z "$as_dir" && as_dir=.
4275 for ac_exec_ext in '' $ac_executable_extensions; do
4276 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4277 ac_cv_prog_AR="$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004278 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004279 break 2
4280 fi
4281done
4282done
4283IFS=$as_save_IFS
4284
4285fi
4286fi
4287AR=$ac_cv_prog_AR
4288if test -n "$AR"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004289 { echo "$as_me:$LINENO: result: $AR" >&5
4290echo "${ECHO_T}$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004291else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004292 { echo "$as_me:$LINENO: result: no" >&5
4293echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004294fi
4295
4296
4297 test -n "$AR" && break
4298done
4299test -n "$AR" || AR="ar"
4300
4301
4302# tweak ARFLAGS only if the user didn't set it on the command line
4303
4304if test -z "$ARFLAGS"
4305then
4306 ARFLAGS="rc"
4307fi
4308
4309
4310# Extract the first word of "svnversion", so it can be a program name with args.
4311set dummy svnversion; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004312{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4313echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004314if test "${ac_cv_prog_SVNVERSION+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004315 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004316else
4317 if test -n "$SVNVERSION"; then
4318 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
4319else
4320as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4321for as_dir in $PATH
4322do
4323 IFS=$as_save_IFS
4324 test -z "$as_dir" && as_dir=.
4325 for ac_exec_ext in '' $ac_executable_extensions; do
4326 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4327 ac_cv_prog_SVNVERSION="found"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004328 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004329 break 2
4330 fi
4331done
4332done
4333IFS=$as_save_IFS
4334
4335 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
4336fi
4337fi
4338SVNVERSION=$ac_cv_prog_SVNVERSION
4339if test -n "$SVNVERSION"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004340 { echo "$as_me:$LINENO: result: $SVNVERSION" >&5
4341echo "${ECHO_T}$SVNVERSION" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004342else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004343 { echo "$as_me:$LINENO: result: no" >&5
4344echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004345fi
4346
4347
4348if test $SVNVERSION = found
4349then
4350 SVNVERSION="svnversion \$(srcdir)"
4351else
4352 SVNVERSION="echo Unversioned directory"
4353fi
4354
4355case $MACHDEP in
4356bsdos*|hp*|HP*)
4357 # install -d does not work on BSDI or HP-UX
4358 if test -z "$INSTALL"
4359 then
4360 INSTALL="${srcdir}/install-sh -c"
4361 fi
4362esac
4363ac_aux_dir=
4364for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4365 if test -f "$ac_dir/install-sh"; then
4366 ac_aux_dir=$ac_dir
4367 ac_install_sh="$ac_aux_dir/install-sh -c"
4368 break
4369 elif test -f "$ac_dir/install.sh"; then
4370 ac_aux_dir=$ac_dir
4371 ac_install_sh="$ac_aux_dir/install.sh -c"
4372 break
4373 elif test -f "$ac_dir/shtool"; then
4374 ac_aux_dir=$ac_dir
4375 ac_install_sh="$ac_aux_dir/shtool install -c"
4376 break
4377 fi
4378done
4379if test -z "$ac_aux_dir"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004380 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
4381echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004382 { (exit 1); exit 1; }; }
4383fi
4384
4385# These three variables are undocumented and unsupported,
4386# and are intended to be withdrawn in a future Autoconf release.
4387# They can cause serious problems if a builder's source tree is in a directory
4388# whose full name contains unusual characters.
4389ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4390ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4391ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4392
4393
4394# Find a good install program. We prefer a C program (faster),
4395# so one script is as good as another. But avoid the broken or
4396# incompatible versions:
4397# SysV /etc/install, /usr/sbin/install
4398# SunOS /usr/etc/install
4399# IRIX /sbin/install
4400# AIX /bin/install
4401# AmigaOS /C/install, which installs bootblocks on floppy discs
4402# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4403# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4404# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4405# OS/2's system install, which has a completely different semantic
4406# ./install, which can be erroneously created by make from ./install.sh.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004407{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4408echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004409if test -z "$INSTALL"; then
4410if test "${ac_cv_path_install+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004411 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004412else
4413 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4414for as_dir in $PATH
4415do
4416 IFS=$as_save_IFS
4417 test -z "$as_dir" && as_dir=.
4418 # Account for people who put trailing slashes in PATH elements.
4419case $as_dir/ in
4420 ./ | .// | /cC/* | \
4421 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4422 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
4423 /usr/ucb/* ) ;;
4424 *)
4425 # OSF1 and SCO ODT 3.0 have their own names for install.
4426 # Don't use installbsd from OSF since it installs stuff as root
4427 # by default.
4428 for ac_prog in ginstall scoinst install; do
4429 for ac_exec_ext in '' $ac_executable_extensions; do
4430 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
4431 if test $ac_prog = install &&
4432 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4433 # AIX install. It has an incompatible calling convention.
4434 :
4435 elif test $ac_prog = install &&
4436 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4437 # program-specific install script used by HP pwplus--don't use.
4438 :
4439 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004440 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4441 break 3
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004442 fi
4443 fi
4444 done
4445 done
4446 ;;
4447esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004448done
4449IFS=$as_save_IFS
4450
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004451
4452fi
4453 if test "${ac_cv_path_install+set}" = set; then
4454 INSTALL=$ac_cv_path_install
4455 else
4456 # As a last resort, use the slow shell script. Don't cache a
4457 # value for INSTALL within a source directory, because that will
4458 # break other packages using the cache if that directory is
4459 # removed, or if the value is a relative name.
4460 INSTALL=$ac_install_sh
4461 fi
4462fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004463{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4464echo "${ECHO_T}$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004465
4466# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4467# It thinks the first close brace ends the variable substitution.
4468test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4469
4470test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4471
4472test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4473
4474
4475# Not every filesystem supports hard links
4476
4477if test -z "$LN" ; then
4478 case $ac_sys_system in
4479 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004480 *) LN=ln;;
4481 esac
4482fi
4483
4484# Check for --with-pydebug
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004485{ echo "$as_me:$LINENO: checking for --with-pydebug" >&5
4486echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004487
4488# Check whether --with-pydebug was given.
4489if test "${with_pydebug+set}" = set; then
4490 withval=$with_pydebug;
4491if test "$withval" != no
4492then
4493
4494cat >>confdefs.h <<\_ACEOF
4495#define Py_DEBUG 1
4496_ACEOF
4497
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004498 { echo "$as_me:$LINENO: result: yes" >&5
4499echo "${ECHO_T}yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004500 Py_DEBUG='true'
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004501else { echo "$as_me:$LINENO: result: no" >&5
4502echo "${ECHO_T}no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004503fi
4504else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004505 { echo "$as_me:$LINENO: result: no" >&5
4506echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004507fi
4508
4509
4510# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
4511# merged with this chunk of code?
4512
4513# Optimizer/debugger flags
4514# ------------------------
4515# (The following bit of code is complicated enough - please keep things
4516# indented properly. Just pretend you're editing Python code. ;-)
4517
4518# There are two parallel sets of case statements below, one that checks to
4519# see if OPT was set and one that does BASECFLAGS setting based upon
4520# compiler and platform. BASECFLAGS tweaks need to be made even if the
4521# user set OPT.
4522
4523# tweak OPT based on compiler and platform, only if the user didn't set
4524# it on the command line
4525
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00004526if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004527then
4528 case $GCC in
4529 yes)
4530 if test "$CC" != 'g++' ; then
4531 STRICT_PROTO="-Wstrict-prototypes"
4532 fi
4533 # For gcc 4.x we need to use -fwrapv so lets check if its supported
4534 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
4535 WRAP="-fwrapv"
4536 fi
4537 case $ac_cv_prog_cc_g in
4538 yes)
4539 if test "$Py_DEBUG" = 'true' ; then
4540 # Optimization messes up debuggers, so turn it off for
4541 # debug builds.
4542 OPT="-g -Wall $STRICT_PROTO"
4543 else
4544 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
4545 fi
4546 ;;
4547 *)
4548 OPT="-O3 -Wall $STRICT_PROTO"
4549 ;;
4550 esac
4551 case $ac_sys_system in
4552 SCO_SV*) OPT="$OPT -m486 -DSCO5"
4553 ;;
4554 esac
4555 ;;
4556
4557 *)
4558 OPT="-O"
4559 ;;
4560 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004561fi
4562
4563
4564
4565# The -arch flags for universal builds on OSX
4566UNIVERSAL_ARCH_FLAGS=
4567
4568
4569# tweak BASECFLAGS based on compiler and platform
4570case $GCC in
4571yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00004572 # Python doesn't violate C99 aliasing rules, but older versions of
4573 # GCC produce warnings for legal Python code. Enable
4574 # -fno-strict-aliasing on versions of GCC that support but produce
4575 # warnings. See Issue3326
4576 { echo "$as_me:$LINENO: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
4577echo $ECHO_N "checking whether $CC accepts and needs -fno-strict-aliasing... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004578 ac_save_cc="$CC"
4579 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00004580 save_CFLAGS="$CFLAGS"
4581 if test "${ac_cv_no_strict_aliasing+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004582 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00004583else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004584 cat >conftest.$ac_ext <<_ACEOF
4585/* confdefs.h. */
4586_ACEOF
4587cat confdefs.h >>conftest.$ac_ext
4588cat >>conftest.$ac_ext <<_ACEOF
4589/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004590
4591int
4592main ()
4593{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004594int main() { return 0; }
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004595 ;
4596 return 0;
4597}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004598_ACEOF
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004599rm -f conftest.$ac_objext
4600if { (ac_try="$ac_compile"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004601case "(($ac_try" in
4602 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4603 *) ac_try_echo=$ac_try;;
4604esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004605eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004606 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004607 ac_status=$?
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004608 grep -v '^ *+' conftest.er1 >conftest.err
4609 rm -f conftest.er1
4610 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004612 (exit $ac_status); } && {
4613 test -z "$ac_c_werror_flag" ||
4614 test ! -s conftest.err
4615 } && test -s conftest.$ac_objext; then
Benjamin Petersone6c9d242010-03-30 17:34:47 +00004616 CC="$ac_save_cc -fstrict-aliasing"
4617 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
4618 cat >conftest.$ac_ext <<_ACEOF
4619/* confdefs.h. */
4620_ACEOF
4621cat confdefs.h >>conftest.$ac_ext
4622cat >>conftest.$ac_ext <<_ACEOF
4623/* end confdefs.h. */
4624
4625int
4626main ()
4627{
4628void f(int **x) {} int main() { double *x; f((int **) &x); return 0; }
4629 ;
4630 return 0;
4631}
4632_ACEOF
4633rm -f conftest.$ac_objext
4634if { (ac_try="$ac_compile"
4635case "(($ac_try" in
4636 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4637 *) ac_try_echo=$ac_try;;
4638esac
4639eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4640 (eval "$ac_compile") 2>conftest.er1
4641 ac_status=$?
4642 grep -v '^ *+' conftest.er1 >conftest.err
4643 rm -f conftest.er1
4644 cat conftest.err >&5
4645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4646 (exit $ac_status); } && {
4647 test -z "$ac_c_werror_flag" ||
4648 test ! -s conftest.err
4649 } && test -s conftest.$ac_objext; then
4650 ac_cv_no_strict_aliasing=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004651else
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004652 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004653sed 's/^/| /' conftest.$ac_ext >&5
4654
Benjamin Petersone6c9d242010-03-30 17:34:47 +00004655 ac_cv_no_strict_aliasing=yes
4656fi
4657
4658rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4659else
4660 echo "$as_me: failed program was:" >&5
4661sed 's/^/| /' conftest.$ac_ext >&5
4662
4663 ac_cv_no_strict_aliasing=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004664fi
4665
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004666rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00004667fi
4668
Benjamin Petersone6c9d242010-03-30 17:34:47 +00004669 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004670 CC="$ac_save_cc"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00004671 { echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing" >&5
4672echo "${ECHO_T}$ac_cv_no_strict_aliasing" >&6; }
4673 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004674 then
4675 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
4676 fi
4677
4678 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
4679 # support. Without this, treatment of subnormals doesn't follow
4680 # the standard.
4681 case $ac_sys_machine in
4682 alpha*)
4683 BASECFLAGS="$BASECFLAGS -mieee"
4684 ;;
4685 esac
4686
4687 case $ac_sys_system in
4688 SCO_SV*)
4689 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
4690 ;;
4691 # is there any other compiler on Darwin besides gcc?
4692 Darwin*)
4693 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
4694 # used to be here, but non-Apple gcc doesn't accept them.
4695
4696
4697 if test "${enable_universalsdk}"; then
4698 UNIVERSAL_ARCH_FLAGS=""
4699 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
4700 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
4701 ARCH_RUN_32BIT=""
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00004702 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004703
Ronald Oussoren755740f2010-02-07 19:56:39 +00004704 # You have to use different flags on various versions of
4705 # OSX to extract PPC code from an universal binary, basically
4706 # '-arch ppc' on OSX 10.4 and '-arch ppc7400' on anything
4707 # newer.
4708 # Because '-arch pp7400' works on OSX 10.5 or higher this
4709 # test is only present in the '32-bit' branch, all other
4710 # branches require OSX 10.5 to compile.
4711
4712 { echo "$as_me:$LINENO: checking lipo flag for extracting ppc code" >&5
4713echo $ECHO_N "checking lipo flag for extracting ppc code... $ECHO_C" >&6; }
4714 FN="test.$$"
4715 cat >${FN}.c <<-EOF
4716 int main() { return 0; }
4717EOF
4718 ${CC} ${CFLAGS} -arch ppc -arch i386 -o ${FN} ${FN}.c -isysroot ${UNIVERSALSDK}
4719 if test $? != 0 ; then
4720 rm ${FN} ${FN}.c
4721 { echo "$as_me:$LINENO: result: failed, assumee -extract ppc7400" >&5
4722echo "${ECHO_T}failed, assumee -extract ppc7400" >&6; }
4723 else
4724 lipo "${FN}" -extract ppc7400 -output "${FN}.out" 2>/dev/null
4725 if test $? != 0 ; then
4726 LIPO_32BIT_FLAGS="-extract ppc -extract i386"
4727 { echo "$as_me:$LINENO: result: \"'-extract ppc'\"" >&5
4728echo "${ECHO_T}\"'-extract ppc'\"" >&6; }
4729 else
4730 { echo "$as_me:$LINENO: result: \"'-extract ppc7400'\"" >&5
4731echo "${ECHO_T}\"'-extract ppc7400'\"" >&6; }
4732 fi
4733 rm -f ${FN} ${FN}.c ${FN}.out
4734 fi
4735
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004736 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
4737 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00004738 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00004739 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004740
4741 elif test "$UNIVERSAL_ARCHS" = "all" ; then
4742 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00004743 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00004744 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004745
Ronald Oussoren3c064c12009-09-08 07:12:42 +00004746 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
4747 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00004748 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00004749 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00004750
4751 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
4752 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00004753 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00004754 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00004755
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004756 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004757 { { echo "$as_me:$LINENO: error: proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" >&5
4758echo "$as_me: error: proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004759 { (exit 1); exit 1; }; }
4760
4761 fi
4762
4763
4764 BASECFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
4765 tgt=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4766 if test "${UNIVERSALSDK}" != "/" -a "${tgt}" '>' '10.4' ; then
4767 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
4768 fi
4769 fi
4770
4771 # Calculate the right deployment target for this build.
4772 #
4773 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4774 if test ${cur_target} '>' 10.2; then
4775 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00004776 if test ${enable_universalsdk}; then
4777 if test "${UNIVERSAL_ARCHS}" = "all"; then
4778 # Ensure that the default platform for a
4779 # 4-way universal build is OSX 10.5,
4780 # that's the first OS release where
4781 # 4-way builds make sense.
4782 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00004783
4784 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
4785 cur_target='10.5'
4786
4787 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
4788 cur_target='10.5'
4789
4790 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
4791 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00004792 fi
4793 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00004794 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00004795 # On Intel macs default to a deployment
4796 # target of 10.4, that's the first OSX
4797 # release with Intel support.
4798 cur_target="10.4"
4799 fi
4800 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004801 fi
4802 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
4803
4804 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
4805 # environment with a value that is the same as what we'll use
4806 # in the Makefile to ensure that we'll get the same compiler
4807 # environment during configure and build time.
4808 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
4809 export MACOSX_DEPLOYMENT_TARGET
4810 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
4811
4812 ;;
4813 OSF*)
4814 BASECFLAGS="$BASECFLAGS -mieee"
4815 ;;
4816 esac
4817 ;;
4818
4819*)
4820 case $ac_sys_system in
4821 OpenUNIX*|UnixWare*)
4822 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
4823 ;;
4824 OSF*)
4825 BASECFLAGS="$BASECFLAGS -ieee -std"
4826 ;;
4827 SCO_SV*)
4828 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
4829 ;;
4830 esac
4831 ;;
4832esac
4833
4834if test "$Py_DEBUG" = 'true'; then
4835 :
4836else
4837 OPT="-DNDEBUG $OPT"
4838fi
4839
4840if test "$ac_arch_flags"
4841then
4842 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
4843fi
4844
4845# disable check for icc since it seems to pass, but generates a warning
4846if test "$CC" = icc
4847then
4848 ac_cv_opt_olimit_ok=no
4849fi
4850
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004851{ echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
4852echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004853if test "${ac_cv_opt_olimit_ok+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004854 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004855else
4856 ac_save_cc="$CC"
4857CC="$CC -OPT:Olimit=0"
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004858cat >conftest.$ac_ext <<_ACEOF
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004859/* confdefs.h. */
4860_ACEOF
4861cat confdefs.h >>conftest.$ac_ext
4862cat >>conftest.$ac_ext <<_ACEOF
4863/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004864
4865int
4866main ()
4867{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004868int main() { return 0; }
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004869 ;
4870 return 0;
4871}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004872_ACEOF
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004873rm -f conftest.$ac_objext
4874if { (ac_try="$ac_compile"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004875case "(($ac_try" in
4876 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4877 *) ac_try_echo=$ac_try;;
4878esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004879eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004880 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004881 ac_status=$?
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004882 grep -v '^ *+' conftest.er1 >conftest.err
4883 rm -f conftest.er1
4884 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004886 (exit $ac_status); } && {
4887 test -z "$ac_c_werror_flag" ||
4888 test ! -s conftest.err
4889 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004890 ac_cv_opt_olimit_ok=yes
4891else
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004892 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004893sed 's/^/| /' conftest.$ac_ext >&5
4894
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004895 ac_cv_opt_olimit_ok=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004896fi
4897
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004898rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004899CC="$ac_save_cc"
4900fi
4901
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004902{ echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
4903echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004904if test $ac_cv_opt_olimit_ok = yes; then
4905 case $ac_sys_system in
4906 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
4907 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
4908 # environment?
4909 Darwin*)
4910 ;;
4911 *)
4912 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
4913 ;;
4914 esac
4915else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004916 { echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
4917echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004918 if test "${ac_cv_olimit_ok+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004919 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004920else
4921 ac_save_cc="$CC"
4922 CC="$CC -Olimit 1500"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004923 cat >conftest.$ac_ext <<_ACEOF
4924/* confdefs.h. */
4925_ACEOF
4926cat confdefs.h >>conftest.$ac_ext
4927cat >>conftest.$ac_ext <<_ACEOF
4928/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004929
4930int
4931main ()
4932{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004933int main() { return 0; }
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004934 ;
4935 return 0;
4936}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004937_ACEOF
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004938rm -f conftest.$ac_objext
4939if { (ac_try="$ac_compile"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004940case "(($ac_try" in
4941 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4942 *) ac_try_echo=$ac_try;;
4943esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004944eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004945 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004946 ac_status=$?
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004947 grep -v '^ *+' conftest.er1 >conftest.err
4948 rm -f conftest.er1
4949 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004951 (exit $ac_status); } && {
4952 test -z "$ac_c_werror_flag" ||
4953 test ! -s conftest.err
4954 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004955 ac_cv_olimit_ok=yes
4956else
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004957 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004958sed 's/^/| /' conftest.$ac_ext >&5
4959
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004960 ac_cv_olimit_ok=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004961fi
4962
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004963rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004964 CC="$ac_save_cc"
4965fi
4966
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004967 { echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4968echo "${ECHO_T}$ac_cv_olimit_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004969 if test $ac_cv_olimit_ok = yes; then
4970 BASECFLAGS="$BASECFLAGS -Olimit 1500"
4971 fi
4972fi
4973
4974# Check whether GCC supports PyArg_ParseTuple format
4975if test "$GCC" = "yes"
4976then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004977 { echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
4978echo $ECHO_N "checking whether gcc supports ParseTuple __format__... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004979 save_CFLAGS=$CFLAGS
4980 CFLAGS="$CFLAGS -Werror"
4981 cat >conftest.$ac_ext <<_ACEOF
4982/* confdefs.h. */
4983_ACEOF
4984cat confdefs.h >>conftest.$ac_ext
4985cat >>conftest.$ac_ext <<_ACEOF
4986/* end confdefs.h. */
4987
4988 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
4989
4990int
4991main ()
4992{
4993
4994 ;
4995 return 0;
4996}
4997_ACEOF
4998rm -f conftest.$ac_objext
4999if { (ac_try="$ac_compile"
5000case "(($ac_try" in
5001 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5002 *) ac_try_echo=$ac_try;;
5003esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005004eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005005 (eval "$ac_compile") 2>conftest.er1
5006 ac_status=$?
5007 grep -v '^ *+' conftest.er1 >conftest.err
5008 rm -f conftest.er1
5009 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005011 (exit $ac_status); } && {
5012 test -z "$ac_c_werror_flag" ||
5013 test ! -s conftest.err
5014 } && test -s conftest.$ac_objext; then
5015
5016cat >>confdefs.h <<\_ACEOF
5017#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
5018_ACEOF
5019
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005020 { echo "$as_me:$LINENO: result: yes" >&5
5021echo "${ECHO_T}yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005022else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005023 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005024sed 's/^/| /' conftest.$ac_ext >&5
5025
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005026 { echo "$as_me:$LINENO: result: no" >&5
5027echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005028
5029fi
5030
5031rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5032 CFLAGS=$save_CFLAGS
5033fi
5034
5035# On some compilers, pthreads are available without further options
5036# (e.g. MacOS X). On some of these systems, the compiler will not
5037# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5038# So we have to see first whether pthreads are available without
5039# options before we can check whether -Kpthread improves anything.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005040{ echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
5041echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005042if test "${ac_cv_pthread_is_default+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005043 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005044else
5045 if test "$cross_compiling" = yes; then
5046 ac_cv_pthread_is_default=no
5047else
5048 cat >conftest.$ac_ext <<_ACEOF
5049/* confdefs.h. */
5050_ACEOF
5051cat confdefs.h >>conftest.$ac_ext
5052cat >>conftest.$ac_ext <<_ACEOF
5053/* end confdefs.h. */
5054
5055#include <pthread.h>
5056
5057void* routine(void* p){return NULL;}
5058
5059int main(){
5060 pthread_t p;
5061 if(pthread_create(&p,NULL,routine,NULL)!=0)
5062 return 1;
5063 (void)pthread_detach(p);
5064 return 0;
5065}
5066
5067_ACEOF
5068rm -f conftest$ac_exeext
5069if { (ac_try="$ac_link"
5070case "(($ac_try" in
5071 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5072 *) ac_try_echo=$ac_try;;
5073esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005074eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005075 (eval "$ac_link") 2>&5
5076 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005078 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5079 { (case "(($ac_try" in
5080 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5081 *) ac_try_echo=$ac_try;;
5082esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005083eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005084 (eval "$ac_try") 2>&5
5085 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005087 (exit $ac_status); }; }; then
5088
5089 ac_cv_pthread_is_default=yes
5090 ac_cv_kthread=no
5091 ac_cv_pthread=no
5092
5093else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005094 echo "$as_me: program exited with status $ac_status" >&5
5095echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005096sed 's/^/| /' conftest.$ac_ext >&5
5097
5098( exit $ac_status )
5099ac_cv_pthread_is_default=no
5100fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005101rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5102fi
5103
5104
5105
5106fi
5107
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005108{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
5109echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005110
5111
5112if test $ac_cv_pthread_is_default = yes
5113then
5114 ac_cv_kpthread=no
5115else
5116# -Kpthread, if available, provides the right #defines
5117# and linker options to make pthread_create available
5118# Some compilers won't report that they do not support -Kpthread,
5119# so we need to run a program to see whether it really made the
5120# function available.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005121{ echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
5122echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005123if test "${ac_cv_kpthread+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005124 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005125else
5126 ac_save_cc="$CC"
5127CC="$CC -Kpthread"
5128if test "$cross_compiling" = yes; then
5129 ac_cv_kpthread=no
5130else
5131 cat >conftest.$ac_ext <<_ACEOF
5132/* confdefs.h. */
5133_ACEOF
5134cat confdefs.h >>conftest.$ac_ext
5135cat >>conftest.$ac_ext <<_ACEOF
5136/* end confdefs.h. */
5137
5138#include <pthread.h>
5139
5140void* routine(void* p){return NULL;}
5141
5142int main(){
5143 pthread_t p;
5144 if(pthread_create(&p,NULL,routine,NULL)!=0)
5145 return 1;
5146 (void)pthread_detach(p);
5147 return 0;
5148}
5149
5150_ACEOF
5151rm -f conftest$ac_exeext
5152if { (ac_try="$ac_link"
5153case "(($ac_try" in
5154 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5155 *) ac_try_echo=$ac_try;;
5156esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005157eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005158 (eval "$ac_link") 2>&5
5159 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005160 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005161 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5162 { (case "(($ac_try" in
5163 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5164 *) ac_try_echo=$ac_try;;
5165esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005166eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005167 (eval "$ac_try") 2>&5
5168 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005170 (exit $ac_status); }; }; then
5171 ac_cv_kpthread=yes
5172else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005173 echo "$as_me: program exited with status $ac_status" >&5
5174echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005175sed 's/^/| /' conftest.$ac_ext >&5
5176
5177( exit $ac_status )
5178ac_cv_kpthread=no
5179fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005180rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5181fi
5182
5183
5184CC="$ac_save_cc"
5185fi
5186
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005187{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
5188echo "${ECHO_T}$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005189fi
5190
5191if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5192then
5193# -Kthread, if available, provides the right #defines
5194# and linker options to make pthread_create available
5195# Some compilers won't report that they do not support -Kthread,
5196# so we need to run a program to see whether it really made the
5197# function available.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005198{ echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
5199echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005200if test "${ac_cv_kthread+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005201 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005202else
5203 ac_save_cc="$CC"
5204CC="$CC -Kthread"
5205if test "$cross_compiling" = yes; then
5206 ac_cv_kthread=no
5207else
5208 cat >conftest.$ac_ext <<_ACEOF
5209/* confdefs.h. */
5210_ACEOF
5211cat confdefs.h >>conftest.$ac_ext
5212cat >>conftest.$ac_ext <<_ACEOF
5213/* end confdefs.h. */
5214
5215#include <pthread.h>
5216
5217void* routine(void* p){return NULL;}
5218
5219int main(){
5220 pthread_t p;
5221 if(pthread_create(&p,NULL,routine,NULL)!=0)
5222 return 1;
5223 (void)pthread_detach(p);
5224 return 0;
5225}
5226
5227_ACEOF
5228rm -f conftest$ac_exeext
5229if { (ac_try="$ac_link"
5230case "(($ac_try" in
5231 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5232 *) ac_try_echo=$ac_try;;
5233esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005234eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005235 (eval "$ac_link") 2>&5
5236 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005238 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5239 { (case "(($ac_try" in
5240 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5241 *) ac_try_echo=$ac_try;;
5242esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005243eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005244 (eval "$ac_try") 2>&5
5245 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005247 (exit $ac_status); }; }; then
5248 ac_cv_kthread=yes
5249else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005250 echo "$as_me: program exited with status $ac_status" >&5
5251echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005252sed 's/^/| /' conftest.$ac_ext >&5
5253
5254( exit $ac_status )
5255ac_cv_kthread=no
5256fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005257rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5258fi
5259
5260
5261CC="$ac_save_cc"
5262fi
5263
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005264{ echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
5265echo "${ECHO_T}$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005266fi
5267
5268if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5269then
5270# -pthread, if available, provides the right #defines
5271# and linker options to make pthread_create available
5272# Some compilers won't report that they do not support -pthread,
5273# so we need to run a program to see whether it really made the
5274# function available.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005275{ echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
5276echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005277if test "${ac_cv_thread+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005278 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005279else
5280 ac_save_cc="$CC"
5281CC="$CC -pthread"
5282if test "$cross_compiling" = yes; then
5283 ac_cv_pthread=no
5284else
5285 cat >conftest.$ac_ext <<_ACEOF
5286/* confdefs.h. */
5287_ACEOF
5288cat confdefs.h >>conftest.$ac_ext
5289cat >>conftest.$ac_ext <<_ACEOF
5290/* end confdefs.h. */
5291
5292#include <pthread.h>
5293
5294void* routine(void* p){return NULL;}
5295
5296int main(){
5297 pthread_t p;
5298 if(pthread_create(&p,NULL,routine,NULL)!=0)
5299 return 1;
5300 (void)pthread_detach(p);
5301 return 0;
5302}
5303
5304_ACEOF
5305rm -f conftest$ac_exeext
5306if { (ac_try="$ac_link"
5307case "(($ac_try" in
5308 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5309 *) ac_try_echo=$ac_try;;
5310esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005311eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005312 (eval "$ac_link") 2>&5
5313 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005315 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5316 { (case "(($ac_try" in
5317 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5318 *) ac_try_echo=$ac_try;;
5319esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005320eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005321 (eval "$ac_try") 2>&5
5322 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005324 (exit $ac_status); }; }; then
5325 ac_cv_pthread=yes
5326else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005327 echo "$as_me: program exited with status $ac_status" >&5
5328echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005329sed 's/^/| /' conftest.$ac_ext >&5
5330
5331( exit $ac_status )
5332ac_cv_pthread=no
5333fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005334rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5335fi
5336
5337
5338CC="$ac_save_cc"
5339fi
5340
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005341{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5342echo "${ECHO_T}$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005343fi
5344
5345# If we have set a CC compiler flag for thread support then
5346# check if it works for CXX, too.
5347ac_cv_cxx_thread=no
5348if test ! -z "$CXX"
5349then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005350{ echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5351echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005352ac_save_cxx="$CXX"
5353
5354if test "$ac_cv_kpthread" = "yes"
5355then
5356 CXX="$CXX -Kpthread"
5357 ac_cv_cxx_thread=yes
5358elif test "$ac_cv_kthread" = "yes"
5359then
5360 CXX="$CXX -Kthread"
5361 ac_cv_cxx_thread=yes
5362elif test "$ac_cv_pthread" = "yes"
5363then
5364 CXX="$CXX -pthread"
5365 ac_cv_cxx_thread=yes
5366fi
5367
5368if test $ac_cv_cxx_thread = yes
5369then
5370 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5371 $CXX -c conftest.$ac_ext 2>&5
5372 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5373 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5374 then
5375 ac_cv_cxx_thread=yes
5376 else
5377 ac_cv_cxx_thread=no
5378 fi
5379 rm -fr conftest*
5380fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005381{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5382echo "${ECHO_T}$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005383fi
5384CXX="$ac_save_cxx"
5385
5386
5387# checks for header files
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005388{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5389echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005390if test "${ac_cv_header_stdc+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005391 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005392else
5393 cat >conftest.$ac_ext <<_ACEOF
5394/* confdefs.h. */
5395_ACEOF
5396cat confdefs.h >>conftest.$ac_ext
5397cat >>conftest.$ac_ext <<_ACEOF
5398/* end confdefs.h. */
5399#include <stdlib.h>
5400#include <stdarg.h>
5401#include <string.h>
5402#include <float.h>
5403
5404int
5405main ()
5406{
5407
5408 ;
5409 return 0;
5410}
5411_ACEOF
5412rm -f conftest.$ac_objext
5413if { (ac_try="$ac_compile"
5414case "(($ac_try" in
5415 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5416 *) ac_try_echo=$ac_try;;
5417esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005418eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005419 (eval "$ac_compile") 2>conftest.er1
5420 ac_status=$?
5421 grep -v '^ *+' conftest.er1 >conftest.err
5422 rm -f conftest.er1
5423 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005425 (exit $ac_status); } && {
5426 test -z "$ac_c_werror_flag" ||
5427 test ! -s conftest.err
5428 } && test -s conftest.$ac_objext; then
5429 ac_cv_header_stdc=yes
5430else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005431 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005432sed 's/^/| /' conftest.$ac_ext >&5
5433
5434 ac_cv_header_stdc=no
5435fi
5436
5437rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5438
5439if test $ac_cv_header_stdc = yes; then
5440 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5441 cat >conftest.$ac_ext <<_ACEOF
5442/* confdefs.h. */
5443_ACEOF
5444cat confdefs.h >>conftest.$ac_ext
5445cat >>conftest.$ac_ext <<_ACEOF
5446/* end confdefs.h. */
5447#include <string.h>
5448
5449_ACEOF
5450if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5451 $EGREP "memchr" >/dev/null 2>&1; then
5452 :
5453else
5454 ac_cv_header_stdc=no
5455fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00005456rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005457
5458fi
5459
5460if test $ac_cv_header_stdc = yes; then
5461 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5462 cat >conftest.$ac_ext <<_ACEOF
5463/* confdefs.h. */
5464_ACEOF
5465cat confdefs.h >>conftest.$ac_ext
5466cat >>conftest.$ac_ext <<_ACEOF
5467/* end confdefs.h. */
5468#include <stdlib.h>
5469
5470_ACEOF
5471if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5472 $EGREP "free" >/dev/null 2>&1; then
5473 :
5474else
5475 ac_cv_header_stdc=no
5476fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00005477rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005478
5479fi
5480
5481if test $ac_cv_header_stdc = yes; then
5482 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5483 if test "$cross_compiling" = yes; then
5484 :
5485else
5486 cat >conftest.$ac_ext <<_ACEOF
5487/* confdefs.h. */
5488_ACEOF
5489cat confdefs.h >>conftest.$ac_ext
5490cat >>conftest.$ac_ext <<_ACEOF
5491/* end confdefs.h. */
5492#include <ctype.h>
5493#include <stdlib.h>
5494#if ((' ' & 0x0FF) == 0x020)
5495# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5496# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5497#else
5498# define ISLOWER(c) \
5499 (('a' <= (c) && (c) <= 'i') \
5500 || ('j' <= (c) && (c) <= 'r') \
5501 || ('s' <= (c) && (c) <= 'z'))
5502# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5503#endif
5504
5505#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5506int
5507main ()
5508{
5509 int i;
5510 for (i = 0; i < 256; i++)
5511 if (XOR (islower (i), ISLOWER (i))
5512 || toupper (i) != TOUPPER (i))
5513 return 2;
5514 return 0;
5515}
5516_ACEOF
5517rm -f conftest$ac_exeext
5518if { (ac_try="$ac_link"
5519case "(($ac_try" in
5520 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5521 *) ac_try_echo=$ac_try;;
5522esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005523eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005524 (eval "$ac_link") 2>&5
5525 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005527 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5528 { (case "(($ac_try" in
5529 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5530 *) ac_try_echo=$ac_try;;
5531esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005532eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005533 (eval "$ac_try") 2>&5
5534 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005536 (exit $ac_status); }; }; then
5537 :
5538else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005539 echo "$as_me: program exited with status $ac_status" >&5
5540echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005541sed 's/^/| /' conftest.$ac_ext >&5
5542
5543( exit $ac_status )
5544ac_cv_header_stdc=no
5545fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005546rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5547fi
5548
5549
5550fi
5551fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005552{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5553echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005554if test $ac_cv_header_stdc = yes; then
5555
5556cat >>confdefs.h <<\_ACEOF
5557#define STDC_HEADERS 1
5558_ACEOF
5559
5560fi
5561
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005562# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5573 inttypes.h stdint.h unistd.h
5574do
5575as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5576{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5577echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5578if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5579 echo $ECHO_N "(cached) $ECHO_C" >&6
5580else
5581 cat >conftest.$ac_ext <<_ACEOF
5582/* confdefs.h. */
5583_ACEOF
5584cat confdefs.h >>conftest.$ac_ext
5585cat >>conftest.$ac_ext <<_ACEOF
5586/* end confdefs.h. */
5587$ac_includes_default
5588
5589#include <$ac_header>
5590_ACEOF
5591rm -f conftest.$ac_objext
5592if { (ac_try="$ac_compile"
5593case "(($ac_try" in
5594 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5595 *) ac_try_echo=$ac_try;;
5596esac
5597eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5598 (eval "$ac_compile") 2>conftest.er1
5599 ac_status=$?
5600 grep -v '^ *+' conftest.er1 >conftest.err
5601 rm -f conftest.er1
5602 cat conftest.err >&5
5603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5604 (exit $ac_status); } && {
5605 test -z "$ac_c_werror_flag" ||
5606 test ! -s conftest.err
5607 } && test -s conftest.$ac_objext; then
5608 eval "$as_ac_Header=yes"
5609else
5610 echo "$as_me: failed program was:" >&5
5611sed 's/^/| /' conftest.$ac_ext >&5
5612
5613 eval "$as_ac_Header=no"
5614fi
5615
5616rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5617fi
5618ac_res=`eval echo '${'$as_ac_Header'}'`
5619 { echo "$as_me:$LINENO: result: $ac_res" >&5
5620echo "${ECHO_T}$ac_res" >&6; }
5621if test `eval echo '${'$as_ac_Header'}'` = yes; then
5622 cat >>confdefs.h <<_ACEOF
5623#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5624_ACEOF
5625
5626fi
5627
5628done
5629
5630
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005631
Martin v. Löwis11437992002-04-12 09:54:03 +00005632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
Anthony Baxter8a560de2004-10-13 15:30:56 +00005667
Martin v. Löwisc3001752005-01-23 09:27:24 +00005668
Martin v. Löwis11017b12006-01-14 18:12:57 +00005669
Thomas Wouters477c8d52006-05-27 19:21:47 +00005670
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005671
5672
5673
5674
5675
5676
5677
5678
Thomas Wouters89f507f2006-12-13 04:49:30 +00005679
Christian Heimes043d6f62008-01-07 17:19:16 +00005680
Christian Heimes4fbc72b2008-03-22 00:47:35 +00005681
5682
Christian Heimesbbe741d2008-03-28 10:53:29 +00005683
Benjamin Petersonde9c8692008-07-01 18:23:09 +00005684
Ronald Oussoren755740f2010-02-07 19:56:39 +00005685
5686
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005687for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5688fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00005689ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00005690shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005691unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00005692sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
5693sys/lock.h sys/mkdev.h sys/modem.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005694sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Benjamin Petersonde9c8692008-07-01 18:23:09 +00005695sys/termio.h sys/time.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005696sys/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 +00005697sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00005698bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00005699do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005700as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005701if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005702 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5703echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005704if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005705 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005706fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005707ac_res=`eval echo '${'$as_ac_Header'}'`
5708 { echo "$as_me:$LINENO: result: $ac_res" >&5
5709echo "${ECHO_T}$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005710else
Martin v. Löwis11437992002-04-12 09:54:03 +00005711 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005712{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5713echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005714cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005715/* confdefs.h. */
5716_ACEOF
5717cat confdefs.h >>conftest.$ac_ext
5718cat >>conftest.$ac_ext <<_ACEOF
5719/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005720$ac_includes_default
5721#include <$ac_header>
5722_ACEOF
5723rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005724if { (ac_try="$ac_compile"
5725case "(($ac_try" in
5726 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5727 *) ac_try_echo=$ac_try;;
5728esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005729eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005730 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005731 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005732 grep -v '^ *+' conftest.er1 >conftest.err
5733 rm -f conftest.er1
5734 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005736 (exit $ac_status); } && {
5737 test -z "$ac_c_werror_flag" ||
5738 test ! -s conftest.err
5739 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005740 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00005741else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005742 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005743sed 's/^/| /' conftest.$ac_ext >&5
5744
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005745 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005746fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005747
5748rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005749{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5750echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005751
5752# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005753{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5754echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005755cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005756/* confdefs.h. */
5757_ACEOF
5758cat confdefs.h >>conftest.$ac_ext
5759cat >>conftest.$ac_ext <<_ACEOF
5760/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005761#include <$ac_header>
5762_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005763if { (ac_try="$ac_cpp conftest.$ac_ext"
5764case "(($ac_try" in
5765 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5766 *) ac_try_echo=$ac_try;;
5767esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005768eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005769 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005770 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005771 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00005772 rm -f conftest.er1
5773 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005775 (exit $ac_status); } >/dev/null && {
5776 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5777 test ! -s conftest.err
5778 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005779 ac_header_preproc=yes
5780else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005781 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005782sed 's/^/| /' conftest.$ac_ext >&5
5783
Martin v. Löwis11437992002-04-12 09:54:03 +00005784 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00005785fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005786
Martin v. Löwis11437992002-04-12 09:54:03 +00005787rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005788{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5789echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005790
5791# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005792case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5793 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005794 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5795echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
5796 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5797echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005798 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005799 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005800 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005801 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5802echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
5803 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5804echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5805 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5806echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5807 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5808echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
5809 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5810echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5811 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5812echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005813 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00005814## -------------------------------------- ##
5815## Report this to http://bugs.python.org/ ##
5816## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005817_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005818 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005819 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00005820esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005821{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5822echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005823if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005824 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005825else
Skip Montanarof0d5f792004-08-15 14:08:23 +00005826 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005827fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005828ac_res=`eval echo '${'$as_ac_Header'}'`
5829 { echo "$as_me:$LINENO: result: $ac_res" >&5
5830echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005831
5832fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005833if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005834 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005835#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005836_ACEOF
5837
5838fi
5839
Guido van Rossum627b2d71993-12-24 10:39:16 +00005840done
5841
Martin v. Löwis11437992002-04-12 09:54:03 +00005842
5843
5844
5845
5846
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005847ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005848for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005849 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
5850{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5851echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005852if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005853 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005854else
Martin v. Löwis11437992002-04-12 09:54:03 +00005855 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005856/* confdefs.h. */
5857_ACEOF
5858cat confdefs.h >>conftest.$ac_ext
5859cat >>conftest.$ac_ext <<_ACEOF
5860/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005861#include <sys/types.h>
5862#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00005863
Martin v. Löwis11437992002-04-12 09:54:03 +00005864int
5865main ()
5866{
5867if ((DIR *) 0)
5868return 0;
5869 ;
5870 return 0;
5871}
5872_ACEOF
5873rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005874if { (ac_try="$ac_compile"
5875case "(($ac_try" in
5876 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5877 *) ac_try_echo=$ac_try;;
5878esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005879eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005880 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005881 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005882 grep -v '^ *+' conftest.er1 >conftest.err
5883 rm -f conftest.er1
5884 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005886 (exit $ac_status); } && {
5887 test -z "$ac_c_werror_flag" ||
5888 test ! -s conftest.err
5889 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005890 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00005891else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005892 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005893sed 's/^/| /' conftest.$ac_ext >&5
5894
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005895 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005896fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005897
5898rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005899fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005900ac_res=`eval echo '${'$as_ac_Header'}'`
5901 { echo "$as_me:$LINENO: result: $ac_res" >&5
5902echo "${ECHO_T}$ac_res" >&6; }
5903if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005904 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005905#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005906_ACEOF
5907
5908ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00005909fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005910
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005911done
5912# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5913if test $ac_header_dirent = dirent.h; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005914 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5915echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005916if test "${ac_cv_search_opendir+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005917 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005918else
Martin v. Löwis11437992002-04-12 09:54:03 +00005919 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005920cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005921/* confdefs.h. */
5922_ACEOF
5923cat confdefs.h >>conftest.$ac_ext
5924cat >>conftest.$ac_ext <<_ACEOF
5925/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005926
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005927/* Override any GCC internal prototype to avoid an error.
5928 Use char because int might match the return type of a GCC
5929 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005930#ifdef __cplusplus
5931extern "C"
5932#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005933char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005934int
5935main ()
5936{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005937return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005938 ;
5939 return 0;
5940}
5941_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005942for ac_lib in '' dir; do
5943 if test -z "$ac_lib"; then
5944 ac_res="none required"
5945 else
5946 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005947 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005948 fi
5949 rm -f conftest.$ac_objext conftest$ac_exeext
5950if { (ac_try="$ac_link"
5951case "(($ac_try" in
5952 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5953 *) ac_try_echo=$ac_try;;
5954esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005955eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005956 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005957 ac_status=$?
5958 grep -v '^ *+' conftest.er1 >conftest.err
5959 rm -f conftest.er1
5960 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005962 (exit $ac_status); } && {
5963 test -z "$ac_c_werror_flag" ||
5964 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005965 } && test -s conftest$ac_exeext &&
5966 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005967 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00005968else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005969 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005970sed 's/^/| /' conftest.$ac_ext >&5
5971
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005972
Thomas Wouters477c8d52006-05-27 19:21:47 +00005973fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005974
5975rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5976 conftest$ac_exeext
5977 if test "${ac_cv_search_opendir+set}" = set; then
5978 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005979fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005980done
5981if test "${ac_cv_search_opendir+set}" = set; then
5982 :
5983else
5984 ac_cv_search_opendir=no
5985fi
5986rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005987LIBS=$ac_func_search_save_LIBS
5988fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005989{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5990echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005991ac_res=$ac_cv_search_opendir
5992if test "$ac_res" != no; then
5993 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005994
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005995fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005996
Michael W. Hudson54241132001-12-07 15:38:26 +00005997else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005998 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5999echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006000if test "${ac_cv_search_opendir+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006001 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006002else
6003 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00006004cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006005/* confdefs.h. */
6006_ACEOF
6007cat confdefs.h >>conftest.$ac_ext
6008cat >>conftest.$ac_ext <<_ACEOF
6009/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006010
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006011/* Override any GCC internal prototype to avoid an error.
6012 Use char because int might match the return type of a GCC
6013 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006014#ifdef __cplusplus
6015extern "C"
6016#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006017char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006018int
6019main ()
6020{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006021return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006022 ;
6023 return 0;
6024}
6025_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006026for ac_lib in '' x; do
6027 if test -z "$ac_lib"; then
6028 ac_res="none required"
6029 else
6030 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006031 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006032 fi
6033 rm -f conftest.$ac_objext conftest$ac_exeext
6034if { (ac_try="$ac_link"
6035case "(($ac_try" in
6036 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6037 *) ac_try_echo=$ac_try;;
6038esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006039eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006040 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006041 ac_status=$?
6042 grep -v '^ *+' conftest.er1 >conftest.err
6043 rm -f conftest.er1
6044 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006046 (exit $ac_status); } && {
6047 test -z "$ac_c_werror_flag" ||
6048 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006049 } && test -s conftest$ac_exeext &&
6050 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006051 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006052else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006053 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006054sed 's/^/| /' conftest.$ac_ext >&5
6055
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006056
Thomas Wouters477c8d52006-05-27 19:21:47 +00006057fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006058
6059rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6060 conftest$ac_exeext
6061 if test "${ac_cv_search_opendir+set}" = set; then
6062 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006063fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006064done
6065if test "${ac_cv_search_opendir+set}" = set; then
6066 :
6067else
6068 ac_cv_search_opendir=no
6069fi
6070rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006071LIBS=$ac_func_search_save_LIBS
6072fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006073{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
6074echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006075ac_res=$ac_cv_search_opendir
6076if test "$ac_res" != no; then
6077 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006078
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006079fi
6080
6081fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006082
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006083{ echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
6084echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006085if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006086 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006087else
6088 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006089/* confdefs.h. */
6090_ACEOF
6091cat confdefs.h >>conftest.$ac_ext
6092cat >>conftest.$ac_ext <<_ACEOF
6093/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006094#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006095int
6096main ()
6097{
6098return makedev(0, 0);
6099 ;
6100 return 0;
6101}
6102_ACEOF
6103rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006104if { (ac_try="$ac_link"
6105case "(($ac_try" in
6106 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6107 *) ac_try_echo=$ac_try;;
6108esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006109eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006110 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006111 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006112 grep -v '^ *+' conftest.er1 >conftest.err
6113 rm -f conftest.er1
6114 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006116 (exit $ac_status); } && {
6117 test -z "$ac_c_werror_flag" ||
6118 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006119 } && test -s conftest$ac_exeext &&
6120 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006121 ac_cv_header_sys_types_h_makedev=yes
6122else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006123 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006124sed 's/^/| /' conftest.$ac_ext >&5
6125
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006126 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006127fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006128
6129rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006130 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006131
6132fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006133{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
6134echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006135
6136if test $ac_cv_header_sys_types_h_makedev = no; then
6137if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006138 { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6139echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006140if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006141 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006142fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006143{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6144echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006145else
6146 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006147{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
6148echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006149cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006150/* confdefs.h. */
6151_ACEOF
6152cat confdefs.h >>conftest.$ac_ext
6153cat >>conftest.$ac_ext <<_ACEOF
6154/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006155$ac_includes_default
6156#include <sys/mkdev.h>
6157_ACEOF
6158rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006159if { (ac_try="$ac_compile"
6160case "(($ac_try" in
6161 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6162 *) ac_try_echo=$ac_try;;
6163esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006164eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006165 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006166 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006167 grep -v '^ *+' conftest.er1 >conftest.err
6168 rm -f conftest.er1
6169 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006171 (exit $ac_status); } && {
6172 test -z "$ac_c_werror_flag" ||
6173 test ! -s conftest.err
6174 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006175 ac_header_compiler=yes
6176else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006177 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006178sed 's/^/| /' conftest.$ac_ext >&5
6179
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006180 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006181fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006182
6183rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006184{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6185echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006186
6187# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006188{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
6189echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006190cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006191/* confdefs.h. */
6192_ACEOF
6193cat confdefs.h >>conftest.$ac_ext
6194cat >>conftest.$ac_ext <<_ACEOF
6195/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006196#include <sys/mkdev.h>
6197_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006198if { (ac_try="$ac_cpp conftest.$ac_ext"
6199case "(($ac_try" in
6200 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6201 *) ac_try_echo=$ac_try;;
6202esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006203eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006204 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006205 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006206 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006207 rm -f conftest.er1
6208 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006210 (exit $ac_status); } >/dev/null && {
6211 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6212 test ! -s conftest.err
6213 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006214 ac_header_preproc=yes
6215else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006216 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006217sed 's/^/| /' conftest.$ac_ext >&5
6218
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006219 ac_header_preproc=no
6220fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006221
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006222rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006223{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6224echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006225
6226# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006227case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6228 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006229 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
6230echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6231 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
6232echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006233 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006234 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006235 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006236 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
6237echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
6238 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
6239echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
6240 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
6241echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
6242 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
6243echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
6244 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
6245echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
6246 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
6247echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006248 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00006249## -------------------------------------- ##
6250## Report this to http://bugs.python.org/ ##
6251## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006252_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006253 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006254 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006255esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006256{ echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6257echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006258if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006259 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006260else
6261 ac_cv_header_sys_mkdev_h=$ac_header_preproc
6262fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006263{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6264echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006265
6266fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006267if test $ac_cv_header_sys_mkdev_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006268
6269cat >>confdefs.h <<\_ACEOF
6270#define MAJOR_IN_MKDEV 1
6271_ACEOF
6272
6273fi
6274
6275
6276
6277 if test $ac_cv_header_sys_mkdev_h = no; then
6278 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006279 { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6280echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006281if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006282 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006283fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006284{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6285echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006286else
6287 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006288{ echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6289echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006290cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006291/* confdefs.h. */
6292_ACEOF
6293cat confdefs.h >>conftest.$ac_ext
6294cat >>conftest.$ac_ext <<_ACEOF
6295/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006296$ac_includes_default
6297#include <sys/sysmacros.h>
6298_ACEOF
6299rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006300if { (ac_try="$ac_compile"
6301case "(($ac_try" in
6302 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6303 *) ac_try_echo=$ac_try;;
6304esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006305eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006306 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006307 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006308 grep -v '^ *+' conftest.er1 >conftest.err
6309 rm -f conftest.er1
6310 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006312 (exit $ac_status); } && {
6313 test -z "$ac_c_werror_flag" ||
6314 test ! -s conftest.err
6315 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006316 ac_header_compiler=yes
6317else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006318 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006319sed 's/^/| /' conftest.$ac_ext >&5
6320
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006321 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006322fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006323
6324rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006325{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6326echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006327
6328# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006329{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6330echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006331cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006332/* confdefs.h. */
6333_ACEOF
6334cat confdefs.h >>conftest.$ac_ext
6335cat >>conftest.$ac_ext <<_ACEOF
6336/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006337#include <sys/sysmacros.h>
6338_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006339if { (ac_try="$ac_cpp conftest.$ac_ext"
6340case "(($ac_try" in
6341 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6342 *) ac_try_echo=$ac_try;;
6343esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006344eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006345 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006346 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006347 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006348 rm -f conftest.er1
6349 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006351 (exit $ac_status); } >/dev/null && {
6352 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6353 test ! -s conftest.err
6354 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006355 ac_header_preproc=yes
6356else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006357 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006358sed 's/^/| /' conftest.$ac_ext >&5
6359
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006360 ac_header_preproc=no
6361fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006362
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006363rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006364{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6365echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006366
6367# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006368case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6369 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006370 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6371echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6372 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6373echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006374 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006375 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006376 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006377 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6378echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
6379 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6380echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6381 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6382echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6383 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6384echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
6385 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6386echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
6387 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6388echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006389 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00006390## -------------------------------------- ##
6391## Report this to http://bugs.python.org/ ##
6392## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006393_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006394 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006395 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006396esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006397{ echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6398echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006399if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006400 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006401else
6402 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6403fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006404{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6405echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006406
6407fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006408if test $ac_cv_header_sys_sysmacros_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006409
6410cat >>confdefs.h <<\_ACEOF
6411#define MAJOR_IN_SYSMACROS 1
6412_ACEOF
6413
6414fi
6415
6416
6417 fi
6418fi
6419
Michael W. Hudson54241132001-12-07 15:38:26 +00006420
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006421# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006422
6423for ac_header in term.h
6424do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006425as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6426{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6427echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006428if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006429 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006430else
6431 cat >conftest.$ac_ext <<_ACEOF
6432/* confdefs.h. */
6433_ACEOF
6434cat confdefs.h >>conftest.$ac_ext
6435cat >>conftest.$ac_ext <<_ACEOF
6436/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006437
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006438#ifdef HAVE_CURSES_H
6439#include <curses.h>
6440#endif
6441
6442
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006443#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006444_ACEOF
6445rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006446if { (ac_try="$ac_compile"
6447case "(($ac_try" in
6448 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6449 *) ac_try_echo=$ac_try;;
6450esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006451eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006452 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006453 ac_status=$?
6454 grep -v '^ *+' conftest.er1 >conftest.err
6455 rm -f conftest.er1
6456 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006458 (exit $ac_status); } && {
6459 test -z "$ac_c_werror_flag" ||
6460 test ! -s conftest.err
6461 } && test -s conftest.$ac_objext; then
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006462 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006463else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006464 echo "$as_me: failed program was:" >&5
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006465sed 's/^/| /' conftest.$ac_ext >&5
6466
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006467 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006468fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006469
6470rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006471fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006472ac_res=`eval echo '${'$as_ac_Header'}'`
6473 { echo "$as_me:$LINENO: result: $ac_res" >&5
6474echo "${ECHO_T}$ac_res" >&6; }
6475if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006476 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006477#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006478_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006479
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006480fi
6481
6482done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006483
6484
Martin v. Löwis11017b12006-01-14 18:12:57 +00006485# On Linux, netlink.h requires asm/types.h
6486
6487for ac_header in linux/netlink.h
6488do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006489as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6490{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6491echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006492if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006493 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11017b12006-01-14 18:12:57 +00006494else
6495 cat >conftest.$ac_ext <<_ACEOF
6496/* confdefs.h. */
6497_ACEOF
6498cat confdefs.h >>conftest.$ac_ext
6499cat >>conftest.$ac_ext <<_ACEOF
6500/* end confdefs.h. */
6501
6502#ifdef HAVE_ASM_TYPES_H
6503#include <asm/types.h>
6504#endif
6505#ifdef HAVE_SYS_SOCKET_H
6506#include <sys/socket.h>
6507#endif
6508
6509
6510#include <$ac_header>
6511_ACEOF
6512rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006513if { (ac_try="$ac_compile"
6514case "(($ac_try" in
6515 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6516 *) ac_try_echo=$ac_try;;
6517esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006518eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006519 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006520 ac_status=$?
6521 grep -v '^ *+' conftest.er1 >conftest.err
6522 rm -f conftest.er1
6523 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006525 (exit $ac_status); } && {
6526 test -z "$ac_c_werror_flag" ||
6527 test ! -s conftest.err
6528 } && test -s conftest.$ac_objext; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006529 eval "$as_ac_Header=yes"
6530else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006531 echo "$as_me: failed program was:" >&5
Martin v. Löwis11017b12006-01-14 18:12:57 +00006532sed 's/^/| /' conftest.$ac_ext >&5
6533
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006534 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00006535fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006536
6537rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00006538fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006539ac_res=`eval echo '${'$as_ac_Header'}'`
6540 { echo "$as_me:$LINENO: result: $ac_res" >&5
6541echo "${ECHO_T}$ac_res" >&6; }
6542if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006543 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006544#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006545_ACEOF
6546
6547fi
6548
6549done
6550
6551
Guido van Rossum627b2d71993-12-24 10:39:16 +00006552# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006553was_it_defined=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006554{ echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
6555echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006556cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006557/* confdefs.h. */
6558_ACEOF
6559cat confdefs.h >>conftest.$ac_ext
6560cat >>conftest.$ac_ext <<_ACEOF
6561/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006562#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006563
6564_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006565if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006566 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006567 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006568else
Martin v. Löwis11437992002-04-12 09:54:03 +00006569
6570
6571cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006572#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00006573_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006574
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006575
Guido van Rossum627b2d71993-12-24 10:39:16 +00006576fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00006577rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006578
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006579{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
6580echo "${ECHO_T}$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006581
Neal Norwitz11690112002-07-30 01:08:28 +00006582# Check whether using makedev requires defining _OSF_SOURCE
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006583{ echo "$as_me:$LINENO: checking for makedev" >&5
6584echo $ECHO_N "checking for makedev... $ECHO_C" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006585cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006586/* confdefs.h. */
6587_ACEOF
6588cat confdefs.h >>conftest.$ac_ext
6589cat >>conftest.$ac_ext <<_ACEOF
6590/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006591#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006592int
6593main ()
6594{
6595 makedev(0, 0)
6596 ;
6597 return 0;
6598}
6599_ACEOF
6600rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006601if { (ac_try="$ac_link"
6602case "(($ac_try" in
6603 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6604 *) ac_try_echo=$ac_try;;
6605esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006606eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006607 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006608 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006609 grep -v '^ *+' conftest.er1 >conftest.err
6610 rm -f conftest.er1
6611 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006613 (exit $ac_status); } && {
6614 test -z "$ac_c_werror_flag" ||
6615 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006616 } && test -s conftest$ac_exeext &&
6617 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006618 ac_cv_has_makedev=yes
6619else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006620 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006621sed 's/^/| /' conftest.$ac_ext >&5
6622
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006623 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006624fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006625
6626rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006627 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006628if test "$ac_cv_has_makedev" = "no"; then
6629 # we didn't link, try if _OSF_SOURCE will allow us to link
6630 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006631/* confdefs.h. */
6632_ACEOF
6633cat confdefs.h >>conftest.$ac_ext
6634cat >>conftest.$ac_ext <<_ACEOF
6635/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006636
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006637#define _OSF_SOURCE 1
6638#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006639
Neal Norwitz11690112002-07-30 01:08:28 +00006640int
6641main ()
6642{
6643 makedev(0, 0)
6644 ;
6645 return 0;
6646}
6647_ACEOF
6648rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006649if { (ac_try="$ac_link"
6650case "(($ac_try" in
6651 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6652 *) ac_try_echo=$ac_try;;
6653esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006654eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006655 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006656 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006657 grep -v '^ *+' conftest.er1 >conftest.err
6658 rm -f conftest.er1
6659 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006661 (exit $ac_status); } && {
6662 test -z "$ac_c_werror_flag" ||
6663 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006664 } && test -s conftest$ac_exeext &&
6665 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006666 ac_cv_has_makedev=yes
6667else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006668 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006669sed 's/^/| /' conftest.$ac_ext >&5
6670
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006671 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006672fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006673
6674rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006675 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006676 if test "$ac_cv_has_makedev" = "yes"; then
6677
6678cat >>confdefs.h <<\_ACEOF
6679#define _OSF_SOURCE 1
6680_ACEOF
6681
6682 fi
6683fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006684{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
6685echo "${ECHO_T}$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006686if test "$ac_cv_has_makedev" = "yes"; then
6687
6688cat >>confdefs.h <<\_ACEOF
6689#define HAVE_MAKEDEV 1
6690_ACEOF
6691
6692fi
6693
Martin v. Löwis399a6892002-10-04 10:22:02 +00006694# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6695# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6696# defined, but the compiler does not support pragma redefine_extname,
6697# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6698# structures (such as rlimit64) without declaring them. As a
6699# work-around, disable LFS on such configurations
6700
6701use_lfs=yes
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006702{ echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
6703echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006704cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006705/* confdefs.h. */
6706_ACEOF
6707cat confdefs.h >>conftest.$ac_ext
6708cat >>conftest.$ac_ext <<_ACEOF
6709/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006710
6711#define _LARGEFILE_SOURCE 1
6712#define _FILE_OFFSET_BITS 64
6713#include <sys/resource.h>
6714
Martin v. Löwis399a6892002-10-04 10:22:02 +00006715int
6716main ()
6717{
6718struct rlimit foo;
6719 ;
6720 return 0;
6721}
6722_ACEOF
6723rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006724if { (ac_try="$ac_compile"
6725case "(($ac_try" in
6726 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6727 *) ac_try_echo=$ac_try;;
6728esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006729eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006730 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00006731 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006732 grep -v '^ *+' conftest.er1 >conftest.err
6733 rm -f conftest.er1
6734 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006736 (exit $ac_status); } && {
6737 test -z "$ac_c_werror_flag" ||
6738 test ! -s conftest.err
6739 } && test -s conftest.$ac_objext; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00006740 sol_lfs_bug=no
6741else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006742 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006743sed 's/^/| /' conftest.$ac_ext >&5
6744
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006745 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006746fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006747
6748rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006749{ echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
6750echo "${ECHO_T}$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006751if test "$sol_lfs_bug" = "yes"; then
6752 use_lfs=no
6753fi
6754
6755if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006756# Two defines needed to enable largefile support on various platforms
6757# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006758
Martin v. Löwis11437992002-04-12 09:54:03 +00006759cat >>confdefs.h <<\_ACEOF
6760#define _LARGEFILE_SOURCE 1
6761_ACEOF
6762
6763
6764cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006765#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00006766_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006767
Martin v. Löwis399a6892002-10-04 10:22:02 +00006768fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006769
Guido van Rossum84e7b241996-08-19 21:59:00 +00006770# Add some code to confdefs.h so that the test for off_t works on SCO
6771cat >> confdefs.h <<\EOF
6772#if defined(SCO_DS)
6773#undef _OFF_T
6774#endif
6775EOF
6776
Guido van Rossumef2255b2000-03-10 22:30:29 +00006777# Type availability checks
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006778{ echo "$as_me:$LINENO: checking for mode_t" >&5
6779echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006780if test "${ac_cv_type_mode_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006781 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006782else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006783 cat >conftest.$ac_ext <<_ACEOF
6784/* confdefs.h. */
6785_ACEOF
6786cat confdefs.h >>conftest.$ac_ext
6787cat >>conftest.$ac_ext <<_ACEOF
6788/* end confdefs.h. */
6789$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006790typedef mode_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006791int
6792main ()
6793{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006794if ((ac__type_new_ *) 0)
6795 return 0;
6796if (sizeof (ac__type_new_))
6797 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006798 ;
6799 return 0;
6800}
6801_ACEOF
6802rm -f conftest.$ac_objext
6803if { (ac_try="$ac_compile"
6804case "(($ac_try" in
6805 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6806 *) ac_try_echo=$ac_try;;
6807esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006808eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006809 (eval "$ac_compile") 2>conftest.er1
6810 ac_status=$?
6811 grep -v '^ *+' conftest.er1 >conftest.err
6812 rm -f conftest.er1
6813 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006815 (exit $ac_status); } && {
6816 test -z "$ac_c_werror_flag" ||
6817 test ! -s conftest.err
6818 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006819 ac_cv_type_mode_t=yes
Jack Jansendd19cf82001-12-06 22:36:17 +00006820else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006821 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006822sed 's/^/| /' conftest.$ac_ext >&5
6823
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006824 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00006825fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006826
6827rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006828fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006829{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
6830echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
6831if test $ac_cv_type_mode_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006832 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006833else
Martin v. Löwis11437992002-04-12 09:54:03 +00006834
6835cat >>confdefs.h <<_ACEOF
6836#define mode_t int
6837_ACEOF
6838
6839fi
6840
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006841{ echo "$as_me:$LINENO: checking for off_t" >&5
6842echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006843if test "${ac_cv_type_off_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006844 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006845else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006846 cat >conftest.$ac_ext <<_ACEOF
6847/* confdefs.h. */
6848_ACEOF
6849cat confdefs.h >>conftest.$ac_ext
6850cat >>conftest.$ac_ext <<_ACEOF
6851/* end confdefs.h. */
6852$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006853typedef off_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006854int
6855main ()
6856{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006857if ((ac__type_new_ *) 0)
6858 return 0;
6859if (sizeof (ac__type_new_))
6860 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006861 ;
6862 return 0;
6863}
6864_ACEOF
6865rm -f conftest.$ac_objext
6866if { (ac_try="$ac_compile"
6867case "(($ac_try" in
6868 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6869 *) ac_try_echo=$ac_try;;
6870esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006871eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006872 (eval "$ac_compile") 2>conftest.er1
6873 ac_status=$?
6874 grep -v '^ *+' conftest.er1 >conftest.err
6875 rm -f conftest.er1
6876 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006877 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006878 (exit $ac_status); } && {
6879 test -z "$ac_c_werror_flag" ||
6880 test ! -s conftest.err
6881 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006882 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006883else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006884 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006885sed 's/^/| /' conftest.$ac_ext >&5
6886
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006887 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006888fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006889
6890rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006891fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006892{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6893echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
6894if test $ac_cv_type_off_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006895 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006896else
Martin v. Löwis11437992002-04-12 09:54:03 +00006897
6898cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006899#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006900_ACEOF
6901
6902fi
6903
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006904{ echo "$as_me:$LINENO: checking for pid_t" >&5
6905echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006906if test "${ac_cv_type_pid_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006907 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006908else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006909 cat >conftest.$ac_ext <<_ACEOF
6910/* confdefs.h. */
6911_ACEOF
6912cat confdefs.h >>conftest.$ac_ext
6913cat >>conftest.$ac_ext <<_ACEOF
6914/* end confdefs.h. */
6915$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006916typedef pid_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006917int
6918main ()
6919{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006920if ((ac__type_new_ *) 0)
6921 return 0;
6922if (sizeof (ac__type_new_))
6923 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006924 ;
6925 return 0;
6926}
6927_ACEOF
6928rm -f conftest.$ac_objext
6929if { (ac_try="$ac_compile"
6930case "(($ac_try" in
6931 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6932 *) ac_try_echo=$ac_try;;
6933esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006934eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006935 (eval "$ac_compile") 2>conftest.er1
6936 ac_status=$?
6937 grep -v '^ *+' conftest.er1 >conftest.err
6938 rm -f conftest.er1
6939 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006941 (exit $ac_status); } && {
6942 test -z "$ac_c_werror_flag" ||
6943 test ! -s conftest.err
6944 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006945 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006946else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006947 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006948sed 's/^/| /' conftest.$ac_ext >&5
6949
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006950 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006951fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006952
6953rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006954fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006955{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
6956echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
6957if test $ac_cv_type_pid_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006958 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006959else
Martin v. Löwis11437992002-04-12 09:54:03 +00006960
6961cat >>confdefs.h <<_ACEOF
6962#define pid_t int
6963_ACEOF
6964
6965fi
6966
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006967{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
6968echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006969if test "${ac_cv_type_signal+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006970 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006971else
6972 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006973/* confdefs.h. */
6974_ACEOF
6975cat confdefs.h >>conftest.$ac_ext
6976cat >>conftest.$ac_ext <<_ACEOF
6977/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00006978#include <sys/types.h>
6979#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006980
Martin v. Löwis11437992002-04-12 09:54:03 +00006981int
6982main ()
6983{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006984return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00006985 ;
6986 return 0;
6987}
6988_ACEOF
6989rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006990if { (ac_try="$ac_compile"
6991case "(($ac_try" in
6992 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6993 *) ac_try_echo=$ac_try;;
6994esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006995eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006996 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006997 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006998 grep -v '^ *+' conftest.er1 >conftest.err
6999 rm -f conftest.er1
7000 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007001 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007002 (exit $ac_status); } && {
7003 test -z "$ac_c_werror_flag" ||
7004 test ! -s conftest.err
7005 } && test -s conftest.$ac_objext; then
7006 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00007007else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007008 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007009sed 's/^/| /' conftest.$ac_ext >&5
7010
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007011 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00007012fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007013
7014rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007015fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007016{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
7017echo "${ECHO_T}$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007018
Martin v. Löwis11437992002-04-12 09:54:03 +00007019cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007020#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00007021_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007022
Michael W. Hudson54241132001-12-07 15:38:26 +00007023
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007024{ echo "$as_me:$LINENO: checking for size_t" >&5
7025echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007026if test "${ac_cv_type_size_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007027 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007028else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007029 cat >conftest.$ac_ext <<_ACEOF
7030/* confdefs.h. */
7031_ACEOF
7032cat confdefs.h >>conftest.$ac_ext
7033cat >>conftest.$ac_ext <<_ACEOF
7034/* end confdefs.h. */
7035$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007036typedef size_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007037int
7038main ()
7039{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007040if ((ac__type_new_ *) 0)
7041 return 0;
7042if (sizeof (ac__type_new_))
7043 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007044 ;
7045 return 0;
7046}
7047_ACEOF
7048rm -f conftest.$ac_objext
7049if { (ac_try="$ac_compile"
7050case "(($ac_try" in
7051 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7052 *) ac_try_echo=$ac_try;;
7053esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007054eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007055 (eval "$ac_compile") 2>conftest.er1
7056 ac_status=$?
7057 grep -v '^ *+' conftest.er1 >conftest.err
7058 rm -f conftest.er1
7059 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007061 (exit $ac_status); } && {
7062 test -z "$ac_c_werror_flag" ||
7063 test ! -s conftest.err
7064 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007065 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007066else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007067 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007068sed 's/^/| /' conftest.$ac_ext >&5
7069
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007070 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007071fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007072
7073rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007074fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007075{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
7076echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
7077if test $ac_cv_type_size_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007078 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007079else
Martin v. Löwis11437992002-04-12 09:54:03 +00007080
7081cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007082#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007083_ACEOF
7084
7085fi
7086
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007087{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
7088echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007089if test "${ac_cv_type_uid_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007090 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007091else
7092 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007093/* confdefs.h. */
7094_ACEOF
7095cat confdefs.h >>conftest.$ac_ext
7096cat >>conftest.$ac_ext <<_ACEOF
7097/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007098#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007099
7100_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007101if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00007102 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007103 ac_cv_type_uid_t=yes
7104else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007105 ac_cv_type_uid_t=no
7106fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00007107rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007108
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007109fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007110{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
7111echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007112if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007113
Martin v. Löwis11437992002-04-12 09:54:03 +00007114cat >>confdefs.h <<\_ACEOF
7115#define uid_t int
7116_ACEOF
7117
7118
7119cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007120#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00007121_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007122
7123fi
7124
Mark Dickinsonbd792642009-03-18 20:06:12 +00007125
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007126 { echo "$as_me:$LINENO: checking for uint32_t" >&5
7127echo $ECHO_N "checking for uint32_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007128if test "${ac_cv_c_uint32_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007129 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007130else
7131 ac_cv_c_uint32_t=no
7132 for ac_type in 'uint32_t' 'unsigned int' 'unsigned long int' \
7133 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7134 cat >conftest.$ac_ext <<_ACEOF
7135/* confdefs.h. */
7136_ACEOF
7137cat confdefs.h >>conftest.$ac_ext
7138cat >>conftest.$ac_ext <<_ACEOF
7139/* end confdefs.h. */
7140$ac_includes_default
7141int
7142main ()
7143{
7144static int test_array [1 - 2 * !(($ac_type) -1 >> (32 - 1) == 1)];
7145test_array [0] = 0
7146
7147 ;
7148 return 0;
7149}
7150_ACEOF
7151rm -f conftest.$ac_objext
7152if { (ac_try="$ac_compile"
7153case "(($ac_try" in
7154 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7155 *) ac_try_echo=$ac_try;;
7156esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007157eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007158 (eval "$ac_compile") 2>conftest.er1
7159 ac_status=$?
7160 grep -v '^ *+' conftest.er1 >conftest.err
7161 rm -f conftest.er1
7162 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007163 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007164 (exit $ac_status); } && {
7165 test -z "$ac_c_werror_flag" ||
7166 test ! -s conftest.err
7167 } && test -s conftest.$ac_objext; then
7168 case $ac_type in
7169 uint32_t) ac_cv_c_uint32_t=yes ;;
7170 *) ac_cv_c_uint32_t=$ac_type ;;
7171esac
7172
7173else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007174 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007175sed 's/^/| /' conftest.$ac_ext >&5
7176
7177
7178fi
7179
7180rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7181 test "$ac_cv_c_uint32_t" != no && break
7182 done
7183fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007184{ echo "$as_me:$LINENO: result: $ac_cv_c_uint32_t" >&5
7185echo "${ECHO_T}$ac_cv_c_uint32_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007186 case $ac_cv_c_uint32_t in #(
7187 no|yes) ;; #(
7188 *)
7189
7190cat >>confdefs.h <<\_ACEOF
7191#define _UINT32_T 1
7192_ACEOF
7193
7194
7195cat >>confdefs.h <<_ACEOF
7196#define uint32_t $ac_cv_c_uint32_t
7197_ACEOF
7198;;
7199 esac
7200
7201
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007202 { echo "$as_me:$LINENO: checking for uint64_t" >&5
7203echo $ECHO_N "checking for uint64_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007204if test "${ac_cv_c_uint64_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007205 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007206else
7207 ac_cv_c_uint64_t=no
7208 for ac_type in 'uint64_t' 'unsigned int' 'unsigned long int' \
7209 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7210 cat >conftest.$ac_ext <<_ACEOF
7211/* confdefs.h. */
7212_ACEOF
7213cat confdefs.h >>conftest.$ac_ext
7214cat >>conftest.$ac_ext <<_ACEOF
7215/* end confdefs.h. */
7216$ac_includes_default
7217int
7218main ()
7219{
7220static int test_array [1 - 2 * !(($ac_type) -1 >> (64 - 1) == 1)];
7221test_array [0] = 0
7222
7223 ;
7224 return 0;
7225}
7226_ACEOF
7227rm -f conftest.$ac_objext
7228if { (ac_try="$ac_compile"
7229case "(($ac_try" in
7230 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7231 *) ac_try_echo=$ac_try;;
7232esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007233eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007234 (eval "$ac_compile") 2>conftest.er1
7235 ac_status=$?
7236 grep -v '^ *+' conftest.er1 >conftest.err
7237 rm -f conftest.er1
7238 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007240 (exit $ac_status); } && {
7241 test -z "$ac_c_werror_flag" ||
7242 test ! -s conftest.err
7243 } && test -s conftest.$ac_objext; then
7244 case $ac_type in
7245 uint64_t) ac_cv_c_uint64_t=yes ;;
7246 *) ac_cv_c_uint64_t=$ac_type ;;
7247esac
7248
7249else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007250 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007251sed 's/^/| /' conftest.$ac_ext >&5
7252
7253
7254fi
7255
7256rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7257 test "$ac_cv_c_uint64_t" != no && break
7258 done
7259fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007260{ echo "$as_me:$LINENO: result: $ac_cv_c_uint64_t" >&5
7261echo "${ECHO_T}$ac_cv_c_uint64_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007262 case $ac_cv_c_uint64_t in #(
7263 no|yes) ;; #(
7264 *)
7265
7266cat >>confdefs.h <<\_ACEOF
7267#define _UINT64_T 1
7268_ACEOF
7269
7270
7271cat >>confdefs.h <<_ACEOF
7272#define uint64_t $ac_cv_c_uint64_t
7273_ACEOF
7274;;
7275 esac
7276
7277
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007278 { echo "$as_me:$LINENO: checking for int32_t" >&5
7279echo $ECHO_N "checking for int32_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007280if test "${ac_cv_c_int32_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007281 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007282else
7283 ac_cv_c_int32_t=no
7284 for ac_type in 'int32_t' 'int' 'long int' \
7285 'long long int' 'short int' 'signed char'; do
7286 cat >conftest.$ac_ext <<_ACEOF
7287/* confdefs.h. */
7288_ACEOF
7289cat confdefs.h >>conftest.$ac_ext
7290cat >>conftest.$ac_ext <<_ACEOF
7291/* end confdefs.h. */
7292$ac_includes_default
7293int
7294main ()
7295{
7296static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1))];
7297test_array [0] = 0
7298
7299 ;
7300 return 0;
7301}
7302_ACEOF
7303rm -f conftest.$ac_objext
7304if { (ac_try="$ac_compile"
7305case "(($ac_try" in
7306 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7307 *) ac_try_echo=$ac_try;;
7308esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007309eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007310 (eval "$ac_compile") 2>conftest.er1
7311 ac_status=$?
7312 grep -v '^ *+' conftest.er1 >conftest.err
7313 rm -f conftest.er1
7314 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007316 (exit $ac_status); } && {
7317 test -z "$ac_c_werror_flag" ||
7318 test ! -s conftest.err
7319 } && test -s conftest.$ac_objext; then
7320 cat >conftest.$ac_ext <<_ACEOF
7321/* confdefs.h. */
7322_ACEOF
7323cat confdefs.h >>conftest.$ac_ext
7324cat >>conftest.$ac_ext <<_ACEOF
7325/* end confdefs.h. */
7326$ac_includes_default
7327int
7328main ()
7329{
7330static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007331 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 2))];
Mark Dickinsonbd792642009-03-18 20:06:12 +00007332test_array [0] = 0
7333
7334 ;
7335 return 0;
7336}
7337_ACEOF
7338rm -f conftest.$ac_objext
7339if { (ac_try="$ac_compile"
7340case "(($ac_try" in
7341 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7342 *) ac_try_echo=$ac_try;;
7343esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007344eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007345 (eval "$ac_compile") 2>conftest.er1
7346 ac_status=$?
7347 grep -v '^ *+' conftest.er1 >conftest.err
7348 rm -f conftest.er1
7349 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007351 (exit $ac_status); } && {
7352 test -z "$ac_c_werror_flag" ||
7353 test ! -s conftest.err
7354 } && test -s conftest.$ac_objext; then
7355 :
7356else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007357 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007358sed 's/^/| /' conftest.$ac_ext >&5
7359
7360 case $ac_type in
7361 int32_t) ac_cv_c_int32_t=yes ;;
7362 *) ac_cv_c_int32_t=$ac_type ;;
7363esac
7364
7365fi
7366
7367rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7368else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007369 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007370sed 's/^/| /' conftest.$ac_ext >&5
7371
7372
7373fi
7374
7375rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7376 test "$ac_cv_c_int32_t" != no && break
7377 done
7378fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007379{ echo "$as_me:$LINENO: result: $ac_cv_c_int32_t" >&5
7380echo "${ECHO_T}$ac_cv_c_int32_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007381 case $ac_cv_c_int32_t in #(
7382 no|yes) ;; #(
7383 *)
7384
7385cat >>confdefs.h <<_ACEOF
7386#define int32_t $ac_cv_c_int32_t
7387_ACEOF
7388;;
7389 esac
7390
7391
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007392 { echo "$as_me:$LINENO: checking for int64_t" >&5
7393echo $ECHO_N "checking for int64_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007394if test "${ac_cv_c_int64_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007395 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007396else
7397 ac_cv_c_int64_t=no
7398 for ac_type in 'int64_t' 'int' 'long int' \
7399 'long long int' 'short int' 'signed char'; do
7400 cat >conftest.$ac_ext <<_ACEOF
7401/* confdefs.h. */
7402_ACEOF
7403cat confdefs.h >>conftest.$ac_ext
7404cat >>conftest.$ac_ext <<_ACEOF
7405/* end confdefs.h. */
7406$ac_includes_default
7407int
7408main ()
7409{
7410static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1))];
7411test_array [0] = 0
7412
7413 ;
7414 return 0;
7415}
7416_ACEOF
7417rm -f conftest.$ac_objext
7418if { (ac_try="$ac_compile"
7419case "(($ac_try" in
7420 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7421 *) ac_try_echo=$ac_try;;
7422esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007423eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007424 (eval "$ac_compile") 2>conftest.er1
7425 ac_status=$?
7426 grep -v '^ *+' conftest.er1 >conftest.err
7427 rm -f conftest.er1
7428 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007430 (exit $ac_status); } && {
7431 test -z "$ac_c_werror_flag" ||
7432 test ! -s conftest.err
7433 } && test -s conftest.$ac_objext; then
7434 cat >conftest.$ac_ext <<_ACEOF
7435/* confdefs.h. */
7436_ACEOF
7437cat confdefs.h >>conftest.$ac_ext
7438cat >>conftest.$ac_ext <<_ACEOF
7439/* end confdefs.h. */
7440$ac_includes_default
7441int
7442main ()
7443{
7444static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007445 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 2))];
Mark Dickinsonbd792642009-03-18 20:06:12 +00007446test_array [0] = 0
7447
7448 ;
7449 return 0;
7450}
7451_ACEOF
7452rm -f conftest.$ac_objext
7453if { (ac_try="$ac_compile"
7454case "(($ac_try" in
7455 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7456 *) ac_try_echo=$ac_try;;
7457esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007458eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007459 (eval "$ac_compile") 2>conftest.er1
7460 ac_status=$?
7461 grep -v '^ *+' conftest.er1 >conftest.err
7462 rm -f conftest.er1
7463 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007465 (exit $ac_status); } && {
7466 test -z "$ac_c_werror_flag" ||
7467 test ! -s conftest.err
7468 } && test -s conftest.$ac_objext; then
7469 :
7470else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007471 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007472sed 's/^/| /' conftest.$ac_ext >&5
7473
7474 case $ac_type in
7475 int64_t) ac_cv_c_int64_t=yes ;;
7476 *) ac_cv_c_int64_t=$ac_type ;;
7477esac
7478
7479fi
7480
7481rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7482else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007483 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007484sed 's/^/| /' conftest.$ac_ext >&5
7485
7486
7487fi
7488
7489rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7490 test "$ac_cv_c_int64_t" != no && break
7491 done
7492fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007493{ echo "$as_me:$LINENO: result: $ac_cv_c_int64_t" >&5
7494echo "${ECHO_T}$ac_cv_c_int64_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007495 case $ac_cv_c_int64_t in #(
7496 no|yes) ;; #(
7497 *)
7498
7499cat >>confdefs.h <<_ACEOF
7500#define int64_t $ac_cv_c_int64_t
7501_ACEOF
7502;;
7503 esac
7504
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007505{ echo "$as_me:$LINENO: checking for ssize_t" >&5
7506echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00007507if test "${ac_cv_type_ssize_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007508 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007509else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007510 cat >conftest.$ac_ext <<_ACEOF
7511/* confdefs.h. */
7512_ACEOF
7513cat confdefs.h >>conftest.$ac_ext
7514cat >>conftest.$ac_ext <<_ACEOF
7515/* end confdefs.h. */
7516$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007517typedef ssize_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007518int
7519main ()
7520{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007521if ((ac__type_new_ *) 0)
7522 return 0;
7523if (sizeof (ac__type_new_))
7524 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007525 ;
7526 return 0;
7527}
7528_ACEOF
7529rm -f conftest.$ac_objext
7530if { (ac_try="$ac_compile"
7531case "(($ac_try" in
7532 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7533 *) ac_try_echo=$ac_try;;
7534esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007535eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007536 (eval "$ac_compile") 2>conftest.er1
7537 ac_status=$?
7538 grep -v '^ *+' conftest.er1 >conftest.err
7539 rm -f conftest.er1
7540 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007542 (exit $ac_status); } && {
7543 test -z "$ac_c_werror_flag" ||
7544 test ! -s conftest.err
7545 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007546 ac_cv_type_ssize_t=yes
Martin v. Löwis18e16552006-02-15 17:27:45 +00007547else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007548 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +00007549sed 's/^/| /' conftest.$ac_ext >&5
7550
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007551 ac_cv_type_ssize_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00007552fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007553
7554rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00007555fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007556{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
7557echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
7558if test $ac_cv_type_ssize_t = yes; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00007559
7560cat >>confdefs.h <<\_ACEOF
7561#define HAVE_SSIZE_T 1
7562_ACEOF
7563
7564fi
7565
Jack Jansendd19cf82001-12-06 22:36:17 +00007566
Michael W. Hudson54241132001-12-07 15:38:26 +00007567# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007568# ANSI C requires sizeof(char) == 1, so no need to check it
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007569{ echo "$as_me:$LINENO: checking for int" >&5
7570echo $ECHO_N "checking for int... $ECHO_C" >&6; }
7571if test "${ac_cv_type_int+set}" = set; then
7572 echo $ECHO_N "(cached) $ECHO_C" >&6
7573else
7574 cat >conftest.$ac_ext <<_ACEOF
7575/* confdefs.h. */
7576_ACEOF
7577cat confdefs.h >>conftest.$ac_ext
7578cat >>conftest.$ac_ext <<_ACEOF
7579/* end confdefs.h. */
7580$ac_includes_default
7581typedef int ac__type_new_;
7582int
7583main ()
7584{
7585if ((ac__type_new_ *) 0)
7586 return 0;
7587if (sizeof (ac__type_new_))
7588 return 0;
7589 ;
7590 return 0;
7591}
7592_ACEOF
7593rm -f conftest.$ac_objext
7594if { (ac_try="$ac_compile"
7595case "(($ac_try" in
7596 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7597 *) ac_try_echo=$ac_try;;
7598esac
7599eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7600 (eval "$ac_compile") 2>conftest.er1
7601 ac_status=$?
7602 grep -v '^ *+' conftest.er1 >conftest.err
7603 rm -f conftest.er1
7604 cat conftest.err >&5
7605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7606 (exit $ac_status); } && {
7607 test -z "$ac_c_werror_flag" ||
7608 test ! -s conftest.err
7609 } && test -s conftest.$ac_objext; then
7610 ac_cv_type_int=yes
7611else
7612 echo "$as_me: failed program was:" >&5
7613sed 's/^/| /' conftest.$ac_ext >&5
7614
7615 ac_cv_type_int=no
7616fi
7617
7618rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7619fi
7620{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
7621echo "${ECHO_T}$ac_cv_type_int" >&6; }
7622
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007623# The cast to long int works around a bug in the HP C Compiler
7624# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7625# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7626# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007627{ echo "$as_me:$LINENO: checking size of int" >&5
7628echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007629if test "${ac_cv_sizeof_int+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007630 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007631else
Martin v. Löwis11437992002-04-12 09:54:03 +00007632 if test "$cross_compiling" = yes; then
7633 # Depending upon the size, compute the lo and hi bounds.
7634cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007635/* confdefs.h. */
7636_ACEOF
7637cat confdefs.h >>conftest.$ac_ext
7638cat >>conftest.$ac_ext <<_ACEOF
7639/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007640$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007641 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007642int
7643main ()
7644{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007645static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007646test_array [0] = 0
7647
7648 ;
7649 return 0;
7650}
7651_ACEOF
7652rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007653if { (ac_try="$ac_compile"
7654case "(($ac_try" in
7655 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7656 *) ac_try_echo=$ac_try;;
7657esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007658eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007659 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007660 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007661 grep -v '^ *+' conftest.er1 >conftest.err
7662 rm -f conftest.er1
7663 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007665 (exit $ac_status); } && {
7666 test -z "$ac_c_werror_flag" ||
7667 test ! -s conftest.err
7668 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007669 ac_lo=0 ac_mid=0
7670 while :; do
7671 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007672/* confdefs.h. */
7673_ACEOF
7674cat confdefs.h >>conftest.$ac_ext
7675cat >>conftest.$ac_ext <<_ACEOF
7676/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007677$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007678 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007679int
7680main ()
7681{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007682static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007683test_array [0] = 0
7684
7685 ;
7686 return 0;
7687}
7688_ACEOF
7689rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007690if { (ac_try="$ac_compile"
7691case "(($ac_try" in
7692 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7693 *) ac_try_echo=$ac_try;;
7694esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007695eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007696 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007697 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007698 grep -v '^ *+' conftest.er1 >conftest.err
7699 rm -f conftest.er1
7700 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007702 (exit $ac_status); } && {
7703 test -z "$ac_c_werror_flag" ||
7704 test ! -s conftest.err
7705 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007706 ac_hi=$ac_mid; break
7707else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007708 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007709sed 's/^/| /' conftest.$ac_ext >&5
7710
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007711 ac_lo=`expr $ac_mid + 1`
7712 if test $ac_lo -le $ac_mid; then
7713 ac_lo= ac_hi=
7714 break
7715 fi
7716 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007717fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007718
7719rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007720 done
7721else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007722 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007723sed 's/^/| /' conftest.$ac_ext >&5
7724
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007725 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007726/* confdefs.h. */
7727_ACEOF
7728cat confdefs.h >>conftest.$ac_ext
7729cat >>conftest.$ac_ext <<_ACEOF
7730/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007731$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007732 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007733int
7734main ()
7735{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007736static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007737test_array [0] = 0
7738
7739 ;
7740 return 0;
7741}
7742_ACEOF
7743rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007744if { (ac_try="$ac_compile"
7745case "(($ac_try" in
7746 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7747 *) ac_try_echo=$ac_try;;
7748esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007749eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007750 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007751 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007752 grep -v '^ *+' conftest.er1 >conftest.err
7753 rm -f conftest.er1
7754 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007755 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007756 (exit $ac_status); } && {
7757 test -z "$ac_c_werror_flag" ||
7758 test ! -s conftest.err
7759 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007760 ac_hi=-1 ac_mid=-1
7761 while :; do
7762 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007763/* confdefs.h. */
7764_ACEOF
7765cat confdefs.h >>conftest.$ac_ext
7766cat >>conftest.$ac_ext <<_ACEOF
7767/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007768$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007769 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007770int
7771main ()
7772{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007773static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007774test_array [0] = 0
7775
7776 ;
7777 return 0;
7778}
7779_ACEOF
7780rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007781if { (ac_try="$ac_compile"
7782case "(($ac_try" in
7783 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7784 *) ac_try_echo=$ac_try;;
7785esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007786eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007787 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007788 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007789 grep -v '^ *+' conftest.er1 >conftest.err
7790 rm -f conftest.er1
7791 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007793 (exit $ac_status); } && {
7794 test -z "$ac_c_werror_flag" ||
7795 test ! -s conftest.err
7796 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007797 ac_lo=$ac_mid; break
7798else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007799 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007800sed 's/^/| /' conftest.$ac_ext >&5
7801
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007802 ac_hi=`expr '(' $ac_mid ')' - 1`
7803 if test $ac_mid -le $ac_hi; then
7804 ac_lo= ac_hi=
7805 break
7806 fi
7807 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007808fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007809
7810rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007811 done
7812else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007813 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007814sed 's/^/| /' conftest.$ac_ext >&5
7815
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007816 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007817fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007818
7819rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007820fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007821
7822rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007823# Binary search between lo and hi bounds.
7824while test "x$ac_lo" != "x$ac_hi"; do
7825 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7826 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 Oussoren74f29b42009-09-20 20:09:26 +00007833 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007834int
7835main ()
7836{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007837static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007838test_array [0] = 0
7839
7840 ;
7841 return 0;
7842}
7843_ACEOF
7844rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007845if { (ac_try="$ac_compile"
7846case "(($ac_try" in
7847 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7848 *) ac_try_echo=$ac_try;;
7849esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007850eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007851 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007852 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007853 grep -v '^ *+' conftest.er1 >conftest.err
7854 rm -f conftest.er1
7855 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007857 (exit $ac_status); } && {
7858 test -z "$ac_c_werror_flag" ||
7859 test ! -s conftest.err
7860 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007861 ac_hi=$ac_mid
7862else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007863 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007864sed 's/^/| /' conftest.$ac_ext >&5
7865
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007866 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007867fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007868
7869rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007870done
7871case $ac_lo in
7872?*) ac_cv_sizeof_int=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007873'') if test "$ac_cv_type_int" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007874 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007875See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007876echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007877See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007878 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007879 else
7880 ac_cv_sizeof_int=0
7881 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007882esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007883else
Martin v. Löwis11437992002-04-12 09:54:03 +00007884 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007885/* confdefs.h. */
7886_ACEOF
7887cat confdefs.h >>conftest.$ac_ext
7888cat >>conftest.$ac_ext <<_ACEOF
7889/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007890$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007891 typedef int ac__type_sizeof_;
7892static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7893static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007894#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007895#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007896int
7897main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007898{
Martin v. Löwis11437992002-04-12 09:54:03 +00007899
7900 FILE *f = fopen ("conftest.val", "w");
7901 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007902 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007903 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007904 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007905 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007906 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007907 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007908 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007909 }
7910 else
7911 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007912 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007913 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007914 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007915 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007916 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007917 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007918
7919 ;
7920 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007921}
Martin v. Löwis11437992002-04-12 09:54:03 +00007922_ACEOF
7923rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007924if { (ac_try="$ac_link"
7925case "(($ac_try" in
7926 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7927 *) ac_try_echo=$ac_try;;
7928esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007929eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007930 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007931 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007933 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007934 { (case "(($ac_try" in
7935 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7936 *) ac_try_echo=$ac_try;;
7937esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007938eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007939 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007940 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007942 (exit $ac_status); }; }; then
7943 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007944else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007945 echo "$as_me: program exited with status $ac_status" >&5
7946echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007947sed 's/^/| /' conftest.$ac_ext >&5
7948
Martin v. Löwis11437992002-04-12 09:54:03 +00007949( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007950if test "$ac_cv_type_int" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007951 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007952See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007953echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007954See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007955 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007956 else
7957 ac_cv_sizeof_int=0
7958 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007959fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007960rm -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 +00007961fi
7962rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007963fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007964{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
7965echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007966
7967
7968
Martin v. Löwis11437992002-04-12 09:54:03 +00007969cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007970#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007971_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007972
7973
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007974{ echo "$as_me:$LINENO: checking for long" >&5
7975echo $ECHO_N "checking for long... $ECHO_C" >&6; }
7976if test "${ac_cv_type_long+set}" = set; then
7977 echo $ECHO_N "(cached) $ECHO_C" >&6
7978else
7979 cat >conftest.$ac_ext <<_ACEOF
7980/* confdefs.h. */
7981_ACEOF
7982cat confdefs.h >>conftest.$ac_ext
7983cat >>conftest.$ac_ext <<_ACEOF
7984/* end confdefs.h. */
7985$ac_includes_default
7986typedef long ac__type_new_;
7987int
7988main ()
7989{
7990if ((ac__type_new_ *) 0)
7991 return 0;
7992if (sizeof (ac__type_new_))
7993 return 0;
7994 ;
7995 return 0;
7996}
7997_ACEOF
7998rm -f conftest.$ac_objext
7999if { (ac_try="$ac_compile"
8000case "(($ac_try" in
8001 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8002 *) ac_try_echo=$ac_try;;
8003esac
8004eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8005 (eval "$ac_compile") 2>conftest.er1
8006 ac_status=$?
8007 grep -v '^ *+' conftest.er1 >conftest.err
8008 rm -f conftest.er1
8009 cat conftest.err >&5
8010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8011 (exit $ac_status); } && {
8012 test -z "$ac_c_werror_flag" ||
8013 test ! -s conftest.err
8014 } && test -s conftest.$ac_objext; then
8015 ac_cv_type_long=yes
8016else
8017 echo "$as_me: failed program was:" >&5
8018sed 's/^/| /' conftest.$ac_ext >&5
8019
8020 ac_cv_type_long=no
8021fi
8022
8023rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8024fi
8025{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
8026echo "${ECHO_T}$ac_cv_type_long" >&6; }
8027
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008028# The cast to long int works around a bug in the HP C Compiler
8029# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8030# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8031# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008032{ echo "$as_me:$LINENO: checking size of long" >&5
8033echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008034if test "${ac_cv_sizeof_long+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008035 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008036else
Martin v. Löwis11437992002-04-12 09:54:03 +00008037 if test "$cross_compiling" = yes; then
8038 # Depending upon the size, compute the lo and hi bounds.
8039cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008040/* confdefs.h. */
8041_ACEOF
8042cat confdefs.h >>conftest.$ac_ext
8043cat >>conftest.$ac_ext <<_ACEOF
8044/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008045$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008046 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008047int
8048main ()
8049{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008050static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008051test_array [0] = 0
8052
8053 ;
8054 return 0;
8055}
8056_ACEOF
8057rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008058if { (ac_try="$ac_compile"
8059case "(($ac_try" in
8060 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8061 *) ac_try_echo=$ac_try;;
8062esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008063eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008064 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008065 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008066 grep -v '^ *+' conftest.er1 >conftest.err
8067 rm -f conftest.er1
8068 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008070 (exit $ac_status); } && {
8071 test -z "$ac_c_werror_flag" ||
8072 test ! -s conftest.err
8073 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008074 ac_lo=0 ac_mid=0
8075 while :; do
8076 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008077/* confdefs.h. */
8078_ACEOF
8079cat confdefs.h >>conftest.$ac_ext
8080cat >>conftest.$ac_ext <<_ACEOF
8081/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008082$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008083 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008084int
8085main ()
8086{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008087static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008088test_array [0] = 0
8089
8090 ;
8091 return 0;
8092}
8093_ACEOF
8094rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008095if { (ac_try="$ac_compile"
8096case "(($ac_try" in
8097 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8098 *) ac_try_echo=$ac_try;;
8099esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008100eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008101 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008102 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008103 grep -v '^ *+' conftest.er1 >conftest.err
8104 rm -f conftest.er1
8105 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008106 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008107 (exit $ac_status); } && {
8108 test -z "$ac_c_werror_flag" ||
8109 test ! -s conftest.err
8110 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008111 ac_hi=$ac_mid; break
8112else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008113 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008114sed 's/^/| /' conftest.$ac_ext >&5
8115
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008116 ac_lo=`expr $ac_mid + 1`
8117 if test $ac_lo -le $ac_mid; then
8118 ac_lo= ac_hi=
8119 break
8120 fi
8121 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008122fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008123
8124rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008125 done
8126else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008127 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008128sed 's/^/| /' conftest.$ac_ext >&5
8129
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008130 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008131/* confdefs.h. */
8132_ACEOF
8133cat confdefs.h >>conftest.$ac_ext
8134cat >>conftest.$ac_ext <<_ACEOF
8135/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008136$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008137 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008138int
8139main ()
8140{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008141static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008142test_array [0] = 0
8143
8144 ;
8145 return 0;
8146}
8147_ACEOF
8148rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008149if { (ac_try="$ac_compile"
8150case "(($ac_try" in
8151 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8152 *) ac_try_echo=$ac_try;;
8153esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008154eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008155 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008156 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008157 grep -v '^ *+' conftest.er1 >conftest.err
8158 rm -f conftest.er1
8159 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008160 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008161 (exit $ac_status); } && {
8162 test -z "$ac_c_werror_flag" ||
8163 test ! -s conftest.err
8164 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008165 ac_hi=-1 ac_mid=-1
8166 while :; do
8167 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008168/* confdefs.h. */
8169_ACEOF
8170cat confdefs.h >>conftest.$ac_ext
8171cat >>conftest.$ac_ext <<_ACEOF
8172/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008173$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008174 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008175int
8176main ()
8177{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008178static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008179test_array [0] = 0
8180
8181 ;
8182 return 0;
8183}
8184_ACEOF
8185rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008186if { (ac_try="$ac_compile"
8187case "(($ac_try" in
8188 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8189 *) ac_try_echo=$ac_try;;
8190esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008191eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008192 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008193 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008194 grep -v '^ *+' conftest.er1 >conftest.err
8195 rm -f conftest.er1
8196 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008198 (exit $ac_status); } && {
8199 test -z "$ac_c_werror_flag" ||
8200 test ! -s conftest.err
8201 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008202 ac_lo=$ac_mid; break
8203else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008204 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008205sed 's/^/| /' conftest.$ac_ext >&5
8206
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008207 ac_hi=`expr '(' $ac_mid ')' - 1`
8208 if test $ac_mid -le $ac_hi; then
8209 ac_lo= ac_hi=
8210 break
8211 fi
8212 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008213fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008214
8215rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008216 done
8217else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008218 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008219sed 's/^/| /' conftest.$ac_ext >&5
8220
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008221 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008222fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008223
8224rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008225fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008226
8227rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008228# Binary search between lo and hi bounds.
8229while test "x$ac_lo" != "x$ac_hi"; do
8230 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8231 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 Oussoren74f29b42009-09-20 20:09:26 +00008238 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008239int
8240main ()
8241{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008242static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008243test_array [0] = 0
8244
8245 ;
8246 return 0;
8247}
8248_ACEOF
8249rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008250if { (ac_try="$ac_compile"
8251case "(($ac_try" in
8252 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8253 *) ac_try_echo=$ac_try;;
8254esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008255eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008256 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008257 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008258 grep -v '^ *+' conftest.er1 >conftest.err
8259 rm -f conftest.er1
8260 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008262 (exit $ac_status); } && {
8263 test -z "$ac_c_werror_flag" ||
8264 test ! -s conftest.err
8265 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008266 ac_hi=$ac_mid
8267else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008268 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008269sed 's/^/| /' conftest.$ac_ext >&5
8270
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008271 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008272fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008273
8274rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008275done
8276case $ac_lo in
8277?*) ac_cv_sizeof_long=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008278'') if test "$ac_cv_type_long" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008279 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008280See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008281echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008282See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008283 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008284 else
8285 ac_cv_sizeof_long=0
8286 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008287esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008288else
Martin v. Löwis11437992002-04-12 09:54:03 +00008289 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008290/* confdefs.h. */
8291_ACEOF
8292cat confdefs.h >>conftest.$ac_ext
8293cat >>conftest.$ac_ext <<_ACEOF
8294/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008295$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008296 typedef long ac__type_sizeof_;
8297static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8298static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008299#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008300#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008301int
8302main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008303{
Martin v. Löwis11437992002-04-12 09:54:03 +00008304
8305 FILE *f = fopen ("conftest.val", "w");
8306 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008307 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008308 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008309 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008310 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008311 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008312 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008313 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008314 }
8315 else
8316 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008317 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008318 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008319 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008320 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008321 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008322 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008323
8324 ;
8325 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008326}
Martin v. Löwis11437992002-04-12 09:54:03 +00008327_ACEOF
8328rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008329if { (ac_try="$ac_link"
8330case "(($ac_try" in
8331 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8332 *) ac_try_echo=$ac_try;;
8333esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008334eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008335 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008336 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008338 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008339 { (case "(($ac_try" in
8340 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8341 *) ac_try_echo=$ac_try;;
8342esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008343eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008344 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008345 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008347 (exit $ac_status); }; }; then
8348 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008349else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008350 echo "$as_me: program exited with status $ac_status" >&5
8351echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008352sed 's/^/| /' conftest.$ac_ext >&5
8353
Martin v. Löwis11437992002-04-12 09:54:03 +00008354( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008355if test "$ac_cv_type_long" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008356 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008357See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008358echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008359See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008360 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008361 else
8362 ac_cv_sizeof_long=0
8363 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008364fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008365rm -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 +00008366fi
8367rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008368fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008369{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
8370echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008371
8372
8373
Martin v. Löwis11437992002-04-12 09:54:03 +00008374cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008375#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008376_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008377
8378
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008379{ echo "$as_me:$LINENO: checking for void *" >&5
8380echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
8381if test "${ac_cv_type_void_p+set}" = set; then
8382 echo $ECHO_N "(cached) $ECHO_C" >&6
8383else
8384 cat >conftest.$ac_ext <<_ACEOF
8385/* confdefs.h. */
8386_ACEOF
8387cat confdefs.h >>conftest.$ac_ext
8388cat >>conftest.$ac_ext <<_ACEOF
8389/* end confdefs.h. */
8390$ac_includes_default
8391typedef void * ac__type_new_;
8392int
8393main ()
8394{
8395if ((ac__type_new_ *) 0)
8396 return 0;
8397if (sizeof (ac__type_new_))
8398 return 0;
8399 ;
8400 return 0;
8401}
8402_ACEOF
8403rm -f conftest.$ac_objext
8404if { (ac_try="$ac_compile"
8405case "(($ac_try" in
8406 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8407 *) ac_try_echo=$ac_try;;
8408esac
8409eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8410 (eval "$ac_compile") 2>conftest.er1
8411 ac_status=$?
8412 grep -v '^ *+' conftest.er1 >conftest.err
8413 rm -f conftest.er1
8414 cat conftest.err >&5
8415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8416 (exit $ac_status); } && {
8417 test -z "$ac_c_werror_flag" ||
8418 test ! -s conftest.err
8419 } && test -s conftest.$ac_objext; then
8420 ac_cv_type_void_p=yes
8421else
8422 echo "$as_me: failed program was:" >&5
8423sed 's/^/| /' conftest.$ac_ext >&5
8424
8425 ac_cv_type_void_p=no
8426fi
8427
8428rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8429fi
8430{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
8431echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
8432
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008433# The cast to long int works around a bug in the HP C Compiler
8434# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8435# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8436# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008437{ echo "$as_me:$LINENO: checking size of void *" >&5
8438echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008439if test "${ac_cv_sizeof_void_p+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008440 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008441else
Martin v. Löwis11437992002-04-12 09:54:03 +00008442 if test "$cross_compiling" = yes; then
8443 # Depending upon the size, compute the lo and hi bounds.
8444cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008445/* confdefs.h. */
8446_ACEOF
8447cat confdefs.h >>conftest.$ac_ext
8448cat >>conftest.$ac_ext <<_ACEOF
8449/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008450$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008451 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008452int
8453main ()
8454{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008455static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008456test_array [0] = 0
8457
8458 ;
8459 return 0;
8460}
8461_ACEOF
8462rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008463if { (ac_try="$ac_compile"
8464case "(($ac_try" in
8465 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8466 *) ac_try_echo=$ac_try;;
8467esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008468eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008469 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008470 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008471 grep -v '^ *+' conftest.er1 >conftest.err
8472 rm -f conftest.er1
8473 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008475 (exit $ac_status); } && {
8476 test -z "$ac_c_werror_flag" ||
8477 test ! -s conftest.err
8478 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008479 ac_lo=0 ac_mid=0
8480 while :; do
8481 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008482/* confdefs.h. */
8483_ACEOF
8484cat confdefs.h >>conftest.$ac_ext
8485cat >>conftest.$ac_ext <<_ACEOF
8486/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008487$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008488 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008489int
8490main ()
8491{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008492static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008493test_array [0] = 0
8494
8495 ;
8496 return 0;
8497}
8498_ACEOF
8499rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008500if { (ac_try="$ac_compile"
8501case "(($ac_try" in
8502 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8503 *) ac_try_echo=$ac_try;;
8504esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008505eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008506 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008507 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008508 grep -v '^ *+' conftest.er1 >conftest.err
8509 rm -f conftest.er1
8510 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008512 (exit $ac_status); } && {
8513 test -z "$ac_c_werror_flag" ||
8514 test ! -s conftest.err
8515 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008516 ac_hi=$ac_mid; break
8517else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008518 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008519sed 's/^/| /' conftest.$ac_ext >&5
8520
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008521 ac_lo=`expr $ac_mid + 1`
8522 if test $ac_lo -le $ac_mid; then
8523 ac_lo= ac_hi=
8524 break
8525 fi
8526 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008527fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008528
8529rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008530 done
8531else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008532 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008533sed 's/^/| /' conftest.$ac_ext >&5
8534
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008535 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008536/* confdefs.h. */
8537_ACEOF
8538cat confdefs.h >>conftest.$ac_ext
8539cat >>conftest.$ac_ext <<_ACEOF
8540/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008541$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008542 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008543int
8544main ()
8545{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008546static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008547test_array [0] = 0
8548
8549 ;
8550 return 0;
8551}
8552_ACEOF
8553rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008554if { (ac_try="$ac_compile"
8555case "(($ac_try" in
8556 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8557 *) ac_try_echo=$ac_try;;
8558esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008559eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008560 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008561 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008562 grep -v '^ *+' conftest.er1 >conftest.err
8563 rm -f conftest.er1
8564 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008566 (exit $ac_status); } && {
8567 test -z "$ac_c_werror_flag" ||
8568 test ! -s conftest.err
8569 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008570 ac_hi=-1 ac_mid=-1
8571 while :; do
8572 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008573/* confdefs.h. */
8574_ACEOF
8575cat confdefs.h >>conftest.$ac_ext
8576cat >>conftest.$ac_ext <<_ACEOF
8577/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008578$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008579 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008580int
8581main ()
8582{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008583static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008584test_array [0] = 0
8585
8586 ;
8587 return 0;
8588}
8589_ACEOF
8590rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008591if { (ac_try="$ac_compile"
8592case "(($ac_try" in
8593 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8594 *) ac_try_echo=$ac_try;;
8595esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008596eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008597 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008598 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008599 grep -v '^ *+' conftest.er1 >conftest.err
8600 rm -f conftest.er1
8601 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008603 (exit $ac_status); } && {
8604 test -z "$ac_c_werror_flag" ||
8605 test ! -s conftest.err
8606 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008607 ac_lo=$ac_mid; break
8608else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008609 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008610sed 's/^/| /' conftest.$ac_ext >&5
8611
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008612 ac_hi=`expr '(' $ac_mid ')' - 1`
8613 if test $ac_mid -le $ac_hi; then
8614 ac_lo= ac_hi=
8615 break
8616 fi
8617 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008618fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008619
8620rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008621 done
8622else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008623 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008624sed 's/^/| /' conftest.$ac_ext >&5
8625
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008626 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008627fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008628
8629rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008630fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008631
8632rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008633# Binary search between lo and hi bounds.
8634while test "x$ac_lo" != "x$ac_hi"; do
8635 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8636 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 Oussoren74f29b42009-09-20 20:09:26 +00008643 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008644int
8645main ()
8646{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008647static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008648test_array [0] = 0
8649
8650 ;
8651 return 0;
8652}
8653_ACEOF
8654rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008655if { (ac_try="$ac_compile"
8656case "(($ac_try" in
8657 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8658 *) ac_try_echo=$ac_try;;
8659esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008660eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008661 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008662 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008663 grep -v '^ *+' conftest.er1 >conftest.err
8664 rm -f conftest.er1
8665 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008667 (exit $ac_status); } && {
8668 test -z "$ac_c_werror_flag" ||
8669 test ! -s conftest.err
8670 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008671 ac_hi=$ac_mid
8672else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008673 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008674sed 's/^/| /' conftest.$ac_ext >&5
8675
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008676 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008677fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008678
8679rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008680done
8681case $ac_lo in
8682?*) ac_cv_sizeof_void_p=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008683'') if test "$ac_cv_type_void_p" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008684 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008685See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008686echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008687See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008688 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008689 else
8690 ac_cv_sizeof_void_p=0
8691 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008692esac
Guido van Rossumad678af1998-10-02 14:42:15 +00008693else
Martin v. Löwis11437992002-04-12 09:54:03 +00008694 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008695/* confdefs.h. */
8696_ACEOF
8697cat confdefs.h >>conftest.$ac_ext
8698cat >>conftest.$ac_ext <<_ACEOF
8699/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008700$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008701 typedef void * ac__type_sizeof_;
8702static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8703static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008704#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008705#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008706int
8707main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00008708{
Martin v. Löwis11437992002-04-12 09:54:03 +00008709
8710 FILE *f = fopen ("conftest.val", "w");
8711 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008712 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008713 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008714 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008715 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008716 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008717 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008718 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008719 }
8720 else
8721 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008722 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008723 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008724 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008725 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008726 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008727 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008728
8729 ;
8730 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00008731}
Martin v. Löwis11437992002-04-12 09:54:03 +00008732_ACEOF
8733rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008734if { (ac_try="$ac_link"
8735case "(($ac_try" in
8736 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8737 *) ac_try_echo=$ac_try;;
8738esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008739eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008740 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008741 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008743 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008744 { (case "(($ac_try" in
8745 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8746 *) ac_try_echo=$ac_try;;
8747esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008748eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008749 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008750 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008752 (exit $ac_status); }; }; then
8753 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00008754else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008755 echo "$as_me: program exited with status $ac_status" >&5
8756echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008757sed 's/^/| /' conftest.$ac_ext >&5
8758
Martin v. Löwis11437992002-04-12 09:54:03 +00008759( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008760if test "$ac_cv_type_void_p" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008761 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008762See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008763echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008764See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008765 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008766 else
8767 ac_cv_sizeof_void_p=0
8768 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008769fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008770rm -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 +00008771fi
8772rm -f conftest.val
Guido van Rossumad678af1998-10-02 14:42:15 +00008773fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008774{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
8775echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008776
8777
8778
Martin v. Löwis11437992002-04-12 09:54:03 +00008779cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008780#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008781_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008782
8783
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008784{ echo "$as_me:$LINENO: checking for short" >&5
8785echo $ECHO_N "checking for short... $ECHO_C" >&6; }
8786if test "${ac_cv_type_short+set}" = set; then
8787 echo $ECHO_N "(cached) $ECHO_C" >&6
8788else
8789 cat >conftest.$ac_ext <<_ACEOF
8790/* confdefs.h. */
8791_ACEOF
8792cat confdefs.h >>conftest.$ac_ext
8793cat >>conftest.$ac_ext <<_ACEOF
8794/* end confdefs.h. */
8795$ac_includes_default
8796typedef short ac__type_new_;
8797int
8798main ()
8799{
8800if ((ac__type_new_ *) 0)
8801 return 0;
8802if (sizeof (ac__type_new_))
8803 return 0;
8804 ;
8805 return 0;
8806}
8807_ACEOF
8808rm -f conftest.$ac_objext
8809if { (ac_try="$ac_compile"
8810case "(($ac_try" in
8811 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8812 *) ac_try_echo=$ac_try;;
8813esac
8814eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8815 (eval "$ac_compile") 2>conftest.er1
8816 ac_status=$?
8817 grep -v '^ *+' conftest.er1 >conftest.err
8818 rm -f conftest.er1
8819 cat conftest.err >&5
8820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8821 (exit $ac_status); } && {
8822 test -z "$ac_c_werror_flag" ||
8823 test ! -s conftest.err
8824 } && test -s conftest.$ac_objext; then
8825 ac_cv_type_short=yes
8826else
8827 echo "$as_me: failed program was:" >&5
8828sed 's/^/| /' conftest.$ac_ext >&5
8829
8830 ac_cv_type_short=no
8831fi
8832
8833rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8834fi
8835{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
8836echo "${ECHO_T}$ac_cv_type_short" >&6; }
8837
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008838# The cast to long int works around a bug in the HP C Compiler
8839# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8840# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8841# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008842{ echo "$as_me:$LINENO: checking size of short" >&5
8843echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008844if test "${ac_cv_sizeof_short+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008845 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008846else
Martin v. Löwis11437992002-04-12 09:54:03 +00008847 if test "$cross_compiling" = yes; then
8848 # Depending upon the size, compute the lo and hi bounds.
8849cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008850/* confdefs.h. */
8851_ACEOF
8852cat confdefs.h >>conftest.$ac_ext
8853cat >>conftest.$ac_ext <<_ACEOF
8854/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008855$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008856 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008857int
8858main ()
8859{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008860static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008861test_array [0] = 0
8862
8863 ;
8864 return 0;
8865}
8866_ACEOF
8867rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008868if { (ac_try="$ac_compile"
8869case "(($ac_try" in
8870 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8871 *) ac_try_echo=$ac_try;;
8872esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008873eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008874 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008875 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008876 grep -v '^ *+' conftest.er1 >conftest.err
8877 rm -f conftest.er1
8878 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008880 (exit $ac_status); } && {
8881 test -z "$ac_c_werror_flag" ||
8882 test ! -s conftest.err
8883 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008884 ac_lo=0 ac_mid=0
8885 while :; do
8886 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008887/* confdefs.h. */
8888_ACEOF
8889cat confdefs.h >>conftest.$ac_ext
8890cat >>conftest.$ac_ext <<_ACEOF
8891/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008892$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008893 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008894int
8895main ()
8896{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008897static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008898test_array [0] = 0
8899
8900 ;
8901 return 0;
8902}
8903_ACEOF
8904rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008905if { (ac_try="$ac_compile"
8906case "(($ac_try" in
8907 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8908 *) ac_try_echo=$ac_try;;
8909esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008910eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008911 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008912 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008913 grep -v '^ *+' conftest.er1 >conftest.err
8914 rm -f conftest.er1
8915 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008917 (exit $ac_status); } && {
8918 test -z "$ac_c_werror_flag" ||
8919 test ! -s conftest.err
8920 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008921 ac_hi=$ac_mid; break
8922else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008923 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008924sed 's/^/| /' conftest.$ac_ext >&5
8925
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008926 ac_lo=`expr $ac_mid + 1`
8927 if test $ac_lo -le $ac_mid; then
8928 ac_lo= ac_hi=
8929 break
8930 fi
8931 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008932fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008933
8934rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008935 done
8936else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008937 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008938sed 's/^/| /' conftest.$ac_ext >&5
8939
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008940 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008941/* confdefs.h. */
8942_ACEOF
8943cat confdefs.h >>conftest.$ac_ext
8944cat >>conftest.$ac_ext <<_ACEOF
8945/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008946$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008947 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008948int
8949main ()
8950{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008951static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008952test_array [0] = 0
8953
8954 ;
8955 return 0;
8956}
8957_ACEOF
8958rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008959if { (ac_try="$ac_compile"
8960case "(($ac_try" in
8961 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8962 *) ac_try_echo=$ac_try;;
8963esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008964eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008965 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008966 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008967 grep -v '^ *+' conftest.er1 >conftest.err
8968 rm -f conftest.er1
8969 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008971 (exit $ac_status); } && {
8972 test -z "$ac_c_werror_flag" ||
8973 test ! -s conftest.err
8974 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008975 ac_hi=-1 ac_mid=-1
8976 while :; do
8977 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008978/* confdefs.h. */
8979_ACEOF
8980cat confdefs.h >>conftest.$ac_ext
8981cat >>conftest.$ac_ext <<_ACEOF
8982/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008983$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008984 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008985int
8986main ()
8987{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008988static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008989test_array [0] = 0
8990
8991 ;
8992 return 0;
8993}
8994_ACEOF
8995rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008996if { (ac_try="$ac_compile"
8997case "(($ac_try" in
8998 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8999 *) ac_try_echo=$ac_try;;
9000esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009001eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009002 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009003 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009004 grep -v '^ *+' conftest.er1 >conftest.err
9005 rm -f conftest.er1
9006 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009007 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009008 (exit $ac_status); } && {
9009 test -z "$ac_c_werror_flag" ||
9010 test ! -s conftest.err
9011 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009012 ac_lo=$ac_mid; break
9013else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009014 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009015sed 's/^/| /' conftest.$ac_ext >&5
9016
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009017 ac_hi=`expr '(' $ac_mid ')' - 1`
9018 if test $ac_mid -le $ac_hi; then
9019 ac_lo= ac_hi=
9020 break
9021 fi
9022 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009023fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009024
9025rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009026 done
9027else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009028 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009029sed 's/^/| /' conftest.$ac_ext >&5
9030
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009031 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009032fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009033
9034rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009035fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009036
9037rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009038# Binary search between lo and hi bounds.
9039while test "x$ac_lo" != "x$ac_hi"; do
9040 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9041 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 Oussoren74f29b42009-09-20 20:09:26 +00009048 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009049int
9050main ()
9051{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009052static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009053test_array [0] = 0
9054
9055 ;
9056 return 0;
9057}
9058_ACEOF
9059rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009060if { (ac_try="$ac_compile"
9061case "(($ac_try" in
9062 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9063 *) ac_try_echo=$ac_try;;
9064esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009065eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009066 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009067 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009068 grep -v '^ *+' conftest.er1 >conftest.err
9069 rm -f conftest.er1
9070 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009072 (exit $ac_status); } && {
9073 test -z "$ac_c_werror_flag" ||
9074 test ! -s conftest.err
9075 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009076 ac_hi=$ac_mid
9077else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009078 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009079sed 's/^/| /' conftest.$ac_ext >&5
9080
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009081 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009082fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009083
9084rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009085done
9086case $ac_lo in
9087?*) ac_cv_sizeof_short=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009088'') if test "$ac_cv_type_short" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009089 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009090See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009091echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009092See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009093 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009094 else
9095 ac_cv_sizeof_short=0
9096 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009097esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009098else
Martin v. Löwis11437992002-04-12 09:54:03 +00009099 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009100/* confdefs.h. */
9101_ACEOF
9102cat confdefs.h >>conftest.$ac_ext
9103cat >>conftest.$ac_ext <<_ACEOF
9104/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009105$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009106 typedef short ac__type_sizeof_;
9107static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9108static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009109#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009110#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009111int
9112main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009113{
Martin v. Löwis11437992002-04-12 09:54:03 +00009114
9115 FILE *f = fopen ("conftest.val", "w");
9116 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009117 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009118 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009119 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009120 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009121 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009122 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009123 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009124 }
9125 else
9126 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009127 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009128 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009129 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009130 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009131 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009132 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009133
9134 ;
9135 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009136}
Martin v. Löwis11437992002-04-12 09:54:03 +00009137_ACEOF
9138rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009139if { (ac_try="$ac_link"
9140case "(($ac_try" in
9141 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9142 *) ac_try_echo=$ac_try;;
9143esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009144eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009145 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009146 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009147 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009148 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009149 { (case "(($ac_try" in
9150 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9151 *) ac_try_echo=$ac_try;;
9152esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009153eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009154 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009155 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009156 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009157 (exit $ac_status); }; }; then
9158 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009159else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009160 echo "$as_me: program exited with status $ac_status" >&5
9161echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009162sed 's/^/| /' conftest.$ac_ext >&5
9163
Martin v. Löwis11437992002-04-12 09:54:03 +00009164( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009165if test "$ac_cv_type_short" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009166 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009167See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009168echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009169See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009170 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009171 else
9172 ac_cv_sizeof_short=0
9173 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009174fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009175rm -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 +00009176fi
9177rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009178fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009179{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
9180echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009181
9182
9183
Martin v. Löwis11437992002-04-12 09:54:03 +00009184cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009185#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00009186_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009187
9188
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009189{ echo "$as_me:$LINENO: checking for float" >&5
9190echo $ECHO_N "checking for float... $ECHO_C" >&6; }
9191if test "${ac_cv_type_float+set}" = set; then
9192 echo $ECHO_N "(cached) $ECHO_C" >&6
9193else
9194 cat >conftest.$ac_ext <<_ACEOF
9195/* confdefs.h. */
9196_ACEOF
9197cat confdefs.h >>conftest.$ac_ext
9198cat >>conftest.$ac_ext <<_ACEOF
9199/* end confdefs.h. */
9200$ac_includes_default
9201typedef float ac__type_new_;
9202int
9203main ()
9204{
9205if ((ac__type_new_ *) 0)
9206 return 0;
9207if (sizeof (ac__type_new_))
9208 return 0;
9209 ;
9210 return 0;
9211}
9212_ACEOF
9213rm -f conftest.$ac_objext
9214if { (ac_try="$ac_compile"
9215case "(($ac_try" in
9216 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9217 *) ac_try_echo=$ac_try;;
9218esac
9219eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9220 (eval "$ac_compile") 2>conftest.er1
9221 ac_status=$?
9222 grep -v '^ *+' conftest.er1 >conftest.err
9223 rm -f conftest.er1
9224 cat conftest.err >&5
9225 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9226 (exit $ac_status); } && {
9227 test -z "$ac_c_werror_flag" ||
9228 test ! -s conftest.err
9229 } && test -s conftest.$ac_objext; then
9230 ac_cv_type_float=yes
9231else
9232 echo "$as_me: failed program was:" >&5
9233sed 's/^/| /' conftest.$ac_ext >&5
9234
9235 ac_cv_type_float=no
9236fi
9237
9238rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9239fi
9240{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
9241echo "${ECHO_T}$ac_cv_type_float" >&6; }
9242
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009243# The cast to long int works around a bug in the HP C Compiler
9244# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9245# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9246# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009247{ echo "$as_me:$LINENO: checking size of float" >&5
9248echo $ECHO_N "checking size of float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009249if test "${ac_cv_sizeof_float+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009250 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009251else
Martin v. Löwis11437992002-04-12 09:54:03 +00009252 if test "$cross_compiling" = yes; then
9253 # Depending upon the size, compute the lo and hi bounds.
9254cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009255/* confdefs.h. */
9256_ACEOF
9257cat confdefs.h >>conftest.$ac_ext
9258cat >>conftest.$ac_ext <<_ACEOF
9259/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009260$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009261 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009262int
9263main ()
9264{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009265static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009266test_array [0] = 0
9267
9268 ;
9269 return 0;
9270}
9271_ACEOF
9272rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009273if { (ac_try="$ac_compile"
9274case "(($ac_try" in
9275 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9276 *) ac_try_echo=$ac_try;;
9277esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009278eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009279 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009280 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009281 grep -v '^ *+' conftest.er1 >conftest.err
9282 rm -f conftest.er1
9283 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009285 (exit $ac_status); } && {
9286 test -z "$ac_c_werror_flag" ||
9287 test ! -s conftest.err
9288 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009289 ac_lo=0 ac_mid=0
9290 while :; do
9291 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009292/* confdefs.h. */
9293_ACEOF
9294cat confdefs.h >>conftest.$ac_ext
9295cat >>conftest.$ac_ext <<_ACEOF
9296/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009297$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009298 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009299int
9300main ()
9301{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009302static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009303test_array [0] = 0
9304
9305 ;
9306 return 0;
9307}
9308_ACEOF
9309rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009310if { (ac_try="$ac_compile"
9311case "(($ac_try" in
9312 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9313 *) ac_try_echo=$ac_try;;
9314esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009315eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009316 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009317 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009318 grep -v '^ *+' conftest.er1 >conftest.err
9319 rm -f conftest.er1
9320 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009322 (exit $ac_status); } && {
9323 test -z "$ac_c_werror_flag" ||
9324 test ! -s conftest.err
9325 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009326 ac_hi=$ac_mid; break
9327else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009328 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009329sed 's/^/| /' conftest.$ac_ext >&5
9330
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009331 ac_lo=`expr $ac_mid + 1`
9332 if test $ac_lo -le $ac_mid; then
9333 ac_lo= ac_hi=
9334 break
9335 fi
9336 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009337fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009338
9339rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009340 done
9341else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009342 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009343sed 's/^/| /' conftest.$ac_ext >&5
9344
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009345 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009346/* confdefs.h. */
9347_ACEOF
9348cat confdefs.h >>conftest.$ac_ext
9349cat >>conftest.$ac_ext <<_ACEOF
9350/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009351$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009352 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009353int
9354main ()
9355{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009356static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009357test_array [0] = 0
9358
9359 ;
9360 return 0;
9361}
9362_ACEOF
9363rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009364if { (ac_try="$ac_compile"
9365case "(($ac_try" in
9366 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9367 *) ac_try_echo=$ac_try;;
9368esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009369eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009370 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009371 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009372 grep -v '^ *+' conftest.er1 >conftest.err
9373 rm -f conftest.er1
9374 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009376 (exit $ac_status); } && {
9377 test -z "$ac_c_werror_flag" ||
9378 test ! -s conftest.err
9379 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009380 ac_hi=-1 ac_mid=-1
9381 while :; do
9382 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009383/* confdefs.h. */
9384_ACEOF
9385cat confdefs.h >>conftest.$ac_ext
9386cat >>conftest.$ac_ext <<_ACEOF
9387/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009388$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009389 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009390int
9391main ()
9392{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009393static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009394test_array [0] = 0
9395
9396 ;
9397 return 0;
9398}
9399_ACEOF
9400rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009401if { (ac_try="$ac_compile"
9402case "(($ac_try" in
9403 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9404 *) ac_try_echo=$ac_try;;
9405esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009406eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009407 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009408 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009409 grep -v '^ *+' conftest.er1 >conftest.err
9410 rm -f conftest.er1
9411 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009413 (exit $ac_status); } && {
9414 test -z "$ac_c_werror_flag" ||
9415 test ! -s conftest.err
9416 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009417 ac_lo=$ac_mid; break
9418else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009419 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009420sed 's/^/| /' conftest.$ac_ext >&5
9421
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009422 ac_hi=`expr '(' $ac_mid ')' - 1`
9423 if test $ac_mid -le $ac_hi; then
9424 ac_lo= ac_hi=
9425 break
9426 fi
9427 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009428fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009429
9430rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009431 done
9432else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009433 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009434sed 's/^/| /' conftest.$ac_ext >&5
9435
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009436 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009437fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009438
9439rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009440fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009441
9442rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009443# Binary search between lo and hi bounds.
9444while test "x$ac_lo" != "x$ac_hi"; do
9445 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9446 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 Oussoren74f29b42009-09-20 20:09:26 +00009453 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009454int
9455main ()
9456{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009457static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009458test_array [0] = 0
9459
9460 ;
9461 return 0;
9462}
9463_ACEOF
9464rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009465if { (ac_try="$ac_compile"
9466case "(($ac_try" in
9467 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9468 *) ac_try_echo=$ac_try;;
9469esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009470eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009471 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009472 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009473 grep -v '^ *+' conftest.er1 >conftest.err
9474 rm -f conftest.er1
9475 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009477 (exit $ac_status); } && {
9478 test -z "$ac_c_werror_flag" ||
9479 test ! -s conftest.err
9480 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009481 ac_hi=$ac_mid
9482else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009483 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009484sed 's/^/| /' conftest.$ac_ext >&5
9485
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009486 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009487fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009488
9489rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009490done
9491case $ac_lo in
9492?*) ac_cv_sizeof_float=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009493'') if test "$ac_cv_type_float" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009494 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009495See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009496echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009497See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009498 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009499 else
9500 ac_cv_sizeof_float=0
9501 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009502esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009503else
Martin v. Löwis11437992002-04-12 09:54:03 +00009504 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009505/* confdefs.h. */
9506_ACEOF
9507cat confdefs.h >>conftest.$ac_ext
9508cat >>conftest.$ac_ext <<_ACEOF
9509/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009510$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009511 typedef float ac__type_sizeof_;
9512static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9513static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009514#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009515#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009516int
9517main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009518{
Martin v. Löwis11437992002-04-12 09:54:03 +00009519
9520 FILE *f = fopen ("conftest.val", "w");
9521 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009522 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009523 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009524 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009525 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009526 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009527 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009528 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009529 }
9530 else
9531 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009532 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009533 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009534 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009535 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009536 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009537 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009538
9539 ;
9540 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009541}
Martin v. Löwis11437992002-04-12 09:54:03 +00009542_ACEOF
9543rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009544if { (ac_try="$ac_link"
9545case "(($ac_try" in
9546 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9547 *) ac_try_echo=$ac_try;;
9548esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009549eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009550 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009551 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009553 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009554 { (case "(($ac_try" in
9555 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9556 *) ac_try_echo=$ac_try;;
9557esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009558eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009559 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009560 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009562 (exit $ac_status); }; }; then
9563 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009564else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009565 echo "$as_me: program exited with status $ac_status" >&5
9566echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009567sed 's/^/| /' conftest.$ac_ext >&5
9568
Martin v. Löwis11437992002-04-12 09:54:03 +00009569( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009570if test "$ac_cv_type_float" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009571 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009572See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009573echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009574See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009575 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009576 else
9577 ac_cv_sizeof_float=0
9578 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009579fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009580rm -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 +00009581fi
9582rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009583fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009584{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
9585echo "${ECHO_T}$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009586
9587
9588
Martin v. Löwis11437992002-04-12 09:54:03 +00009589cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009590#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00009591_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009592
9593
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009594{ echo "$as_me:$LINENO: checking for double" >&5
9595echo $ECHO_N "checking for double... $ECHO_C" >&6; }
9596if test "${ac_cv_type_double+set}" = set; then
9597 echo $ECHO_N "(cached) $ECHO_C" >&6
9598else
9599 cat >conftest.$ac_ext <<_ACEOF
9600/* confdefs.h. */
9601_ACEOF
9602cat confdefs.h >>conftest.$ac_ext
9603cat >>conftest.$ac_ext <<_ACEOF
9604/* end confdefs.h. */
9605$ac_includes_default
9606typedef double ac__type_new_;
9607int
9608main ()
9609{
9610if ((ac__type_new_ *) 0)
9611 return 0;
9612if (sizeof (ac__type_new_))
9613 return 0;
9614 ;
9615 return 0;
9616}
9617_ACEOF
9618rm -f conftest.$ac_objext
9619if { (ac_try="$ac_compile"
9620case "(($ac_try" in
9621 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9622 *) ac_try_echo=$ac_try;;
9623esac
9624eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9625 (eval "$ac_compile") 2>conftest.er1
9626 ac_status=$?
9627 grep -v '^ *+' conftest.er1 >conftest.err
9628 rm -f conftest.er1
9629 cat conftest.err >&5
9630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9631 (exit $ac_status); } && {
9632 test -z "$ac_c_werror_flag" ||
9633 test ! -s conftest.err
9634 } && test -s conftest.$ac_objext; then
9635 ac_cv_type_double=yes
9636else
9637 echo "$as_me: failed program was:" >&5
9638sed 's/^/| /' conftest.$ac_ext >&5
9639
9640 ac_cv_type_double=no
9641fi
9642
9643rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9644fi
9645{ echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
9646echo "${ECHO_T}$ac_cv_type_double" >&6; }
9647
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009648# The cast to long int works around a bug in the HP C Compiler
9649# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9650# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9651# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009652{ echo "$as_me:$LINENO: checking size of double" >&5
9653echo $ECHO_N "checking size of double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009654if test "${ac_cv_sizeof_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009655 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009656else
Martin v. Löwis11437992002-04-12 09:54:03 +00009657 if test "$cross_compiling" = yes; then
9658 # Depending upon the size, compute the lo and hi bounds.
9659cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009660/* confdefs.h. */
9661_ACEOF
9662cat confdefs.h >>conftest.$ac_ext
9663cat >>conftest.$ac_ext <<_ACEOF
9664/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009665$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009666 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009667int
9668main ()
9669{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009670static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009671test_array [0] = 0
9672
9673 ;
9674 return 0;
9675}
9676_ACEOF
9677rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009678if { (ac_try="$ac_compile"
9679case "(($ac_try" in
9680 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9681 *) ac_try_echo=$ac_try;;
9682esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009683eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009684 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009685 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009686 grep -v '^ *+' conftest.er1 >conftest.err
9687 rm -f conftest.er1
9688 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009689 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009690 (exit $ac_status); } && {
9691 test -z "$ac_c_werror_flag" ||
9692 test ! -s conftest.err
9693 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009694 ac_lo=0 ac_mid=0
9695 while :; do
9696 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009697/* confdefs.h. */
9698_ACEOF
9699cat confdefs.h >>conftest.$ac_ext
9700cat >>conftest.$ac_ext <<_ACEOF
9701/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009702$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009703 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009704int
9705main ()
9706{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009707static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009708test_array [0] = 0
9709
9710 ;
9711 return 0;
9712}
9713_ACEOF
9714rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009715if { (ac_try="$ac_compile"
9716case "(($ac_try" in
9717 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9718 *) ac_try_echo=$ac_try;;
9719esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009720eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009721 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009722 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009723 grep -v '^ *+' conftest.er1 >conftest.err
9724 rm -f conftest.er1
9725 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009727 (exit $ac_status); } && {
9728 test -z "$ac_c_werror_flag" ||
9729 test ! -s conftest.err
9730 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009731 ac_hi=$ac_mid; break
9732else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009733 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009734sed 's/^/| /' conftest.$ac_ext >&5
9735
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009736 ac_lo=`expr $ac_mid + 1`
9737 if test $ac_lo -le $ac_mid; then
9738 ac_lo= ac_hi=
9739 break
9740 fi
9741 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009742fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009743
9744rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009745 done
9746else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009747 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009748sed 's/^/| /' conftest.$ac_ext >&5
9749
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009750 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009751/* confdefs.h. */
9752_ACEOF
9753cat confdefs.h >>conftest.$ac_ext
9754cat >>conftest.$ac_ext <<_ACEOF
9755/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009756$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009757 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009758int
9759main ()
9760{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009761static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009762test_array [0] = 0
9763
9764 ;
9765 return 0;
9766}
9767_ACEOF
9768rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009769if { (ac_try="$ac_compile"
9770case "(($ac_try" in
9771 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9772 *) ac_try_echo=$ac_try;;
9773esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009774eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009775 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009776 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009777 grep -v '^ *+' conftest.er1 >conftest.err
9778 rm -f conftest.er1
9779 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009781 (exit $ac_status); } && {
9782 test -z "$ac_c_werror_flag" ||
9783 test ! -s conftest.err
9784 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009785 ac_hi=-1 ac_mid=-1
9786 while :; do
9787 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009788/* confdefs.h. */
9789_ACEOF
9790cat confdefs.h >>conftest.$ac_ext
9791cat >>conftest.$ac_ext <<_ACEOF
9792/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009793$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009794 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009795int
9796main ()
9797{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009798static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009799test_array [0] = 0
9800
9801 ;
9802 return 0;
9803}
9804_ACEOF
9805rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009806if { (ac_try="$ac_compile"
9807case "(($ac_try" in
9808 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9809 *) ac_try_echo=$ac_try;;
9810esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009811eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009812 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009813 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009814 grep -v '^ *+' conftest.er1 >conftest.err
9815 rm -f conftest.er1
9816 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009818 (exit $ac_status); } && {
9819 test -z "$ac_c_werror_flag" ||
9820 test ! -s conftest.err
9821 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009822 ac_lo=$ac_mid; break
9823else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009824 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009825sed 's/^/| /' conftest.$ac_ext >&5
9826
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009827 ac_hi=`expr '(' $ac_mid ')' - 1`
9828 if test $ac_mid -le $ac_hi; then
9829 ac_lo= ac_hi=
9830 break
9831 fi
9832 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009833fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009834
9835rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009836 done
9837else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009838 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009839sed 's/^/| /' conftest.$ac_ext >&5
9840
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009841 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009842fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009843
9844rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009845fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009846
9847rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009848# Binary search between lo and hi bounds.
9849while test "x$ac_lo" != "x$ac_hi"; do
9850 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9851 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 Oussoren74f29b42009-09-20 20:09:26 +00009858 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009859int
9860main ()
9861{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009862static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009863test_array [0] = 0
9864
9865 ;
9866 return 0;
9867}
9868_ACEOF
9869rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009870if { (ac_try="$ac_compile"
9871case "(($ac_try" in
9872 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9873 *) ac_try_echo=$ac_try;;
9874esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009875eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009876 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009877 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009878 grep -v '^ *+' conftest.er1 >conftest.err
9879 rm -f conftest.er1
9880 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009881 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009882 (exit $ac_status); } && {
9883 test -z "$ac_c_werror_flag" ||
9884 test ! -s conftest.err
9885 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009886 ac_hi=$ac_mid
9887else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009888 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009889sed 's/^/| /' conftest.$ac_ext >&5
9890
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009891 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009892fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009893
9894rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009895done
9896case $ac_lo in
9897?*) ac_cv_sizeof_double=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009898'') if test "$ac_cv_type_double" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009899 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009900See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009901echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009902See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009903 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009904 else
9905 ac_cv_sizeof_double=0
9906 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009907esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009908else
Martin v. Löwis11437992002-04-12 09:54:03 +00009909 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009910/* confdefs.h. */
9911_ACEOF
9912cat confdefs.h >>conftest.$ac_ext
9913cat >>conftest.$ac_ext <<_ACEOF
9914/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009915$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009916 typedef double ac__type_sizeof_;
9917static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9918static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009919#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009920#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009921int
9922main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009923{
Martin v. Löwis11437992002-04-12 09:54:03 +00009924
9925 FILE *f = fopen ("conftest.val", "w");
9926 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009927 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009928 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009929 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009930 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009931 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009932 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009933 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009934 }
9935 else
9936 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009937 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009938 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009939 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009940 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009941 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009942 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009943
9944 ;
9945 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009946}
Martin v. Löwis11437992002-04-12 09:54:03 +00009947_ACEOF
9948rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009949if { (ac_try="$ac_link"
9950case "(($ac_try" in
9951 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9952 *) ac_try_echo=$ac_try;;
9953esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009954eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009955 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009956 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009958 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009959 { (case "(($ac_try" in
9960 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9961 *) ac_try_echo=$ac_try;;
9962esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009963eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009964 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009965 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009966 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009967 (exit $ac_status); }; }; then
9968 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009969else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009970 echo "$as_me: program exited with status $ac_status" >&5
9971echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009972sed 's/^/| /' conftest.$ac_ext >&5
9973
Martin v. Löwis11437992002-04-12 09:54:03 +00009974( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009975if test "$ac_cv_type_double" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009976 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009977See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009978echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009979See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009980 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009981 else
9982 ac_cv_sizeof_double=0
9983 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009984fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009985rm -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 +00009986fi
9987rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009988fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009989{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
9990echo "${ECHO_T}$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009991
9992
9993
Martin v. Löwis11437992002-04-12 09:54:03 +00009994cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009995#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00009996_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009997
9998
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009999{ echo "$as_me:$LINENO: checking for fpos_t" >&5
10000echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6; }
10001if test "${ac_cv_type_fpos_t+set}" = set; then
10002 echo $ECHO_N "(cached) $ECHO_C" >&6
10003else
10004 cat >conftest.$ac_ext <<_ACEOF
10005/* confdefs.h. */
10006_ACEOF
10007cat confdefs.h >>conftest.$ac_ext
10008cat >>conftest.$ac_ext <<_ACEOF
10009/* end confdefs.h. */
10010$ac_includes_default
10011typedef fpos_t ac__type_new_;
10012int
10013main ()
10014{
10015if ((ac__type_new_ *) 0)
10016 return 0;
10017if (sizeof (ac__type_new_))
10018 return 0;
10019 ;
10020 return 0;
10021}
10022_ACEOF
10023rm -f conftest.$ac_objext
10024if { (ac_try="$ac_compile"
10025case "(($ac_try" in
10026 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10027 *) ac_try_echo=$ac_try;;
10028esac
10029eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10030 (eval "$ac_compile") 2>conftest.er1
10031 ac_status=$?
10032 grep -v '^ *+' conftest.er1 >conftest.err
10033 rm -f conftest.er1
10034 cat conftest.err >&5
10035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10036 (exit $ac_status); } && {
10037 test -z "$ac_c_werror_flag" ||
10038 test ! -s conftest.err
10039 } && test -s conftest.$ac_objext; then
10040 ac_cv_type_fpos_t=yes
10041else
10042 echo "$as_me: failed program was:" >&5
10043sed 's/^/| /' conftest.$ac_ext >&5
10044
10045 ac_cv_type_fpos_t=no
10046fi
10047
10048rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10049fi
10050{ echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
10051echo "${ECHO_T}$ac_cv_type_fpos_t" >&6; }
10052
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010053# The cast to long int works around a bug in the HP C Compiler
10054# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10055# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10056# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010057{ echo "$as_me:$LINENO: checking size of fpos_t" >&5
10058echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010059if test "${ac_cv_sizeof_fpos_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010060 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000010061else
Martin v. Löwis11437992002-04-12 09:54:03 +000010062 if test "$cross_compiling" = yes; then
10063 # Depending upon the size, compute the lo and hi bounds.
10064cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010065/* confdefs.h. */
10066_ACEOF
10067cat confdefs.h >>conftest.$ac_ext
10068cat >>conftest.$ac_ext <<_ACEOF
10069/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010070$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010071 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010072int
10073main ()
10074{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010075static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010076test_array [0] = 0
10077
10078 ;
10079 return 0;
10080}
10081_ACEOF
10082rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010083if { (ac_try="$ac_compile"
10084case "(($ac_try" in
10085 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10086 *) ac_try_echo=$ac_try;;
10087esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010088eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010089 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010090 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010091 grep -v '^ *+' conftest.er1 >conftest.err
10092 rm -f conftest.er1
10093 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010095 (exit $ac_status); } && {
10096 test -z "$ac_c_werror_flag" ||
10097 test ! -s conftest.err
10098 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010099 ac_lo=0 ac_mid=0
10100 while :; do
10101 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010102/* confdefs.h. */
10103_ACEOF
10104cat confdefs.h >>conftest.$ac_ext
10105cat >>conftest.$ac_ext <<_ACEOF
10106/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010107$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010108 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010109int
10110main ()
10111{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010112static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010113test_array [0] = 0
10114
10115 ;
10116 return 0;
10117}
10118_ACEOF
10119rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010120if { (ac_try="$ac_compile"
10121case "(($ac_try" in
10122 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10123 *) ac_try_echo=$ac_try;;
10124esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010125eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010126 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010127 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010128 grep -v '^ *+' conftest.er1 >conftest.err
10129 rm -f conftest.er1
10130 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010132 (exit $ac_status); } && {
10133 test -z "$ac_c_werror_flag" ||
10134 test ! -s conftest.err
10135 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010136 ac_hi=$ac_mid; break
10137else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010138 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010139sed 's/^/| /' conftest.$ac_ext >&5
10140
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010141 ac_lo=`expr $ac_mid + 1`
10142 if test $ac_lo -le $ac_mid; then
10143 ac_lo= ac_hi=
10144 break
10145 fi
10146 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010147fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010148
10149rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010150 done
10151else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010152 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010153sed 's/^/| /' conftest.$ac_ext >&5
10154
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010155 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010156/* confdefs.h. */
10157_ACEOF
10158cat confdefs.h >>conftest.$ac_ext
10159cat >>conftest.$ac_ext <<_ACEOF
10160/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010161$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010162 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010163int
10164main ()
10165{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010166static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010167test_array [0] = 0
10168
10169 ;
10170 return 0;
10171}
10172_ACEOF
10173rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010174if { (ac_try="$ac_compile"
10175case "(($ac_try" in
10176 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10177 *) ac_try_echo=$ac_try;;
10178esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010179eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010180 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010181 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010182 grep -v '^ *+' conftest.er1 >conftest.err
10183 rm -f conftest.er1
10184 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010186 (exit $ac_status); } && {
10187 test -z "$ac_c_werror_flag" ||
10188 test ! -s conftest.err
10189 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010190 ac_hi=-1 ac_mid=-1
10191 while :; do
10192 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010193/* confdefs.h. */
10194_ACEOF
10195cat confdefs.h >>conftest.$ac_ext
10196cat >>conftest.$ac_ext <<_ACEOF
10197/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010198$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010199 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010200int
10201main ()
10202{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010203static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010204test_array [0] = 0
10205
10206 ;
10207 return 0;
10208}
10209_ACEOF
10210rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010211if { (ac_try="$ac_compile"
10212case "(($ac_try" in
10213 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10214 *) ac_try_echo=$ac_try;;
10215esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010216eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010217 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010218 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010219 grep -v '^ *+' conftest.er1 >conftest.err
10220 rm -f conftest.er1
10221 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010223 (exit $ac_status); } && {
10224 test -z "$ac_c_werror_flag" ||
10225 test ! -s conftest.err
10226 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010227 ac_lo=$ac_mid; break
10228else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010229 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010230sed 's/^/| /' conftest.$ac_ext >&5
10231
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010232 ac_hi=`expr '(' $ac_mid ')' - 1`
10233 if test $ac_mid -le $ac_hi; then
10234 ac_lo= ac_hi=
10235 break
10236 fi
10237 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010238fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010239
10240rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010241 done
10242else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010243 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010244sed 's/^/| /' conftest.$ac_ext >&5
10245
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010246 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010247fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010248
10249rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010250fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010251
10252rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010253# Binary search between lo and hi bounds.
10254while test "x$ac_lo" != "x$ac_hi"; do
10255 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10256 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 Oussoren74f29b42009-09-20 20:09:26 +000010263 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010264int
10265main ()
10266{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010267static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010268test_array [0] = 0
10269
10270 ;
10271 return 0;
10272}
10273_ACEOF
10274rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010275if { (ac_try="$ac_compile"
10276case "(($ac_try" in
10277 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10278 *) ac_try_echo=$ac_try;;
10279esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010280eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010281 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010282 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010283 grep -v '^ *+' conftest.er1 >conftest.err
10284 rm -f conftest.er1
10285 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010287 (exit $ac_status); } && {
10288 test -z "$ac_c_werror_flag" ||
10289 test ! -s conftest.err
10290 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010291 ac_hi=$ac_mid
10292else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010293 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010294sed 's/^/| /' conftest.$ac_ext >&5
10295
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010296 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010297fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010298
10299rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010300done
10301case $ac_lo in
10302?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010303'') if test "$ac_cv_type_fpos_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010304 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010305See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010306echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010307See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010308 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010309 else
10310 ac_cv_sizeof_fpos_t=0
10311 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010312esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010313else
Martin v. Löwis11437992002-04-12 09:54:03 +000010314 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010315/* confdefs.h. */
10316_ACEOF
10317cat confdefs.h >>conftest.$ac_ext
10318cat >>conftest.$ac_ext <<_ACEOF
10319/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010320$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010321 typedef fpos_t ac__type_sizeof_;
10322static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10323static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010324#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010325#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010326int
10327main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010328{
Martin v. Löwis11437992002-04-12 09:54:03 +000010329
10330 FILE *f = fopen ("conftest.val", "w");
10331 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010332 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010333 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010334 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010335 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010336 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010337 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010338 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010339 }
10340 else
10341 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010342 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010343 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010344 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010345 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010346 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010347 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010348
10349 ;
10350 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010351}
Martin v. Löwis11437992002-04-12 09:54:03 +000010352_ACEOF
10353rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010354if { (ac_try="$ac_link"
10355case "(($ac_try" in
10356 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10357 *) ac_try_echo=$ac_try;;
10358esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010359eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010360 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010361 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010362 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010363 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010364 { (case "(($ac_try" in
10365 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10366 *) ac_try_echo=$ac_try;;
10367esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010368eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010369 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010370 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010371 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010372 (exit $ac_status); }; }; then
10373 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010374else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010375 echo "$as_me: program exited with status $ac_status" >&5
10376echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010377sed 's/^/| /' conftest.$ac_ext >&5
10378
Martin v. Löwis11437992002-04-12 09:54:03 +000010379( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010380if test "$ac_cv_type_fpos_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010381 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010382See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010383echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010384See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010385 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010386 else
10387 ac_cv_sizeof_fpos_t=0
10388 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010389fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010390rm -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 +000010391fi
10392rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010393fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010394{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
10395echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010396
10397
10398
Martin v. Löwis11437992002-04-12 09:54:03 +000010399cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010400#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010401_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010402
Michael W. Hudson54241132001-12-07 15:38:26 +000010403
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010404{ echo "$as_me:$LINENO: checking for size_t" >&5
10405echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
10406if test "${ac_cv_type_size_t+set}" = set; then
10407 echo $ECHO_N "(cached) $ECHO_C" >&6
10408else
10409 cat >conftest.$ac_ext <<_ACEOF
10410/* confdefs.h. */
10411_ACEOF
10412cat confdefs.h >>conftest.$ac_ext
10413cat >>conftest.$ac_ext <<_ACEOF
10414/* end confdefs.h. */
10415$ac_includes_default
10416typedef size_t ac__type_new_;
10417int
10418main ()
10419{
10420if ((ac__type_new_ *) 0)
10421 return 0;
10422if (sizeof (ac__type_new_))
10423 return 0;
10424 ;
10425 return 0;
10426}
10427_ACEOF
10428rm -f conftest.$ac_objext
10429if { (ac_try="$ac_compile"
10430case "(($ac_try" in
10431 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10432 *) ac_try_echo=$ac_try;;
10433esac
10434eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10435 (eval "$ac_compile") 2>conftest.er1
10436 ac_status=$?
10437 grep -v '^ *+' conftest.er1 >conftest.err
10438 rm -f conftest.er1
10439 cat conftest.err >&5
10440 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10441 (exit $ac_status); } && {
10442 test -z "$ac_c_werror_flag" ||
10443 test ! -s conftest.err
10444 } && test -s conftest.$ac_objext; then
10445 ac_cv_type_size_t=yes
10446else
10447 echo "$as_me: failed program was:" >&5
10448sed 's/^/| /' conftest.$ac_ext >&5
10449
10450 ac_cv_type_size_t=no
10451fi
10452
10453rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10454fi
10455{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
10456echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
10457
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010458# The cast to long int works around a bug in the HP C Compiler
10459# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10460# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10461# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010462{ echo "$as_me:$LINENO: checking size of size_t" >&5
10463echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010464if test "${ac_cv_sizeof_size_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010465 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +000010466else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010467 if test "$cross_compiling" = yes; then
10468 # Depending upon the size, compute the lo and hi bounds.
10469cat >conftest.$ac_ext <<_ACEOF
10470/* confdefs.h. */
10471_ACEOF
10472cat confdefs.h >>conftest.$ac_ext
10473cat >>conftest.$ac_ext <<_ACEOF
10474/* end confdefs.h. */
10475$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010476 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010477int
10478main ()
10479{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010480static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010481test_array [0] = 0
10482
10483 ;
10484 return 0;
10485}
10486_ACEOF
10487rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010488if { (ac_try="$ac_compile"
10489case "(($ac_try" in
10490 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10491 *) ac_try_echo=$ac_try;;
10492esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010493eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010494 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010495 ac_status=$?
10496 grep -v '^ *+' conftest.er1 >conftest.err
10497 rm -f conftest.er1
10498 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010500 (exit $ac_status); } && {
10501 test -z "$ac_c_werror_flag" ||
10502 test ! -s conftest.err
10503 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010504 ac_lo=0 ac_mid=0
10505 while :; do
10506 cat >conftest.$ac_ext <<_ACEOF
10507/* confdefs.h. */
10508_ACEOF
10509cat confdefs.h >>conftest.$ac_ext
10510cat >>conftest.$ac_ext <<_ACEOF
10511/* end confdefs.h. */
10512$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010513 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010514int
10515main ()
10516{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010517static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010518test_array [0] = 0
10519
10520 ;
10521 return 0;
10522}
10523_ACEOF
10524rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010525if { (ac_try="$ac_compile"
10526case "(($ac_try" in
10527 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10528 *) ac_try_echo=$ac_try;;
10529esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010530eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010531 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010532 ac_status=$?
10533 grep -v '^ *+' conftest.er1 >conftest.err
10534 rm -f conftest.er1
10535 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010537 (exit $ac_status); } && {
10538 test -z "$ac_c_werror_flag" ||
10539 test ! -s conftest.err
10540 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010541 ac_hi=$ac_mid; break
10542else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010543 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010544sed 's/^/| /' conftest.$ac_ext >&5
10545
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010546 ac_lo=`expr $ac_mid + 1`
10547 if test $ac_lo -le $ac_mid; then
10548 ac_lo= ac_hi=
10549 break
10550 fi
10551 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010552fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010553
10554rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010555 done
10556else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010557 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010558sed 's/^/| /' conftest.$ac_ext >&5
10559
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010560 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +000010561/* confdefs.h. */
10562_ACEOF
10563cat confdefs.h >>conftest.$ac_ext
10564cat >>conftest.$ac_ext <<_ACEOF
10565/* end confdefs.h. */
10566$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010567 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010568int
10569main ()
10570{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010571static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010572test_array [0] = 0
10573
10574 ;
10575 return 0;
10576}
10577_ACEOF
10578rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010579if { (ac_try="$ac_compile"
10580case "(($ac_try" in
10581 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10582 *) ac_try_echo=$ac_try;;
10583esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010584eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010585 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010586 ac_status=$?
10587 grep -v '^ *+' conftest.er1 >conftest.err
10588 rm -f conftest.er1
10589 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010591 (exit $ac_status); } && {
10592 test -z "$ac_c_werror_flag" ||
10593 test ! -s conftest.err
10594 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010595 ac_hi=-1 ac_mid=-1
10596 while :; do
10597 cat >conftest.$ac_ext <<_ACEOF
10598/* confdefs.h. */
10599_ACEOF
10600cat confdefs.h >>conftest.$ac_ext
10601cat >>conftest.$ac_ext <<_ACEOF
10602/* end confdefs.h. */
10603$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010604 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010605int
10606main ()
10607{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010608static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010609test_array [0] = 0
10610
10611 ;
10612 return 0;
10613}
10614_ACEOF
10615rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010616if { (ac_try="$ac_compile"
10617case "(($ac_try" in
10618 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10619 *) ac_try_echo=$ac_try;;
10620esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010621eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010622 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010623 ac_status=$?
10624 grep -v '^ *+' conftest.er1 >conftest.err
10625 rm -f conftest.er1
10626 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010628 (exit $ac_status); } && {
10629 test -z "$ac_c_werror_flag" ||
10630 test ! -s conftest.err
10631 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010632 ac_lo=$ac_mid; break
10633else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010634 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010635sed 's/^/| /' conftest.$ac_ext >&5
10636
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010637 ac_hi=`expr '(' $ac_mid ')' - 1`
10638 if test $ac_mid -le $ac_hi; then
10639 ac_lo= ac_hi=
10640 break
10641 fi
10642 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010643fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010644
10645rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010646 done
10647else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010648 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010649sed 's/^/| /' conftest.$ac_ext >&5
10650
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010651 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +000010652fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010653
10654rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010655fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010656
10657rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010658# Binary search between lo and hi bounds.
10659while test "x$ac_lo" != "x$ac_hi"; do
10660 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10661 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 Oussoren74f29b42009-09-20 20:09:26 +000010668 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010669int
10670main ()
10671{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010672static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010673test_array [0] = 0
10674
10675 ;
10676 return 0;
10677}
10678_ACEOF
10679rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010680if { (ac_try="$ac_compile"
10681case "(($ac_try" in
10682 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10683 *) ac_try_echo=$ac_try;;
10684esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010685eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010686 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010687 ac_status=$?
10688 grep -v '^ *+' conftest.er1 >conftest.err
10689 rm -f conftest.er1
10690 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010692 (exit $ac_status); } && {
10693 test -z "$ac_c_werror_flag" ||
10694 test ! -s conftest.err
10695 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010696 ac_hi=$ac_mid
10697else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010698 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010699sed 's/^/| /' conftest.$ac_ext >&5
10700
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010701 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010702fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010703
10704rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010705done
10706case $ac_lo in
10707?*) ac_cv_sizeof_size_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010708'') if test "$ac_cv_type_size_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010709 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010710See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010711echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010712See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010713 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010714 else
10715 ac_cv_sizeof_size_t=0
10716 fi ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010717esac
10718else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010719 cat >conftest.$ac_ext <<_ACEOF
10720/* confdefs.h. */
10721_ACEOF
10722cat confdefs.h >>conftest.$ac_ext
10723cat >>conftest.$ac_ext <<_ACEOF
10724/* end confdefs.h. */
10725$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010726 typedef size_t ac__type_sizeof_;
10727static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10728static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010729#include <stdio.h>
10730#include <stdlib.h>
10731int
10732main ()
10733{
10734
10735 FILE *f = fopen ("conftest.val", "w");
10736 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010737 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010738 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010739 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010740 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010741 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010742 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010743 fprintf (f, "%ld\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010744 }
10745 else
10746 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010747 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010748 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010749 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010750 fprintf (f, "%lu\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010751 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010752 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010753
10754 ;
10755 return 0;
10756}
10757_ACEOF
10758rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010759if { (ac_try="$ac_link"
10760case "(($ac_try" in
10761 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10762 *) ac_try_echo=$ac_try;;
10763esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010764eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010765 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010766 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010768 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010769 { (case "(($ac_try" in
10770 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10771 *) ac_try_echo=$ac_try;;
10772esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010773eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010774 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010775 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010777 (exit $ac_status); }; }; then
10778 ac_cv_sizeof_size_t=`cat conftest.val`
10779else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010780 echo "$as_me: program exited with status $ac_status" >&5
10781echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010782sed 's/^/| /' conftest.$ac_ext >&5
10783
10784( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010785if test "$ac_cv_type_size_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010786 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010787See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010788echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010789See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010790 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010791 else
10792 ac_cv_sizeof_size_t=0
10793 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +000010794fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010795rm -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 +000010796fi
10797rm -f conftest.val
Martin v. Löwis18e16552006-02-15 17:27:45 +000010798fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010799{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
10800echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010801
10802
10803
Martin v. Löwis18e16552006-02-15 17:27:45 +000010804cat >>confdefs.h <<_ACEOF
10805#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
10806_ACEOF
10807
10808
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010809{ echo "$as_me:$LINENO: checking for pid_t" >&5
10810echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
10811if test "${ac_cv_type_pid_t+set}" = set; then
10812 echo $ECHO_N "(cached) $ECHO_C" >&6
10813else
10814 cat >conftest.$ac_ext <<_ACEOF
10815/* confdefs.h. */
10816_ACEOF
10817cat confdefs.h >>conftest.$ac_ext
10818cat >>conftest.$ac_ext <<_ACEOF
10819/* end confdefs.h. */
10820$ac_includes_default
10821typedef pid_t ac__type_new_;
10822int
10823main ()
10824{
10825if ((ac__type_new_ *) 0)
10826 return 0;
10827if (sizeof (ac__type_new_))
10828 return 0;
10829 ;
10830 return 0;
10831}
10832_ACEOF
10833rm -f conftest.$ac_objext
10834if { (ac_try="$ac_compile"
10835case "(($ac_try" in
10836 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10837 *) ac_try_echo=$ac_try;;
10838esac
10839eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10840 (eval "$ac_compile") 2>conftest.er1
10841 ac_status=$?
10842 grep -v '^ *+' conftest.er1 >conftest.err
10843 rm -f conftest.er1
10844 cat conftest.err >&5
10845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10846 (exit $ac_status); } && {
10847 test -z "$ac_c_werror_flag" ||
10848 test ! -s conftest.err
10849 } && test -s conftest.$ac_objext; then
10850 ac_cv_type_pid_t=yes
10851else
10852 echo "$as_me: failed program was:" >&5
10853sed 's/^/| /' conftest.$ac_ext >&5
10854
10855 ac_cv_type_pid_t=no
10856fi
10857
10858rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10859fi
10860{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10861echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
10862
Christian Heimes400adb02008-02-01 08:12:03 +000010863# The cast to long int works around a bug in the HP C Compiler
10864# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10865# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10866# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010867{ echo "$as_me:$LINENO: checking size of pid_t" >&5
10868echo $ECHO_N "checking size of pid_t... $ECHO_C" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +000010869if test "${ac_cv_sizeof_pid_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010870 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes400adb02008-02-01 08:12:03 +000010871else
10872 if test "$cross_compiling" = yes; then
10873 # Depending upon the size, compute the lo and hi bounds.
10874cat >conftest.$ac_ext <<_ACEOF
10875/* confdefs.h. */
10876_ACEOF
10877cat confdefs.h >>conftest.$ac_ext
10878cat >>conftest.$ac_ext <<_ACEOF
10879/* end confdefs.h. */
10880$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010881 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010882int
10883main ()
10884{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010885static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Christian Heimes400adb02008-02-01 08:12:03 +000010886test_array [0] = 0
10887
10888 ;
10889 return 0;
10890}
10891_ACEOF
10892rm -f conftest.$ac_objext
10893if { (ac_try="$ac_compile"
10894case "(($ac_try" in
10895 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10896 *) ac_try_echo=$ac_try;;
10897esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010898eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010899 (eval "$ac_compile") 2>conftest.er1
10900 ac_status=$?
10901 grep -v '^ *+' conftest.er1 >conftest.err
10902 rm -f conftest.er1
10903 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010905 (exit $ac_status); } && {
10906 test -z "$ac_c_werror_flag" ||
10907 test ! -s conftest.err
10908 } && test -s conftest.$ac_objext; then
10909 ac_lo=0 ac_mid=0
10910 while :; do
10911 cat >conftest.$ac_ext <<_ACEOF
10912/* confdefs.h. */
10913_ACEOF
10914cat confdefs.h >>conftest.$ac_ext
10915cat >>conftest.$ac_ext <<_ACEOF
10916/* end confdefs.h. */
10917$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010918 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010919int
10920main ()
10921{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010922static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000010923test_array [0] = 0
10924
10925 ;
10926 return 0;
10927}
10928_ACEOF
10929rm -f conftest.$ac_objext
10930if { (ac_try="$ac_compile"
10931case "(($ac_try" in
10932 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10933 *) ac_try_echo=$ac_try;;
10934esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010935eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010936 (eval "$ac_compile") 2>conftest.er1
10937 ac_status=$?
10938 grep -v '^ *+' conftest.er1 >conftest.err
10939 rm -f conftest.er1
10940 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010942 (exit $ac_status); } && {
10943 test -z "$ac_c_werror_flag" ||
10944 test ! -s conftest.err
10945 } && test -s conftest.$ac_objext; then
10946 ac_hi=$ac_mid; break
10947else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010948 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010949sed 's/^/| /' conftest.$ac_ext >&5
10950
10951 ac_lo=`expr $ac_mid + 1`
10952 if test $ac_lo -le $ac_mid; then
10953 ac_lo= ac_hi=
10954 break
10955 fi
10956 ac_mid=`expr 2 '*' $ac_mid + 1`
10957fi
10958
10959rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10960 done
10961else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010962 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010963sed 's/^/| /' conftest.$ac_ext >&5
10964
10965 cat >conftest.$ac_ext <<_ACEOF
10966/* confdefs.h. */
10967_ACEOF
10968cat confdefs.h >>conftest.$ac_ext
10969cat >>conftest.$ac_ext <<_ACEOF
10970/* end confdefs.h. */
10971$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010972 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010973int
10974main ()
10975{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010976static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Christian Heimes400adb02008-02-01 08:12:03 +000010977test_array [0] = 0
10978
10979 ;
10980 return 0;
10981}
10982_ACEOF
10983rm -f conftest.$ac_objext
10984if { (ac_try="$ac_compile"
10985case "(($ac_try" in
10986 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10987 *) ac_try_echo=$ac_try;;
10988esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010989eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010990 (eval "$ac_compile") 2>conftest.er1
10991 ac_status=$?
10992 grep -v '^ *+' conftest.er1 >conftest.err
10993 rm -f conftest.er1
10994 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010996 (exit $ac_status); } && {
10997 test -z "$ac_c_werror_flag" ||
10998 test ! -s conftest.err
10999 } && test -s conftest.$ac_objext; then
11000 ac_hi=-1 ac_mid=-1
11001 while :; do
11002 cat >conftest.$ac_ext <<_ACEOF
11003/* confdefs.h. */
11004_ACEOF
11005cat confdefs.h >>conftest.$ac_ext
11006cat >>conftest.$ac_ext <<_ACEOF
11007/* end confdefs.h. */
11008$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011009 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000011010int
11011main ()
11012{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011013static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000011014test_array [0] = 0
11015
11016 ;
11017 return 0;
11018}
11019_ACEOF
11020rm -f conftest.$ac_objext
11021if { (ac_try="$ac_compile"
11022case "(($ac_try" in
11023 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11024 *) ac_try_echo=$ac_try;;
11025esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011026eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011027 (eval "$ac_compile") 2>conftest.er1
11028 ac_status=$?
11029 grep -v '^ *+' conftest.er1 >conftest.err
11030 rm -f conftest.er1
11031 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011033 (exit $ac_status); } && {
11034 test -z "$ac_c_werror_flag" ||
11035 test ! -s conftest.err
11036 } && test -s conftest.$ac_objext; then
11037 ac_lo=$ac_mid; break
11038else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011039 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011040sed 's/^/| /' conftest.$ac_ext >&5
11041
11042 ac_hi=`expr '(' $ac_mid ')' - 1`
11043 if test $ac_mid -le $ac_hi; then
11044 ac_lo= ac_hi=
11045 break
11046 fi
11047 ac_mid=`expr 2 '*' $ac_mid`
11048fi
11049
11050rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11051 done
11052else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011053 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011054sed 's/^/| /' conftest.$ac_ext >&5
11055
11056 ac_lo= ac_hi=
11057fi
11058
11059rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11060fi
11061
11062rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11063# Binary search between lo and hi bounds.
11064while test "x$ac_lo" != "x$ac_hi"; do
11065 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
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 Oussoren74f29b42009-09-20 20:09:26 +000011073 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000011074int
11075main ()
11076{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011077static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000011078test_array [0] = 0
11079
11080 ;
11081 return 0;
11082}
11083_ACEOF
11084rm -f conftest.$ac_objext
11085if { (ac_try="$ac_compile"
11086case "(($ac_try" in
11087 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11088 *) ac_try_echo=$ac_try;;
11089esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011090eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011091 (eval "$ac_compile") 2>conftest.er1
11092 ac_status=$?
11093 grep -v '^ *+' conftest.er1 >conftest.err
11094 rm -f conftest.er1
11095 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011097 (exit $ac_status); } && {
11098 test -z "$ac_c_werror_flag" ||
11099 test ! -s conftest.err
11100 } && test -s conftest.$ac_objext; then
11101 ac_hi=$ac_mid
11102else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011103 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011104sed 's/^/| /' conftest.$ac_ext >&5
11105
11106 ac_lo=`expr '(' $ac_mid ')' + 1`
11107fi
11108
11109rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11110done
11111case $ac_lo in
11112?*) ac_cv_sizeof_pid_t=$ac_lo;;
11113'') if test "$ac_cv_type_pid_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011114 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011115See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011116echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011117See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011118 { (exit 77); exit 77; }; }
Christian Heimes400adb02008-02-01 08:12:03 +000011119 else
11120 ac_cv_sizeof_pid_t=0
11121 fi ;;
11122esac
11123else
11124 cat >conftest.$ac_ext <<_ACEOF
11125/* confdefs.h. */
11126_ACEOF
11127cat confdefs.h >>conftest.$ac_ext
11128cat >>conftest.$ac_ext <<_ACEOF
11129/* end confdefs.h. */
11130$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011131 typedef pid_t ac__type_sizeof_;
11132static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11133static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Christian Heimes400adb02008-02-01 08:12:03 +000011134#include <stdio.h>
11135#include <stdlib.h>
11136int
11137main ()
11138{
11139
11140 FILE *f = fopen ("conftest.val", "w");
11141 if (! f)
11142 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011143 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Christian Heimes400adb02008-02-01 08:12:03 +000011144 {
11145 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011146 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes400adb02008-02-01 08:12:03 +000011147 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011148 fprintf (f, "%ld\n", i);
Christian Heimes400adb02008-02-01 08:12:03 +000011149 }
11150 else
11151 {
11152 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011153 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes400adb02008-02-01 08:12:03 +000011154 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011155 fprintf (f, "%lu\n", i);
Christian Heimes400adb02008-02-01 08:12:03 +000011156 }
11157 return ferror (f) || fclose (f) != 0;
11158
11159 ;
11160 return 0;
11161}
11162_ACEOF
11163rm -f conftest$ac_exeext
11164if { (ac_try="$ac_link"
11165case "(($ac_try" in
11166 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11167 *) ac_try_echo=$ac_try;;
11168esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011169eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011170 (eval "$ac_link") 2>&5
11171 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011172 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011173 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11174 { (case "(($ac_try" in
11175 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11176 *) ac_try_echo=$ac_try;;
11177esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011178eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011179 (eval "$ac_try") 2>&5
11180 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011182 (exit $ac_status); }; }; then
11183 ac_cv_sizeof_pid_t=`cat conftest.val`
11184else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011185 echo "$as_me: program exited with status $ac_status" >&5
11186echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011187sed 's/^/| /' conftest.$ac_ext >&5
11188
11189( exit $ac_status )
11190if test "$ac_cv_type_pid_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011191 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011192See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011193echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011194See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011195 { (exit 77); exit 77; }; }
Christian Heimes400adb02008-02-01 08:12:03 +000011196 else
11197 ac_cv_sizeof_pid_t=0
11198 fi
11199fi
11200rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11201fi
11202rm -f conftest.val
11203fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011204{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5
11205echo "${ECHO_T}$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +000011206
11207
11208
11209cat >>confdefs.h <<_ACEOF
11210#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
11211_ACEOF
11212
11213
Michael W. Hudson54241132001-12-07 15:38:26 +000011214
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011215{ echo "$as_me:$LINENO: checking for long long support" >&5
11216echo $ECHO_N "checking for long long support... $ECHO_C" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011217have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011218cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011219/* confdefs.h. */
11220_ACEOF
11221cat confdefs.h >>conftest.$ac_ext
11222cat >>conftest.$ac_ext <<_ACEOF
11223/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011224
Martin v. Löwis11437992002-04-12 09:54:03 +000011225int
11226main ()
11227{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011228long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011229 ;
11230 return 0;
11231}
11232_ACEOF
11233rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011234if { (ac_try="$ac_compile"
11235case "(($ac_try" in
11236 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11237 *) ac_try_echo=$ac_try;;
11238esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011239eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011240 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011241 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011242 grep -v '^ *+' conftest.er1 >conftest.err
11243 rm -f conftest.er1
11244 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011245 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011246 (exit $ac_status); } && {
11247 test -z "$ac_c_werror_flag" ||
11248 test ! -s conftest.err
11249 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011250
11251
11252cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011253#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011254_ACEOF
11255
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011256 have_long_long=yes
11257
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011258else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011259 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011260sed 's/^/| /' conftest.$ac_ext >&5
11261
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011262
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011263fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011264
11265rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011266{ echo "$as_me:$LINENO: result: $have_long_long" >&5
11267echo "${ECHO_T}$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000011268if test "$have_long_long" = yes ; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011269{ echo "$as_me:$LINENO: checking for long long" >&5
11270echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
11271if test "${ac_cv_type_long_long+set}" = set; then
11272 echo $ECHO_N "(cached) $ECHO_C" >&6
11273else
11274 cat >conftest.$ac_ext <<_ACEOF
11275/* confdefs.h. */
11276_ACEOF
11277cat confdefs.h >>conftest.$ac_ext
11278cat >>conftest.$ac_ext <<_ACEOF
11279/* end confdefs.h. */
11280$ac_includes_default
11281typedef long long ac__type_new_;
11282int
11283main ()
11284{
11285if ((ac__type_new_ *) 0)
11286 return 0;
11287if (sizeof (ac__type_new_))
11288 return 0;
11289 ;
11290 return 0;
11291}
11292_ACEOF
11293rm -f conftest.$ac_objext
11294if { (ac_try="$ac_compile"
11295case "(($ac_try" in
11296 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11297 *) ac_try_echo=$ac_try;;
11298esac
11299eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11300 (eval "$ac_compile") 2>conftest.er1
11301 ac_status=$?
11302 grep -v '^ *+' conftest.er1 >conftest.err
11303 rm -f conftest.er1
11304 cat conftest.err >&5
11305 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11306 (exit $ac_status); } && {
11307 test -z "$ac_c_werror_flag" ||
11308 test ! -s conftest.err
11309 } && test -s conftest.$ac_objext; then
11310 ac_cv_type_long_long=yes
11311else
11312 echo "$as_me: failed program was:" >&5
11313sed 's/^/| /' conftest.$ac_ext >&5
11314
11315 ac_cv_type_long_long=no
11316fi
11317
11318rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11319fi
11320{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
11321echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
11322
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011323# The cast to long int works around a bug in the HP C Compiler
11324# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11325# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11326# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011327{ echo "$as_me:$LINENO: checking size of long long" >&5
11328echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011329if test "${ac_cv_sizeof_long_long+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011330 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011331else
Martin v. Löwis11437992002-04-12 09:54:03 +000011332 if test "$cross_compiling" = yes; then
11333 # Depending upon the size, compute the lo and hi bounds.
11334cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011335/* confdefs.h. */
11336_ACEOF
11337cat confdefs.h >>conftest.$ac_ext
11338cat >>conftest.$ac_ext <<_ACEOF
11339/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011340$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011341 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011342int
11343main ()
11344{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011345static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011346test_array [0] = 0
11347
11348 ;
11349 return 0;
11350}
11351_ACEOF
11352rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011353if { (ac_try="$ac_compile"
11354case "(($ac_try" in
11355 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11356 *) ac_try_echo=$ac_try;;
11357esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011358eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011359 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011360 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011361 grep -v '^ *+' conftest.er1 >conftest.err
11362 rm -f conftest.er1
11363 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011364 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011365 (exit $ac_status); } && {
11366 test -z "$ac_c_werror_flag" ||
11367 test ! -s conftest.err
11368 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011369 ac_lo=0 ac_mid=0
11370 while :; do
11371 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011372/* confdefs.h. */
11373_ACEOF
11374cat confdefs.h >>conftest.$ac_ext
11375cat >>conftest.$ac_ext <<_ACEOF
11376/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011377$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011378 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011379int
11380main ()
11381{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011382static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011383test_array [0] = 0
11384
11385 ;
11386 return 0;
11387}
11388_ACEOF
11389rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011390if { (ac_try="$ac_compile"
11391case "(($ac_try" in
11392 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11393 *) ac_try_echo=$ac_try;;
11394esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011395eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011396 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011397 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011398 grep -v '^ *+' conftest.er1 >conftest.err
11399 rm -f conftest.er1
11400 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011402 (exit $ac_status); } && {
11403 test -z "$ac_c_werror_flag" ||
11404 test ! -s conftest.err
11405 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011406 ac_hi=$ac_mid; break
11407else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011408 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011409sed 's/^/| /' conftest.$ac_ext >&5
11410
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011411 ac_lo=`expr $ac_mid + 1`
11412 if test $ac_lo -le $ac_mid; then
11413 ac_lo= ac_hi=
11414 break
11415 fi
11416 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011417fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011418
11419rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011420 done
11421else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011422 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011423sed 's/^/| /' conftest.$ac_ext >&5
11424
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011425 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011426/* confdefs.h. */
11427_ACEOF
11428cat confdefs.h >>conftest.$ac_ext
11429cat >>conftest.$ac_ext <<_ACEOF
11430/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011431$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011432 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011433int
11434main ()
11435{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011436static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011437test_array [0] = 0
11438
11439 ;
11440 return 0;
11441}
11442_ACEOF
11443rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011444if { (ac_try="$ac_compile"
11445case "(($ac_try" in
11446 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11447 *) ac_try_echo=$ac_try;;
11448esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011449eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011450 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011451 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011452 grep -v '^ *+' conftest.er1 >conftest.err
11453 rm -f conftest.er1
11454 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011456 (exit $ac_status); } && {
11457 test -z "$ac_c_werror_flag" ||
11458 test ! -s conftest.err
11459 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011460 ac_hi=-1 ac_mid=-1
11461 while :; do
11462 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011463/* confdefs.h. */
11464_ACEOF
11465cat confdefs.h >>conftest.$ac_ext
11466cat >>conftest.$ac_ext <<_ACEOF
11467/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011468$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011469 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011470int
11471main ()
11472{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011473static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011474test_array [0] = 0
11475
11476 ;
11477 return 0;
11478}
11479_ACEOF
11480rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011481if { (ac_try="$ac_compile"
11482case "(($ac_try" in
11483 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11484 *) ac_try_echo=$ac_try;;
11485esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011486eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011487 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011488 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011489 grep -v '^ *+' conftest.er1 >conftest.err
11490 rm -f conftest.er1
11491 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011492 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011493 (exit $ac_status); } && {
11494 test -z "$ac_c_werror_flag" ||
11495 test ! -s conftest.err
11496 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011497 ac_lo=$ac_mid; break
11498else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011499 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011500sed 's/^/| /' conftest.$ac_ext >&5
11501
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011502 ac_hi=`expr '(' $ac_mid ')' - 1`
11503 if test $ac_mid -le $ac_hi; then
11504 ac_lo= ac_hi=
11505 break
11506 fi
11507 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000011508fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011509
11510rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011511 done
11512else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011513 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011514sed 's/^/| /' conftest.$ac_ext >&5
11515
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011516 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000011517fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011518
11519rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011520fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011521
11522rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011523# Binary search between lo and hi bounds.
11524while test "x$ac_lo" != "x$ac_hi"; do
11525 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11526 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 Oussoren74f29b42009-09-20 20:09:26 +000011533 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011534int
11535main ()
11536{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011537static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011538test_array [0] = 0
11539
11540 ;
11541 return 0;
11542}
11543_ACEOF
11544rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011545if { (ac_try="$ac_compile"
11546case "(($ac_try" in
11547 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11548 *) ac_try_echo=$ac_try;;
11549esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011550eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011551 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011552 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011553 grep -v '^ *+' conftest.er1 >conftest.err
11554 rm -f conftest.er1
11555 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011556 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011557 (exit $ac_status); } && {
11558 test -z "$ac_c_werror_flag" ||
11559 test ! -s conftest.err
11560 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011561 ac_hi=$ac_mid
11562else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011563 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011564sed 's/^/| /' conftest.$ac_ext >&5
11565
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011566 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011567fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011568
11569rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011570done
11571case $ac_lo in
11572?*) ac_cv_sizeof_long_long=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011573'') if test "$ac_cv_type_long_long" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011574 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011575See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011576echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011577See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011578 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011579 else
11580 ac_cv_sizeof_long_long=0
11581 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011582esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011583else
Martin v. Löwis11437992002-04-12 09:54:03 +000011584 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011585/* confdefs.h. */
11586_ACEOF
11587cat confdefs.h >>conftest.$ac_ext
11588cat >>conftest.$ac_ext <<_ACEOF
11589/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011590$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011591 typedef long long ac__type_sizeof_;
11592static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11593static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011594#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011595#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011596int
11597main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011598{
Martin v. Löwis11437992002-04-12 09:54:03 +000011599
11600 FILE *f = fopen ("conftest.val", "w");
11601 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011602 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011603 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011604 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011605 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011606 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011607 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011608 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011609 }
11610 else
11611 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011612 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011613 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011614 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011615 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011616 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011617 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011618
11619 ;
11620 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011621}
Martin v. Löwis11437992002-04-12 09:54:03 +000011622_ACEOF
11623rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011624if { (ac_try="$ac_link"
11625case "(($ac_try" in
11626 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11627 *) ac_try_echo=$ac_try;;
11628esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011629eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011630 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011631 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011633 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011634 { (case "(($ac_try" in
11635 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11636 *) ac_try_echo=$ac_try;;
11637esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011638eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011639 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011640 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011642 (exit $ac_status); }; }; then
11643 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011644else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011645 echo "$as_me: program exited with status $ac_status" >&5
11646echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011647sed 's/^/| /' conftest.$ac_ext >&5
11648
Martin v. Löwis11437992002-04-12 09:54:03 +000011649( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011650if test "$ac_cv_type_long_long" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011651 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011652See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011653echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011654See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011655 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011656 else
11657 ac_cv_sizeof_long_long=0
11658 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011659fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011660rm -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 +000011661fi
11662rm -f conftest.val
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011663fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011664{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
11665echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011666
11667
11668
Martin v. Löwis11437992002-04-12 09:54:03 +000011669cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011670#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000011671_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011672
Michael W. Hudson54241132001-12-07 15:38:26 +000011673
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011674fi
11675
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011676{ echo "$as_me:$LINENO: checking for long double support" >&5
11677echo $ECHO_N "checking for long double support... $ECHO_C" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011678have_long_double=no
11679cat >conftest.$ac_ext <<_ACEOF
11680/* confdefs.h. */
11681_ACEOF
11682cat confdefs.h >>conftest.$ac_ext
11683cat >>conftest.$ac_ext <<_ACEOF
11684/* end confdefs.h. */
11685
11686int
11687main ()
11688{
11689long double x; x = (long double)0;
11690 ;
11691 return 0;
11692}
11693_ACEOF
11694rm -f conftest.$ac_objext
11695if { (ac_try="$ac_compile"
11696case "(($ac_try" in
11697 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11698 *) ac_try_echo=$ac_try;;
11699esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011700eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011701 (eval "$ac_compile") 2>conftest.er1
11702 ac_status=$?
11703 grep -v '^ *+' conftest.er1 >conftest.err
11704 rm -f conftest.er1
11705 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011707 (exit $ac_status); } && {
11708 test -z "$ac_c_werror_flag" ||
11709 test ! -s conftest.err
11710 } && test -s conftest.$ac_objext; then
11711
11712
11713cat >>confdefs.h <<\_ACEOF
11714#define HAVE_LONG_DOUBLE 1
11715_ACEOF
11716
11717 have_long_double=yes
11718
11719else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011720 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011721sed 's/^/| /' conftest.$ac_ext >&5
11722
11723
11724fi
11725
11726rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011727{ echo "$as_me:$LINENO: result: $have_long_double" >&5
11728echo "${ECHO_T}$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011729if test "$have_long_double" = yes ; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011730{ echo "$as_me:$LINENO: checking for long double" >&5
11731echo $ECHO_N "checking for long double... $ECHO_C" >&6; }
11732if test "${ac_cv_type_long_double+set}" = set; then
11733 echo $ECHO_N "(cached) $ECHO_C" >&6
11734else
11735 cat >conftest.$ac_ext <<_ACEOF
11736/* confdefs.h. */
11737_ACEOF
11738cat confdefs.h >>conftest.$ac_ext
11739cat >>conftest.$ac_ext <<_ACEOF
11740/* end confdefs.h. */
11741$ac_includes_default
11742typedef long double ac__type_new_;
11743int
11744main ()
11745{
11746if ((ac__type_new_ *) 0)
11747 return 0;
11748if (sizeof (ac__type_new_))
11749 return 0;
11750 ;
11751 return 0;
11752}
11753_ACEOF
11754rm -f conftest.$ac_objext
11755if { (ac_try="$ac_compile"
11756case "(($ac_try" in
11757 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11758 *) ac_try_echo=$ac_try;;
11759esac
11760eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11761 (eval "$ac_compile") 2>conftest.er1
11762 ac_status=$?
11763 grep -v '^ *+' conftest.er1 >conftest.err
11764 rm -f conftest.er1
11765 cat conftest.err >&5
11766 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11767 (exit $ac_status); } && {
11768 test -z "$ac_c_werror_flag" ||
11769 test ! -s conftest.err
11770 } && test -s conftest.$ac_objext; then
11771 ac_cv_type_long_double=yes
11772else
11773 echo "$as_me: failed program was:" >&5
11774sed 's/^/| /' conftest.$ac_ext >&5
11775
11776 ac_cv_type_long_double=no
11777fi
11778
11779rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11780fi
11781{ echo "$as_me:$LINENO: result: $ac_cv_type_long_double" >&5
11782echo "${ECHO_T}$ac_cv_type_long_double" >&6; }
11783
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011784# The cast to long int works around a bug in the HP C Compiler
11785# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11786# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11787# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011788{ echo "$as_me:$LINENO: checking size of long double" >&5
11789echo $ECHO_N "checking size of long double... $ECHO_C" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011790if test "${ac_cv_sizeof_long_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011791 echo $ECHO_N "(cached) $ECHO_C" >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011792else
11793 if test "$cross_compiling" = yes; then
11794 # Depending upon the size, compute the lo and hi bounds.
11795cat >conftest.$ac_ext <<_ACEOF
11796/* confdefs.h. */
11797_ACEOF
11798cat confdefs.h >>conftest.$ac_ext
11799cat >>conftest.$ac_ext <<_ACEOF
11800/* end confdefs.h. */
11801$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011802 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011803int
11804main ()
11805{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011806static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011807test_array [0] = 0
11808
11809 ;
11810 return 0;
11811}
11812_ACEOF
11813rm -f conftest.$ac_objext
11814if { (ac_try="$ac_compile"
11815case "(($ac_try" in
11816 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11817 *) ac_try_echo=$ac_try;;
11818esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011819eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011820 (eval "$ac_compile") 2>conftest.er1
11821 ac_status=$?
11822 grep -v '^ *+' conftest.er1 >conftest.err
11823 rm -f conftest.er1
11824 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011826 (exit $ac_status); } && {
11827 test -z "$ac_c_werror_flag" ||
11828 test ! -s conftest.err
11829 } && test -s conftest.$ac_objext; then
11830 ac_lo=0 ac_mid=0
11831 while :; do
11832 cat >conftest.$ac_ext <<_ACEOF
11833/* confdefs.h. */
11834_ACEOF
11835cat confdefs.h >>conftest.$ac_ext
11836cat >>conftest.$ac_ext <<_ACEOF
11837/* end confdefs.h. */
11838$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011839 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011840int
11841main ()
11842{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011843static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011844test_array [0] = 0
11845
11846 ;
11847 return 0;
11848}
11849_ACEOF
11850rm -f conftest.$ac_objext
11851if { (ac_try="$ac_compile"
11852case "(($ac_try" in
11853 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11854 *) ac_try_echo=$ac_try;;
11855esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011856eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011857 (eval "$ac_compile") 2>conftest.er1
11858 ac_status=$?
11859 grep -v '^ *+' conftest.er1 >conftest.err
11860 rm -f conftest.er1
11861 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011863 (exit $ac_status); } && {
11864 test -z "$ac_c_werror_flag" ||
11865 test ! -s conftest.err
11866 } && test -s conftest.$ac_objext; then
11867 ac_hi=$ac_mid; break
11868else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011869 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011870sed 's/^/| /' conftest.$ac_ext >&5
11871
11872 ac_lo=`expr $ac_mid + 1`
11873 if test $ac_lo -le $ac_mid; then
11874 ac_lo= ac_hi=
11875 break
11876 fi
11877 ac_mid=`expr 2 '*' $ac_mid + 1`
11878fi
11879
11880rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11881 done
11882else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011883 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011884sed 's/^/| /' conftest.$ac_ext >&5
11885
11886 cat >conftest.$ac_ext <<_ACEOF
11887/* confdefs.h. */
11888_ACEOF
11889cat confdefs.h >>conftest.$ac_ext
11890cat >>conftest.$ac_ext <<_ACEOF
11891/* end confdefs.h. */
11892$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011893 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011894int
11895main ()
11896{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011897static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011898test_array [0] = 0
11899
11900 ;
11901 return 0;
11902}
11903_ACEOF
11904rm -f conftest.$ac_objext
11905if { (ac_try="$ac_compile"
11906case "(($ac_try" in
11907 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11908 *) ac_try_echo=$ac_try;;
11909esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011910eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011911 (eval "$ac_compile") 2>conftest.er1
11912 ac_status=$?
11913 grep -v '^ *+' conftest.er1 >conftest.err
11914 rm -f conftest.er1
11915 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011917 (exit $ac_status); } && {
11918 test -z "$ac_c_werror_flag" ||
11919 test ! -s conftest.err
11920 } && test -s conftest.$ac_objext; then
11921 ac_hi=-1 ac_mid=-1
11922 while :; do
11923 cat >conftest.$ac_ext <<_ACEOF
11924/* confdefs.h. */
11925_ACEOF
11926cat confdefs.h >>conftest.$ac_ext
11927cat >>conftest.$ac_ext <<_ACEOF
11928/* end confdefs.h. */
11929$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011930 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011931int
11932main ()
11933{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011934static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011935test_array [0] = 0
11936
11937 ;
11938 return 0;
11939}
11940_ACEOF
11941rm -f conftest.$ac_objext
11942if { (ac_try="$ac_compile"
11943case "(($ac_try" in
11944 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11945 *) ac_try_echo=$ac_try;;
11946esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011947eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011948 (eval "$ac_compile") 2>conftest.er1
11949 ac_status=$?
11950 grep -v '^ *+' conftest.er1 >conftest.err
11951 rm -f conftest.er1
11952 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011954 (exit $ac_status); } && {
11955 test -z "$ac_c_werror_flag" ||
11956 test ! -s conftest.err
11957 } && test -s conftest.$ac_objext; then
11958 ac_lo=$ac_mid; break
11959else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011960 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011961sed 's/^/| /' conftest.$ac_ext >&5
11962
11963 ac_hi=`expr '(' $ac_mid ')' - 1`
11964 if test $ac_mid -le $ac_hi; then
11965 ac_lo= ac_hi=
11966 break
11967 fi
11968 ac_mid=`expr 2 '*' $ac_mid`
11969fi
11970
11971rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11972 done
11973else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011974 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011975sed 's/^/| /' conftest.$ac_ext >&5
11976
11977 ac_lo= ac_hi=
11978fi
11979
11980rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11981fi
11982
11983rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11984# Binary search between lo and hi bounds.
11985while test "x$ac_lo" != "x$ac_hi"; do
11986 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
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 Oussoren74f29b42009-09-20 20:09:26 +000011994 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011995int
11996main ()
11997{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011998static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011999test_array [0] = 0
12000
12001 ;
12002 return 0;
12003}
12004_ACEOF
12005rm -f conftest.$ac_objext
12006if { (ac_try="$ac_compile"
12007case "(($ac_try" in
12008 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12009 *) ac_try_echo=$ac_try;;
12010esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012011eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012012 (eval "$ac_compile") 2>conftest.er1
12013 ac_status=$?
12014 grep -v '^ *+' conftest.er1 >conftest.err
12015 rm -f conftest.er1
12016 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012018 (exit $ac_status); } && {
12019 test -z "$ac_c_werror_flag" ||
12020 test ! -s conftest.err
12021 } && test -s conftest.$ac_objext; then
12022 ac_hi=$ac_mid
12023else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012024 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012025sed 's/^/| /' conftest.$ac_ext >&5
12026
12027 ac_lo=`expr '(' $ac_mid ')' + 1`
12028fi
12029
12030rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12031done
12032case $ac_lo in
12033?*) ac_cv_sizeof_long_double=$ac_lo;;
12034'') if test "$ac_cv_type_long_double" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012035 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012036See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012037echo "$as_me: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012038See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012039 { (exit 77); exit 77; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012040 else
12041 ac_cv_sizeof_long_double=0
12042 fi ;;
12043esac
12044else
12045 cat >conftest.$ac_ext <<_ACEOF
12046/* confdefs.h. */
12047_ACEOF
12048cat confdefs.h >>conftest.$ac_ext
12049cat >>conftest.$ac_ext <<_ACEOF
12050/* end confdefs.h. */
12051$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012052 typedef long double ac__type_sizeof_;
12053static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12054static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012055#include <stdio.h>
12056#include <stdlib.h>
12057int
12058main ()
12059{
12060
12061 FILE *f = fopen ("conftest.val", "w");
12062 if (! f)
12063 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012064 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012065 {
12066 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012067 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012068 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012069 fprintf (f, "%ld\n", i);
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012070 }
12071 else
12072 {
12073 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012074 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012075 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012076 fprintf (f, "%lu\n", i);
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012077 }
12078 return ferror (f) || fclose (f) != 0;
12079
12080 ;
12081 return 0;
12082}
12083_ACEOF
12084rm -f conftest$ac_exeext
12085if { (ac_try="$ac_link"
12086case "(($ac_try" in
12087 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12088 *) ac_try_echo=$ac_try;;
12089esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012090eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012091 (eval "$ac_link") 2>&5
12092 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012094 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12095 { (case "(($ac_try" in
12096 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12097 *) ac_try_echo=$ac_try;;
12098esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012099eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012100 (eval "$ac_try") 2>&5
12101 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012103 (exit $ac_status); }; }; then
12104 ac_cv_sizeof_long_double=`cat conftest.val`
12105else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012106 echo "$as_me: program exited with status $ac_status" >&5
12107echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012108sed 's/^/| /' conftest.$ac_ext >&5
12109
12110( exit $ac_status )
12111if test "$ac_cv_type_long_double" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012112 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012113See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012114echo "$as_me: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012115See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012116 { (exit 77); exit 77; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012117 else
12118 ac_cv_sizeof_long_double=0
12119 fi
12120fi
12121rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12122fi
12123rm -f conftest.val
12124fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012125{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5
12126echo "${ECHO_T}$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012127
12128
12129
12130cat >>confdefs.h <<_ACEOF
12131#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
12132_ACEOF
12133
12134
12135fi
12136
12137
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012138{ echo "$as_me:$LINENO: checking for _Bool support" >&5
12139echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012140have_c99_bool=no
12141cat >conftest.$ac_ext <<_ACEOF
12142/* confdefs.h. */
12143_ACEOF
12144cat confdefs.h >>conftest.$ac_ext
12145cat >>conftest.$ac_ext <<_ACEOF
12146/* end confdefs.h. */
12147
12148int
12149main ()
12150{
12151_Bool x; x = (_Bool)0;
12152 ;
12153 return 0;
12154}
12155_ACEOF
12156rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012157if { (ac_try="$ac_compile"
12158case "(($ac_try" in
12159 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12160 *) ac_try_echo=$ac_try;;
12161esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012162eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012163 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012164 ac_status=$?
12165 grep -v '^ *+' conftest.er1 >conftest.err
12166 rm -f conftest.er1
12167 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012169 (exit $ac_status); } && {
12170 test -z "$ac_c_werror_flag" ||
12171 test ! -s conftest.err
12172 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012173
12174
12175cat >>confdefs.h <<\_ACEOF
12176#define HAVE_C99_BOOL 1
12177_ACEOF
12178
12179 have_c99_bool=yes
12180
12181else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012182 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012183sed 's/^/| /' conftest.$ac_ext >&5
12184
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012185
Thomas Woutersb2137042007-02-01 18:02:27 +000012186fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012187
12188rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012189{ echo "$as_me:$LINENO: result: $have_c99_bool" >&5
12190echo "${ECHO_T}$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012191if test "$have_c99_bool" = yes ; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012192{ echo "$as_me:$LINENO: checking for _Bool" >&5
12193echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; }
12194if test "${ac_cv_type__Bool+set}" = set; then
12195 echo $ECHO_N "(cached) $ECHO_C" >&6
12196else
12197 cat >conftest.$ac_ext <<_ACEOF
12198/* confdefs.h. */
12199_ACEOF
12200cat confdefs.h >>conftest.$ac_ext
12201cat >>conftest.$ac_ext <<_ACEOF
12202/* end confdefs.h. */
12203$ac_includes_default
12204typedef _Bool ac__type_new_;
12205int
12206main ()
12207{
12208if ((ac__type_new_ *) 0)
12209 return 0;
12210if (sizeof (ac__type_new_))
12211 return 0;
12212 ;
12213 return 0;
12214}
12215_ACEOF
12216rm -f conftest.$ac_objext
12217if { (ac_try="$ac_compile"
12218case "(($ac_try" in
12219 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12220 *) ac_try_echo=$ac_try;;
12221esac
12222eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12223 (eval "$ac_compile") 2>conftest.er1
12224 ac_status=$?
12225 grep -v '^ *+' conftest.er1 >conftest.err
12226 rm -f conftest.er1
12227 cat conftest.err >&5
12228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12229 (exit $ac_status); } && {
12230 test -z "$ac_c_werror_flag" ||
12231 test ! -s conftest.err
12232 } && test -s conftest.$ac_objext; then
12233 ac_cv_type__Bool=yes
12234else
12235 echo "$as_me: failed program was:" >&5
12236sed 's/^/| /' conftest.$ac_ext >&5
12237
12238 ac_cv_type__Bool=no
12239fi
12240
12241rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12242fi
12243{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
12244echo "${ECHO_T}$ac_cv_type__Bool" >&6; }
12245
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012246# The cast to long int works around a bug in the HP C Compiler
12247# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12248# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12249# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012250{ echo "$as_me:$LINENO: checking size of _Bool" >&5
12251echo $ECHO_N "checking size of _Bool... $ECHO_C" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012252if test "${ac_cv_sizeof__Bool+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012253 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Woutersb2137042007-02-01 18:02:27 +000012254else
12255 if test "$cross_compiling" = yes; then
12256 # Depending upon the size, compute the lo and hi bounds.
12257cat >conftest.$ac_ext <<_ACEOF
12258/* confdefs.h. */
12259_ACEOF
12260cat confdefs.h >>conftest.$ac_ext
12261cat >>conftest.$ac_ext <<_ACEOF
12262/* end confdefs.h. */
12263$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012264 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012265int
12266main ()
12267{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012268static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012269test_array [0] = 0
12270
12271 ;
12272 return 0;
12273}
12274_ACEOF
12275rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012276if { (ac_try="$ac_compile"
12277case "(($ac_try" in
12278 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12279 *) ac_try_echo=$ac_try;;
12280esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012281eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012282 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012283 ac_status=$?
12284 grep -v '^ *+' conftest.er1 >conftest.err
12285 rm -f conftest.er1
12286 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012287 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012288 (exit $ac_status); } && {
12289 test -z "$ac_c_werror_flag" ||
12290 test ! -s conftest.err
12291 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012292 ac_lo=0 ac_mid=0
12293 while :; do
12294 cat >conftest.$ac_ext <<_ACEOF
12295/* confdefs.h. */
12296_ACEOF
12297cat confdefs.h >>conftest.$ac_ext
12298cat >>conftest.$ac_ext <<_ACEOF
12299/* end confdefs.h. */
12300$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012301 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012302int
12303main ()
12304{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012305static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012306test_array [0] = 0
12307
12308 ;
12309 return 0;
12310}
12311_ACEOF
12312rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012313if { (ac_try="$ac_compile"
12314case "(($ac_try" in
12315 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12316 *) ac_try_echo=$ac_try;;
12317esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012318eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012319 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012320 ac_status=$?
12321 grep -v '^ *+' conftest.er1 >conftest.err
12322 rm -f conftest.er1
12323 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012325 (exit $ac_status); } && {
12326 test -z "$ac_c_werror_flag" ||
12327 test ! -s conftest.err
12328 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012329 ac_hi=$ac_mid; break
12330else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012331 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012332sed 's/^/| /' conftest.$ac_ext >&5
12333
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012334 ac_lo=`expr $ac_mid + 1`
12335 if test $ac_lo -le $ac_mid; then
12336 ac_lo= ac_hi=
12337 break
12338 fi
12339 ac_mid=`expr 2 '*' $ac_mid + 1`
Thomas Woutersb2137042007-02-01 18:02:27 +000012340fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012341
12342rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012343 done
12344else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012345 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012346sed 's/^/| /' conftest.$ac_ext >&5
12347
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012348 cat >conftest.$ac_ext <<_ACEOF
Thomas Woutersb2137042007-02-01 18:02:27 +000012349/* confdefs.h. */
12350_ACEOF
12351cat confdefs.h >>conftest.$ac_ext
12352cat >>conftest.$ac_ext <<_ACEOF
12353/* end confdefs.h. */
12354$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012355 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012356int
12357main ()
12358{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012359static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012360test_array [0] = 0
12361
12362 ;
12363 return 0;
12364}
12365_ACEOF
12366rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012367if { (ac_try="$ac_compile"
12368case "(($ac_try" in
12369 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12370 *) ac_try_echo=$ac_try;;
12371esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012372eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012373 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012374 ac_status=$?
12375 grep -v '^ *+' conftest.er1 >conftest.err
12376 rm -f conftest.er1
12377 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012378 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012379 (exit $ac_status); } && {
12380 test -z "$ac_c_werror_flag" ||
12381 test ! -s conftest.err
12382 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012383 ac_hi=-1 ac_mid=-1
12384 while :; do
12385 cat >conftest.$ac_ext <<_ACEOF
12386/* confdefs.h. */
12387_ACEOF
12388cat confdefs.h >>conftest.$ac_ext
12389cat >>conftest.$ac_ext <<_ACEOF
12390/* end confdefs.h. */
12391$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012392 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012393int
12394main ()
12395{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012396static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012397test_array [0] = 0
12398
12399 ;
12400 return 0;
12401}
12402_ACEOF
12403rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012404if { (ac_try="$ac_compile"
12405case "(($ac_try" in
12406 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12407 *) ac_try_echo=$ac_try;;
12408esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012409eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012410 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012411 ac_status=$?
12412 grep -v '^ *+' conftest.er1 >conftest.err
12413 rm -f conftest.er1
12414 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012416 (exit $ac_status); } && {
12417 test -z "$ac_c_werror_flag" ||
12418 test ! -s conftest.err
12419 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012420 ac_lo=$ac_mid; break
12421else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012422 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012423sed 's/^/| /' conftest.$ac_ext >&5
12424
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012425 ac_hi=`expr '(' $ac_mid ')' - 1`
12426 if test $ac_mid -le $ac_hi; then
12427 ac_lo= ac_hi=
12428 break
12429 fi
12430 ac_mid=`expr 2 '*' $ac_mid`
Thomas Woutersb2137042007-02-01 18:02:27 +000012431fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012432
12433rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012434 done
12435else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012436 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012437sed 's/^/| /' conftest.$ac_ext >&5
12438
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012439 ac_lo= ac_hi=
Thomas Woutersb2137042007-02-01 18:02:27 +000012440fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012441
12442rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012443fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012444
12445rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012446# Binary search between lo and hi bounds.
12447while test "x$ac_lo" != "x$ac_hi"; do
12448 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
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 Oussoren74f29b42009-09-20 20:09:26 +000012456 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012457int
12458main ()
12459{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012460static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012461test_array [0] = 0
12462
12463 ;
12464 return 0;
12465}
12466_ACEOF
12467rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012468if { (ac_try="$ac_compile"
12469case "(($ac_try" in
12470 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12471 *) ac_try_echo=$ac_try;;
12472esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012473eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012474 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012475 ac_status=$?
12476 grep -v '^ *+' conftest.er1 >conftest.err
12477 rm -f conftest.er1
12478 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012480 (exit $ac_status); } && {
12481 test -z "$ac_c_werror_flag" ||
12482 test ! -s conftest.err
12483 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012484 ac_hi=$ac_mid
12485else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012486 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012487sed 's/^/| /' conftest.$ac_ext >&5
12488
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012489 ac_lo=`expr '(' $ac_mid ')' + 1`
Thomas Woutersb2137042007-02-01 18:02:27 +000012490fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012491
12492rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012493done
12494case $ac_lo in
12495?*) ac_cv_sizeof__Bool=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012496'') if test "$ac_cv_type__Bool" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012497 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012498See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012499echo "$as_me: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012500See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012501 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012502 else
12503 ac_cv_sizeof__Bool=0
12504 fi ;;
Thomas Woutersb2137042007-02-01 18:02:27 +000012505esac
12506else
12507 cat >conftest.$ac_ext <<_ACEOF
12508/* confdefs.h. */
12509_ACEOF
12510cat confdefs.h >>conftest.$ac_ext
12511cat >>conftest.$ac_ext <<_ACEOF
12512/* end confdefs.h. */
12513$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012514 typedef _Bool ac__type_sizeof_;
12515static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12516static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Thomas Woutersb2137042007-02-01 18:02:27 +000012517#include <stdio.h>
12518#include <stdlib.h>
12519int
12520main ()
12521{
12522
12523 FILE *f = fopen ("conftest.val", "w");
12524 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012525 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012526 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Thomas Woutersb2137042007-02-01 18:02:27 +000012527 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012528 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012529 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012530 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012531 fprintf (f, "%ld\n", i);
Thomas Woutersb2137042007-02-01 18:02:27 +000012532 }
12533 else
12534 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012535 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012536 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012537 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012538 fprintf (f, "%lu\n", i);
Thomas Woutersb2137042007-02-01 18:02:27 +000012539 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012540 return ferror (f) || fclose (f) != 0;
Thomas Woutersb2137042007-02-01 18:02:27 +000012541
12542 ;
12543 return 0;
12544}
12545_ACEOF
12546rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012547if { (ac_try="$ac_link"
12548case "(($ac_try" in
12549 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12550 *) ac_try_echo=$ac_try;;
12551esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012552eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012553 (eval "$ac_link") 2>&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012554 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012556 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012557 { (case "(($ac_try" in
12558 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12559 *) ac_try_echo=$ac_try;;
12560esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012561eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012562 (eval "$ac_try") 2>&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012563 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012565 (exit $ac_status); }; }; then
12566 ac_cv_sizeof__Bool=`cat conftest.val`
12567else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012568 echo "$as_me: program exited with status $ac_status" >&5
12569echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012570sed 's/^/| /' conftest.$ac_ext >&5
12571
12572( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012573if test "$ac_cv_type__Bool" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012574 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012575See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012576echo "$as_me: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012577See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012578 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012579 else
12580 ac_cv_sizeof__Bool=0
12581 fi
Thomas Woutersb2137042007-02-01 18:02:27 +000012582fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012583rm -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 +000012584fi
12585rm -f conftest.val
12586fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012587{ echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
12588echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012589
12590
12591
Thomas Woutersb2137042007-02-01 18:02:27 +000012592cat >>confdefs.h <<_ACEOF
12593#define SIZEOF__BOOL $ac_cv_sizeof__Bool
12594_ACEOF
12595
12596
12597fi
12598
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012599{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12600echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000012601if test "${ac_cv_type_uintptr_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012602 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters89f507f2006-12-13 04:49:30 +000012603else
12604 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012605/* confdefs.h. */
12606_ACEOF
12607cat confdefs.h >>conftest.$ac_ext
12608cat >>conftest.$ac_ext <<_ACEOF
12609/* end confdefs.h. */
Thomas Wouters89f507f2006-12-13 04:49:30 +000012610#ifdef HAVE_STDINT_H
12611 #include <stdint.h>
12612 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012613
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012614typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012615int
12616main ()
12617{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012618if ((ac__type_new_ *) 0)
12619 return 0;
12620if (sizeof (ac__type_new_))
12621 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012622 ;
12623 return 0;
12624}
12625_ACEOF
12626rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012627if { (ac_try="$ac_compile"
12628case "(($ac_try" in
12629 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12630 *) ac_try_echo=$ac_try;;
12631esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012632eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012633 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012634 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012635 grep -v '^ *+' conftest.er1 >conftest.err
12636 rm -f conftest.er1
12637 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012639 (exit $ac_status); } && {
12640 test -z "$ac_c_werror_flag" ||
12641 test ! -s conftest.err
12642 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012643 ac_cv_type_uintptr_t=yes
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012644else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012645 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012646sed 's/^/| /' conftest.$ac_ext >&5
12647
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012648 ac_cv_type_uintptr_t=no
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012649fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012650
12651rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters89f507f2006-12-13 04:49:30 +000012652fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012653{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12654echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12655if test $ac_cv_type_uintptr_t = yes; then
Thomas Wouters89f507f2006-12-13 04:49:30 +000012656
12657cat >>confdefs.h <<_ACEOF
12658#define HAVE_UINTPTR_T 1
12659_ACEOF
12660
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012661{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12662echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
12663if test "${ac_cv_type_uintptr_t+set}" = set; then
12664 echo $ECHO_N "(cached) $ECHO_C" >&6
12665else
12666 cat >conftest.$ac_ext <<_ACEOF
12667/* confdefs.h. */
12668_ACEOF
12669cat confdefs.h >>conftest.$ac_ext
12670cat >>conftest.$ac_ext <<_ACEOF
12671/* end confdefs.h. */
12672$ac_includes_default
12673typedef uintptr_t ac__type_new_;
12674int
12675main ()
12676{
12677if ((ac__type_new_ *) 0)
12678 return 0;
12679if (sizeof (ac__type_new_))
12680 return 0;
12681 ;
12682 return 0;
12683}
12684_ACEOF
12685rm -f conftest.$ac_objext
12686if { (ac_try="$ac_compile"
12687case "(($ac_try" in
12688 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12689 *) ac_try_echo=$ac_try;;
12690esac
12691eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12692 (eval "$ac_compile") 2>conftest.er1
12693 ac_status=$?
12694 grep -v '^ *+' conftest.er1 >conftest.err
12695 rm -f conftest.er1
12696 cat conftest.err >&5
12697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12698 (exit $ac_status); } && {
12699 test -z "$ac_c_werror_flag" ||
12700 test ! -s conftest.err
12701 } && test -s conftest.$ac_objext; then
12702 ac_cv_type_uintptr_t=yes
12703else
12704 echo "$as_me: failed program was:" >&5
12705sed 's/^/| /' conftest.$ac_ext >&5
12706
12707 ac_cv_type_uintptr_t=no
12708fi
12709
12710rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12711fi
12712{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12713echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12714
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012715# The cast to long int works around a bug in the HP C Compiler
12716# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12717# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12718# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012719{ echo "$as_me:$LINENO: checking size of uintptr_t" >&5
12720echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012721if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012722 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012723else
Martin v. Löwis11437992002-04-12 09:54:03 +000012724 if test "$cross_compiling" = yes; then
12725 # Depending upon the size, compute the lo and hi bounds.
12726cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012727/* confdefs.h. */
12728_ACEOF
12729cat confdefs.h >>conftest.$ac_ext
12730cat >>conftest.$ac_ext <<_ACEOF
12731/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012732$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012733 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012734int
12735main ()
12736{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012737static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012738test_array [0] = 0
12739
12740 ;
12741 return 0;
12742}
12743_ACEOF
12744rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012745if { (ac_try="$ac_compile"
12746case "(($ac_try" in
12747 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12748 *) ac_try_echo=$ac_try;;
12749esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012750eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012751 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012752 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012753 grep -v '^ *+' conftest.er1 >conftest.err
12754 rm -f conftest.er1
12755 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012756 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012757 (exit $ac_status); } && {
12758 test -z "$ac_c_werror_flag" ||
12759 test ! -s conftest.err
12760 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012761 ac_lo=0 ac_mid=0
12762 while :; do
12763 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012764/* confdefs.h. */
12765_ACEOF
12766cat confdefs.h >>conftest.$ac_ext
12767cat >>conftest.$ac_ext <<_ACEOF
12768/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012769$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012770 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012771int
12772main ()
12773{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012774static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012775test_array [0] = 0
12776
12777 ;
12778 return 0;
12779}
12780_ACEOF
12781rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012782if { (ac_try="$ac_compile"
12783case "(($ac_try" in
12784 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12785 *) ac_try_echo=$ac_try;;
12786esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012787eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012788 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012789 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012790 grep -v '^ *+' conftest.er1 >conftest.err
12791 rm -f conftest.er1
12792 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012794 (exit $ac_status); } && {
12795 test -z "$ac_c_werror_flag" ||
12796 test ! -s conftest.err
12797 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012798 ac_hi=$ac_mid; break
12799else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012800 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012801sed 's/^/| /' conftest.$ac_ext >&5
12802
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012803 ac_lo=`expr $ac_mid + 1`
12804 if test $ac_lo -le $ac_mid; then
12805 ac_lo= ac_hi=
12806 break
12807 fi
12808 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012809fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012810
12811rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012812 done
12813else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012814 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012815sed 's/^/| /' conftest.$ac_ext >&5
12816
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012817 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012818/* confdefs.h. */
12819_ACEOF
12820cat confdefs.h >>conftest.$ac_ext
12821cat >>conftest.$ac_ext <<_ACEOF
12822/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012823$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012824 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012825int
12826main ()
12827{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012828static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012829test_array [0] = 0
12830
12831 ;
12832 return 0;
12833}
12834_ACEOF
12835rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012836if { (ac_try="$ac_compile"
12837case "(($ac_try" in
12838 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12839 *) ac_try_echo=$ac_try;;
12840esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012841eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012842 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012843 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012844 grep -v '^ *+' conftest.er1 >conftest.err
12845 rm -f conftest.er1
12846 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012848 (exit $ac_status); } && {
12849 test -z "$ac_c_werror_flag" ||
12850 test ! -s conftest.err
12851 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012852 ac_hi=-1 ac_mid=-1
12853 while :; do
12854 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012855/* confdefs.h. */
12856_ACEOF
12857cat confdefs.h >>conftest.$ac_ext
12858cat >>conftest.$ac_ext <<_ACEOF
12859/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012860$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012861 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012862int
12863main ()
12864{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012865static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012866test_array [0] = 0
12867
12868 ;
12869 return 0;
12870}
12871_ACEOF
12872rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012873if { (ac_try="$ac_compile"
12874case "(($ac_try" in
12875 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12876 *) ac_try_echo=$ac_try;;
12877esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012878eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012879 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012880 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012881 grep -v '^ *+' conftest.er1 >conftest.err
12882 rm -f conftest.er1
12883 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012885 (exit $ac_status); } && {
12886 test -z "$ac_c_werror_flag" ||
12887 test ! -s conftest.err
12888 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012889 ac_lo=$ac_mid; break
12890else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012891 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012892sed 's/^/| /' conftest.$ac_ext >&5
12893
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012894 ac_hi=`expr '(' $ac_mid ')' - 1`
12895 if test $ac_mid -le $ac_hi; then
12896 ac_lo= ac_hi=
12897 break
12898 fi
12899 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000012900fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012901
12902rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012903 done
12904else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012905 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012906sed 's/^/| /' conftest.$ac_ext >&5
12907
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012908 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000012909fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012910
12911rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012912fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012913
12914rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012915# Binary search between lo and hi bounds.
12916while test "x$ac_lo" != "x$ac_hi"; do
12917 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12918 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 Oussoren74f29b42009-09-20 20:09:26 +000012925 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012926int
12927main ()
12928{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012929static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012930test_array [0] = 0
12931
12932 ;
12933 return 0;
12934}
12935_ACEOF
12936rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012937if { (ac_try="$ac_compile"
12938case "(($ac_try" in
12939 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12940 *) ac_try_echo=$ac_try;;
12941esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012942eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012943 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012944 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012945 grep -v '^ *+' conftest.er1 >conftest.err
12946 rm -f conftest.er1
12947 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012948 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012949 (exit $ac_status); } && {
12950 test -z "$ac_c_werror_flag" ||
12951 test ! -s conftest.err
12952 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012953 ac_hi=$ac_mid
12954else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012955 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012956sed 's/^/| /' conftest.$ac_ext >&5
12957
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012958 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012959fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012960
12961rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012962done
12963case $ac_lo in
12964?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012965'') if test "$ac_cv_type_uintptr_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012966 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012967See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012968echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012969See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012970 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012971 else
12972 ac_cv_sizeof_uintptr_t=0
12973 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012974esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012975else
Martin v. Löwis11437992002-04-12 09:54:03 +000012976 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012977/* confdefs.h. */
12978_ACEOF
12979cat confdefs.h >>conftest.$ac_ext
12980cat >>conftest.$ac_ext <<_ACEOF
12981/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012982$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012983 typedef uintptr_t ac__type_sizeof_;
12984static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12985static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000012986#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012987#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012988int
12989main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012990{
Martin v. Löwis11437992002-04-12 09:54:03 +000012991
12992 FILE *f = fopen ("conftest.val", "w");
12993 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012994 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012995 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000012996 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012997 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012998 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012999 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013000 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000013001 }
13002 else
13003 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013004 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013005 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013006 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013007 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000013008 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013009 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013010
13011 ;
13012 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013013}
Martin v. Löwis11437992002-04-12 09:54:03 +000013014_ACEOF
13015rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013016if { (ac_try="$ac_link"
13017case "(($ac_try" in
13018 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13019 *) ac_try_echo=$ac_try;;
13020esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013021eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013022 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013023 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013025 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013026 { (case "(($ac_try" in
13027 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13028 *) ac_try_echo=$ac_try;;
13029esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013030eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013031 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013032 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013034 (exit $ac_status); }; }; then
13035 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013036else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013037 echo "$as_me: program exited with status $ac_status" >&5
13038echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013039sed 's/^/| /' conftest.$ac_ext >&5
13040
Martin v. Löwis11437992002-04-12 09:54:03 +000013041( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013042if test "$ac_cv_type_uintptr_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013043 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000013044See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013045echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000013046See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013047 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013048 else
13049 ac_cv_sizeof_uintptr_t=0
13050 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013051fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013052rm -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 +000013053fi
13054rm -f conftest.val
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013055fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013056{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
13057echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013058
13059
13060
Martin v. Löwis11437992002-04-12 09:54:03 +000013061cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013062#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013063_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013064
Michael W. Hudson54241132001-12-07 15:38:26 +000013065
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013066fi
13067
Thomas Wouters89f507f2006-12-13 04:49:30 +000013068
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013069{ echo "$as_me:$LINENO: checking for off_t" >&5
13070echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
13071if test "${ac_cv_type_off_t+set}" = set; then
13072 echo $ECHO_N "(cached) $ECHO_C" >&6
13073else
13074 cat >conftest.$ac_ext <<_ACEOF
13075/* confdefs.h. */
13076_ACEOF
13077cat confdefs.h >>conftest.$ac_ext
13078cat >>conftest.$ac_ext <<_ACEOF
13079/* end confdefs.h. */
13080
13081#ifdef HAVE_SYS_TYPES_H
13082#include <sys/types.h>
13083#endif
13084
13085
13086typedef off_t ac__type_new_;
13087int
13088main ()
13089{
13090if ((ac__type_new_ *) 0)
13091 return 0;
13092if (sizeof (ac__type_new_))
13093 return 0;
13094 ;
13095 return 0;
13096}
13097_ACEOF
13098rm -f conftest.$ac_objext
13099if { (ac_try="$ac_compile"
13100case "(($ac_try" in
13101 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13102 *) ac_try_echo=$ac_try;;
13103esac
13104eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13105 (eval "$ac_compile") 2>conftest.er1
13106 ac_status=$?
13107 grep -v '^ *+' conftest.er1 >conftest.err
13108 rm -f conftest.er1
13109 cat conftest.err >&5
13110 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13111 (exit $ac_status); } && {
13112 test -z "$ac_c_werror_flag" ||
13113 test ! -s conftest.err
13114 } && test -s conftest.$ac_objext; then
13115 ac_cv_type_off_t=yes
13116else
13117 echo "$as_me: failed program was:" >&5
13118sed 's/^/| /' conftest.$ac_ext >&5
13119
13120 ac_cv_type_off_t=no
13121fi
13122
13123rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13124fi
13125{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
13126echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
13127
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013128# The cast to long int works around a bug in the HP C Compiler
13129# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13130# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13131# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013132{ echo "$as_me:$LINENO: checking size of off_t" >&5
13133echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013134if test "${ac_cv_sizeof_off_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013135 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013136else
13137 if test "$cross_compiling" = yes; then
13138 # Depending upon the size, compute the lo and hi bounds.
13139cat >conftest.$ac_ext <<_ACEOF
13140/* confdefs.h. */
13141_ACEOF
13142cat confdefs.h >>conftest.$ac_ext
13143cat >>conftest.$ac_ext <<_ACEOF
13144/* end confdefs.h. */
13145
13146#ifdef HAVE_SYS_TYPES_H
13147#include <sys/types.h>
13148#endif
13149
13150
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013151 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013152int
13153main ()
13154{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013155static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013156test_array [0] = 0
13157
13158 ;
13159 return 0;
13160}
13161_ACEOF
13162rm -f conftest.$ac_objext
13163if { (ac_try="$ac_compile"
13164case "(($ac_try" in
13165 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13166 *) ac_try_echo=$ac_try;;
13167esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013168eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013169 (eval "$ac_compile") 2>conftest.er1
13170 ac_status=$?
13171 grep -v '^ *+' conftest.er1 >conftest.err
13172 rm -f conftest.er1
13173 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013175 (exit $ac_status); } && {
13176 test -z "$ac_c_werror_flag" ||
13177 test ! -s conftest.err
13178 } && test -s conftest.$ac_objext; then
13179 ac_lo=0 ac_mid=0
13180 while :; do
13181 cat >conftest.$ac_ext <<_ACEOF
13182/* confdefs.h. */
13183_ACEOF
13184cat confdefs.h >>conftest.$ac_ext
13185cat >>conftest.$ac_ext <<_ACEOF
13186/* end confdefs.h. */
13187
13188#ifdef HAVE_SYS_TYPES_H
13189#include <sys/types.h>
13190#endif
13191
13192
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013193 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013194int
13195main ()
13196{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013197static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013198test_array [0] = 0
13199
13200 ;
13201 return 0;
13202}
13203_ACEOF
13204rm -f conftest.$ac_objext
13205if { (ac_try="$ac_compile"
13206case "(($ac_try" in
13207 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13208 *) ac_try_echo=$ac_try;;
13209esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013210eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013211 (eval "$ac_compile") 2>conftest.er1
13212 ac_status=$?
13213 grep -v '^ *+' conftest.er1 >conftest.err
13214 rm -f conftest.er1
13215 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013217 (exit $ac_status); } && {
13218 test -z "$ac_c_werror_flag" ||
13219 test ! -s conftest.err
13220 } && test -s conftest.$ac_objext; then
13221 ac_hi=$ac_mid; break
13222else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013223 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013224sed 's/^/| /' conftest.$ac_ext >&5
13225
13226 ac_lo=`expr $ac_mid + 1`
13227 if test $ac_lo -le $ac_mid; then
13228 ac_lo= ac_hi=
13229 break
13230 fi
13231 ac_mid=`expr 2 '*' $ac_mid + 1`
13232fi
13233
13234rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13235 done
13236else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013237 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013238sed 's/^/| /' conftest.$ac_ext >&5
13239
13240 cat >conftest.$ac_ext <<_ACEOF
13241/* confdefs.h. */
13242_ACEOF
13243cat confdefs.h >>conftest.$ac_ext
13244cat >>conftest.$ac_ext <<_ACEOF
13245/* end confdefs.h. */
13246
13247#ifdef HAVE_SYS_TYPES_H
13248#include <sys/types.h>
13249#endif
13250
13251
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013252 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013253int
13254main ()
13255{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013256static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013257test_array [0] = 0
13258
13259 ;
13260 return 0;
13261}
13262_ACEOF
13263rm -f conftest.$ac_objext
13264if { (ac_try="$ac_compile"
13265case "(($ac_try" in
13266 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13267 *) ac_try_echo=$ac_try;;
13268esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013269eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013270 (eval "$ac_compile") 2>conftest.er1
13271 ac_status=$?
13272 grep -v '^ *+' conftest.er1 >conftest.err
13273 rm -f conftest.er1
13274 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013276 (exit $ac_status); } && {
13277 test -z "$ac_c_werror_flag" ||
13278 test ! -s conftest.err
13279 } && test -s conftest.$ac_objext; then
13280 ac_hi=-1 ac_mid=-1
13281 while :; do
13282 cat >conftest.$ac_ext <<_ACEOF
13283/* confdefs.h. */
13284_ACEOF
13285cat confdefs.h >>conftest.$ac_ext
13286cat >>conftest.$ac_ext <<_ACEOF
13287/* end confdefs.h. */
13288
13289#ifdef HAVE_SYS_TYPES_H
13290#include <sys/types.h>
13291#endif
13292
13293
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013294 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013295int
13296main ()
13297{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013298static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013299test_array [0] = 0
13300
13301 ;
13302 return 0;
13303}
13304_ACEOF
13305rm -f conftest.$ac_objext
13306if { (ac_try="$ac_compile"
13307case "(($ac_try" in
13308 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13309 *) ac_try_echo=$ac_try;;
13310esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013311eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013312 (eval "$ac_compile") 2>conftest.er1
13313 ac_status=$?
13314 grep -v '^ *+' conftest.er1 >conftest.err
13315 rm -f conftest.er1
13316 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013318 (exit $ac_status); } && {
13319 test -z "$ac_c_werror_flag" ||
13320 test ! -s conftest.err
13321 } && test -s conftest.$ac_objext; then
13322 ac_lo=$ac_mid; break
13323else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013324 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013325sed 's/^/| /' conftest.$ac_ext >&5
13326
13327 ac_hi=`expr '(' $ac_mid ')' - 1`
13328 if test $ac_mid -le $ac_hi; then
13329 ac_lo= ac_hi=
13330 break
13331 fi
13332 ac_mid=`expr 2 '*' $ac_mid`
13333fi
13334
13335rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13336 done
13337else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013338 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013339sed 's/^/| /' conftest.$ac_ext >&5
13340
13341 ac_lo= ac_hi=
13342fi
13343
13344rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13345fi
13346
13347rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13348# Binary search between lo and hi bounds.
13349while test "x$ac_lo" != "x$ac_hi"; do
13350 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13351 cat >conftest.$ac_ext <<_ACEOF
13352/* confdefs.h. */
13353_ACEOF
13354cat confdefs.h >>conftest.$ac_ext
13355cat >>conftest.$ac_ext <<_ACEOF
13356/* end confdefs.h. */
13357
13358#ifdef HAVE_SYS_TYPES_H
13359#include <sys/types.h>
13360#endif
13361
13362
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013363 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013364int
13365main ()
13366{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013367static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013368test_array [0] = 0
13369
13370 ;
13371 return 0;
13372}
13373_ACEOF
13374rm -f conftest.$ac_objext
13375if { (ac_try="$ac_compile"
13376case "(($ac_try" in
13377 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13378 *) ac_try_echo=$ac_try;;
13379esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013380eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013381 (eval "$ac_compile") 2>conftest.er1
13382 ac_status=$?
13383 grep -v '^ *+' conftest.er1 >conftest.err
13384 rm -f conftest.er1
13385 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013386 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013387 (exit $ac_status); } && {
13388 test -z "$ac_c_werror_flag" ||
13389 test ! -s conftest.err
13390 } && test -s conftest.$ac_objext; then
13391 ac_hi=$ac_mid
13392else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013393 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013394sed 's/^/| /' conftest.$ac_ext >&5
13395
13396 ac_lo=`expr '(' $ac_mid ')' + 1`
13397fi
13398
13399rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13400done
13401case $ac_lo in
13402?*) ac_cv_sizeof_off_t=$ac_lo;;
13403'') if test "$ac_cv_type_off_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013404 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013405See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013406echo "$as_me: error: cannot compute sizeof (off_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013407See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013408 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013409 else
13410 ac_cv_sizeof_off_t=0
13411 fi ;;
13412esac
13413else
13414 cat >conftest.$ac_ext <<_ACEOF
13415/* confdefs.h. */
13416_ACEOF
13417cat confdefs.h >>conftest.$ac_ext
13418cat >>conftest.$ac_ext <<_ACEOF
13419/* end confdefs.h. */
13420
13421#ifdef HAVE_SYS_TYPES_H
13422#include <sys/types.h>
13423#endif
13424
13425
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013426 typedef off_t ac__type_sizeof_;
13427static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13428static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013429#include <stdio.h>
13430#include <stdlib.h>
13431int
13432main ()
13433{
13434
13435 FILE *f = fopen ("conftest.val", "w");
13436 if (! f)
13437 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013438 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013439 {
13440 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013441 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013442 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013443 fprintf (f, "%ld\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013444 }
13445 else
13446 {
13447 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013448 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013449 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013450 fprintf (f, "%lu\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013451 }
13452 return ferror (f) || fclose (f) != 0;
13453
13454 ;
13455 return 0;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013456}
Martin v. Löwis11437992002-04-12 09:54:03 +000013457_ACEOF
13458rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013459if { (ac_try="$ac_link"
13460case "(($ac_try" in
13461 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13462 *) ac_try_echo=$ac_try;;
13463esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013464eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013465 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013466 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013468 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013469 { (case "(($ac_try" in
13470 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13471 *) ac_try_echo=$ac_try;;
13472esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013473eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013474 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013475 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013477 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013478 ac_cv_sizeof_off_t=`cat conftest.val`
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013479else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013480 echo "$as_me: program exited with status $ac_status" >&5
13481echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013482sed 's/^/| /' conftest.$ac_ext >&5
13483
Martin v. Löwis11437992002-04-12 09:54:03 +000013484( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013485if test "$ac_cv_type_off_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013486 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013487See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013488echo "$as_me: error: cannot compute sizeof (off_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013489See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013490 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013491 else
13492 ac_cv_sizeof_off_t=0
13493 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013494fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013495rm -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 +000013496fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013497rm -f conftest.val
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013498fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013499{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
13500echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013501
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013502
13503
Martin v. Löwis11437992002-04-12 09:54:03 +000013504cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013505#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013506_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013507
Michael W. Hudson54241132001-12-07 15:38:26 +000013508
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013509
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013510{ echo "$as_me:$LINENO: checking whether to enable large file support" >&5
13511echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +000013512if test "$have_long_long" = yes
13513then
13514if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +000013515 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013516
Martin v. Löwis11437992002-04-12 09:54:03 +000013517cat >>confdefs.h <<\_ACEOF
13518#define HAVE_LARGEFILE_SUPPORT 1
13519_ACEOF
13520
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013521 { echo "$as_me:$LINENO: result: yes" >&5
13522echo "${ECHO_T}yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013523else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013524 { echo "$as_me:$LINENO: result: no" >&5
13525echo "${ECHO_T}no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013526fi
Mark Dickinson2df5d282009-12-31 21:22:50 +000013527else
13528 { echo "$as_me:$LINENO: result: no" >&5
13529echo "${ECHO_T}no" >&6; }
13530fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013531
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013532{ echo "$as_me:$LINENO: checking for time_t" >&5
13533echo $ECHO_N "checking for time_t... $ECHO_C" >&6; }
13534if test "${ac_cv_type_time_t+set}" = set; then
13535 echo $ECHO_N "(cached) $ECHO_C" >&6
13536else
13537 cat >conftest.$ac_ext <<_ACEOF
13538/* confdefs.h. */
13539_ACEOF
13540cat confdefs.h >>conftest.$ac_ext
13541cat >>conftest.$ac_ext <<_ACEOF
13542/* end confdefs.h. */
13543
13544#ifdef HAVE_SYS_TYPES_H
13545#include <sys/types.h>
13546#endif
13547#ifdef HAVE_TIME_H
13548#include <time.h>
13549#endif
13550
13551
13552typedef time_t ac__type_new_;
13553int
13554main ()
13555{
13556if ((ac__type_new_ *) 0)
13557 return 0;
13558if (sizeof (ac__type_new_))
13559 return 0;
13560 ;
13561 return 0;
13562}
13563_ACEOF
13564rm -f conftest.$ac_objext
13565if { (ac_try="$ac_compile"
13566case "(($ac_try" in
13567 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13568 *) ac_try_echo=$ac_try;;
13569esac
13570eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13571 (eval "$ac_compile") 2>conftest.er1
13572 ac_status=$?
13573 grep -v '^ *+' conftest.er1 >conftest.err
13574 rm -f conftest.er1
13575 cat conftest.err >&5
13576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13577 (exit $ac_status); } && {
13578 test -z "$ac_c_werror_flag" ||
13579 test ! -s conftest.err
13580 } && test -s conftest.$ac_objext; then
13581 ac_cv_type_time_t=yes
13582else
13583 echo "$as_me: failed program was:" >&5
13584sed 's/^/| /' conftest.$ac_ext >&5
13585
13586 ac_cv_type_time_t=no
13587fi
13588
13589rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13590fi
13591{ echo "$as_me:$LINENO: result: $ac_cv_type_time_t" >&5
13592echo "${ECHO_T}$ac_cv_type_time_t" >&6; }
13593
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013594# The cast to long int works around a bug in the HP C Compiler
13595# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13596# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13597# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013598{ echo "$as_me:$LINENO: checking size of time_t" >&5
13599echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013600if test "${ac_cv_sizeof_time_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013601 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013602else
13603 if test "$cross_compiling" = yes; then
13604 # Depending upon the size, compute the lo and hi bounds.
13605cat >conftest.$ac_ext <<_ACEOF
13606/* confdefs.h. */
13607_ACEOF
13608cat confdefs.h >>conftest.$ac_ext
13609cat >>conftest.$ac_ext <<_ACEOF
13610/* end confdefs.h. */
13611
13612#ifdef HAVE_SYS_TYPES_H
13613#include <sys/types.h>
13614#endif
13615#ifdef HAVE_TIME_H
13616#include <time.h>
13617#endif
13618
13619
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013620 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013621int
13622main ()
13623{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013624static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013625test_array [0] = 0
13626
13627 ;
13628 return 0;
13629}
13630_ACEOF
13631rm -f conftest.$ac_objext
13632if { (ac_try="$ac_compile"
13633case "(($ac_try" in
13634 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13635 *) ac_try_echo=$ac_try;;
13636esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013637eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013638 (eval "$ac_compile") 2>conftest.er1
13639 ac_status=$?
13640 grep -v '^ *+' conftest.er1 >conftest.err
13641 rm -f conftest.er1
13642 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013643 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013644 (exit $ac_status); } && {
13645 test -z "$ac_c_werror_flag" ||
13646 test ! -s conftest.err
13647 } && test -s conftest.$ac_objext; then
13648 ac_lo=0 ac_mid=0
13649 while :; do
13650 cat >conftest.$ac_ext <<_ACEOF
13651/* confdefs.h. */
13652_ACEOF
13653cat confdefs.h >>conftest.$ac_ext
13654cat >>conftest.$ac_ext <<_ACEOF
13655/* end confdefs.h. */
13656
13657#ifdef HAVE_SYS_TYPES_H
13658#include <sys/types.h>
13659#endif
13660#ifdef HAVE_TIME_H
13661#include <time.h>
13662#endif
13663
13664
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013665 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013666int
13667main ()
13668{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013669static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013670test_array [0] = 0
13671
13672 ;
13673 return 0;
13674}
13675_ACEOF
13676rm -f conftest.$ac_objext
13677if { (ac_try="$ac_compile"
13678case "(($ac_try" in
13679 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13680 *) ac_try_echo=$ac_try;;
13681esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013682eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013683 (eval "$ac_compile") 2>conftest.er1
13684 ac_status=$?
13685 grep -v '^ *+' conftest.er1 >conftest.err
13686 rm -f conftest.er1
13687 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013688 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013689 (exit $ac_status); } && {
13690 test -z "$ac_c_werror_flag" ||
13691 test ! -s conftest.err
13692 } && test -s conftest.$ac_objext; then
13693 ac_hi=$ac_mid; break
13694else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013695 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013696sed 's/^/| /' conftest.$ac_ext >&5
13697
13698 ac_lo=`expr $ac_mid + 1`
13699 if test $ac_lo -le $ac_mid; then
13700 ac_lo= ac_hi=
13701 break
13702 fi
13703 ac_mid=`expr 2 '*' $ac_mid + 1`
13704fi
13705
13706rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13707 done
13708else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013709 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013710sed 's/^/| /' conftest.$ac_ext >&5
13711
13712 cat >conftest.$ac_ext <<_ACEOF
13713/* confdefs.h. */
13714_ACEOF
13715cat confdefs.h >>conftest.$ac_ext
13716cat >>conftest.$ac_ext <<_ACEOF
13717/* end confdefs.h. */
13718
13719#ifdef HAVE_SYS_TYPES_H
13720#include <sys/types.h>
13721#endif
13722#ifdef HAVE_TIME_H
13723#include <time.h>
13724#endif
13725
13726
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013727 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013728int
13729main ()
13730{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013731static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013732test_array [0] = 0
13733
13734 ;
13735 return 0;
13736}
13737_ACEOF
13738rm -f conftest.$ac_objext
13739if { (ac_try="$ac_compile"
13740case "(($ac_try" in
13741 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13742 *) ac_try_echo=$ac_try;;
13743esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013744eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013745 (eval "$ac_compile") 2>conftest.er1
13746 ac_status=$?
13747 grep -v '^ *+' conftest.er1 >conftest.err
13748 rm -f conftest.er1
13749 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013751 (exit $ac_status); } && {
13752 test -z "$ac_c_werror_flag" ||
13753 test ! -s conftest.err
13754 } && test -s conftest.$ac_objext; then
13755 ac_hi=-1 ac_mid=-1
13756 while :; do
13757 cat >conftest.$ac_ext <<_ACEOF
13758/* confdefs.h. */
13759_ACEOF
13760cat confdefs.h >>conftest.$ac_ext
13761cat >>conftest.$ac_ext <<_ACEOF
13762/* end confdefs.h. */
13763
13764#ifdef HAVE_SYS_TYPES_H
13765#include <sys/types.h>
13766#endif
13767#ifdef HAVE_TIME_H
13768#include <time.h>
13769#endif
13770
13771
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013772 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013773int
13774main ()
13775{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013776static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013777test_array [0] = 0
13778
13779 ;
13780 return 0;
13781}
13782_ACEOF
13783rm -f conftest.$ac_objext
13784if { (ac_try="$ac_compile"
13785case "(($ac_try" in
13786 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13787 *) ac_try_echo=$ac_try;;
13788esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013789eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013790 (eval "$ac_compile") 2>conftest.er1
13791 ac_status=$?
13792 grep -v '^ *+' conftest.er1 >conftest.err
13793 rm -f conftest.er1
13794 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013796 (exit $ac_status); } && {
13797 test -z "$ac_c_werror_flag" ||
13798 test ! -s conftest.err
13799 } && test -s conftest.$ac_objext; then
13800 ac_lo=$ac_mid; break
13801else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013802 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013803sed 's/^/| /' conftest.$ac_ext >&5
13804
13805 ac_hi=`expr '(' $ac_mid ')' - 1`
13806 if test $ac_mid -le $ac_hi; then
13807 ac_lo= ac_hi=
13808 break
13809 fi
13810 ac_mid=`expr 2 '*' $ac_mid`
13811fi
13812
13813rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13814 done
13815else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013816 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013817sed 's/^/| /' conftest.$ac_ext >&5
13818
13819 ac_lo= ac_hi=
13820fi
13821
13822rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13823fi
13824
13825rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13826# Binary search between lo and hi bounds.
13827while test "x$ac_lo" != "x$ac_hi"; do
13828 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13829 cat >conftest.$ac_ext <<_ACEOF
13830/* confdefs.h. */
13831_ACEOF
13832cat confdefs.h >>conftest.$ac_ext
13833cat >>conftest.$ac_ext <<_ACEOF
13834/* end confdefs.h. */
13835
13836#ifdef HAVE_SYS_TYPES_H
13837#include <sys/types.h>
13838#endif
13839#ifdef HAVE_TIME_H
13840#include <time.h>
13841#endif
13842
13843
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013844 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013845int
13846main ()
13847{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013848static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013849test_array [0] = 0
13850
13851 ;
13852 return 0;
13853}
13854_ACEOF
13855rm -f conftest.$ac_objext
13856if { (ac_try="$ac_compile"
13857case "(($ac_try" in
13858 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13859 *) ac_try_echo=$ac_try;;
13860esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013861eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013862 (eval "$ac_compile") 2>conftest.er1
13863 ac_status=$?
13864 grep -v '^ *+' conftest.er1 >conftest.err
13865 rm -f conftest.er1
13866 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013868 (exit $ac_status); } && {
13869 test -z "$ac_c_werror_flag" ||
13870 test ! -s conftest.err
13871 } && test -s conftest.$ac_objext; then
13872 ac_hi=$ac_mid
13873else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013874 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013875sed 's/^/| /' conftest.$ac_ext >&5
13876
13877 ac_lo=`expr '(' $ac_mid ')' + 1`
13878fi
13879
13880rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13881done
13882case $ac_lo in
13883?*) ac_cv_sizeof_time_t=$ac_lo;;
13884'') if test "$ac_cv_type_time_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013885 { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013886See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013887echo "$as_me: error: cannot compute sizeof (time_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013888See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013889 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013890 else
13891 ac_cv_sizeof_time_t=0
13892 fi ;;
13893esac
13894else
13895 cat >conftest.$ac_ext <<_ACEOF
13896/* confdefs.h. */
13897_ACEOF
13898cat confdefs.h >>conftest.$ac_ext
13899cat >>conftest.$ac_ext <<_ACEOF
13900/* end confdefs.h. */
13901
13902#ifdef HAVE_SYS_TYPES_H
13903#include <sys/types.h>
13904#endif
13905#ifdef HAVE_TIME_H
13906#include <time.h>
13907#endif
13908
13909
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013910 typedef time_t ac__type_sizeof_;
13911static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13912static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013913#include <stdio.h>
13914#include <stdlib.h>
13915int
13916main ()
13917{
13918
13919 FILE *f = fopen ("conftest.val", "w");
13920 if (! f)
13921 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013922 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013923 {
13924 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013925 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013926 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013927 fprintf (f, "%ld\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013928 }
13929 else
13930 {
13931 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013932 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013933 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013934 fprintf (f, "%lu\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013935 }
13936 return ferror (f) || fclose (f) != 0;
13937
13938 ;
13939 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013940}
Martin v. Löwis11437992002-04-12 09:54:03 +000013941_ACEOF
13942rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013943if { (ac_try="$ac_link"
13944case "(($ac_try" in
13945 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13946 *) ac_try_echo=$ac_try;;
13947esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013948eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013949 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013950 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013952 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013953 { (case "(($ac_try" in
13954 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13955 *) ac_try_echo=$ac_try;;
13956esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013957eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013958 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013959 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013961 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013962 ac_cv_sizeof_time_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013963else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013964 echo "$as_me: program exited with status $ac_status" >&5
13965echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013966sed 's/^/| /' conftest.$ac_ext >&5
13967
Martin v. Löwis11437992002-04-12 09:54:03 +000013968( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013969if test "$ac_cv_type_time_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013970 { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013971See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013972echo "$as_me: error: cannot compute sizeof (time_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013973See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013974 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013975 else
13976 ac_cv_sizeof_time_t=0
13977 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013978fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013979rm -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 +000013980fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013981rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013982fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013983{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
13984echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013985
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013986
13987
Martin v. Löwis11437992002-04-12 09:54:03 +000013988cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013989#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013990_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013991
Michael W. Hudson54241132001-12-07 15:38:26 +000013992
13993
Trent Mick635f6fb2000-08-23 21:33:05 +000013994# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013995ac_save_cc="$CC"
13996if test "$ac_cv_kpthread" = "yes"
13997then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013998elif test "$ac_cv_kthread" = "yes"
13999then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014000elif test "$ac_cv_pthread" = "yes"
14001then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000014002fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014003
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014004{ echo "$as_me:$LINENO: checking for pthread_t" >&5
14005echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000014006have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014007cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014008/* confdefs.h. */
14009_ACEOF
14010cat confdefs.h >>conftest.$ac_ext
14011cat >>conftest.$ac_ext <<_ACEOF
14012/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000014013#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014014int
14015main ()
14016{
Guido van Rossum12580492000-09-24 16:47:19 +000014017pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000014018 ;
14019 return 0;
14020}
14021_ACEOF
14022rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014023if { (ac_try="$ac_compile"
14024case "(($ac_try" in
14025 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14026 *) ac_try_echo=$ac_try;;
14027esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014028eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014029 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014030 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014031 grep -v '^ *+' conftest.er1 >conftest.err
14032 rm -f conftest.er1
14033 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014035 (exit $ac_status); } && {
14036 test -z "$ac_c_werror_flag" ||
14037 test ! -s conftest.err
14038 } && test -s conftest.$ac_objext; then
Trent Mick635f6fb2000-08-23 21:33:05 +000014039 have_pthread_t=yes
14040else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014041 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014042sed 's/^/| /' conftest.$ac_ext >&5
14043
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014044
Trent Mick635f6fb2000-08-23 21:33:05 +000014045fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014046
14047rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014048{ echo "$as_me:$LINENO: result: $have_pthread_t" >&5
14049echo "${ECHO_T}$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000014050if test "$have_pthread_t" = yes ; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014051 { echo "$as_me:$LINENO: checking for pthread_t" >&5
14052echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
14053if test "${ac_cv_type_pthread_t+set}" = set; then
14054 echo $ECHO_N "(cached) $ECHO_C" >&6
14055else
14056 cat >conftest.$ac_ext <<_ACEOF
14057/* confdefs.h. */
14058_ACEOF
14059cat confdefs.h >>conftest.$ac_ext
14060cat >>conftest.$ac_ext <<_ACEOF
14061/* end confdefs.h. */
14062
14063#ifdef HAVE_PTHREAD_H
14064#include <pthread.h>
14065#endif
14066
14067
14068typedef pthread_t ac__type_new_;
14069int
14070main ()
14071{
14072if ((ac__type_new_ *) 0)
14073 return 0;
14074if (sizeof (ac__type_new_))
14075 return 0;
14076 ;
14077 return 0;
14078}
14079_ACEOF
14080rm -f conftest.$ac_objext
14081if { (ac_try="$ac_compile"
14082case "(($ac_try" in
14083 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14084 *) ac_try_echo=$ac_try;;
14085esac
14086eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14087 (eval "$ac_compile") 2>conftest.er1
14088 ac_status=$?
14089 grep -v '^ *+' conftest.er1 >conftest.err
14090 rm -f conftest.er1
14091 cat conftest.err >&5
14092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14093 (exit $ac_status); } && {
14094 test -z "$ac_c_werror_flag" ||
14095 test ! -s conftest.err
14096 } && test -s conftest.$ac_objext; then
14097 ac_cv_type_pthread_t=yes
14098else
14099 echo "$as_me: failed program was:" >&5
14100sed 's/^/| /' conftest.$ac_ext >&5
14101
14102 ac_cv_type_pthread_t=no
14103fi
14104
14105rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14106fi
14107{ echo "$as_me:$LINENO: result: $ac_cv_type_pthread_t" >&5
14108echo "${ECHO_T}$ac_cv_type_pthread_t" >&6; }
14109
14110# The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014111# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14112# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14113# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014114{ echo "$as_me:$LINENO: checking size of pthread_t" >&5
14115echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014116if test "${ac_cv_sizeof_pthread_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014117 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014118else
14119 if test "$cross_compiling" = yes; then
14120 # Depending upon the size, compute the lo and hi bounds.
14121cat >conftest.$ac_ext <<_ACEOF
14122/* confdefs.h. */
14123_ACEOF
14124cat confdefs.h >>conftest.$ac_ext
14125cat >>conftest.$ac_ext <<_ACEOF
14126/* end confdefs.h. */
14127
14128#ifdef HAVE_PTHREAD_H
14129#include <pthread.h>
14130#endif
14131
14132
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014133 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014134int
14135main ()
14136{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014137static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014138test_array [0] = 0
14139
14140 ;
14141 return 0;
14142}
14143_ACEOF
14144rm -f conftest.$ac_objext
14145if { (ac_try="$ac_compile"
14146case "(($ac_try" in
14147 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14148 *) ac_try_echo=$ac_try;;
14149esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014150eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014151 (eval "$ac_compile") 2>conftest.er1
14152 ac_status=$?
14153 grep -v '^ *+' conftest.er1 >conftest.err
14154 rm -f conftest.er1
14155 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014156 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014157 (exit $ac_status); } && {
14158 test -z "$ac_c_werror_flag" ||
14159 test ! -s conftest.err
14160 } && test -s conftest.$ac_objext; then
14161 ac_lo=0 ac_mid=0
14162 while :; do
14163 cat >conftest.$ac_ext <<_ACEOF
14164/* confdefs.h. */
14165_ACEOF
14166cat confdefs.h >>conftest.$ac_ext
14167cat >>conftest.$ac_ext <<_ACEOF
14168/* end confdefs.h. */
14169
14170#ifdef HAVE_PTHREAD_H
14171#include <pthread.h>
14172#endif
14173
14174
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014175 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014176int
14177main ()
14178{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014179static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014180test_array [0] = 0
14181
14182 ;
14183 return 0;
14184}
14185_ACEOF
14186rm -f conftest.$ac_objext
14187if { (ac_try="$ac_compile"
14188case "(($ac_try" in
14189 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14190 *) ac_try_echo=$ac_try;;
14191esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014192eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014193 (eval "$ac_compile") 2>conftest.er1
14194 ac_status=$?
14195 grep -v '^ *+' conftest.er1 >conftest.err
14196 rm -f conftest.er1
14197 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014199 (exit $ac_status); } && {
14200 test -z "$ac_c_werror_flag" ||
14201 test ! -s conftest.err
14202 } && test -s conftest.$ac_objext; then
14203 ac_hi=$ac_mid; break
14204else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014205 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014206sed 's/^/| /' conftest.$ac_ext >&5
14207
14208 ac_lo=`expr $ac_mid + 1`
14209 if test $ac_lo -le $ac_mid; then
14210 ac_lo= ac_hi=
14211 break
14212 fi
14213 ac_mid=`expr 2 '*' $ac_mid + 1`
14214fi
14215
14216rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14217 done
14218else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014219 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014220sed 's/^/| /' conftest.$ac_ext >&5
14221
14222 cat >conftest.$ac_ext <<_ACEOF
14223/* confdefs.h. */
14224_ACEOF
14225cat confdefs.h >>conftest.$ac_ext
14226cat >>conftest.$ac_ext <<_ACEOF
14227/* end confdefs.h. */
14228
14229#ifdef HAVE_PTHREAD_H
14230#include <pthread.h>
14231#endif
14232
14233
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014234 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014235int
14236main ()
14237{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014238static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014239test_array [0] = 0
14240
14241 ;
14242 return 0;
14243}
14244_ACEOF
14245rm -f conftest.$ac_objext
14246if { (ac_try="$ac_compile"
14247case "(($ac_try" in
14248 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14249 *) ac_try_echo=$ac_try;;
14250esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014251eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014252 (eval "$ac_compile") 2>conftest.er1
14253 ac_status=$?
14254 grep -v '^ *+' conftest.er1 >conftest.err
14255 rm -f conftest.er1
14256 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014258 (exit $ac_status); } && {
14259 test -z "$ac_c_werror_flag" ||
14260 test ! -s conftest.err
14261 } && test -s conftest.$ac_objext; then
14262 ac_hi=-1 ac_mid=-1
14263 while :; do
14264 cat >conftest.$ac_ext <<_ACEOF
14265/* confdefs.h. */
14266_ACEOF
14267cat confdefs.h >>conftest.$ac_ext
14268cat >>conftest.$ac_ext <<_ACEOF
14269/* end confdefs.h. */
14270
14271#ifdef HAVE_PTHREAD_H
14272#include <pthread.h>
14273#endif
14274
14275
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014276 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014277int
14278main ()
14279{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014280static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014281test_array [0] = 0
14282
14283 ;
14284 return 0;
14285}
14286_ACEOF
14287rm -f conftest.$ac_objext
14288if { (ac_try="$ac_compile"
14289case "(($ac_try" in
14290 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14291 *) ac_try_echo=$ac_try;;
14292esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014293eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014294 (eval "$ac_compile") 2>conftest.er1
14295 ac_status=$?
14296 grep -v '^ *+' conftest.er1 >conftest.err
14297 rm -f conftest.er1
14298 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014300 (exit $ac_status); } && {
14301 test -z "$ac_c_werror_flag" ||
14302 test ! -s conftest.err
14303 } && test -s conftest.$ac_objext; then
14304 ac_lo=$ac_mid; break
14305else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014306 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014307sed 's/^/| /' conftest.$ac_ext >&5
14308
14309 ac_hi=`expr '(' $ac_mid ')' - 1`
14310 if test $ac_mid -le $ac_hi; then
14311 ac_lo= ac_hi=
14312 break
14313 fi
14314 ac_mid=`expr 2 '*' $ac_mid`
14315fi
14316
14317rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14318 done
14319else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014320 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014321sed 's/^/| /' conftest.$ac_ext >&5
14322
14323 ac_lo= ac_hi=
14324fi
14325
14326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14327fi
14328
14329rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14330# Binary search between lo and hi bounds.
14331while test "x$ac_lo" != "x$ac_hi"; do
14332 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
14333 cat >conftest.$ac_ext <<_ACEOF
14334/* confdefs.h. */
14335_ACEOF
14336cat confdefs.h >>conftest.$ac_ext
14337cat >>conftest.$ac_ext <<_ACEOF
14338/* end confdefs.h. */
14339
14340#ifdef HAVE_PTHREAD_H
14341#include <pthread.h>
14342#endif
14343
14344
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014345 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014346int
14347main ()
14348{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014349static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014350test_array [0] = 0
14351
14352 ;
14353 return 0;
14354}
14355_ACEOF
14356rm -f conftest.$ac_objext
14357if { (ac_try="$ac_compile"
14358case "(($ac_try" in
14359 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14360 *) ac_try_echo=$ac_try;;
14361esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014362eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014363 (eval "$ac_compile") 2>conftest.er1
14364 ac_status=$?
14365 grep -v '^ *+' conftest.er1 >conftest.err
14366 rm -f conftest.er1
14367 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014369 (exit $ac_status); } && {
14370 test -z "$ac_c_werror_flag" ||
14371 test ! -s conftest.err
14372 } && test -s conftest.$ac_objext; then
14373 ac_hi=$ac_mid
14374else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014375 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014376sed 's/^/| /' conftest.$ac_ext >&5
14377
14378 ac_lo=`expr '(' $ac_mid ')' + 1`
14379fi
14380
14381rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14382done
14383case $ac_lo in
14384?*) ac_cv_sizeof_pthread_t=$ac_lo;;
14385'') if test "$ac_cv_type_pthread_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014386 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014387See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014388echo "$as_me: error: cannot compute sizeof (pthread_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014389See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014390 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014391 else
14392 ac_cv_sizeof_pthread_t=0
14393 fi ;;
14394esac
14395else
14396 cat >conftest.$ac_ext <<_ACEOF
14397/* confdefs.h. */
14398_ACEOF
14399cat confdefs.h >>conftest.$ac_ext
14400cat >>conftest.$ac_ext <<_ACEOF
14401/* end confdefs.h. */
14402
14403#ifdef HAVE_PTHREAD_H
14404#include <pthread.h>
14405#endif
14406
14407
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014408 typedef pthread_t ac__type_sizeof_;
14409static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
14410static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014411#include <stdio.h>
14412#include <stdlib.h>
14413int
14414main ()
14415{
14416
14417 FILE *f = fopen ("conftest.val", "w");
14418 if (! f)
14419 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014420 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014421 {
14422 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014423 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014424 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014425 fprintf (f, "%ld\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014426 }
14427 else
14428 {
14429 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014430 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014431 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014432 fprintf (f, "%lu\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014433 }
14434 return ferror (f) || fclose (f) != 0;
14435
14436 ;
14437 return 0;
14438}
Martin v. Löwis11437992002-04-12 09:54:03 +000014439_ACEOF
14440rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014441if { (ac_try="$ac_link"
14442case "(($ac_try" in
14443 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14444 *) ac_try_echo=$ac_try;;
14445esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014446eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014447 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014448 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014450 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014451 { (case "(($ac_try" in
14452 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14453 *) ac_try_echo=$ac_try;;
14454esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014455eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014456 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014457 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014458 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014459 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014460 ac_cv_sizeof_pthread_t=`cat conftest.val`
Trent Mick635f6fb2000-08-23 21:33:05 +000014461else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014462 echo "$as_me: program exited with status $ac_status" >&5
14463echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014464sed 's/^/| /' conftest.$ac_ext >&5
14465
Martin v. Löwis11437992002-04-12 09:54:03 +000014466( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014467if test "$ac_cv_type_pthread_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014468 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014469See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014470echo "$as_me: error: cannot compute sizeof (pthread_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014471See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014472 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014473 else
14474 ac_cv_sizeof_pthread_t=0
14475 fi
Trent Mick635f6fb2000-08-23 21:33:05 +000014476fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014477rm -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 +000014478fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014479rm -f conftest.val
Trent Mick635f6fb2000-08-23 21:33:05 +000014480fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014481{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
14482echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014483
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014484
14485
Martin v. Löwis11437992002-04-12 09:54:03 +000014486cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014487#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014488_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014489
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014490
Trent Mick635f6fb2000-08-23 21:33:05 +000014491fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000014492CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000014493
Michael W. Hudson54241132001-12-07 15:38:26 +000014494
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014495case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014496 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014497 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
14498 ;;
14499 Darwin/*)
14500 OTHER_LIBTOOL_OPT=""
14501 ;;
14502esac
14503
14504
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014505ARCH_RUN_32BIT=""
14506
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014507case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014508 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +000014509 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
14510 if test "${enable_universalsdk}"; then
14511 :
14512 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +000014513 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +000014514 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000014515 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014516 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000014517 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +000014518 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014519 if test ${gcc_version} '<' 4.0
14520 then
14521 LIBTOOL_CRUFT="-lcc_dynamic"
14522 else
14523 LIBTOOL_CRUFT=""
14524 fi
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014525 if test "$cross_compiling" = yes; then
Ronald Oussoren3c064c12009-09-08 07:12:42 +000014526 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014527else
14528 cat >conftest.$ac_ext <<_ACEOF
14529/* confdefs.h. */
14530_ACEOF
14531cat confdefs.h >>conftest.$ac_ext
14532cat >>conftest.$ac_ext <<_ACEOF
14533/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +000014534
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014535 #include <unistd.h>
14536 int main(int argc, char*argv[])
14537 {
14538 if (sizeof(long) == 4) {
14539 return 0;
14540 } else {
14541 return 1;
14542 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +000014543 }
14544
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014545_ACEOF
14546rm -f conftest$ac_exeext
14547if { (ac_try="$ac_link"
14548case "(($ac_try" in
14549 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14550 *) ac_try_echo=$ac_try;;
14551esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014552eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014553 (eval "$ac_link") 2>&5
14554 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014556 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14557 { (case "(($ac_try" in
14558 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14559 *) ac_try_echo=$ac_try;;
14560esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014561eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014562 (eval "$ac_try") 2>&5
14563 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014565 (exit $ac_status); }; }; then
14566 ac_osx_32bit=yes
14567else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014568 echo "$as_me: program exited with status $ac_status" >&5
14569echo "$as_me: failed program was:" >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014570sed 's/^/| /' conftest.$ac_ext >&5
14571
14572( exit $ac_status )
14573ac_osx_32bit=no
14574fi
14575rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14576fi
14577
14578
14579
14580 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +000014581 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014582 i386)
14583 MACOSX_DEFAULT_ARCH="i386"
14584 ;;
14585 ppc)
14586 MACOSX_DEFAULT_ARCH="ppc"
14587 ;;
14588 *)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014589 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
14590echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014591 { (exit 1); exit 1; }; }
14592 ;;
14593 esac
14594 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +000014595 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014596 i386)
14597 MACOSX_DEFAULT_ARCH="x86_64"
14598 ;;
14599 ppc)
14600 MACOSX_DEFAULT_ARCH="ppc64"
14601 ;;
14602 *)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014603 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
14604echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014605 { (exit 1); exit 1; }; }
14606 ;;
14607 esac
14608
14609 #ARCH_RUN_32BIT="true"
14610 fi
14611
14612 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +000014613 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014614 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014615esac
14616
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014617{ echo "$as_me:$LINENO: checking for --enable-framework" >&5
14618echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014619if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014620then
Skip Montanarodecc6a42003-01-01 20:07:49 +000014621 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000014622 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000014623 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014624
Martin v. Löwis11437992002-04-12 09:54:03 +000014625cat >>confdefs.h <<\_ACEOF
14626#define WITH_NEXT_FRAMEWORK 1
14627_ACEOF
14628
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014629 { echo "$as_me:$LINENO: result: yes" >&5
14630echo "${ECHO_T}yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +000014631 if test $enable_shared = "yes"
14632 then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014633 { { echo "$as_me:$LINENO: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" >&5
14634echo "$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 +000014635 { (exit 1); exit 1; }; }
14636 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014637else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014638 { echo "$as_me:$LINENO: result: no" >&5
14639echo "${ECHO_T}no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014640fi
14641
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014642{ echo "$as_me:$LINENO: checking for dyld" >&5
14643echo $ECHO_N "checking for dyld... $ECHO_C" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014644case $ac_sys_system/$ac_sys_release in
14645 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014646
Martin v. Löwis11437992002-04-12 09:54:03 +000014647cat >>confdefs.h <<\_ACEOF
14648#define WITH_DYLD 1
14649_ACEOF
14650
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014651 { echo "$as_me:$LINENO: result: always on for Darwin" >&5
14652echo "${ECHO_T}always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014653 ;;
14654 *)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014655 { echo "$as_me:$LINENO: result: no" >&5
14656echo "${ECHO_T}no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014657 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014658esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014659
Guido van Rossum0a516c91994-09-12 10:58:40 +000014660# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000014661
Michael W. Hudson54241132001-12-07 15:38:26 +000014662
14663
14664
14665
Guido van Rossum0a516c91994-09-12 10:58:40 +000014666# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000014667# -- usually .so, .sl on HP-UX, .dll on Cygwin
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014668{ echo "$as_me:$LINENO: checking SO" >&5
14669echo $ECHO_N "checking SO... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014670if test -z "$SO"
14671then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014672 case $ac_sys_system in
Thomas Wouters477c8d52006-05-27 19:21:47 +000014673 hp*|HP*)
14674 case `uname -m` in
14675 ia64) SO=.so;;
14676 *) SO=.sl;;
14677 esac
14678 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000014679 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014680 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014681 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000014682else
14683 # this might also be a termcap variable, see #610332
14684 echo
14685 echo '====================================================================='
14686 echo '+ +'
14687 echo '+ WARNING: You have set SO in your environment. +'
14688 echo '+ Do you really mean to change the extension for shared libraries? +'
14689 echo '+ Continuing in 10 seconds to let you to ponder. +'
14690 echo '+ +'
14691 echo '====================================================================='
14692 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000014693fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014694{ echo "$as_me:$LINENO: result: $SO" >&5
14695echo "${ECHO_T}$SO" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000014696
Georg Brandlb1441c72009-01-03 22:33:39 +000014697
Thomas Wouters477c8d52006-05-27 19:21:47 +000014698cat >>confdefs.h <<_ACEOF
14699#define SHLIB_EXT "$SO"
14700_ACEOF
14701
Guido van Rossum0a516c91994-09-12 10:58:40 +000014702# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000014703# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014704# (Shared libraries in this instance are shared modules to be loaded into
14705# Python, as opposed to building Python itself as a shared library.)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014706{ echo "$as_me:$LINENO: checking LDSHARED" >&5
14707echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014708if test -z "$LDSHARED"
14709then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014710 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014711 AIX*)
14712 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000014713 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014714 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000014715 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000014716 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000014717 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +000014718 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000014719 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000014720 else LDSHARED='$(CC) -G';
Greg Ward57c9a6632000-05-26 12:22:54 +000014721 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +000014722 hp*|HP*)
14723 if test "$GCC" = "yes"
14724 then LDSHARED='$(CC) -shared'
14725 else LDSHARED='ld -b';
14726 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +000014727 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000014728 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000014729 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14730 if test "$enable_framework" ; then
14731 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014732 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14733 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014734 else
14735 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000014736 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000014737 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014738 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000014739 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14740 if test "$enable_framework" ; then
14741 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014742 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14743 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014744 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000014745 # No framework, use the Python app as bundle-loader
14746 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000014747 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014748 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014749 Darwin/*)
14750 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
14751 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +000014752
Benjamin Peterson14ae9592008-07-16 02:20:15 +000014753 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000014754 then
Thomas Wouters477c8d52006-05-27 19:21:47 +000014755 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +000014756 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +000014757 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000014758 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
14759 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000014760 else
14761 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14762 if test "$enable_framework" ; then
14763 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014764 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14765 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000014766 else
14767 # No framework, use the Python app as bundle-loader
14768 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
14769 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
14770 fi
14771 fi
14772 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +000014773 Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000014774 BSD/OS*/4*) LDSHARED="gcc -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014775 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000014776 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000014777 then
Benjamin Petersonab0a7522010-03-14 15:18:25 +000014778 LDSHARED='$(CC) -shared ${LDFLAGS}'
Guido van Rossum0286ae82000-08-29 15:06:49 +000014779 else
14780 LDSHARED="ld -Bshareable ${LDFLAGS}"
14781 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014782 OpenBSD*)
14783 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14784 then
14785 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
14786 else
14787 case `uname -r` in
14788 [01].* | 2.[0-7] | 2.[0-7].*)
14789 LDSHARED="ld -Bshareable ${LDFLAGS}"
14790 ;;
14791 *)
14792 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
14793 ;;
14794 esac
14795 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014796 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014797 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000014798 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000014799 then LDSHARED='$(CC) -shared'
14800 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000014801 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000014802 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Guido van Rossumaef734b2001-01-10 21:09:12 +000014803 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014804 *) LDSHARED="ld";;
14805 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014806fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014807{ echo "$as_me:$LINENO: result: $LDSHARED" >&5
14808echo "${ECHO_T}$LDSHARED" >&6; }
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014809BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000014810# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014811# library (module) -- this is only needed for a few systems
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014812{ echo "$as_me:$LINENO: checking CCSHARED" >&5
14813echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014814if test -z "$CCSHARED"
14815then
Guido van Rossum07397971997-04-29 21:49:50 +000014816 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000014817 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014818 then CCSHARED="-fPIC";
14819 elif test `uname -p` = sparc;
14820 then CCSHARED="-xcode=pic32";
14821 else CCSHARED="-Kpic";
14822 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000014823 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000014824 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000014825 else CCSHARED="+z";
14826 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014827 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014828 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014829 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014830 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000014831 if test "$GCC" = "yes"
14832 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014833 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000014834 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014835 SCO_SV*)
14836 if test "$GCC" = "yes"
14837 then CCSHARED="-fPIC"
14838 else CCSHARED="-Kpic -belf"
14839 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014840 IRIX*/6*) case $CC in
14841 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000014842 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014843 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014844 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014845fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014846{ echo "$as_me:$LINENO: result: $CCSHARED" >&5
14847echo "${ECHO_T}$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014848# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014849# the python executable -- this is only needed for a few systems
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014850{ echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
14851echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014852if test -z "$LINKFORSHARED"
14853then
Guido van Rossum07397971997-04-29 21:49:50 +000014854 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014855 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000014856 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000014857 LINKFORSHARED="-Wl,-E -Wl,+s";;
14858# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014859 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014860 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014861 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000014862 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +000014863 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +000014864 if test "$enable_framework"
14865 then
Jack Jansenda49e192005-01-07 13:08:22 +000014866 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014867 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014868 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014869 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014870 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000014871 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014872 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000014873 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14874 then
14875 LINKFORSHARED="-Wl,--export-dynamic"
14876 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014877 SunOS/5*) case $CC in
14878 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000014879 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000014880 then
14881 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014882 fi;;
14883 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000014884 CYGWIN*)
14885 if test $enable_shared = "no"
14886 then
14887 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
14888 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +000014889 QNX*)
14890 # -Wl,-E causes the symbols to be added to the dynamic
14891 # symbol table so that they can be found when a module
14892 # is loaded. -N 2048K causes the stack size to be set
14893 # to 2048 kilobytes so that the stack doesn't overflow
14894 # when running test_compile.py.
14895 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014896 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014897fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014898{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
14899echo "${ECHO_T}$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014900
Michael W. Hudson54241132001-12-07 15:38:26 +000014901
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000014902
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014903{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
14904echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014905if test ! "$LIBRARY" = "$LDLIBRARY"
14906then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000014907 case $ac_sys_system in
14908 CYGWIN*)
14909 # Cygwin needs CCSHARED when building extension DLLs
14910 # but not when building the interpreter DLL.
14911 CFLAGSFORSHARED='';;
14912 *)
14913 CFLAGSFORSHARED='$(CCSHARED)'
14914 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014915fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014916{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
14917echo "${ECHO_T}$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014918
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014919# SHLIBS are libraries (except -lc and -lm) to link to the python shared
14920# library (with --enable-shared).
14921# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000014922# symbols, this must be set to $(LIBS) (expanded by make). We do this even
14923# if it is not required, since it creates a dependency of the shared library
14924# to LIBS. This, in turn, means that applications linking the shared libpython
14925# don't need to link LIBS explicitly. The default should be only changed
14926# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014927
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014928{ echo "$as_me:$LINENO: checking SHLIBS" >&5
14929echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014930case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014931 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000014932 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014933esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014934{ echo "$as_me:$LINENO: result: $SHLIBS" >&5
14935echo "${ECHO_T}$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014936
14937
Guido van Rossum627b2d71993-12-24 10:39:16 +000014938# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000014939
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014940{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
14941echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014942if test "${ac_cv_lib_dl_dlopen+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014943 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014944else
Martin v. Löwis11437992002-04-12 09:54:03 +000014945 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014946LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014947cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014948/* confdefs.h. */
14949_ACEOF
14950cat confdefs.h >>conftest.$ac_ext
14951cat >>conftest.$ac_ext <<_ACEOF
14952/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014953
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014954/* Override any GCC internal prototype to avoid an error.
14955 Use char because int might match the return type of a GCC
14956 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014957#ifdef __cplusplus
14958extern "C"
14959#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014960char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014961int
14962main ()
14963{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014964return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014965 ;
14966 return 0;
14967}
14968_ACEOF
14969rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014970if { (ac_try="$ac_link"
14971case "(($ac_try" in
14972 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14973 *) ac_try_echo=$ac_try;;
14974esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014975eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014976 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014977 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014978 grep -v '^ *+' conftest.er1 >conftest.err
14979 rm -f conftest.er1
14980 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014982 (exit $ac_status); } && {
14983 test -z "$ac_c_werror_flag" ||
14984 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014985 } && test -s conftest$ac_exeext &&
14986 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014987 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014988else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014989 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014990sed 's/^/| /' conftest.$ac_ext >&5
14991
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014992 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014993fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014994
14995rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014996 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014997LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000014998fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014999{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
15000echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
15001if test $ac_cv_lib_dl_dlopen = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015002 cat >>confdefs.h <<_ACEOF
15003#define HAVE_LIBDL 1
15004_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015005
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015006 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000015007
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015008fi
15009 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000015010
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015011{ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
15012echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015013if test "${ac_cv_lib_dld_shl_load+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015014 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015015else
Martin v. Löwis11437992002-04-12 09:54:03 +000015016 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015017LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015018cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015019/* confdefs.h. */
15020_ACEOF
15021cat confdefs.h >>conftest.$ac_ext
15022cat >>conftest.$ac_ext <<_ACEOF
15023/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015024
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015025/* Override any GCC internal prototype to avoid an error.
15026 Use char because int might match the return type of a GCC
15027 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015028#ifdef __cplusplus
15029extern "C"
15030#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015031char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015032int
15033main ()
15034{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015035return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015036 ;
15037 return 0;
15038}
15039_ACEOF
15040rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015041if { (ac_try="$ac_link"
15042case "(($ac_try" in
15043 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15044 *) ac_try_echo=$ac_try;;
15045esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015046eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015047 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015048 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015049 grep -v '^ *+' conftest.er1 >conftest.err
15050 rm -f conftest.er1
15051 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015052 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015053 (exit $ac_status); } && {
15054 test -z "$ac_c_werror_flag" ||
15055 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015056 } && test -s conftest$ac_exeext &&
15057 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015058 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015059else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015060 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015061sed 's/^/| /' conftest.$ac_ext >&5
15062
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015063 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015064fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015065
15066rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015067 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015068LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000015069fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015070{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
15071echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
15072if test $ac_cv_lib_dld_shl_load = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015073 cat >>confdefs.h <<_ACEOF
15074#define HAVE_LIBDLD 1
15075_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015076
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015077 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015078
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015079fi
15080 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000015081
Georg Brandlb1441c72009-01-03 22:33:39 +000015082# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +000015083if test "$with_threads" = "yes" -o -z "$with_threads"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015084 { echo "$as_me:$LINENO: checking for library containing sem_init" >&5
15085echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015086if test "${ac_cv_search_sem_init+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015087 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015088else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015089 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000015090cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015091/* confdefs.h. */
15092_ACEOF
15093cat confdefs.h >>conftest.$ac_ext
15094cat >>conftest.$ac_ext <<_ACEOF
15095/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015096
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015097/* Override any GCC internal prototype to avoid an error.
15098 Use char because int might match the return type of a GCC
15099 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015100#ifdef __cplusplus
15101extern "C"
15102#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015103char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015104int
15105main ()
15106{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015107return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015108 ;
15109 return 0;
15110}
15111_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015112for ac_lib in '' pthread rt posix4; do
15113 if test -z "$ac_lib"; then
15114 ac_res="none required"
15115 else
15116 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015117 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015118 fi
15119 rm -f conftest.$ac_objext conftest$ac_exeext
15120if { (ac_try="$ac_link"
15121case "(($ac_try" in
15122 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15123 *) ac_try_echo=$ac_try;;
15124esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015125eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015126 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015127 ac_status=$?
15128 grep -v '^ *+' conftest.er1 >conftest.err
15129 rm -f conftest.er1
15130 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015132 (exit $ac_status); } && {
15133 test -z "$ac_c_werror_flag" ||
15134 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015135 } && test -s conftest$ac_exeext &&
15136 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015137 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +000015138else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015139 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015140sed 's/^/| /' conftest.$ac_ext >&5
15141
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015142
Thomas Wouters477c8d52006-05-27 19:21:47 +000015143fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015144
15145rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15146 conftest$ac_exeext
15147 if test "${ac_cv_search_sem_init+set}" = set; then
15148 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015149fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015150done
15151if test "${ac_cv_search_sem_init+set}" = set; then
15152 :
15153else
15154 ac_cv_search_sem_init=no
15155fi
15156rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015157LIBS=$ac_func_search_save_LIBS
15158fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015159{ echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
15160echo "${ECHO_T}$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015161ac_res=$ac_cv_search_sem_init
15162if test "$ac_res" != no; then
15163 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015164
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015165fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000015166 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000015167 # posix4 on Solaris 2.6
15168 # pthread (first!) on Linux
15169fi
15170
Martin v. Löwis19d17342003-06-14 21:03:05 +000015171# check if we need libintl for locale functions
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015172{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
15173echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000015174if test "${ac_cv_lib_intl_textdomain+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015175 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +000015176else
15177 ac_check_lib_save_LIBS=$LIBS
15178LIBS="-lintl $LIBS"
15179cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015180/* confdefs.h. */
15181_ACEOF
15182cat confdefs.h >>conftest.$ac_ext
15183cat >>conftest.$ac_ext <<_ACEOF
15184/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015185
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015186/* Override any GCC internal prototype to avoid an error.
15187 Use char because int might match the return type of a GCC
15188 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015189#ifdef __cplusplus
15190extern "C"
15191#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000015192char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015193int
15194main ()
15195{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015196return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015197 ;
15198 return 0;
15199}
15200_ACEOF
15201rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015202if { (ac_try="$ac_link"
15203case "(($ac_try" in
15204 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15205 *) ac_try_echo=$ac_try;;
15206esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015207eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015208 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000015209 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015210 grep -v '^ *+' conftest.er1 >conftest.err
15211 rm -f conftest.er1
15212 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015214 (exit $ac_status); } && {
15215 test -z "$ac_c_werror_flag" ||
15216 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015217 } && test -s conftest$ac_exeext &&
15218 $as_test_x conftest$ac_exeext; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015219 ac_cv_lib_intl_textdomain=yes
15220else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015221 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015222sed 's/^/| /' conftest.$ac_ext >&5
15223
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015224 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000015225fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015226
15227rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015228 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000015229LIBS=$ac_check_lib_save_LIBS
15230fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015231{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
15232echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; }
15233if test $ac_cv_lib_intl_textdomain = yes; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015234
15235cat >>confdefs.h <<\_ACEOF
15236#define WITH_LIBINTL 1
15237_ACEOF
15238
Brett Cannonc6d936e2009-06-07 20:09:53 +000015239 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +000015240fi
15241
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015242
15243# checks for system dependent C++ extensions support
15244case "$ac_sys_system" in
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015245 AIX*) { echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
15246echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015247 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015248/* confdefs.h. */
15249_ACEOF
15250cat confdefs.h >>conftest.$ac_ext
15251cat >>conftest.$ac_ext <<_ACEOF
15252/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015253#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015254int
15255main ()
15256{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015257loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000015258 ;
15259 return 0;
15260}
15261_ACEOF
15262rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015263if { (ac_try="$ac_link"
15264case "(($ac_try" in
15265 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15266 *) ac_try_echo=$ac_try;;
15267esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015268eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015269 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015270 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015271 grep -v '^ *+' conftest.er1 >conftest.err
15272 rm -f conftest.er1
15273 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015275 (exit $ac_status); } && {
15276 test -z "$ac_c_werror_flag" ||
15277 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015278 } && test -s conftest$ac_exeext &&
15279 $as_test_x conftest$ac_exeext; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015280
Martin v. Löwis11437992002-04-12 09:54:03 +000015281cat >>confdefs.h <<\_ACEOF
15282#define AIX_GENUINE_CPLUSPLUS 1
15283_ACEOF
15284
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015285 { echo "$as_me:$LINENO: result: yes" >&5
15286echo "${ECHO_T}yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015287else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015288 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015289sed 's/^/| /' conftest.$ac_ext >&5
15290
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015291 { echo "$as_me:$LINENO: result: no" >&5
15292echo "${ECHO_T}no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015293fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015294
15295rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015296 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015297 *) ;;
15298esac
15299
Guido van Rossum70c7f481998-03-26 18:44:10 +000015300# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015301{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
15302echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015303if test "${ac_cv_lib_nsl_t_open+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015304 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015305else
Martin v. Löwis11437992002-04-12 09:54:03 +000015306 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015307LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015308cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015309/* confdefs.h. */
15310_ACEOF
15311cat confdefs.h >>conftest.$ac_ext
15312cat >>conftest.$ac_ext <<_ACEOF
15313/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015314
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015315/* Override any GCC internal prototype to avoid an error.
15316 Use char because int might match the return type of a GCC
15317 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015318#ifdef __cplusplus
15319extern "C"
15320#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015321char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015322int
15323main ()
15324{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015325return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015326 ;
15327 return 0;
15328}
15329_ACEOF
15330rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015331if { (ac_try="$ac_link"
15332case "(($ac_try" in
15333 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15334 *) ac_try_echo=$ac_try;;
15335esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015336eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015337 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015338 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015339 grep -v '^ *+' conftest.er1 >conftest.err
15340 rm -f conftest.er1
15341 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015343 (exit $ac_status); } && {
15344 test -z "$ac_c_werror_flag" ||
15345 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015346 } && test -s conftest$ac_exeext &&
15347 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015348 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015349else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015350 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015351sed 's/^/| /' conftest.$ac_ext >&5
15352
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015353 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015354fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015355
15356rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015357 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015358LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015359fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015360{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
15361echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6; }
15362if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015363 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015364fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000015365 # SVR4
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015366{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
15367echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015368if test "${ac_cv_lib_socket_socket+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015369 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015370else
Martin v. Löwis11437992002-04-12 09:54:03 +000015371 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015372LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015373cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015374/* confdefs.h. */
15375_ACEOF
15376cat confdefs.h >>conftest.$ac_ext
15377cat >>conftest.$ac_ext <<_ACEOF
15378/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015379
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015380/* Override any GCC internal prototype to avoid an error.
15381 Use char because int might match the return type of a GCC
15382 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015383#ifdef __cplusplus
15384extern "C"
15385#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015386char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015387int
15388main ()
15389{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015390return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015391 ;
15392 return 0;
15393}
15394_ACEOF
15395rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015396if { (ac_try="$ac_link"
15397case "(($ac_try" in
15398 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15399 *) ac_try_echo=$ac_try;;
15400esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015401eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015402 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015403 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015404 grep -v '^ *+' conftest.er1 >conftest.err
15405 rm -f conftest.er1
15406 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015408 (exit $ac_status); } && {
15409 test -z "$ac_c_werror_flag" ||
15410 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015411 } && test -s conftest$ac_exeext &&
15412 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015413 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015414else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015415 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015416sed 's/^/| /' conftest.$ac_ext >&5
15417
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015418 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015419fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015420
15421rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015422 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015423LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015424fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015425{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
15426echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
15427if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000015428 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000015429fi
15430 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000015431
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015432{ echo "$as_me:$LINENO: checking for --with-libs" >&5
15433echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015434
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015435# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000015436if test "${with_libs+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015437 withval=$with_libs;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015438{ echo "$as_me:$LINENO: result: $withval" >&5
15439echo "${ECHO_T}$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000015440LIBS="$withval $LIBS"
15441
15442else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015443 { echo "$as_me:$LINENO: result: no" >&5
15444echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015445fi
15446
Guido van Rossum7f43da71994-08-01 12:15:30 +000015447
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000015448if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000015449 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
15450set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
15451{ echo "$as_me:$LINENO: checking for $ac_word" >&5
15452echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
15453if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
15454 echo $ECHO_N "(cached) $ECHO_C" >&6
15455else
15456 case $PKG_CONFIG in
15457 [\\/]* | ?:[\\/]*)
15458 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
15459 ;;
15460 *)
15461 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15462for as_dir in $PATH
15463do
15464 IFS=$as_save_IFS
15465 test -z "$as_dir" && as_dir=.
15466 for ac_exec_ext in '' $ac_executable_extensions; do
15467 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15468 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
15469 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15470 break 2
15471 fi
15472done
15473done
15474IFS=$as_save_IFS
15475
15476 ;;
15477esac
15478fi
15479PKG_CONFIG=$ac_cv_path_PKG_CONFIG
15480if test -n "$PKG_CONFIG"; then
15481 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
15482echo "${ECHO_T}$PKG_CONFIG" >&6; }
15483else
15484 { echo "$as_me:$LINENO: result: no" >&5
15485echo "${ECHO_T}no" >&6; }
15486fi
15487
15488
15489fi
15490if test -z "$ac_cv_path_PKG_CONFIG"; then
15491 ac_pt_PKG_CONFIG=$PKG_CONFIG
15492 # Extract the first word of "pkg-config", so it can be a program name with args.
15493set dummy pkg-config; ac_word=$2
15494{ echo "$as_me:$LINENO: checking for $ac_word" >&5
15495echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
15496if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
15497 echo $ECHO_N "(cached) $ECHO_C" >&6
15498else
15499 case $ac_pt_PKG_CONFIG in
15500 [\\/]* | ?:[\\/]*)
15501 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
15502 ;;
15503 *)
15504 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15505for as_dir in $PATH
15506do
15507 IFS=$as_save_IFS
15508 test -z "$as_dir" && as_dir=.
15509 for ac_exec_ext in '' $ac_executable_extensions; do
15510 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15511 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
15512 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15513 break 2
15514 fi
15515done
15516done
15517IFS=$as_save_IFS
15518
15519 ;;
15520esac
15521fi
15522ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
15523if test -n "$ac_pt_PKG_CONFIG"; then
15524 { echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5
15525echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6; }
15526else
15527 { echo "$as_me:$LINENO: result: no" >&5
15528echo "${ECHO_T}no" >&6; }
15529fi
15530
15531 if test "x$ac_pt_PKG_CONFIG" = x; then
15532 PKG_CONFIG=""
15533 else
15534 case $cross_compiling:$ac_tool_warned in
15535yes:)
15536{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
15537whose name does not start with the host triplet. If you think this
15538configuration is useful to you, please write to autoconf@gnu.org." >&5
15539echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
15540whose name does not start with the host triplet. If you think this
15541configuration is useful to you, please write to autoconf@gnu.org." >&2;}
15542ac_tool_warned=yes ;;
15543esac
15544 PKG_CONFIG=$ac_pt_PKG_CONFIG
15545 fi
15546else
15547 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
15548fi
15549
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000015550
15551# Check for use of the system expat library
15552{ echo "$as_me:$LINENO: checking for --with-system-expat" >&5
15553echo $ECHO_N "checking for --with-system-expat... $ECHO_C" >&6; }
15554
15555# Check whether --with-system_expat was given.
15556if test "${with_system_expat+set}" = set; then
15557 withval=$with_system_expat;
15558fi
15559
15560
15561{ echo "$as_me:$LINENO: result: $with_system_expat" >&5
15562echo "${ECHO_T}$with_system_expat" >&6; }
15563
15564# Check for use of the system libffi library
15565{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
15566echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
15567
15568# Check whether --with-system_ffi was given.
15569if test "${with_system_ffi+set}" = set; then
15570 withval=$with_system_ffi;
15571fi
15572
15573
15574if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000015575 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
15576else
15577 LIBFFI_INCLUDEDIR=""
15578fi
15579
15580
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015581{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5
15582echo "${ECHO_T}$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015583
Matthias Klose55708cc2009-04-30 08:06:49 +000015584# Check for --with-dbmliborder
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015585{ echo "$as_me:$LINENO: checking for --with-dbmliborder" >&5
15586echo $ECHO_N "checking for --with-dbmliborder... $ECHO_C" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000015587
15588# Check whether --with-dbmliborder was given.
15589if test "${with_dbmliborder+set}" = set; then
15590 withval=$with_dbmliborder;
15591if test x$with_dbmliborder = xyes
15592then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015593{ { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15594echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Matthias Klose55708cc2009-04-30 08:06:49 +000015595 { (exit 1); exit 1; }; }
15596else
15597 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
15598 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
15599 then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015600 { { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15601echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Matthias Klose55708cc2009-04-30 08:06:49 +000015602 { (exit 1); exit 1; }; }
15603 fi
15604 done
15605fi
15606fi
15607
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015608{ echo "$as_me:$LINENO: result: $with_dbmliborder" >&5
15609echo "${ECHO_T}$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000015610
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000015611# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015612
15613
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015614{ echo "$as_me:$LINENO: checking for --with-signal-module" >&5
15615echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015616
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015617# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015618if test "${with_signal_module+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015619 withval=$with_signal_module;
15620fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015621
15622
15623if test -z "$with_signal_module"
15624then with_signal_module="yes"
15625fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015626{ echo "$as_me:$LINENO: result: $with_signal_module" >&5
15627echo "${ECHO_T}$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015628
15629if test "${with_signal_module}" = "yes"; then
15630 USE_SIGNAL_MODULE=""
15631 SIGNAL_OBJS=""
15632else
15633 USE_SIGNAL_MODULE="#"
15634 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
15635fi
15636
Guido van Rossum3d15bd82001-01-10 18:53:48 +000015637# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000015638
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015639USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000015640
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015641{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
15642echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015643
Guido van Rossumec2f0731997-01-22 20:54:01 +000015644
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015645# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015646if test "${with_dec_threads+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015647 withval=$with_dec_threads;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015648{ echo "$as_me:$LINENO: result: $withval" >&5
15649echo "${ECHO_T}$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000015650LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000015651if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000015652 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000015653fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015654else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015655 { echo "$as_me:$LINENO: result: no" >&5
15656echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015657fi
15658
Martin v. Löwis11437992002-04-12 09:54:03 +000015659
15660# Templates for things AC_DEFINEd more than once.
15661# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015662
15663
Martin v. Löwis11437992002-04-12 09:54:03 +000015664
15665
15666
15667
15668
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015669{ echo "$as_me:$LINENO: checking for --with-threads" >&5
15670echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015671
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015672# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015673if test "${with_threads+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015674 withval=$with_threads;
15675fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015676
15677
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015678# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000015679
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015680# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015681if test "${with_thread+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015682 withval=$with_thread; with_threads=$with_thread
15683fi
15684
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015685
15686if test -z "$with_threads"
15687then with_threads="yes"
15688fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015689{ echo "$as_me:$LINENO: result: $with_threads" >&5
15690echo "${ECHO_T}$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015691
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015692
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015693if test "$with_threads" = "no"
15694then
15695 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015696elif test "$ac_cv_pthread_is_default" = yes
15697then
Martin v. Löwis11437992002-04-12 09:54:03 +000015698 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015699#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015700_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015701
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015702 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000015703 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015704#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015705_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015706
15707 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000015708 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015709elif test "$ac_cv_kpthread" = "yes"
15710then
15711 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015712 if test "$ac_cv_cxx_thread" = "yes"; then
15713 CXX="$CXX -Kpthread"
15714 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015715 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015716#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015717_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015718
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015719 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015720 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015721elif test "$ac_cv_kthread" = "yes"
15722then
15723 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015724 if test "$ac_cv_cxx_thread" = "yes"; then
15725 CXX="$CXX -Kthread"
15726 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015727 cat >>confdefs.h <<\_ACEOF
15728#define WITH_THREAD 1
15729_ACEOF
15730
15731 posix_threads=yes
15732 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015733elif test "$ac_cv_pthread" = "yes"
15734then
15735 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015736 if test "$ac_cv_cxx_thread" = "yes"; then
15737 CXX="$CXX -pthread"
15738 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015739 cat >>confdefs.h <<\_ACEOF
15740#define WITH_THREAD 1
15741_ACEOF
15742
15743 posix_threads=yes
15744 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015745else
15746 if test ! -z "$with_threads" -a -d "$with_threads"
15747 then LDFLAGS="$LDFLAGS -L$with_threads"
15748 fi
15749 if test ! -z "$withval" -a -d "$withval"
15750 then LDFLAGS="$LDFLAGS -L$withval"
15751 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015752
15753 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000015754 # define _POSIX_THREADS in unistd.h. Some apparently don't
15755 # (e.g. gnu pth with pthread emulation)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015756 { echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
15757echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015758 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015759/* confdefs.h. */
15760_ACEOF
15761cat confdefs.h >>conftest.$ac_ext
15762cat >>conftest.$ac_ext <<_ACEOF
15763/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015764
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015765#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015766#ifdef _POSIX_THREADS
15767yes
15768#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015769
15770_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015771if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015772 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015773 unistd_defines_pthreads=yes
15774else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015775 unistd_defines_pthreads=no
15776fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000015777rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015778
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015779 { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
15780echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015781
Martin v. Löwis11437992002-04-12 09:54:03 +000015782 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015783#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015784_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015785
Martin v. Löwis11437992002-04-12 09:54:03 +000015786 if test "${ac_cv_header_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015787 { echo "$as_me:$LINENO: checking for cthreads.h" >&5
15788echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015789if test "${ac_cv_header_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015790 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015791fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015792{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
15793echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015794else
Martin v. Löwis11437992002-04-12 09:54:03 +000015795 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015796{ echo "$as_me:$LINENO: checking cthreads.h usability" >&5
15797echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015798cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015799/* confdefs.h. */
15800_ACEOF
15801cat confdefs.h >>conftest.$ac_ext
15802cat >>conftest.$ac_ext <<_ACEOF
15803/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015804$ac_includes_default
15805#include <cthreads.h>
15806_ACEOF
15807rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015808if { (ac_try="$ac_compile"
15809case "(($ac_try" in
15810 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15811 *) ac_try_echo=$ac_try;;
15812esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015813eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015814 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015815 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015816 grep -v '^ *+' conftest.er1 >conftest.err
15817 rm -f conftest.er1
15818 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015820 (exit $ac_status); } && {
15821 test -z "$ac_c_werror_flag" ||
15822 test ! -s conftest.err
15823 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015824 ac_header_compiler=yes
15825else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015826 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015827sed 's/^/| /' conftest.$ac_ext >&5
15828
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015829 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015830fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015831
15832rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015833{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15834echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015835
15836# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015837{ echo "$as_me:$LINENO: checking cthreads.h presence" >&5
15838echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015839cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015840/* confdefs.h. */
15841_ACEOF
15842cat confdefs.h >>conftest.$ac_ext
15843cat >>conftest.$ac_ext <<_ACEOF
15844/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015845#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015846_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015847if { (ac_try="$ac_cpp conftest.$ac_ext"
15848case "(($ac_try" in
15849 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15850 *) ac_try_echo=$ac_try;;
15851esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015852eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015853 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015854 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000015855 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000015856 rm -f conftest.er1
15857 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015859 (exit $ac_status); } >/dev/null && {
15860 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15861 test ! -s conftest.err
15862 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015863 ac_header_preproc=yes
15864else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015865 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015866sed 's/^/| /' conftest.$ac_ext >&5
15867
Martin v. Löwis11437992002-04-12 09:54:03 +000015868 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015869fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015870
Martin v. Löwis11437992002-04-12 09:54:03 +000015871rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015872{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15873echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015874
15875# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015876case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15877 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015878 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
15879echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15880 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
15881echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015882 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015883 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015884 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015885 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
15886echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
15887 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
15888echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
15889 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
15890echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
15891 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
15892echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
15893 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
15894echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
15895 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
15896echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015897 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000015898## -------------------------------------- ##
15899## Report this to http://bugs.python.org/ ##
15900## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015901_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015902 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000015903 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015904esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015905{ echo "$as_me:$LINENO: checking for cthreads.h" >&5
15906echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015907if test "${ac_cv_header_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015908 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015909else
15910 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015911fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015912{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
15913echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015914
15915fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015916if test $ac_cv_header_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015917 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015918#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015919_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015920
Martin v. Löwis11437992002-04-12 09:54:03 +000015921 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015922#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015923_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015924
Martin v. Löwis11437992002-04-12 09:54:03 +000015925
15926cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015927#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015928_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015929
15930 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015931 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015932else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015933
Martin v. Löwis11437992002-04-12 09:54:03 +000015934 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015935 { echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
15936echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015937if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015938 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015939fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015940{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
15941echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015942else
Martin v. Löwis11437992002-04-12 09:54:03 +000015943 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015944{ echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
15945echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015946cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015947/* confdefs.h. */
15948_ACEOF
15949cat confdefs.h >>conftest.$ac_ext
15950cat >>conftest.$ac_ext <<_ACEOF
15951/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015952$ac_includes_default
15953#include <mach/cthreads.h>
15954_ACEOF
15955rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015956if { (ac_try="$ac_compile"
15957case "(($ac_try" in
15958 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15959 *) ac_try_echo=$ac_try;;
15960esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015961eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015962 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015963 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015964 grep -v '^ *+' conftest.er1 >conftest.err
15965 rm -f conftest.er1
15966 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015968 (exit $ac_status); } && {
15969 test -z "$ac_c_werror_flag" ||
15970 test ! -s conftest.err
15971 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015972 ac_header_compiler=yes
15973else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015974 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015975sed 's/^/| /' conftest.$ac_ext >&5
15976
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015977 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015978fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015979
15980rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015981{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15982echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015983
15984# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015985{ echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
15986echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015987cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015988/* confdefs.h. */
15989_ACEOF
15990cat confdefs.h >>conftest.$ac_ext
15991cat >>conftest.$ac_ext <<_ACEOF
15992/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015993#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015994_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015995if { (ac_try="$ac_cpp conftest.$ac_ext"
15996case "(($ac_try" in
15997 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15998 *) ac_try_echo=$ac_try;;
15999esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016000eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016001 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016002 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000016003 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000016004 rm -f conftest.er1
16005 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016007 (exit $ac_status); } >/dev/null && {
16008 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16009 test ! -s conftest.err
16010 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016011 ac_header_preproc=yes
16012else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016013 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016014sed 's/^/| /' conftest.$ac_ext >&5
16015
Martin v. Löwis11437992002-04-12 09:54:03 +000016016 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016017fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016018
Martin v. Löwis11437992002-04-12 09:54:03 +000016019rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016020{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16021echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016022
16023# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016024case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16025 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016026 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
16027echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16028 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
16029echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000016030 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016031 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000016032 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016033 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
16034echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
16035 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
16036echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
16037 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
16038echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
16039 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
16040echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
16041 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
16042echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
16043 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
16044echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016045 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000016046## -------------------------------------- ##
16047## Report this to http://bugs.python.org/ ##
16048## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000016049_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016050 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000016051 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016052esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016053{ echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
16054echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016055if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016056 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016057else
16058 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016059fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016060{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
16061echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016062
16063fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016064if test $ac_cv_header_mach_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016065 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016066#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016067_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016068
Martin v. Löwis11437992002-04-12 09:54:03 +000016069 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016070#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016071_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016072
Martin v. Löwis11437992002-04-12 09:54:03 +000016073
16074cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016075#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016076_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016077
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016078 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016079else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016080
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016081 # Just looking for pthread_create in libpthread is not enough:
16082 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
16083 # So we really have to include pthread.h, and then link.
16084 _libs=$LIBS
16085 LIBS="$LIBS -lpthread"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016086 { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
16087echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016088 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016089/* confdefs.h. */
16090_ACEOF
16091cat confdefs.h >>conftest.$ac_ext
16092cat >>conftest.$ac_ext <<_ACEOF
16093/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016094#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000016095
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016096void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000016097int
16098main ()
16099{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016100
16101pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000016102 ;
16103 return 0;
16104}
16105_ACEOF
16106rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016107if { (ac_try="$ac_link"
16108case "(($ac_try" in
16109 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16110 *) ac_try_echo=$ac_try;;
16111esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016112eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016113 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016114 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016115 grep -v '^ *+' conftest.er1 >conftest.err
16116 rm -f conftest.er1
16117 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016119 (exit $ac_status); } && {
16120 test -z "$ac_c_werror_flag" ||
16121 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016122 } && test -s conftest$ac_exeext &&
16123 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016124
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016125 { echo "$as_me:$LINENO: result: yes" >&5
16126echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016127 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000016128#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016129_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000016130
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000016131 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016132 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000016133else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016134 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016135sed 's/^/| /' conftest.$ac_ext >&5
16136
Martin v. Löwis11437992002-04-12 09:54:03 +000016137
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016138 LIBS=$_libs
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016139 { echo "$as_me:$LINENO: checking for pthread_detach" >&5
16140echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016141if test "${ac_cv_func_pthread_detach+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016142 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000016143else
Martin v. Löwis11437992002-04-12 09:54:03 +000016144 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016145/* confdefs.h. */
16146_ACEOF
16147cat confdefs.h >>conftest.$ac_ext
16148cat >>conftest.$ac_ext <<_ACEOF
16149/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016150/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
16151 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16152#define pthread_detach innocuous_pthread_detach
16153
Guido van Rossumad678af1998-10-02 14:42:15 +000016154/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016155 which can conflict with char pthread_detach (); below.
16156 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016157 <limits.h> exists even on freestanding compilers. */
16158
16159#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016160# include <limits.h>
16161#else
16162# include <assert.h>
16163#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016164
16165#undef pthread_detach
16166
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016167/* Override any GCC internal prototype to avoid an error.
16168 Use char because int might match the return type of a GCC
16169 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016170#ifdef __cplusplus
16171extern "C"
16172#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016173char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000016174/* The GNU C library defines this for functions which it implements
16175 to always fail with ENOSYS. Some functions are actually named
16176 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016177#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000016178choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000016179#endif
16180
Skip Montanaro6dead952003-09-25 14:50:04 +000016181int
16182main ()
16183{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016184return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016185 ;
16186 return 0;
16187}
16188_ACEOF
16189rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016190if { (ac_try="$ac_link"
16191case "(($ac_try" in
16192 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16193 *) ac_try_echo=$ac_try;;
16194esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016195eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016196 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016197 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016198 grep -v '^ *+' conftest.er1 >conftest.err
16199 rm -f conftest.er1
16200 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016202 (exit $ac_status); } && {
16203 test -z "$ac_c_werror_flag" ||
16204 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016205 } && test -s conftest$ac_exeext &&
16206 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016207 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000016208else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016209 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016210sed 's/^/| /' conftest.$ac_ext >&5
16211
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016212 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000016213fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016214
16215rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016216 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000016217fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016218{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
16219echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; }
16220if test $ac_cv_func_pthread_detach = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016221 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000016222#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016223_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000016224
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000016225 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016226 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000016227else
Guido van Rossumad678af1998-10-02 14:42:15 +000016228
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016229 { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
16230echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016231if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016232 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016233else
Martin v. Löwis11437992002-04-12 09:54:03 +000016234 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016235LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016236cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016237/* confdefs.h. */
16238_ACEOF
16239cat confdefs.h >>conftest.$ac_ext
16240cat >>conftest.$ac_ext <<_ACEOF
16241/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016242
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016243/* Override any GCC internal prototype to avoid an error.
16244 Use char because int might match the return type of a GCC
16245 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016246#ifdef __cplusplus
16247extern "C"
16248#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016249char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016250int
16251main ()
16252{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016253return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016254 ;
16255 return 0;
16256}
16257_ACEOF
16258rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016259if { (ac_try="$ac_link"
16260case "(($ac_try" in
16261 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16262 *) ac_try_echo=$ac_try;;
16263esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016264eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016265 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016266 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016267 grep -v '^ *+' conftest.er1 >conftest.err
16268 rm -f conftest.er1
16269 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016271 (exit $ac_status); } && {
16272 test -z "$ac_c_werror_flag" ||
16273 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016274 } && test -s conftest$ac_exeext &&
16275 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016276 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000016277else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016278 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016279sed 's/^/| /' conftest.$ac_ext >&5
16280
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016281 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000016282fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016283
16284rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016285 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016286LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016287fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016288{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
16289echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
16290if test $ac_cv_lib_pthreads_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016291 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016292#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016293_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016294
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016295 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016296 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016297 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000016298else
Greg Steinadf63d62000-07-05 10:38:09 +000016299
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016300 { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
16301echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016302if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016303 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000016304else
Martin v. Löwis11437992002-04-12 09:54:03 +000016305 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016306LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016307cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016308/* confdefs.h. */
16309_ACEOF
16310cat confdefs.h >>conftest.$ac_ext
16311cat >>conftest.$ac_ext <<_ACEOF
16312/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016313
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016314/* Override any GCC internal prototype to avoid an error.
16315 Use char because int might match the return type of a GCC
16316 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016317#ifdef __cplusplus
16318extern "C"
16319#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016320char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016321int
16322main ()
16323{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016324return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016325 ;
16326 return 0;
16327}
16328_ACEOF
16329rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016330if { (ac_try="$ac_link"
16331case "(($ac_try" in
16332 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16333 *) ac_try_echo=$ac_try;;
16334esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016335eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016336 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016337 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016338 grep -v '^ *+' conftest.er1 >conftest.err
16339 rm -f conftest.er1
16340 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016342 (exit $ac_status); } && {
16343 test -z "$ac_c_werror_flag" ||
16344 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016345 } && test -s conftest$ac_exeext &&
16346 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016347 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000016348else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016349 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016350sed 's/^/| /' conftest.$ac_ext >&5
16351
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016352 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000016353fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016354
16355rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016356 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016357LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000016358fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016359{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
16360echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
16361if test $ac_cv_lib_c_r_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016362 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016363#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016364_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016365
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016366 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016367 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016368 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016369else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016370
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016371 { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
16372echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016373if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016374 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016375else
Martin v. Löwis11437992002-04-12 09:54:03 +000016376 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016377LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016378cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016379/* confdefs.h. */
16380_ACEOF
16381cat confdefs.h >>conftest.$ac_ext
16382cat >>conftest.$ac_ext <<_ACEOF
16383/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016384
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016385/* Override any GCC internal prototype to avoid an error.
16386 Use char because int might match the return type of a GCC
16387 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016388#ifdef __cplusplus
16389extern "C"
16390#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016391char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016392int
16393main ()
16394{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016395return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016396 ;
16397 return 0;
16398}
16399_ACEOF
16400rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016401if { (ac_try="$ac_link"
16402case "(($ac_try" in
16403 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16404 *) ac_try_echo=$ac_try;;
16405esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016406eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016407 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016408 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016409 grep -v '^ *+' conftest.er1 >conftest.err
16410 rm -f conftest.er1
16411 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016413 (exit $ac_status); } && {
16414 test -z "$ac_c_werror_flag" ||
16415 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016416 } && test -s conftest$ac_exeext &&
16417 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016418 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016419else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016420 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016421sed 's/^/| /' conftest.$ac_ext >&5
16422
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016423 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016424fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016425
16426rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016427 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016428LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016429fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016430{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
16431echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; }
16432if test $ac_cv_lib_pthread___pthread_create_system = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016433 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016434#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016435_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016436
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016437 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016438 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016439 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016440else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016441
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016442 { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
16443echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016444if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016445 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000016446else
Martin v. Löwis11437992002-04-12 09:54:03 +000016447 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016448LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016449cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016450/* confdefs.h. */
16451_ACEOF
16452cat confdefs.h >>conftest.$ac_ext
16453cat >>conftest.$ac_ext <<_ACEOF
16454/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016455
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016456/* Override any GCC internal prototype to avoid an error.
16457 Use char because int might match the return type of a GCC
16458 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016459#ifdef __cplusplus
16460extern "C"
16461#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016462char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016463int
16464main ()
16465{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016466return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016467 ;
16468 return 0;
16469}
16470_ACEOF
16471rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016472if { (ac_try="$ac_link"
16473case "(($ac_try" in
16474 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16475 *) ac_try_echo=$ac_try;;
16476esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016477eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016478 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016479 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016480 grep -v '^ *+' conftest.er1 >conftest.err
16481 rm -f conftest.er1
16482 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016483 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016484 (exit $ac_status); } && {
16485 test -z "$ac_c_werror_flag" ||
16486 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016487 } && test -s conftest$ac_exeext &&
16488 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016489 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000016490else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016491 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016492sed 's/^/| /' conftest.$ac_ext >&5
16493
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016494 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000016495fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016496
16497rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016498 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016499LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016500fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016501{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
16502echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; }
16503if test $ac_cv_lib_cma_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016504 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016505#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016506_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016507
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016508 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016509 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016510 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000016511else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000016512
Martin v. Löwis130fb172001-07-19 11:00:41 +000016513 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000016514fi
16515
Guido van Rossum627b2d71993-12-24 10:39:16 +000016516
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016517fi
16518
Guido van Rossum0be3e491997-05-22 20:33:33 +000016519fi
16520
Guido van Rossum49545951997-12-02 19:28:29 +000016521fi
16522
Guido van Rossumb93a8621998-05-07 13:27:32 +000016523fi
16524
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016525fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016526
16527rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016528 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016529fi
16530
Martin v. Löwis11437992002-04-12 09:54:03 +000016531
16532fi
16533
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016534
Michael W. Hudson54241132001-12-07 15:38:26 +000016535
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016536 { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
16537echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016538if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016539 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016540else
Martin v. Löwis11437992002-04-12 09:54:03 +000016541 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016542LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016543cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016544/* confdefs.h. */
16545_ACEOF
16546cat confdefs.h >>conftest.$ac_ext
16547cat >>conftest.$ac_ext <<_ACEOF
16548/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016549
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016550/* Override any GCC internal prototype to avoid an error.
16551 Use char because int might match the return type of a GCC
16552 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016553#ifdef __cplusplus
16554extern "C"
16555#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016556char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016557int
16558main ()
16559{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016560return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016561 ;
16562 return 0;
16563}
16564_ACEOF
16565rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016566if { (ac_try="$ac_link"
16567case "(($ac_try" in
16568 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16569 *) ac_try_echo=$ac_try;;
16570esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016571eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016572 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016573 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016574 grep -v '^ *+' conftest.er1 >conftest.err
16575 rm -f conftest.er1
16576 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016578 (exit $ac_status); } && {
16579 test -z "$ac_c_werror_flag" ||
16580 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016581 } && test -s conftest$ac_exeext &&
16582 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016583 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016584else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016585 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016586sed 's/^/| /' conftest.$ac_ext >&5
16587
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016588 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016589fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016590
16591rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016592 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016593LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016594fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016595{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
16596echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; }
16597if test $ac_cv_lib_mpc_usconfig = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016598 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016599#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016600_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016601
Martin v. Löwis130fb172001-07-19 11:00:41 +000016602 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016603 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000016604 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000016605fi
16606
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016607
Neal Norwitza978ab02002-11-02 16:58:05 +000016608 if test "$posix_threads" != "yes"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016609 { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
16610echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016611if test "${ac_cv_lib_thread_thr_create+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016612 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016613else
Martin v. Löwis11437992002-04-12 09:54:03 +000016614 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016615LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016616cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016617/* confdefs.h. */
16618_ACEOF
16619cat confdefs.h >>conftest.$ac_ext
16620cat >>conftest.$ac_ext <<_ACEOF
16621/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016622
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016623/* Override any GCC internal prototype to avoid an error.
16624 Use char because int might match the return type of a GCC
16625 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016626#ifdef __cplusplus
16627extern "C"
16628#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016629char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016630int
16631main ()
16632{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016633return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016634 ;
16635 return 0;
16636}
16637_ACEOF
16638rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016639if { (ac_try="$ac_link"
16640case "(($ac_try" in
16641 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16642 *) ac_try_echo=$ac_try;;
16643esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016644eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016645 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016646 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016647 grep -v '^ *+' conftest.er1 >conftest.err
16648 rm -f conftest.er1
16649 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016651 (exit $ac_status); } && {
16652 test -z "$ac_c_werror_flag" ||
16653 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016654 } && test -s conftest$ac_exeext &&
16655 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016656 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016657else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016658 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016659sed 's/^/| /' conftest.$ac_ext >&5
16660
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016661 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016662fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016663
16664rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016665 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016666LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016667fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016668{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
16669echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
16670if test $ac_cv_lib_thread_thr_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016671 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016672#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016673_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016674
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016675 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016676 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016677 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000016678fi
16679
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016680 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016681
Martin v. Löwis130fb172001-07-19 11:00:41 +000016682 if test "$USE_THREAD_MODULE" != "#"
16683 then
16684 # If the above checks didn't disable threads, (at least) OSF1
16685 # needs this '-threads' argument during linking.
16686 case $ac_sys_system in
16687 OSF1) LDLAST=-threads;;
16688 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000016689 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016690fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016691
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016692if test "$posix_threads" = "yes"; then
16693 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016694
16695cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016696#define _POSIX_THREADS 1
16697_ACEOF
16698
16699 fi
16700
16701 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
16702 case $ac_sys_system/$ac_sys_release in
16703 SunOS/5.6)
16704cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016705#define HAVE_PTHREAD_DESTRUCTOR 1
16706_ACEOF
16707
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016708 ;;
16709 SunOS/5.8)
16710cat >>confdefs.h <<\_ACEOF
16711#define HAVE_BROKEN_POSIX_SEMAPHORES 1
16712_ACEOF
16713
16714 ;;
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000016715 AIX/5)
16716cat >>confdefs.h <<\_ACEOF
16717#define HAVE_BROKEN_POSIX_SEMAPHORES 1
16718_ACEOF
16719
16720 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016721 esac
16722
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016723 { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
16724echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016725 if test "${ac_cv_pthread_system_supported+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016726 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016727else
16728 if test "$cross_compiling" = yes; then
16729 ac_cv_pthread_system_supported=no
16730else
16731 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016732/* confdefs.h. */
16733_ACEOF
16734cat confdefs.h >>conftest.$ac_ext
16735cat >>conftest.$ac_ext <<_ACEOF
16736/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016737#include <pthread.h>
16738 void *foo(void *parm) {
16739 return NULL;
16740 }
16741 main() {
16742 pthread_attr_t attr;
16743 pthread_t id;
16744 if (pthread_attr_init(&attr)) exit(-1);
16745 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
16746 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
16747 exit(0);
16748 }
16749_ACEOF
16750rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016751if { (ac_try="$ac_link"
16752case "(($ac_try" in
16753 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16754 *) ac_try_echo=$ac_try;;
16755esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016756eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016757 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016758 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016759 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016760 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016761 { (case "(($ac_try" in
16762 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16763 *) ac_try_echo=$ac_try;;
16764esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016765eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016766 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016767 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016769 (exit $ac_status); }; }; then
16770 ac_cv_pthread_system_supported=yes
16771else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016772 echo "$as_me: program exited with status $ac_status" >&5
16773echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016774sed 's/^/| /' conftest.$ac_ext >&5
16775
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016776( exit $ac_status )
16777ac_cv_pthread_system_supported=no
16778fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016779rm -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 +000016780fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016781
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016782
16783
Guido van Rossum627b2d71993-12-24 10:39:16 +000016784fi
16785
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016786 { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
16787echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016788 if test "$ac_cv_pthread_system_supported" = "yes"; then
16789
16790cat >>confdefs.h <<\_ACEOF
16791#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
16792_ACEOF
16793
16794 fi
16795
16796for ac_func in pthread_sigmask
16797do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016798as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16799{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16800echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016801if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016802 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016803else
16804 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016805/* confdefs.h. */
16806_ACEOF
16807cat confdefs.h >>conftest.$ac_ext
16808cat >>conftest.$ac_ext <<_ACEOF
16809/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016810/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16811 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16812#define $ac_func innocuous_$ac_func
16813
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016814/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016815 which can conflict with char $ac_func (); below.
16816 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016817 <limits.h> exists even on freestanding compilers. */
16818
16819#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016820# include <limits.h>
16821#else
16822# include <assert.h>
16823#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016824
16825#undef $ac_func
16826
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016827/* Override any GCC internal prototype to avoid an error.
16828 Use char because int might match the return type of a GCC
16829 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016830#ifdef __cplusplus
16831extern "C"
16832#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016833char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016834/* The GNU C library defines this for functions which it implements
16835 to always fail with ENOSYS. Some functions are actually named
16836 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016837#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016838choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016839#endif
16840
Skip Montanaro6dead952003-09-25 14:50:04 +000016841int
16842main ()
16843{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016844return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016845 ;
16846 return 0;
16847}
16848_ACEOF
16849rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016850if { (ac_try="$ac_link"
16851case "(($ac_try" in
16852 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16853 *) ac_try_echo=$ac_try;;
16854esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016855eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016856 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016857 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016858 grep -v '^ *+' conftest.er1 >conftest.err
16859 rm -f conftest.er1
16860 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016862 (exit $ac_status); } && {
16863 test -z "$ac_c_werror_flag" ||
16864 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016865 } && test -s conftest$ac_exeext &&
16866 $as_test_x conftest$ac_exeext; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016867 eval "$as_ac_var=yes"
16868else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016869 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016870sed 's/^/| /' conftest.$ac_ext >&5
16871
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016872 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016873fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016874
16875rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016876 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016877fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016878ac_res=`eval echo '${'$as_ac_var'}'`
16879 { echo "$as_me:$LINENO: result: $ac_res" >&5
16880echo "${ECHO_T}$ac_res" >&6; }
16881if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016882 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016883#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016884_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000016885 case $ac_sys_system in
16886 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016887
Jason Tishlerfac083d2003-07-22 15:20:49 +000016888cat >>confdefs.h <<\_ACEOF
16889#define HAVE_BROKEN_PTHREAD_SIGMASK 1
16890_ACEOF
16891
16892 ;;
16893 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016894fi
16895done
16896
16897fi
16898
16899
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016900# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000016901
16902
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016903{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
16904echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016905# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016906if test "${enable_ipv6+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016907 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016908 no)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016909 { echo "$as_me:$LINENO: result: no" >&5
16910echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016911 ipv6=no
16912 ;;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016913 *) { echo "$as_me:$LINENO: result: yes" >&5
16914echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016915 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016916#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016917_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016918
16919 ipv6=yes
16920 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016921 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016922else
Martin v. Löwis11437992002-04-12 09:54:03 +000016923
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016924 if test "$cross_compiling" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016925 { echo "$as_me:$LINENO: result: no" >&5
16926echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016927 ipv6=no
16928
16929else
Martin v. Löwis11437992002-04-12 09:54:03 +000016930 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016931/* confdefs.h. */
16932_ACEOF
16933cat confdefs.h >>conftest.$ac_ext
16934cat >>conftest.$ac_ext <<_ACEOF
16935/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016936 /* AF_INET6 available check */
16937#include <sys/types.h>
16938#include <sys/socket.h>
16939main()
16940{
16941 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
16942 exit(1);
16943 else
16944 exit(0);
16945}
16946
Martin v. Löwis11437992002-04-12 09:54:03 +000016947_ACEOF
16948rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016949if { (ac_try="$ac_link"
16950case "(($ac_try" in
16951 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16952 *) ac_try_echo=$ac_try;;
16953esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016954eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016955 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016956 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016958 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016959 { (case "(($ac_try" in
16960 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16961 *) ac_try_echo=$ac_try;;
16962esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016963eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016964 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016965 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016966 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016967 (exit $ac_status); }; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016968 { echo "$as_me:$LINENO: result: yes" >&5
16969echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016970 ipv6=yes
16971else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016972 echo "$as_me: program exited with status $ac_status" >&5
16973echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016974sed 's/^/| /' conftest.$ac_ext >&5
16975
Martin v. Löwis11437992002-04-12 09:54:03 +000016976( exit $ac_status )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016977{ echo "$as_me:$LINENO: result: no" >&5
16978echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016979 ipv6=no
16980fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016981rm -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 +000016982fi
16983
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016984
16985
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016986if test "$ipv6" = "yes"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016987 { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
16988echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016989 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016990/* confdefs.h. */
16991_ACEOF
16992cat confdefs.h >>conftest.$ac_ext
16993cat >>conftest.$ac_ext <<_ACEOF
16994/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016995#include <sys/types.h>
16996#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016997int
16998main ()
16999{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017000struct sockaddr_in6 x;
17001x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000017002 ;
17003 return 0;
17004}
17005_ACEOF
17006rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017007if { (ac_try="$ac_compile"
17008case "(($ac_try" in
17009 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17010 *) ac_try_echo=$ac_try;;
17011esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017012eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017013 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017014 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017015 grep -v '^ *+' conftest.er1 >conftest.err
17016 rm -f conftest.er1
17017 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017019 (exit $ac_status); } && {
17020 test -z "$ac_c_werror_flag" ||
17021 test ! -s conftest.err
17022 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017023 { echo "$as_me:$LINENO: result: yes" >&5
17024echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017025 ipv6=yes
17026else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017027 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017028sed 's/^/| /' conftest.$ac_ext >&5
17029
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017030 { echo "$as_me:$LINENO: result: no" >&5
17031echo "${ECHO_T}no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017032 ipv6=no
17033fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017034
17035rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017036fi
17037
17038if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017039 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017040#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017041_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017042
17043fi
17044
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017045fi
17046
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017047
17048ipv6type=unknown
17049ipv6lib=none
17050ipv6trylibc=no
17051
17052if test "$ipv6" = "yes"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017053 { echo "$as_me:$LINENO: checking ipv6 stack type" >&5
17054echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000017055 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
17056 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017057 case $i in
17058 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000017059 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017060/* confdefs.h. */
17061_ACEOF
17062cat confdefs.h >>conftest.$ac_ext
17063cat >>conftest.$ac_ext <<_ACEOF
17064/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017065
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017066#include <netinet/in.h>
17067#ifdef IPV6_INRIA_VERSION
17068yes
17069#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017070_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017071if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017072 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017073 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017074fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000017075rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017076
17077 ;;
17078 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000017079 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017080/* confdefs.h. */
17081_ACEOF
17082cat confdefs.h >>conftest.$ac_ext
17083cat >>conftest.$ac_ext <<_ACEOF
17084/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017085
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017086#include <netinet/in.h>
17087#ifdef __KAME__
17088yes
17089#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017090_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017091if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017092 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017093 ipv6type=$i;
17094 ipv6lib=inet6
17095 ipv6libdir=/usr/local/v6/lib
17096 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017097fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000017098rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017099
17100 ;;
17101 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000017102 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017103/* confdefs.h. */
17104_ACEOF
17105cat confdefs.h >>conftest.$ac_ext
17106cat >>conftest.$ac_ext <<_ACEOF
17107/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017108
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017109#include <features.h>
17110#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
17111yes
17112#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017113_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017114if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017115 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017116 ipv6type=$i;
17117 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017118fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000017119rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017120
17121 ;;
17122 linux-inet6)
17123 if test -d /usr/inet6; then
17124 ipv6type=$i
17125 ipv6lib=inet6
17126 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000017127 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017128 fi
17129 ;;
17130 solaris)
17131 if test -f /etc/netconfig; then
17132 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
17133 ipv6type=$i
17134 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017135 fi
17136 fi
17137 ;;
17138 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000017139 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017140/* confdefs.h. */
17141_ACEOF
17142cat confdefs.h >>conftest.$ac_ext
17143cat >>conftest.$ac_ext <<_ACEOF
17144/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017145
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017146#include <sys/param.h>
17147#ifdef _TOSHIBA_INET6
17148yes
17149#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017150_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017151if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017152 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017153 ipv6type=$i;
17154 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017155 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017156fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000017157rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017158
17159 ;;
17160 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000017161 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017162/* confdefs.h. */
17163_ACEOF
17164cat confdefs.h >>conftest.$ac_ext
17165cat >>conftest.$ac_ext <<_ACEOF
17166/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017167
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017168#include </usr/local/v6/include/sys/v6config.h>
17169#ifdef __V6D__
17170yes
17171#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017172_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017173if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017174 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017175 ipv6type=$i;
17176 ipv6lib=v6;
17177 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000017178 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017179fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000017180rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017181
17182 ;;
17183 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000017184 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017185/* confdefs.h. */
17186_ACEOF
17187cat confdefs.h >>conftest.$ac_ext
17188cat >>conftest.$ac_ext <<_ACEOF
17189/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017190
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017191#include <sys/param.h>
17192#ifdef _ZETA_MINAMI_INET6
17193yes
17194#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017195_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017196if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017197 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017198 ipv6type=$i;
17199 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017200 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017201fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000017202rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017203
17204 ;;
17205 esac
17206 if test "$ipv6type" != "unknown"; then
17207 break
17208 fi
17209 done
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017210 { echo "$as_me:$LINENO: result: $ipv6type" >&5
17211echo "${ECHO_T}$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017212fi
17213
17214if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
17215 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
17216 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
17217 echo "using lib$ipv6lib"
17218 else
17219 if test $ipv6trylibc = "yes"; then
17220 echo "using libc"
17221 else
17222 echo 'Fatal: no $ipv6lib library found. cannot continue.'
17223 echo "You need to fetch lib$ipv6lib.a from appropriate"
17224 echo 'ipv6 kit and compile beforehand.'
17225 exit 1
17226 fi
17227 fi
17228fi
17229
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017230{ echo "$as_me:$LINENO: checking for OSX 10.5 SDK or later" >&5
17231echo $ECHO_N "checking for OSX 10.5 SDK or later... $ECHO_C" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017232cat >conftest.$ac_ext <<_ACEOF
17233/* confdefs.h. */
17234_ACEOF
17235cat confdefs.h >>conftest.$ac_ext
17236cat >>conftest.$ac_ext <<_ACEOF
17237/* end confdefs.h. */
17238#include <Carbon/Carbon.h>
17239int
17240main ()
17241{
17242FSIORefNum fRef = 0
17243 ;
17244 return 0;
17245}
17246_ACEOF
17247rm -f conftest.$ac_objext
17248if { (ac_try="$ac_compile"
17249case "(($ac_try" in
17250 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17251 *) ac_try_echo=$ac_try;;
17252esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017253eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017254 (eval "$ac_compile") 2>conftest.er1
17255 ac_status=$?
17256 grep -v '^ *+' conftest.er1 >conftest.err
17257 rm -f conftest.er1
17258 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017260 (exit $ac_status); } && {
17261 test -z "$ac_c_werror_flag" ||
17262 test ! -s conftest.err
17263 } && test -s conftest.$ac_objext; then
17264
17265cat >>confdefs.h <<\_ACEOF
17266#define HAVE_OSX105_SDK 1
17267_ACEOF
17268
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017269 { echo "$as_me:$LINENO: result: yes" >&5
17270echo "${ECHO_T}yes" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017271else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017272 echo "$as_me: failed program was:" >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017273sed 's/^/| /' conftest.$ac_ext >&5
17274
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017275 { echo "$as_me:$LINENO: result: no" >&5
17276echo "${ECHO_T}no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017277
17278fi
17279
17280rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17281
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017282# Check for --with-doc-strings
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017283{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
17284echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017285
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017286# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017287if test "${with_doc_strings+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017288 withval=$with_doc_strings;
17289fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017290
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017291
17292if test -z "$with_doc_strings"
17293then with_doc_strings="yes"
17294fi
17295if test "$with_doc_strings" != "no"
17296then
17297
17298cat >>confdefs.h <<\_ACEOF
17299#define WITH_DOC_STRINGS 1
17300_ACEOF
17301
17302fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017303{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
17304echo "${ECHO_T}$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017305
Neil Schemenauera35c6882001-02-27 04:45:05 +000017306# Check for Python-specific malloc support
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017307{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
17308echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017309
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017310# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017311if test "${with_tsc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017312 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017313if test "$withval" != no
17314then
17315
17316cat >>confdefs.h <<\_ACEOF
17317#define WITH_TSC 1
17318_ACEOF
17319
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017320 { echo "$as_me:$LINENO: result: yes" >&5
17321echo "${ECHO_T}yes" >&6; }
17322else { echo "$as_me:$LINENO: result: no" >&5
17323echo "${ECHO_T}no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017324fi
17325else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017326 { echo "$as_me:$LINENO: result: no" >&5
17327echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017328fi
17329
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017330
17331# Check for Python-specific malloc support
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017332{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
17333echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017334
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017335# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000017336if test "${with_pymalloc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017337 withval=$with_pymalloc;
17338fi
Michael W. Hudson54241132001-12-07 15:38:26 +000017339
Neil Schemenauera35c6882001-02-27 04:45:05 +000017340
Neil Schemenauer16c22972002-03-22 15:34:49 +000017341if test -z "$with_pymalloc"
17342then with_pymalloc="yes"
17343fi
17344if test "$with_pymalloc" != "no"
17345then
Martin v. Löwis11437992002-04-12 09:54:03 +000017346
17347cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017348#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017349_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017350
17351fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017352{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
17353echo "${ECHO_T}$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000017354
Benjamin Peterson05159c42009-12-03 03:01:27 +000017355# Check for Valgrind support
17356{ echo "$as_me:$LINENO: checking for --with-valgrind" >&5
17357echo $ECHO_N "checking for --with-valgrind... $ECHO_C" >&6; }
17358
17359# Check whether --with-valgrind was given.
17360if test "${with_valgrind+set}" = set; then
17361 withval=$with_valgrind;
17362else
17363 with_valgrind=no
17364fi
17365
17366{ echo "$as_me:$LINENO: result: $with_valgrind" >&5
17367echo "${ECHO_T}$with_valgrind" >&6; }
17368if test "$with_valgrind" != no; then
17369 if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
17370 { echo "$as_me:$LINENO: checking for valgrind/valgrind.h" >&5
17371echo $ECHO_N "checking for valgrind/valgrind.h... $ECHO_C" >&6; }
17372if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
17373 echo $ECHO_N "(cached) $ECHO_C" >&6
17374fi
17375{ echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_valgrind_h" >&5
17376echo "${ECHO_T}$ac_cv_header_valgrind_valgrind_h" >&6; }
17377else
17378 # Is the header compilable?
17379{ echo "$as_me:$LINENO: checking valgrind/valgrind.h usability" >&5
17380echo $ECHO_N "checking valgrind/valgrind.h usability... $ECHO_C" >&6; }
17381cat >conftest.$ac_ext <<_ACEOF
17382/* confdefs.h. */
17383_ACEOF
17384cat confdefs.h >>conftest.$ac_ext
17385cat >>conftest.$ac_ext <<_ACEOF
17386/* end confdefs.h. */
17387$ac_includes_default
17388#include <valgrind/valgrind.h>
17389_ACEOF
17390rm -f conftest.$ac_objext
17391if { (ac_try="$ac_compile"
17392case "(($ac_try" in
17393 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17394 *) ac_try_echo=$ac_try;;
17395esac
17396eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17397 (eval "$ac_compile") 2>conftest.er1
17398 ac_status=$?
17399 grep -v '^ *+' conftest.er1 >conftest.err
17400 rm -f conftest.er1
17401 cat conftest.err >&5
17402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17403 (exit $ac_status); } && {
17404 test -z "$ac_c_werror_flag" ||
17405 test ! -s conftest.err
17406 } && test -s conftest.$ac_objext; then
17407 ac_header_compiler=yes
17408else
17409 echo "$as_me: failed program was:" >&5
17410sed 's/^/| /' conftest.$ac_ext >&5
17411
17412 ac_header_compiler=no
17413fi
17414
17415rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17416{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17417echo "${ECHO_T}$ac_header_compiler" >&6; }
17418
17419# Is the header present?
17420{ echo "$as_me:$LINENO: checking valgrind/valgrind.h presence" >&5
17421echo $ECHO_N "checking valgrind/valgrind.h presence... $ECHO_C" >&6; }
17422cat >conftest.$ac_ext <<_ACEOF
17423/* confdefs.h. */
17424_ACEOF
17425cat confdefs.h >>conftest.$ac_ext
17426cat >>conftest.$ac_ext <<_ACEOF
17427/* end confdefs.h. */
17428#include <valgrind/valgrind.h>
17429_ACEOF
17430if { (ac_try="$ac_cpp conftest.$ac_ext"
17431case "(($ac_try" in
17432 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17433 *) ac_try_echo=$ac_try;;
17434esac
17435eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17436 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
17437 ac_status=$?
17438 grep -v '^ *+' conftest.er1 >conftest.err
17439 rm -f conftest.er1
17440 cat conftest.err >&5
17441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17442 (exit $ac_status); } >/dev/null && {
17443 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17444 test ! -s conftest.err
17445 }; then
17446 ac_header_preproc=yes
17447else
17448 echo "$as_me: failed program was:" >&5
17449sed 's/^/| /' conftest.$ac_ext >&5
17450
17451 ac_header_preproc=no
17452fi
17453
17454rm -f conftest.err conftest.$ac_ext
17455{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17456echo "${ECHO_T}$ac_header_preproc" >&6; }
17457
17458# So? What about this header?
17459case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17460 yes:no: )
17461 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&5
17462echo "$as_me: WARNING: valgrind/valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17463 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: proceeding with the compiler's result" >&5
17464echo "$as_me: WARNING: valgrind/valgrind.h: proceeding with the compiler's result" >&2;}
17465 ac_header_preproc=yes
17466 ;;
17467 no:yes:* )
17468 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: present but cannot be compiled" >&5
17469echo "$as_me: WARNING: valgrind/valgrind.h: present but cannot be compiled" >&2;}
17470 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: check for missing prerequisite headers?" >&5
17471echo "$as_me: WARNING: valgrind/valgrind.h: check for missing prerequisite headers?" >&2;}
17472 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: see the Autoconf documentation" >&5
17473echo "$as_me: WARNING: valgrind/valgrind.h: see the Autoconf documentation" >&2;}
17474 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: section \"Present But Cannot Be Compiled\"" >&5
17475echo "$as_me: WARNING: valgrind/valgrind.h: section \"Present But Cannot Be Compiled\"" >&2;}
17476 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: proceeding with the preprocessor's result" >&5
17477echo "$as_me: WARNING: valgrind/valgrind.h: proceeding with the preprocessor's result" >&2;}
17478 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: in the future, the compiler will take precedence" >&5
17479echo "$as_me: WARNING: valgrind/valgrind.h: in the future, the compiler will take precedence" >&2;}
17480 ( cat <<\_ASBOX
17481## -------------------------------------- ##
17482## Report this to http://bugs.python.org/ ##
17483## -------------------------------------- ##
17484_ASBOX
17485 ) | sed "s/^/$as_me: WARNING: /" >&2
17486 ;;
17487esac
17488{ echo "$as_me:$LINENO: checking for valgrind/valgrind.h" >&5
17489echo $ECHO_N "checking for valgrind/valgrind.h... $ECHO_C" >&6; }
17490if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
17491 echo $ECHO_N "(cached) $ECHO_C" >&6
17492else
17493 ac_cv_header_valgrind_valgrind_h=$ac_header_preproc
17494fi
17495{ echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_valgrind_h" >&5
17496echo "${ECHO_T}$ac_cv_header_valgrind_valgrind_h" >&6; }
17497
17498fi
17499if test $ac_cv_header_valgrind_valgrind_h = yes; then
17500
17501cat >>confdefs.h <<\_ACEOF
17502#define WITH_VALGRIND 1
17503_ACEOF
17504
17505else
17506 { { echo "$as_me:$LINENO: error: Valgrind support requested but headers not available" >&5
17507echo "$as_me: error: Valgrind support requested but headers not available" >&2;}
17508 { (exit 1); exit 1; }; }
17509
17510fi
17511
17512
17513fi
17514
Barry Warsawef82cd72000-06-30 16:21:01 +000017515# Check for --with-wctype-functions
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017516{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
17517echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017518
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017519# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000017520if test "${with_wctype_functions+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017521 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000017522if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000017523then
17524
17525cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000017526#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017527_ACEOF
17528
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017529 { echo "$as_me:$LINENO: result: yes" >&5
17530echo "${ECHO_T}yes" >&6; }
17531else { echo "$as_me:$LINENO: result: no" >&5
17532echo "${ECHO_T}no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000017533fi
17534else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017535 { echo "$as_me:$LINENO: result: no" >&5
17536echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017537fi
17538
Barry Warsawef82cd72000-06-30 16:21:01 +000017539
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000017540# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000017541
Guido van Rossum98935bf2001-09-05 19:13:16 +000017542DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000017543
Guido van Rossume97ee181999-12-20 21:27:22 +000017544# the dlopen() function means we might want to use dynload_shlib.o. some
17545# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000017546
Thomas Wouters3a584202000-08-05 23:28:51 +000017547for ac_func in dlopen
17548do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017549as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17550{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17551echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017552if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017553 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000017554else
Martin v. Löwis11437992002-04-12 09:54:03 +000017555 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017556/* confdefs.h. */
17557_ACEOF
17558cat confdefs.h >>conftest.$ac_ext
17559cat >>conftest.$ac_ext <<_ACEOF
17560/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017561/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17562 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17563#define $ac_func innocuous_$ac_func
17564
Guido van Rossume97ee181999-12-20 21:27:22 +000017565/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017566 which can conflict with char $ac_func (); below.
17567 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017568 <limits.h> exists even on freestanding compilers. */
17569
17570#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017571# include <limits.h>
17572#else
17573# include <assert.h>
17574#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017575
17576#undef $ac_func
17577
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017578/* Override any GCC internal prototype to avoid an error.
17579 Use char because int might match the return type of a GCC
17580 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017581#ifdef __cplusplus
17582extern "C"
17583#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017584char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000017585/* The GNU C library defines this for functions which it implements
17586 to always fail with ENOSYS. Some functions are actually named
17587 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017588#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000017589choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000017590#endif
17591
Skip Montanaro6dead952003-09-25 14:50:04 +000017592int
17593main ()
17594{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017595return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017596 ;
17597 return 0;
17598}
17599_ACEOF
17600rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017601if { (ac_try="$ac_link"
17602case "(($ac_try" in
17603 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17604 *) ac_try_echo=$ac_try;;
17605esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017606eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017607 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017608 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017609 grep -v '^ *+' conftest.er1 >conftest.err
17610 rm -f conftest.er1
17611 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017613 (exit $ac_status); } && {
17614 test -z "$ac_c_werror_flag" ||
17615 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017616 } && test -s conftest$ac_exeext &&
17617 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017618 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017619else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017620 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017621sed 's/^/| /' conftest.$ac_ext >&5
17622
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017623 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017624fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017625
17626rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017627 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017628fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017629ac_res=`eval echo '${'$as_ac_var'}'`
17630 { echo "$as_me:$LINENO: result: $ac_res" >&5
17631echo "${ECHO_T}$ac_res" >&6; }
17632if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017633 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017634#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017635_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017636
Guido van Rossume97ee181999-12-20 21:27:22 +000017637fi
Thomas Wouters3a584202000-08-05 23:28:51 +000017638done
Guido van Rossume97ee181999-12-20 21:27:22 +000017639
Michael W. Hudson54241132001-12-07 15:38:26 +000017640
Guido van Rossume97ee181999-12-20 21:27:22 +000017641# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
17642# loading of modules.
17643
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017644{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
17645echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000017646if test -z "$DYNLOADFILE"
17647then
17648 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000017649 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
17650 if test "$ac_cv_func_dlopen" = yes
17651 then DYNLOADFILE="dynload_shlib.o"
17652 else DYNLOADFILE="dynload_aix.o"
17653 fi
17654 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000017655 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000017656 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
17657 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000017658 *)
17659 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
17660 # out any dynamic loading
17661 if test "$ac_cv_func_dlopen" = yes
17662 then DYNLOADFILE="dynload_shlib.o"
17663 else DYNLOADFILE="dynload_stub.o"
17664 fi
17665 ;;
17666 esac
17667fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017668{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
17669echo "${ECHO_T}$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000017670if test "$DYNLOADFILE" != "dynload_stub.o"
17671then
Martin v. Löwis11437992002-04-12 09:54:03 +000017672
17673cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017674#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017675_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017676
17677fi
17678
Neil Schemenauer4e425612001-06-19 15:44:15 +000017679# MACHDEP_OBJS can be set to platform-specific object files needed by Python
17680
Michael W. Hudson54241132001-12-07 15:38:26 +000017681
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017682{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
17683echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000017684if test -z "$MACHDEP_OBJS"
17685then
Jack Jansene578a632001-08-15 01:27:14 +000017686 MACHDEP_OBJS=$extra_machdep_objs
17687else
17688 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000017689fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017690{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
17691echo "${ECHO_T}MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000017692
Guido van Rossum627b2d71993-12-24 10:39:16 +000017693# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000017694
17695
17696
17697
17698
17699
17700
17701
17702
17703
17704
17705
17706
17707
17708
17709
17710
17711
17712
17713
17714
17715
17716
17717
17718
17719
17720
17721
17722
17723
17724
17725
17726
17727
17728
17729
17730
17731
17732
17733
17734
17735
17736
17737
17738
17739
17740
17741
17742
17743
17744
17745
17746
17747
17748
17749
17750
17751
17752
17753
17754
17755
17756
17757
17758
17759
17760
17761
17762
17763
17764
Martin v. Löwisd6320502004-08-12 13:45:08 +000017765
Martin v. Löwisc3001752005-01-23 09:27:24 +000017766
17767
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000017768
17769
Thomas Wouterscf297e42007-02-23 15:07:44 +000017770
17771
Gregory P. Smith25523d22007-09-03 16:44:55 +000017772
Christian Heimes4e30a842007-11-30 22:12:06 +000017773
Martin v. Löwis92fab752008-03-08 10:40:41 +000017774
Martin v. Löwis823725e2008-03-24 13:39:54 +000017775
17776
Benjamin Peterson965ce872009-04-05 21:24:58 +000017777
17778
17779
17780
Martin v. Löwis011e8422009-05-05 04:43:17 +000017781
Martin v. Löwis113a0852009-05-29 17:25:39 +000017782
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000017783
17784
17785
17786
Antoine Pitroub7572f02009-12-02 20:46:48 +000017787
Martin v. Löwis823725e2008-03-24 13:39:54 +000017788for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
17789 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000017790 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000017791 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitroub7572f02009-12-02 20:46:48 +000017792 initgroups kill killpg lchmod lchown lstat mbrtowc mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000017793 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000017794 putenv readlink realpath \
Benjamin Peterson965ce872009-04-05 21:24:58 +000017795 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
17796 setgid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000017797 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setuid setvbuf \
17798 sigaction siginterrupt sigrelse snprintf strftime strlcpy \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000017799 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis113a0852009-05-29 17:25:39 +000017800 truncate uname unsetenv utimes waitpid wait3 wait4 \
17801 wcscoll wcsftime wcsxfrm _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000017802do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017803as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17804{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17805echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017806if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017807 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017808else
Martin v. Löwis11437992002-04-12 09:54:03 +000017809 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017810/* confdefs.h. */
17811_ACEOF
17812cat confdefs.h >>conftest.$ac_ext
17813cat >>conftest.$ac_ext <<_ACEOF
17814/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017815/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17816 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17817#define $ac_func innocuous_$ac_func
17818
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017819/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017820 which can conflict with char $ac_func (); below.
17821 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017822 <limits.h> exists even on freestanding compilers. */
17823
17824#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017825# include <limits.h>
17826#else
17827# include <assert.h>
17828#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017829
17830#undef $ac_func
17831
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017832/* Override any GCC internal prototype to avoid an error.
17833 Use char because int might match the return type of a GCC
17834 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017835#ifdef __cplusplus
17836extern "C"
17837#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017838char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000017839/* The GNU C library defines this for functions which it implements
17840 to always fail with ENOSYS. Some functions are actually named
17841 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017842#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000017843choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000017844#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017845
Skip Montanaro6dead952003-09-25 14:50:04 +000017846int
17847main ()
17848{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017849return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017850 ;
17851 return 0;
17852}
17853_ACEOF
17854rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017855if { (ac_try="$ac_link"
17856case "(($ac_try" in
17857 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17858 *) ac_try_echo=$ac_try;;
17859esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017860eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017861 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017862 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017863 grep -v '^ *+' conftest.er1 >conftest.err
17864 rm -f conftest.er1
17865 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017867 (exit $ac_status); } && {
17868 test -z "$ac_c_werror_flag" ||
17869 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017870 } && test -s conftest$ac_exeext &&
17871 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017872 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017873else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017874 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017875sed 's/^/| /' conftest.$ac_ext >&5
17876
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017877 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017878fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017879
17880rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017881 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017882fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017883ac_res=`eval echo '${'$as_ac_var'}'`
17884 { echo "$as_me:$LINENO: result: $ac_res" >&5
17885echo "${ECHO_T}$ac_res" >&6; }
17886if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017887 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017888#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017889_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017890
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017891fi
17892done
17893
Michael W. Hudson54241132001-12-07 15:38:26 +000017894
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017895# For some functions, having a definition is not sufficient, since
17896# we want to take their address.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017897{ echo "$as_me:$LINENO: checking for chroot" >&5
17898echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017899cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017900/* confdefs.h. */
17901_ACEOF
17902cat confdefs.h >>conftest.$ac_ext
17903cat >>conftest.$ac_ext <<_ACEOF
17904/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017905#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017906int
17907main ()
17908{
17909void *x=chroot
17910 ;
17911 return 0;
17912}
17913_ACEOF
17914rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017915if { (ac_try="$ac_compile"
17916case "(($ac_try" in
17917 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17918 *) ac_try_echo=$ac_try;;
17919esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017920eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017921 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017922 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017923 grep -v '^ *+' conftest.er1 >conftest.err
17924 rm -f conftest.er1
17925 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017927 (exit $ac_status); } && {
17928 test -z "$ac_c_werror_flag" ||
17929 test ! -s conftest.err
17930 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017931
17932cat >>confdefs.h <<\_ACEOF
17933#define HAVE_CHROOT 1
17934_ACEOF
17935
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017936 { echo "$as_me:$LINENO: result: yes" >&5
17937echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017938else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017939 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017940sed 's/^/| /' conftest.$ac_ext >&5
17941
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017942 { echo "$as_me:$LINENO: result: no" >&5
17943echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017944
17945fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017946
17947rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017948{ echo "$as_me:$LINENO: checking for link" >&5
17949echo $ECHO_N "checking for link... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017950cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017951/* confdefs.h. */
17952_ACEOF
17953cat confdefs.h >>conftest.$ac_ext
17954cat >>conftest.$ac_ext <<_ACEOF
17955/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017956#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017957int
17958main ()
17959{
17960void *x=link
17961 ;
17962 return 0;
17963}
17964_ACEOF
17965rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017966if { (ac_try="$ac_compile"
17967case "(($ac_try" in
17968 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17969 *) ac_try_echo=$ac_try;;
17970esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017971eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017972 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017973 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017974 grep -v '^ *+' conftest.er1 >conftest.err
17975 rm -f conftest.er1
17976 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017978 (exit $ac_status); } && {
17979 test -z "$ac_c_werror_flag" ||
17980 test ! -s conftest.err
17981 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017982
17983cat >>confdefs.h <<\_ACEOF
17984#define HAVE_LINK 1
17985_ACEOF
17986
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017987 { echo "$as_me:$LINENO: result: yes" >&5
17988echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017989else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017990 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017991sed 's/^/| /' conftest.$ac_ext >&5
17992
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017993 { echo "$as_me:$LINENO: result: no" >&5
17994echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017995
17996fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017997
17998rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017999{ echo "$as_me:$LINENO: checking for symlink" >&5
18000echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018001cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018002/* confdefs.h. */
18003_ACEOF
18004cat confdefs.h >>conftest.$ac_ext
18005cat >>conftest.$ac_ext <<_ACEOF
18006/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018007#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018008int
18009main ()
18010{
18011void *x=symlink
18012 ;
18013 return 0;
18014}
18015_ACEOF
18016rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018017if { (ac_try="$ac_compile"
18018case "(($ac_try" in
18019 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18020 *) ac_try_echo=$ac_try;;
18021esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018022eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018023 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018024 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018025 grep -v '^ *+' conftest.er1 >conftest.err
18026 rm -f conftest.er1
18027 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018029 (exit $ac_status); } && {
18030 test -z "$ac_c_werror_flag" ||
18031 test ! -s conftest.err
18032 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018033
18034cat >>confdefs.h <<\_ACEOF
18035#define HAVE_SYMLINK 1
18036_ACEOF
18037
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018038 { echo "$as_me:$LINENO: result: yes" >&5
18039echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018040else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018041 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018042sed 's/^/| /' conftest.$ac_ext >&5
18043
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018044 { echo "$as_me:$LINENO: result: no" >&5
18045echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018046
18047fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018048
18049rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018050{ echo "$as_me:$LINENO: checking for fchdir" >&5
18051echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018052cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018053/* confdefs.h. */
18054_ACEOF
18055cat confdefs.h >>conftest.$ac_ext
18056cat >>conftest.$ac_ext <<_ACEOF
18057/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018058#include <unistd.h>
18059int
18060main ()
18061{
18062void *x=fchdir
18063 ;
18064 return 0;
18065}
18066_ACEOF
18067rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018068if { (ac_try="$ac_compile"
18069case "(($ac_try" in
18070 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18071 *) ac_try_echo=$ac_try;;
18072esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018073eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018074 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018075 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018076 grep -v '^ *+' conftest.er1 >conftest.err
18077 rm -f conftest.er1
18078 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018080 (exit $ac_status); } && {
18081 test -z "$ac_c_werror_flag" ||
18082 test ! -s conftest.err
18083 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018084
18085cat >>confdefs.h <<\_ACEOF
18086#define HAVE_FCHDIR 1
18087_ACEOF
18088
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018089 { echo "$as_me:$LINENO: result: yes" >&5
18090echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018091else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018092 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018093sed 's/^/| /' conftest.$ac_ext >&5
18094
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018095 { echo "$as_me:$LINENO: result: no" >&5
18096echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018097
18098fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018099
18100rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018101{ echo "$as_me:$LINENO: checking for fsync" >&5
18102echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018103cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018104/* confdefs.h. */
18105_ACEOF
18106cat confdefs.h >>conftest.$ac_ext
18107cat >>conftest.$ac_ext <<_ACEOF
18108/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018109#include <unistd.h>
18110int
18111main ()
18112{
18113void *x=fsync
18114 ;
18115 return 0;
18116}
18117_ACEOF
18118rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018119if { (ac_try="$ac_compile"
18120case "(($ac_try" in
18121 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18122 *) ac_try_echo=$ac_try;;
18123esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018124eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018125 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +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 Oussoren74f29b42009-09-20 20:09:26 +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
18134 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018135
18136cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018137#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018138_ACEOF
18139
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018140 { echo "$as_me:$LINENO: result: yes" >&5
18141echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018142else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018143 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018144sed 's/^/| /' conftest.$ac_ext >&5
18145
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018146 { echo "$as_me:$LINENO: result: no" >&5
18147echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018148
18149fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018150
18151rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018152{ echo "$as_me:$LINENO: checking for fdatasync" >&5
18153echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018154cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018155/* confdefs.h. */
18156_ACEOF
18157cat confdefs.h >>conftest.$ac_ext
18158cat >>conftest.$ac_ext <<_ACEOF
18159/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018160#include <unistd.h>
18161int
18162main ()
18163{
18164void *x=fdatasync
18165 ;
18166 return 0;
18167}
18168_ACEOF
18169rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018170if { (ac_try="$ac_compile"
18171case "(($ac_try" in
18172 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18173 *) ac_try_echo=$ac_try;;
18174esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018175eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018176 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018177 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018178 grep -v '^ *+' conftest.er1 >conftest.err
18179 rm -f conftest.er1
18180 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018182 (exit $ac_status); } && {
18183 test -z "$ac_c_werror_flag" ||
18184 test ! -s conftest.err
18185 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018186
18187cat >>confdefs.h <<\_ACEOF
18188#define HAVE_FDATASYNC 1
18189_ACEOF
18190
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018191 { echo "$as_me:$LINENO: result: yes" >&5
18192echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018193else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018194 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018195sed 's/^/| /' conftest.$ac_ext >&5
18196
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018197 { echo "$as_me:$LINENO: result: no" >&5
18198echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018199
18200fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018201
18202rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018203{ echo "$as_me:$LINENO: checking for epoll" >&5
18204echo $ECHO_N "checking for epoll... $ECHO_C" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018205cat >conftest.$ac_ext <<_ACEOF
18206/* confdefs.h. */
18207_ACEOF
18208cat confdefs.h >>conftest.$ac_ext
18209cat >>conftest.$ac_ext <<_ACEOF
18210/* end confdefs.h. */
18211#include <sys/epoll.h>
18212int
18213main ()
18214{
18215void *x=epoll_create
18216 ;
18217 return 0;
18218}
18219_ACEOF
18220rm -f conftest.$ac_objext
18221if { (ac_try="$ac_compile"
18222case "(($ac_try" in
18223 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18224 *) ac_try_echo=$ac_try;;
18225esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018226eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018227 (eval "$ac_compile") 2>conftest.er1
18228 ac_status=$?
18229 grep -v '^ *+' conftest.er1 >conftest.err
18230 rm -f conftest.er1
18231 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018233 (exit $ac_status); } && {
18234 test -z "$ac_c_werror_flag" ||
18235 test ! -s conftest.err
18236 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018237
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018238cat >>confdefs.h <<\_ACEOF
18239#define HAVE_EPOLL 1
18240_ACEOF
18241
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018242 { echo "$as_me:$LINENO: result: yes" >&5
18243echo "${ECHO_T}yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018244else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018245 echo "$as_me: failed program was:" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018246sed 's/^/| /' conftest.$ac_ext >&5
18247
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018248 { echo "$as_me:$LINENO: result: no" >&5
18249echo "${ECHO_T}no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018250
18251fi
18252
18253rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018254{ echo "$as_me:$LINENO: checking for kqueue" >&5
18255echo $ECHO_N "checking for kqueue... $ECHO_C" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018256cat >conftest.$ac_ext <<_ACEOF
18257/* confdefs.h. */
18258_ACEOF
18259cat confdefs.h >>conftest.$ac_ext
18260cat >>conftest.$ac_ext <<_ACEOF
18261/* end confdefs.h. */
18262
18263#include <sys/types.h>
18264#include <sys/event.h>
18265
18266int
18267main ()
18268{
18269int x=kqueue()
18270 ;
18271 return 0;
18272}
18273_ACEOF
18274rm -f conftest.$ac_objext
18275if { (ac_try="$ac_compile"
18276case "(($ac_try" in
18277 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18278 *) ac_try_echo=$ac_try;;
18279esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018280eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018281 (eval "$ac_compile") 2>conftest.er1
18282 ac_status=$?
18283 grep -v '^ *+' conftest.er1 >conftest.err
18284 rm -f conftest.er1
18285 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018287 (exit $ac_status); } && {
18288 test -z "$ac_c_werror_flag" ||
18289 test ! -s conftest.err
18290 } && test -s conftest.$ac_objext; then
18291
18292cat >>confdefs.h <<\_ACEOF
18293#define HAVE_KQUEUE 1
18294_ACEOF
18295
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018296 { echo "$as_me:$LINENO: result: yes" >&5
18297echo "${ECHO_T}yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018298else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018299 echo "$as_me: failed program was:" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018300sed 's/^/| /' conftest.$ac_ext >&5
18301
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018302 { echo "$as_me:$LINENO: result: no" >&5
18303echo "${ECHO_T}no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018304
18305fi
18306
18307rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000018308# On some systems (eg. FreeBSD 5), we would find a definition of the
18309# functions ctermid_r, setgroups in the library, but no prototype
18310# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
18311# address to avoid compiler warnings and potential miscompilations
18312# because of the missing prototypes.
18313
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018314{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
18315echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018316cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018317/* confdefs.h. */
18318_ACEOF
18319cat confdefs.h >>conftest.$ac_ext
18320cat >>conftest.$ac_ext <<_ACEOF
18321/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000018322
18323#include "confdefs.h"
18324#include <stdio.h>
18325
Martin v. Löwisd5843682002-11-21 20:41:28 +000018326int
18327main ()
18328{
18329void* p = ctermid_r
18330 ;
18331 return 0;
18332}
18333_ACEOF
18334rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018335if { (ac_try="$ac_compile"
18336case "(($ac_try" in
18337 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18338 *) ac_try_echo=$ac_try;;
18339esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018340eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018341 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000018342 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018343 grep -v '^ *+' conftest.er1 >conftest.err
18344 rm -f conftest.er1
18345 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018347 (exit $ac_status); } && {
18348 test -z "$ac_c_werror_flag" ||
18349 test ! -s conftest.err
18350 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000018351
18352cat >>confdefs.h <<\_ACEOF
18353#define HAVE_CTERMID_R 1
18354_ACEOF
18355
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018356 { echo "$as_me:$LINENO: result: yes" >&5
18357echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018358else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018359 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018360sed 's/^/| /' conftest.$ac_ext >&5
18361
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018362 { echo "$as_me:$LINENO: result: no" >&5
18363echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018364
18365fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018366
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018367rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18368
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018369{ echo "$as_me:$LINENO: checking for flock" >&5
18370echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018371cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018372/* confdefs.h. */
18373_ACEOF
18374cat confdefs.h >>conftest.$ac_ext
18375cat >>conftest.$ac_ext <<_ACEOF
18376/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018377
18378#include "confdefs.h"
18379#include <sys/file.h>
18380
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018381int
18382main ()
18383{
18384void* p = flock
18385 ;
18386 return 0;
18387}
18388_ACEOF
18389rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018390if { (ac_try="$ac_compile"
18391case "(($ac_try" in
18392 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18393 *) ac_try_echo=$ac_try;;
18394esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018395eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018396 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018397 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018398 grep -v '^ *+' conftest.er1 >conftest.err
18399 rm -f conftest.er1
18400 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018402 (exit $ac_status); } && {
18403 test -z "$ac_c_werror_flag" ||
18404 test ! -s conftest.err
18405 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018406
18407cat >>confdefs.h <<\_ACEOF
18408#define HAVE_FLOCK 1
18409_ACEOF
18410
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018411 { echo "$as_me:$LINENO: result: yes" >&5
18412echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018413else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018414 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018415sed 's/^/| /' conftest.$ac_ext >&5
18416
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018417 { echo "$as_me:$LINENO: result: no" >&5
18418echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018419
18420fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018421
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018422rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18423
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018424{ echo "$as_me:$LINENO: checking for getpagesize" >&5
18425echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018426cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018427/* confdefs.h. */
18428_ACEOF
18429cat confdefs.h >>conftest.$ac_ext
18430cat >>conftest.$ac_ext <<_ACEOF
18431/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018432
18433#include "confdefs.h"
18434#include <unistd.h>
18435
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018436int
18437main ()
18438{
18439void* p = getpagesize
18440 ;
18441 return 0;
18442}
18443_ACEOF
18444rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018445if { (ac_try="$ac_compile"
18446case "(($ac_try" in
18447 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18448 *) ac_try_echo=$ac_try;;
18449esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018450eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018451 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018452 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018453 grep -v '^ *+' conftest.er1 >conftest.err
18454 rm -f conftest.er1
18455 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018457 (exit $ac_status); } && {
18458 test -z "$ac_c_werror_flag" ||
18459 test ! -s conftest.err
18460 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018461
18462cat >>confdefs.h <<\_ACEOF
18463#define HAVE_GETPAGESIZE 1
18464_ACEOF
18465
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018466 { echo "$as_me:$LINENO: result: yes" >&5
18467echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018468else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018469 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018470sed 's/^/| /' conftest.$ac_ext >&5
18471
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018472 { echo "$as_me:$LINENO: result: no" >&5
18473echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018474
18475fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018476
18477rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018478
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018479for ac_prog in true
18480do
18481 # Extract the first word of "$ac_prog", so it can be a program name with args.
18482set dummy $ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018483{ echo "$as_me:$LINENO: checking for $ac_word" >&5
18484echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018485if test "${ac_cv_prog_TRUE+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018486 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018487else
18488 if test -n "$TRUE"; then
18489 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
18490else
18491as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18492for as_dir in $PATH
18493do
18494 IFS=$as_save_IFS
18495 test -z "$as_dir" && as_dir=.
18496 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018497 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 +000018498 ac_cv_prog_TRUE="$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018499 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018500 break 2
18501 fi
18502done
18503done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018504IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018505
18506fi
18507fi
18508TRUE=$ac_cv_prog_TRUE
18509if test -n "$TRUE"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018510 { echo "$as_me:$LINENO: result: $TRUE" >&5
18511echo "${ECHO_T}$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018512else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018513 { echo "$as_me:$LINENO: result: no" >&5
18514echo "${ECHO_T}no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018515fi
18516
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018517
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018518 test -n "$TRUE" && break
18519done
18520test -n "$TRUE" || TRUE="/bin/true"
18521
18522
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018523{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
18524echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018525if test "${ac_cv_lib_c_inet_aton+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018526 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018527else
18528 ac_check_lib_save_LIBS=$LIBS
18529LIBS="-lc $LIBS"
18530cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018531/* confdefs.h. */
18532_ACEOF
18533cat confdefs.h >>conftest.$ac_ext
18534cat >>conftest.$ac_ext <<_ACEOF
18535/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018536
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018537/* Override any GCC internal prototype to avoid an error.
18538 Use char because int might match the return type of a GCC
18539 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018540#ifdef __cplusplus
18541extern "C"
18542#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018543char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018544int
18545main ()
18546{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018547return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018548 ;
18549 return 0;
18550}
18551_ACEOF
18552rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018553if { (ac_try="$ac_link"
18554case "(($ac_try" in
18555 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18556 *) ac_try_echo=$ac_try;;
18557esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018558eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018559 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018560 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018561 grep -v '^ *+' conftest.er1 >conftest.err
18562 rm -f conftest.er1
18563 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018565 (exit $ac_status); } && {
18566 test -z "$ac_c_werror_flag" ||
18567 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018568 } && test -s conftest$ac_exeext &&
18569 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018570 ac_cv_lib_c_inet_aton=yes
18571else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018572 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018573sed 's/^/| /' conftest.$ac_ext >&5
18574
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018575 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018576fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018577
18578rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018579 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018580LIBS=$ac_check_lib_save_LIBS
18581fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018582{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
18583echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
18584if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018585 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018586else
18587
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018588{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
18589echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018590if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018591 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018592else
18593 ac_check_lib_save_LIBS=$LIBS
18594LIBS="-lresolv $LIBS"
18595cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018596/* confdefs.h. */
18597_ACEOF
18598cat confdefs.h >>conftest.$ac_ext
18599cat >>conftest.$ac_ext <<_ACEOF
18600/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018601
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018602/* Override any GCC internal prototype to avoid an error.
18603 Use char because int might match the return type of a GCC
18604 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018605#ifdef __cplusplus
18606extern "C"
18607#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018608char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018609int
18610main ()
18611{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018612return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018613 ;
18614 return 0;
18615}
18616_ACEOF
18617rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018618if { (ac_try="$ac_link"
18619case "(($ac_try" in
18620 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18621 *) ac_try_echo=$ac_try;;
18622esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018623eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018624 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018625 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018626 grep -v '^ *+' conftest.er1 >conftest.err
18627 rm -f conftest.er1
18628 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018630 (exit $ac_status); } && {
18631 test -z "$ac_c_werror_flag" ||
18632 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018633 } && test -s conftest$ac_exeext &&
18634 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018635 ac_cv_lib_resolv_inet_aton=yes
18636else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018637 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018638sed 's/^/| /' conftest.$ac_ext >&5
18639
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018640 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018641fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018642
18643rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018644 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018645LIBS=$ac_check_lib_save_LIBS
18646fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018647{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
18648echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
18649if test $ac_cv_lib_resolv_inet_aton = yes; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018650 cat >>confdefs.h <<_ACEOF
18651#define HAVE_LIBRESOLV 1
18652_ACEOF
18653
18654 LIBS="-lresolv $LIBS"
18655
18656fi
18657
18658
18659fi
18660
18661
Christian Heimesd0764e22007-12-04 15:00:33 +000018662# On Tru64, chflags seems to be present, but calling it will
18663# exit Python
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018664{ echo "$as_me:$LINENO: checking for chflags" >&5
18665echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018666if test "${ac_cv_have_chflags+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018667 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018668else
18669 if test "$cross_compiling" = yes; then
Benjamin Petersoned68afa2010-01-30 19:36:43 +000018670 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000018671else
18672 cat >conftest.$ac_ext <<_ACEOF
18673/* confdefs.h. */
18674_ACEOF
18675cat confdefs.h >>conftest.$ac_ext
18676cat >>conftest.$ac_ext <<_ACEOF
18677/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +000018678[
Christian Heimesd0764e22007-12-04 15:00:33 +000018679#include <sys/stat.h>
18680#include <unistd.h>
18681int main(int argc, char*argv[])
18682{
18683 if(chflags(argv[0], 0) != 0)
18684 return 1;
18685 return 0;
18686}
Benjamin Petersoned68afa2010-01-30 19:36:43 +000018687]
Christian Heimesd0764e22007-12-04 15:00:33 +000018688_ACEOF
18689rm -f conftest$ac_exeext
18690if { (ac_try="$ac_link"
18691case "(($ac_try" in
18692 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18693 *) ac_try_echo=$ac_try;;
18694esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018695eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018696 (eval "$ac_link") 2>&5
18697 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018698 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018699 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18700 { (case "(($ac_try" in
18701 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18702 *) ac_try_echo=$ac_try;;
18703esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018704eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018705 (eval "$ac_try") 2>&5
18706 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018708 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018709 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018710else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018711 echo "$as_me: program exited with status $ac_status" >&5
18712echo "$as_me: failed program was:" >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018713sed 's/^/| /' conftest.$ac_ext >&5
18714
18715( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018716ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018717fi
18718rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018719fi
18720
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018721
18722
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018723fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018724{ echo "$as_me:$LINENO: result: $ac_cv_have_chflags" >&5
18725echo "${ECHO_T}$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000018726if test "$ac_cv_have_chflags" = cross ; then
18727 { echo "$as_me:$LINENO: checking for chflags" >&5
18728echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
18729if test "${ac_cv_func_chflags+set}" = set; then
18730 echo $ECHO_N "(cached) $ECHO_C" >&6
18731else
18732 cat >conftest.$ac_ext <<_ACEOF
18733/* confdefs.h. */
18734_ACEOF
18735cat confdefs.h >>conftest.$ac_ext
18736cat >>conftest.$ac_ext <<_ACEOF
18737/* end confdefs.h. */
18738/* Define chflags to an innocuous variant, in case <limits.h> declares chflags.
18739 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18740#define chflags innocuous_chflags
18741
18742/* System header to define __stub macros and hopefully few prototypes,
18743 which can conflict with char chflags (); below.
18744 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18745 <limits.h> exists even on freestanding compilers. */
18746
18747#ifdef __STDC__
18748# include <limits.h>
18749#else
18750# include <assert.h>
18751#endif
18752
18753#undef chflags
18754
18755/* Override any GCC internal prototype to avoid an error.
18756 Use char because int might match the return type of a GCC
18757 builtin and then its argument prototype would still apply. */
18758#ifdef __cplusplus
18759extern "C"
18760#endif
18761char chflags ();
18762/* The GNU C library defines this for functions which it implements
18763 to always fail with ENOSYS. Some functions are actually named
18764 something starting with __ and the normal name is an alias. */
18765#if defined __stub_chflags || defined __stub___chflags
18766choke me
18767#endif
18768
18769int
18770main ()
18771{
18772return chflags ();
18773 ;
18774 return 0;
18775}
18776_ACEOF
18777rm -f conftest.$ac_objext conftest$ac_exeext
18778if { (ac_try="$ac_link"
18779case "(($ac_try" in
18780 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18781 *) ac_try_echo=$ac_try;;
18782esac
18783eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18784 (eval "$ac_link") 2>conftest.er1
18785 ac_status=$?
18786 grep -v '^ *+' conftest.er1 >conftest.err
18787 rm -f conftest.er1
18788 cat conftest.err >&5
18789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18790 (exit $ac_status); } && {
18791 test -z "$ac_c_werror_flag" ||
18792 test ! -s conftest.err
18793 } && test -s conftest$ac_exeext &&
18794 $as_test_x conftest$ac_exeext; then
18795 ac_cv_func_chflags=yes
18796else
18797 echo "$as_me: failed program was:" >&5
18798sed 's/^/| /' conftest.$ac_ext >&5
18799
18800 ac_cv_func_chflags=no
18801fi
18802
18803rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18804 conftest$ac_exeext conftest.$ac_ext
18805fi
18806{ echo "$as_me:$LINENO: result: $ac_cv_func_chflags" >&5
18807echo "${ECHO_T}$ac_cv_func_chflags" >&6; }
18808if test $ac_cv_func_chflags = yes; then
18809 ac_cv_have_chflags="yes"
18810else
18811 ac_cv_have_chflags="no"
18812fi
18813
18814fi
18815if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018816
18817cat >>confdefs.h <<\_ACEOF
18818#define HAVE_CHFLAGS 1
18819_ACEOF
18820
18821fi
18822
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018823{ echo "$as_me:$LINENO: checking for lchflags" >&5
18824echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018825if test "${ac_cv_have_lchflags+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018826 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018827else
18828 if test "$cross_compiling" = yes; then
Benjamin Petersoned68afa2010-01-30 19:36:43 +000018829 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000018830else
18831 cat >conftest.$ac_ext <<_ACEOF
18832/* confdefs.h. */
18833_ACEOF
18834cat confdefs.h >>conftest.$ac_ext
18835cat >>conftest.$ac_ext <<_ACEOF
18836/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +000018837[
Christian Heimesd0764e22007-12-04 15:00:33 +000018838#include <sys/stat.h>
18839#include <unistd.h>
18840int main(int argc, char*argv[])
18841{
18842 if(lchflags(argv[0], 0) != 0)
18843 return 1;
18844 return 0;
18845}
Benjamin Petersoned68afa2010-01-30 19:36:43 +000018846]
Christian Heimesd0764e22007-12-04 15:00:33 +000018847_ACEOF
18848rm -f conftest$ac_exeext
18849if { (ac_try="$ac_link"
18850case "(($ac_try" in
18851 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18852 *) ac_try_echo=$ac_try;;
18853esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018854eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018855 (eval "$ac_link") 2>&5
18856 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018858 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18859 { (case "(($ac_try" in
18860 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18861 *) ac_try_echo=$ac_try;;
18862esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018863eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018864 (eval "$ac_try") 2>&5
18865 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018867 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018868 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018869else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018870 echo "$as_me: program exited with status $ac_status" >&5
18871echo "$as_me: failed program was:" >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018872sed 's/^/| /' conftest.$ac_ext >&5
18873
18874( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018875ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000018876fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018877rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18878fi
18879
18880
Christian Heimesd0764e22007-12-04 15:00:33 +000018881
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018882fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018883{ echo "$as_me:$LINENO: result: $ac_cv_have_lchflags" >&5
18884echo "${ECHO_T}$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000018885if test "$ac_cv_have_lchflags" = cross ; then
18886 { echo "$as_me:$LINENO: checking for lchflags" >&5
18887echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
18888if test "${ac_cv_func_lchflags+set}" = set; then
18889 echo $ECHO_N "(cached) $ECHO_C" >&6
18890else
18891 cat >conftest.$ac_ext <<_ACEOF
18892/* confdefs.h. */
18893_ACEOF
18894cat confdefs.h >>conftest.$ac_ext
18895cat >>conftest.$ac_ext <<_ACEOF
18896/* end confdefs.h. */
18897/* Define lchflags to an innocuous variant, in case <limits.h> declares lchflags.
18898 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18899#define lchflags innocuous_lchflags
18900
18901/* System header to define __stub macros and hopefully few prototypes,
18902 which can conflict with char lchflags (); below.
18903 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18904 <limits.h> exists even on freestanding compilers. */
18905
18906#ifdef __STDC__
18907# include <limits.h>
18908#else
18909# include <assert.h>
18910#endif
18911
18912#undef lchflags
18913
18914/* Override any GCC internal prototype to avoid an error.
18915 Use char because int might match the return type of a GCC
18916 builtin and then its argument prototype would still apply. */
18917#ifdef __cplusplus
18918extern "C"
18919#endif
18920char lchflags ();
18921/* The GNU C library defines this for functions which it implements
18922 to always fail with ENOSYS. Some functions are actually named
18923 something starting with __ and the normal name is an alias. */
18924#if defined __stub_lchflags || defined __stub___lchflags
18925choke me
18926#endif
18927
18928int
18929main ()
18930{
18931return lchflags ();
18932 ;
18933 return 0;
18934}
18935_ACEOF
18936rm -f conftest.$ac_objext conftest$ac_exeext
18937if { (ac_try="$ac_link"
18938case "(($ac_try" in
18939 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18940 *) ac_try_echo=$ac_try;;
18941esac
18942eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18943 (eval "$ac_link") 2>conftest.er1
18944 ac_status=$?
18945 grep -v '^ *+' conftest.er1 >conftest.err
18946 rm -f conftest.er1
18947 cat conftest.err >&5
18948 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18949 (exit $ac_status); } && {
18950 test -z "$ac_c_werror_flag" ||
18951 test ! -s conftest.err
18952 } && test -s conftest$ac_exeext &&
18953 $as_test_x conftest$ac_exeext; then
18954 ac_cv_func_lchflags=yes
18955else
18956 echo "$as_me: failed program was:" >&5
18957sed 's/^/| /' conftest.$ac_ext >&5
18958
18959 ac_cv_func_lchflags=no
18960fi
18961
18962rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18963 conftest$ac_exeext conftest.$ac_ext
18964fi
18965{ echo "$as_me:$LINENO: result: $ac_cv_func_lchflags" >&5
18966echo "${ECHO_T}$ac_cv_func_lchflags" >&6; }
18967if test $ac_cv_func_lchflags = yes; then
18968 ac_cv_have_lchflags="yes"
18969else
18970 ac_cv_have_lchflags="no"
18971fi
18972
18973fi
18974if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018975
18976cat >>confdefs.h <<\_ACEOF
18977#define HAVE_LCHFLAGS 1
18978_ACEOF
18979
18980fi
18981
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018982case $ac_sys_system/$ac_sys_release in
18983Darwin/*)
18984 _CUR_CFLAGS="${CFLAGS}"
18985 _CUR_LDFLAGS="${LDFLAGS}"
18986 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
18987 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
18988 ;;
18989esac
18990
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018991{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
18992echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018993if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018994 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018995else
18996 ac_check_lib_save_LIBS=$LIBS
18997LIBS="-lz $LIBS"
18998cat >conftest.$ac_ext <<_ACEOF
18999/* confdefs.h. */
19000_ACEOF
19001cat confdefs.h >>conftest.$ac_ext
19002cat >>conftest.$ac_ext <<_ACEOF
19003/* end confdefs.h. */
19004
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019005/* Override any GCC internal prototype to avoid an error.
19006 Use char because int might match the return type of a GCC
19007 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000019008#ifdef __cplusplus
19009extern "C"
19010#endif
19011char inflateCopy ();
19012int
19013main ()
19014{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019015return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000019016 ;
19017 return 0;
19018}
19019_ACEOF
19020rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019021if { (ac_try="$ac_link"
19022case "(($ac_try" in
19023 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19024 *) ac_try_echo=$ac_try;;
19025esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019026eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019027 (eval "$ac_link") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000019028 ac_status=$?
19029 grep -v '^ *+' conftest.er1 >conftest.err
19030 rm -f conftest.er1
19031 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019033 (exit $ac_status); } && {
19034 test -z "$ac_c_werror_flag" ||
19035 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019036 } && test -s conftest$ac_exeext &&
19037 $as_test_x conftest$ac_exeext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000019038 ac_cv_lib_z_inflateCopy=yes
19039else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019040 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000019041sed 's/^/| /' conftest.$ac_ext >&5
19042
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019043 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000019044fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019045
19046rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Thomas Wouters0e3f5912006-08-11 14:57:12 +000019047 conftest$ac_exeext conftest.$ac_ext
19048LIBS=$ac_check_lib_save_LIBS
19049fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019050{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
19051echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6; }
19052if test $ac_cv_lib_z_inflateCopy = yes; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000019053
19054cat >>confdefs.h <<\_ACEOF
19055#define HAVE_ZLIB_COPY 1
19056_ACEOF
19057
19058fi
19059
19060
19061case $ac_sys_system/$ac_sys_release in
19062Darwin/*)
19063 CFLAGS="${_CUR_CFLAGS}"
19064 LDFLAGS="${_CUR_LDFLAGS}"
19065 ;;
19066esac
19067
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019068{ echo "$as_me:$LINENO: checking for hstrerror" >&5
19069echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019070cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019071/* confdefs.h. */
19072_ACEOF
19073cat confdefs.h >>conftest.$ac_ext
19074cat >>conftest.$ac_ext <<_ACEOF
19075/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019076
19077#include "confdefs.h"
19078#include <netdb.h>
19079
Martin v. Löwise9416172003-05-03 10:12:45 +000019080int
19081main ()
19082{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019083void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000019084 ;
19085 return 0;
19086}
19087_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019088rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019089if { (ac_try="$ac_link"
19090case "(($ac_try" in
19091 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19092 *) ac_try_echo=$ac_try;;
19093esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019094eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019095 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019096 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019097 grep -v '^ *+' conftest.er1 >conftest.err
19098 rm -f conftest.er1
19099 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019101 (exit $ac_status); } && {
19102 test -z "$ac_c_werror_flag" ||
19103 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019104 } && test -s conftest$ac_exeext &&
19105 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019106
19107cat >>confdefs.h <<\_ACEOF
19108#define HAVE_HSTRERROR 1
19109_ACEOF
19110
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019111 { echo "$as_me:$LINENO: result: yes" >&5
19112echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019113else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019114 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019115sed 's/^/| /' conftest.$ac_ext >&5
19116
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019117 { echo "$as_me:$LINENO: result: no" >&5
19118echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019119
19120fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019121
19122rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019123 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019124
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019125{ echo "$as_me:$LINENO: checking for inet_aton" >&5
19126echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019127cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019128/* confdefs.h. */
19129_ACEOF
19130cat confdefs.h >>conftest.$ac_ext
19131cat >>conftest.$ac_ext <<_ACEOF
19132/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019133
19134#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000019135#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000019136#include <sys/socket.h>
19137#include <netinet/in.h>
19138#include <arpa/inet.h>
19139
Martin v. Löwise9416172003-05-03 10:12:45 +000019140int
19141main ()
19142{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019143void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000019144 ;
19145 return 0;
19146}
19147_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019148rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019149if { (ac_try="$ac_link"
19150case "(($ac_try" in
19151 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19152 *) ac_try_echo=$ac_try;;
19153esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019154eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019155 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019156 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019157 grep -v '^ *+' conftest.er1 >conftest.err
19158 rm -f conftest.er1
19159 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019160 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019161 (exit $ac_status); } && {
19162 test -z "$ac_c_werror_flag" ||
19163 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019164 } && test -s conftest$ac_exeext &&
19165 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019166
19167cat >>confdefs.h <<\_ACEOF
19168#define HAVE_INET_ATON 1
19169_ACEOF
19170
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019171 { echo "$as_me:$LINENO: result: yes" >&5
19172echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019173else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019174 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019175sed 's/^/| /' conftest.$ac_ext >&5
19176
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019177 { echo "$as_me:$LINENO: result: no" >&5
19178echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019179
19180fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019181
19182rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019183 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019184
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019185{ echo "$as_me:$LINENO: checking for inet_pton" >&5
19186echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019187cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019188/* confdefs.h. */
19189_ACEOF
19190cat confdefs.h >>conftest.$ac_ext
19191cat >>conftest.$ac_ext <<_ACEOF
19192/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019193
19194#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000019195#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000019196#include <sys/socket.h>
19197#include <netinet/in.h>
19198#include <arpa/inet.h>
19199
Martin v. Löwise9416172003-05-03 10:12:45 +000019200int
19201main ()
19202{
19203void* p = inet_pton
19204 ;
19205 return 0;
19206}
19207_ACEOF
19208rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019209if { (ac_try="$ac_compile"
19210case "(($ac_try" in
19211 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19212 *) ac_try_echo=$ac_try;;
19213esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019214eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019215 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019216 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019217 grep -v '^ *+' conftest.er1 >conftest.err
19218 rm -f conftest.er1
19219 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019221 (exit $ac_status); } && {
19222 test -z "$ac_c_werror_flag" ||
19223 test ! -s conftest.err
19224 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019225
19226cat >>confdefs.h <<\_ACEOF
19227#define HAVE_INET_PTON 1
19228_ACEOF
19229
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019230 { echo "$as_me:$LINENO: result: yes" >&5
19231echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019232else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019233 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019234sed 's/^/| /' conftest.$ac_ext >&5
19235
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019236 { echo "$as_me:$LINENO: result: no" >&5
19237echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019238
19239fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019240
19241rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019242
Martin v. Löwisd6640d42003-07-06 09:29:52 +000019243# On some systems, setgroups is in unistd.h, on others, in grp.h
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019244{ echo "$as_me:$LINENO: checking for setgroups" >&5
19245echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019246cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019247/* confdefs.h. */
19248_ACEOF
19249cat confdefs.h >>conftest.$ac_ext
19250cat >>conftest.$ac_ext <<_ACEOF
19251/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000019252
19253#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000019254#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000019255#ifdef HAVE_GRP_H
19256#include <grp.h>
19257#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000019258
Martin v. Löwisd5843682002-11-21 20:41:28 +000019259int
19260main ()
19261{
19262void* p = setgroups
19263 ;
19264 return 0;
19265}
19266_ACEOF
19267rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019268if { (ac_try="$ac_compile"
19269case "(($ac_try" in
19270 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19271 *) ac_try_echo=$ac_try;;
19272esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019273eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019274 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000019275 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019276 grep -v '^ *+' conftest.er1 >conftest.err
19277 rm -f conftest.er1
19278 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019280 (exit $ac_status); } && {
19281 test -z "$ac_c_werror_flag" ||
19282 test ! -s conftest.err
19283 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000019284
19285cat >>confdefs.h <<\_ACEOF
19286#define HAVE_SETGROUPS 1
19287_ACEOF
19288
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019289 { echo "$as_me:$LINENO: result: yes" >&5
19290echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019291else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019292 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019293sed 's/^/| /' conftest.$ac_ext >&5
19294
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019295 { echo "$as_me:$LINENO: result: no" >&5
19296echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019297
19298fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019299
19300rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000019301
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019302# check for openpty and forkpty
19303
Martin v. Löwis11437992002-04-12 09:54:03 +000019304
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019305for ac_func in openpty
19306do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019307as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19308{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19309echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019310if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019311 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019312else
Martin v. Löwis11437992002-04-12 09:54:03 +000019313 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019314/* confdefs.h. */
19315_ACEOF
19316cat confdefs.h >>conftest.$ac_ext
19317cat >>conftest.$ac_ext <<_ACEOF
19318/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019319/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19320 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19321#define $ac_func innocuous_$ac_func
19322
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019323/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019324 which can conflict with char $ac_func (); below.
19325 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019326 <limits.h> exists even on freestanding compilers. */
19327
19328#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019329# include <limits.h>
19330#else
19331# include <assert.h>
19332#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019333
19334#undef $ac_func
19335
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019336/* Override any GCC internal prototype to avoid an error.
19337 Use char because int might match the return type of a GCC
19338 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019339#ifdef __cplusplus
19340extern "C"
19341#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019342char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019343/* The GNU C library defines this for functions which it implements
19344 to always fail with ENOSYS. Some functions are actually named
19345 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019346#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019347choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019348#endif
19349
Skip Montanaro6dead952003-09-25 14:50:04 +000019350int
19351main ()
19352{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019353return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019354 ;
19355 return 0;
19356}
19357_ACEOF
19358rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019359if { (ac_try="$ac_link"
19360case "(($ac_try" in
19361 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19362 *) ac_try_echo=$ac_try;;
19363esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019364eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019365 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019366 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019367 grep -v '^ *+' conftest.er1 >conftest.err
19368 rm -f conftest.er1
19369 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019371 (exit $ac_status); } && {
19372 test -z "$ac_c_werror_flag" ||
19373 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019374 } && test -s conftest$ac_exeext &&
19375 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019376 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019377else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019378 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019379sed 's/^/| /' conftest.$ac_ext >&5
19380
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019381 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019382fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019383
19384rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019385 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019386fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019387ac_res=`eval echo '${'$as_ac_var'}'`
19388 { echo "$as_me:$LINENO: result: $ac_res" >&5
19389echo "${ECHO_T}$ac_res" >&6; }
19390if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019391 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019392#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019393_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019394
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019395else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019396 { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
19397echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019398if test "${ac_cv_lib_util_openpty+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019399 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019400else
Martin v. Löwis11437992002-04-12 09:54:03 +000019401 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019402LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019403cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019404/* confdefs.h. */
19405_ACEOF
19406cat confdefs.h >>conftest.$ac_ext
19407cat >>conftest.$ac_ext <<_ACEOF
19408/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019409
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019410/* Override any GCC internal prototype to avoid an error.
19411 Use char because int might match the return type of a GCC
19412 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019413#ifdef __cplusplus
19414extern "C"
19415#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019416char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019417int
19418main ()
19419{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019420return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019421 ;
19422 return 0;
19423}
19424_ACEOF
19425rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019426if { (ac_try="$ac_link"
19427case "(($ac_try" in
19428 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19429 *) ac_try_echo=$ac_try;;
19430esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019431eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019432 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019433 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019434 grep -v '^ *+' conftest.er1 >conftest.err
19435 rm -f conftest.er1
19436 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019437 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019438 (exit $ac_status); } && {
19439 test -z "$ac_c_werror_flag" ||
19440 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019441 } && test -s conftest$ac_exeext &&
19442 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019443 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000019444else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019445 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019446sed 's/^/| /' conftest.$ac_ext >&5
19447
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019448 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +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öwis11437992002-04-12 09:54:03 +000019453LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019454fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019455{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
19456echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
19457if test $ac_cv_lib_util_openpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019458 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019459#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019460_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019461 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019462else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019463 { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
19464echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019465if test "${ac_cv_lib_bsd_openpty+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019466 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019467else
19468 ac_check_lib_save_LIBS=$LIBS
19469LIBS="-lbsd $LIBS"
19470cat >conftest.$ac_ext <<_ACEOF
19471/* confdefs.h. */
19472_ACEOF
19473cat confdefs.h >>conftest.$ac_ext
19474cat >>conftest.$ac_ext <<_ACEOF
19475/* end confdefs.h. */
19476
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019477/* Override any GCC internal prototype to avoid an error.
19478 Use char because int might match the return type of a GCC
19479 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019480#ifdef __cplusplus
19481extern "C"
19482#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019483char openpty ();
19484int
19485main ()
19486{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019487return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019488 ;
19489 return 0;
19490}
19491_ACEOF
19492rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019493if { (ac_try="$ac_link"
19494case "(($ac_try" in
19495 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19496 *) ac_try_echo=$ac_try;;
19497esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019498eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019499 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019500 ac_status=$?
19501 grep -v '^ *+' conftest.er1 >conftest.err
19502 rm -f conftest.er1
19503 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019504 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019505 (exit $ac_status); } && {
19506 test -z "$ac_c_werror_flag" ||
19507 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019508 } && test -s conftest$ac_exeext &&
19509 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019510 ac_cv_lib_bsd_openpty=yes
19511else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019512 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019513sed 's/^/| /' conftest.$ac_ext >&5
19514
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019515 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019516fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019517
19518rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019519 conftest$ac_exeext conftest.$ac_ext
19520LIBS=$ac_check_lib_save_LIBS
19521fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019522{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
19523echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
19524if test $ac_cv_lib_bsd_openpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019525 cat >>confdefs.h <<\_ACEOF
19526#define HAVE_OPENPTY 1
19527_ACEOF
19528 LIBS="$LIBS -lbsd"
19529fi
19530
19531
19532fi
19533
Fred Drake8cef4cf2000-06-28 16:40:38 +000019534
19535fi
19536done
19537
Martin v. Löwis11437992002-04-12 09:54:03 +000019538
Fred Drake8cef4cf2000-06-28 16:40:38 +000019539for ac_func in forkpty
19540do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019541as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19542{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19543echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019544if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019545 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019546else
Martin v. Löwis11437992002-04-12 09:54:03 +000019547 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019548/* confdefs.h. */
19549_ACEOF
19550cat confdefs.h >>conftest.$ac_ext
19551cat >>conftest.$ac_ext <<_ACEOF
19552/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019553/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19554 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19555#define $ac_func innocuous_$ac_func
19556
Fred Drake8cef4cf2000-06-28 16:40:38 +000019557/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019558 which can conflict with char $ac_func (); below.
19559 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019560 <limits.h> exists even on freestanding compilers. */
19561
19562#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019563# include <limits.h>
19564#else
19565# include <assert.h>
19566#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019567
19568#undef $ac_func
19569
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019570/* Override any GCC internal prototype to avoid an error.
19571 Use char because int might match the return type of a GCC
19572 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019573#ifdef __cplusplus
19574extern "C"
19575#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019576char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000019577/* The GNU C library defines this for functions which it implements
19578 to always fail with ENOSYS. Some functions are actually named
19579 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019580#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000019581choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000019582#endif
19583
Skip Montanaro6dead952003-09-25 14:50:04 +000019584int
19585main ()
19586{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019587return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019588 ;
19589 return 0;
19590}
19591_ACEOF
19592rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019593if { (ac_try="$ac_link"
19594case "(($ac_try" in
19595 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19596 *) ac_try_echo=$ac_try;;
19597esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019598eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019599 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019600 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019601 grep -v '^ *+' conftest.er1 >conftest.err
19602 rm -f conftest.er1
19603 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019604 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019605 (exit $ac_status); } && {
19606 test -z "$ac_c_werror_flag" ||
19607 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019608 } && test -s conftest$ac_exeext &&
19609 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019610 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019611else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019612 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019613sed 's/^/| /' conftest.$ac_ext >&5
19614
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019615 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019616fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019617
19618rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019619 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019620fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019621ac_res=`eval echo '${'$as_ac_var'}'`
19622 { echo "$as_me:$LINENO: result: $ac_res" >&5
19623echo "${ECHO_T}$ac_res" >&6; }
19624if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019625 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019626#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019627_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019628
Fred Drake8cef4cf2000-06-28 16:40:38 +000019629else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019630 { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
19631echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019632if test "${ac_cv_lib_util_forkpty+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019633 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019634else
Martin v. Löwis11437992002-04-12 09:54:03 +000019635 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019636LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019637cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019638/* confdefs.h. */
19639_ACEOF
19640cat confdefs.h >>conftest.$ac_ext
19641cat >>conftest.$ac_ext <<_ACEOF
19642/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019643
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019644/* Override any GCC internal prototype to avoid an error.
19645 Use char because int might match the return type of a GCC
19646 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019647#ifdef __cplusplus
19648extern "C"
19649#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019650char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019651int
19652main ()
19653{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019654return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019655 ;
19656 return 0;
19657}
19658_ACEOF
19659rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019660if { (ac_try="$ac_link"
19661case "(($ac_try" in
19662 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19663 *) ac_try_echo=$ac_try;;
19664esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019665eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019666 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019667 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019668 grep -v '^ *+' conftest.er1 >conftest.err
19669 rm -f conftest.er1
19670 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019672 (exit $ac_status); } && {
19673 test -z "$ac_c_werror_flag" ||
19674 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019675 } && test -s conftest$ac_exeext &&
19676 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019677 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000019678else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019679 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019680sed 's/^/| /' conftest.$ac_ext >&5
19681
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019682 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019683fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019684
19685rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019686 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019687LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019688fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019689{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
19690echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
19691if test $ac_cv_lib_util_forkpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019692 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019693#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019694_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019695 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019696else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019697 { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
19698echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019699if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019700 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019701else
19702 ac_check_lib_save_LIBS=$LIBS
19703LIBS="-lbsd $LIBS"
19704cat >conftest.$ac_ext <<_ACEOF
19705/* confdefs.h. */
19706_ACEOF
19707cat confdefs.h >>conftest.$ac_ext
19708cat >>conftest.$ac_ext <<_ACEOF
19709/* end confdefs.h. */
19710
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019711/* Override any GCC internal prototype to avoid an error.
19712 Use char because int might match the return type of a GCC
19713 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019714#ifdef __cplusplus
19715extern "C"
19716#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019717char forkpty ();
19718int
19719main ()
19720{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019721return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019722 ;
19723 return 0;
19724}
19725_ACEOF
19726rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019727if { (ac_try="$ac_link"
19728case "(($ac_try" in
19729 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19730 *) ac_try_echo=$ac_try;;
19731esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019732eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019733 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019734 ac_status=$?
19735 grep -v '^ *+' conftest.er1 >conftest.err
19736 rm -f conftest.er1
19737 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019739 (exit $ac_status); } && {
19740 test -z "$ac_c_werror_flag" ||
19741 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019742 } && test -s conftest$ac_exeext &&
19743 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019744 ac_cv_lib_bsd_forkpty=yes
19745else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019746 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019747sed 's/^/| /' conftest.$ac_ext >&5
19748
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019749 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019750fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019751
19752rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019753 conftest$ac_exeext conftest.$ac_ext
19754LIBS=$ac_check_lib_save_LIBS
19755fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019756{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
19757echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
19758if test $ac_cv_lib_bsd_forkpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019759 cat >>confdefs.h <<\_ACEOF
19760#define HAVE_FORKPTY 1
19761_ACEOF
19762 LIBS="$LIBS -lbsd"
19763fi
19764
19765
19766fi
19767
Fred Drake8cef4cf2000-06-28 16:40:38 +000019768
19769fi
19770done
19771
Jack Jansendd19cf82001-12-06 22:36:17 +000019772
Christian Heimesb186d002008-03-18 15:15:01 +000019773# Stuff for expat.
19774
19775for ac_func in memmove
19776do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019777as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19778{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19779echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Christian Heimesb186d002008-03-18 15:15:01 +000019780if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019781 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimesb186d002008-03-18 15:15:01 +000019782else
19783 cat >conftest.$ac_ext <<_ACEOF
19784/* confdefs.h. */
19785_ACEOF
19786cat confdefs.h >>conftest.$ac_ext
19787cat >>conftest.$ac_ext <<_ACEOF
19788/* end confdefs.h. */
19789/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19790 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19791#define $ac_func innocuous_$ac_func
19792
19793/* System header to define __stub macros and hopefully few prototypes,
19794 which can conflict with char $ac_func (); below.
19795 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19796 <limits.h> exists even on freestanding compilers. */
19797
19798#ifdef __STDC__
19799# include <limits.h>
19800#else
19801# include <assert.h>
19802#endif
19803
19804#undef $ac_func
19805
19806/* Override any GCC internal prototype to avoid an error.
19807 Use char because int might match the return type of a GCC
19808 builtin and then its argument prototype would still apply. */
19809#ifdef __cplusplus
19810extern "C"
19811#endif
19812char $ac_func ();
19813/* The GNU C library defines this for functions which it implements
19814 to always fail with ENOSYS. Some functions are actually named
19815 something starting with __ and the normal name is an alias. */
19816#if defined __stub_$ac_func || defined __stub___$ac_func
19817choke me
19818#endif
19819
19820int
19821main ()
19822{
19823return $ac_func ();
19824 ;
19825 return 0;
19826}
19827_ACEOF
19828rm -f conftest.$ac_objext conftest$ac_exeext
19829if { (ac_try="$ac_link"
19830case "(($ac_try" in
19831 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19832 *) ac_try_echo=$ac_try;;
19833esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019834eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesb186d002008-03-18 15:15:01 +000019835 (eval "$ac_link") 2>conftest.er1
19836 ac_status=$?
19837 grep -v '^ *+' conftest.er1 >conftest.err
19838 rm -f conftest.er1
19839 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesb186d002008-03-18 15:15:01 +000019841 (exit $ac_status); } && {
19842 test -z "$ac_c_werror_flag" ||
19843 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019844 } && test -s conftest$ac_exeext &&
19845 $as_test_x conftest$ac_exeext; then
Christian Heimesb186d002008-03-18 15:15:01 +000019846 eval "$as_ac_var=yes"
19847else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019848 echo "$as_me: failed program was:" >&5
Christian Heimesb186d002008-03-18 15:15:01 +000019849sed 's/^/| /' conftest.$ac_ext >&5
19850
19851 eval "$as_ac_var=no"
19852fi
19853
19854rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19855 conftest$ac_exeext conftest.$ac_ext
19856fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019857ac_res=`eval echo '${'$as_ac_var'}'`
19858 { echo "$as_me:$LINENO: result: $ac_res" >&5
19859echo "${ECHO_T}$ac_res" >&6; }
19860if test `eval echo '${'$as_ac_var'}'` = yes; then
Christian Heimesb186d002008-03-18 15:15:01 +000019861 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019862#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimesb186d002008-03-18 15:15:01 +000019863_ACEOF
19864
19865fi
19866done
19867
19868
Michael W. Hudson54241132001-12-07 15:38:26 +000019869# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000019870
19871
19872
19873
19874
19875
Fred Drake8cef4cf2000-06-28 16:40:38 +000019876for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
19877do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019878as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19879{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19880echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019881if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019882 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019883else
Martin v. Löwis11437992002-04-12 09:54:03 +000019884 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019885/* confdefs.h. */
19886_ACEOF
19887cat confdefs.h >>conftest.$ac_ext
19888cat >>conftest.$ac_ext <<_ACEOF
19889/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019890/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19891 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19892#define $ac_func innocuous_$ac_func
19893
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019894/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019895 which can conflict with char $ac_func (); below.
19896 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019897 <limits.h> exists even on freestanding compilers. */
19898
19899#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019900# include <limits.h>
19901#else
19902# include <assert.h>
19903#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019904
19905#undef $ac_func
19906
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019907/* Override any GCC internal prototype to avoid an error.
19908 Use char because int might match the return type of a GCC
19909 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019910#ifdef __cplusplus
19911extern "C"
19912#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019913char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019914/* The GNU C library defines this for functions which it implements
19915 to always fail with ENOSYS. Some functions are actually named
19916 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019917#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019918choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019919#endif
19920
Skip Montanaro6dead952003-09-25 14:50:04 +000019921int
19922main ()
19923{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019924return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019925 ;
19926 return 0;
19927}
19928_ACEOF
19929rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019930if { (ac_try="$ac_link"
19931case "(($ac_try" in
19932 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19933 *) ac_try_echo=$ac_try;;
19934esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019935eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019936 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019937 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019938 grep -v '^ *+' conftest.er1 >conftest.err
19939 rm -f conftest.er1
19940 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019942 (exit $ac_status); } && {
19943 test -z "$ac_c_werror_flag" ||
19944 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019945 } && test -s conftest$ac_exeext &&
19946 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019947 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019948else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019949 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019950sed 's/^/| /' conftest.$ac_ext >&5
19951
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019952 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019953fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019954
19955rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019956 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019957fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019958ac_res=`eval echo '${'$as_ac_var'}'`
19959 { echo "$as_me:$LINENO: result: $ac_res" >&5
19960echo "${ECHO_T}$ac_res" >&6; }
19961if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019962 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019963#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019964_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000019965
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019966fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000019967done
19968
Michael W. Hudson54241132001-12-07 15:38:26 +000019969
Martin v. Löwis11437992002-04-12 09:54:03 +000019970
19971
19972
Christian Heimesb186d002008-03-18 15:15:01 +000019973for ac_func in dup2 getcwd strdup
Thomas Wouters3a584202000-08-05 23:28:51 +000019974do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019975as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19976{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19977echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019978if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019979 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019980else
Martin v. Löwis11437992002-04-12 09:54:03 +000019981 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019982/* confdefs.h. */
19983_ACEOF
19984cat confdefs.h >>conftest.$ac_ext
19985cat >>conftest.$ac_ext <<_ACEOF
19986/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019987/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19988 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19989#define $ac_func innocuous_$ac_func
19990
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000019991/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019992 which can conflict with char $ac_func (); below.
19993 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019994 <limits.h> exists even on freestanding compilers. */
19995
19996#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019997# include <limits.h>
19998#else
19999# include <assert.h>
20000#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020001
20002#undef $ac_func
20003
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020004/* Override any GCC internal prototype to avoid an error.
20005 Use char because int might match the return type of a GCC
20006 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020007#ifdef __cplusplus
20008extern "C"
20009#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020010char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000020011/* The GNU C library defines this for functions which it implements
20012 to always fail with ENOSYS. Some functions are actually named
20013 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020014#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000020015choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000020016#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020017
Skip Montanaro6dead952003-09-25 14:50:04 +000020018int
20019main ()
20020{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020021return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020022 ;
20023 return 0;
20024}
20025_ACEOF
20026rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020027if { (ac_try="$ac_link"
20028case "(($ac_try" in
20029 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20030 *) ac_try_echo=$ac_try;;
20031esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020032eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020033 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020034 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020035 grep -v '^ *+' conftest.er1 >conftest.err
20036 rm -f conftest.er1
20037 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020039 (exit $ac_status); } && {
20040 test -z "$ac_c_werror_flag" ||
20041 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020042 } && test -s conftest$ac_exeext &&
20043 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020044 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000020045else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020046 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020047sed 's/^/| /' conftest.$ac_ext >&5
20048
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020049 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000020050fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020051
20052rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020053 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000020054fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020055ac_res=`eval echo '${'$as_ac_var'}'`
20056 { echo "$as_me:$LINENO: result: $ac_res" >&5
20057echo "${ECHO_T}$ac_res" >&6; }
20058if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020059 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020060#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020061_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000020062
Martin v. Löwis1142de32002-03-29 16:28:31 +000020063else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020064 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000020065 *" $ac_func.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020066 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
20067 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000020068esac
20069
Martin v. Löwis1142de32002-03-29 16:28:31 +000020070fi
20071done
20072
20073
Martin v. Löwis11437992002-04-12 09:54:03 +000020074
Martin v. Löwis1142de32002-03-29 16:28:31 +000020075for ac_func in getpgrp
20076do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020077as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20078{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20079echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020080if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020081 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000020082else
Martin v. Löwis11437992002-04-12 09:54:03 +000020083 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020084/* confdefs.h. */
20085_ACEOF
20086cat confdefs.h >>conftest.$ac_ext
20087cat >>conftest.$ac_ext <<_ACEOF
20088/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020089/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20090 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20091#define $ac_func innocuous_$ac_func
20092
Martin v. Löwis1142de32002-03-29 16:28:31 +000020093/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020094 which can conflict with char $ac_func (); below.
20095 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020096 <limits.h> exists even on freestanding compilers. */
20097
20098#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020099# include <limits.h>
20100#else
20101# include <assert.h>
20102#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020103
20104#undef $ac_func
20105
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020106/* Override any GCC internal prototype to avoid an error.
20107 Use char because int might match the return type of a GCC
20108 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020109#ifdef __cplusplus
20110extern "C"
20111#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020112char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000020113/* The GNU C library defines this for functions which it implements
20114 to always fail with ENOSYS. Some functions are actually named
20115 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020116#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000020117choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000020118#endif
20119
Skip Montanaro6dead952003-09-25 14:50:04 +000020120int
20121main ()
20122{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020123return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020124 ;
20125 return 0;
20126}
20127_ACEOF
20128rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020129if { (ac_try="$ac_link"
20130case "(($ac_try" in
20131 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20132 *) ac_try_echo=$ac_try;;
20133esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020134eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020135 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020136 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020137 grep -v '^ *+' conftest.er1 >conftest.err
20138 rm -f conftest.er1
20139 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020141 (exit $ac_status); } && {
20142 test -z "$ac_c_werror_flag" ||
20143 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020144 } && test -s conftest$ac_exeext &&
20145 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020146 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020147else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020148 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020149sed 's/^/| /' conftest.$ac_ext >&5
20150
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020151 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020152fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020153
20154rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020155 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020156fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020157ac_res=`eval echo '${'$as_ac_var'}'`
20158 { echo "$as_me:$LINENO: result: $ac_res" >&5
20159echo "${ECHO_T}$ac_res" >&6; }
20160if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020161 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020162#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020163_ACEOF
20164 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020165/* confdefs.h. */
20166_ACEOF
20167cat confdefs.h >>conftest.$ac_ext
20168cat >>conftest.$ac_ext <<_ACEOF
20169/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020170#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020171int
20172main ()
20173{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020174getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020175 ;
20176 return 0;
20177}
20178_ACEOF
20179rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020180if { (ac_try="$ac_compile"
20181case "(($ac_try" in
20182 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20183 *) ac_try_echo=$ac_try;;
20184esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020185eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020186 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020187 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020188 grep -v '^ *+' conftest.er1 >conftest.err
20189 rm -f conftest.er1
20190 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020192 (exit $ac_status); } && {
20193 test -z "$ac_c_werror_flag" ||
20194 test ! -s conftest.err
20195 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020196
20197cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020198#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020199_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020200
Martin v. Löwis11437992002-04-12 09:54:03 +000020201
Guido van Rossumf78abae1997-01-21 22:02:36 +000020202else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020203 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020204sed 's/^/| /' conftest.$ac_ext >&5
20205
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020206
Guido van Rossum627b2d71993-12-24 10:39:16 +000020207fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020208
20209rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020210
Guido van Rossum627b2d71993-12-24 10:39:16 +000020211fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020212done
Guido van Rossum627b2d71993-12-24 10:39:16 +000020213
Jack Jansen150753c2003-03-29 22:07:47 +000020214
20215for ac_func in setpgrp
20216do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020217as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20218{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20219echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020220if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020221 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020222else
Martin v. Löwis11437992002-04-12 09:54:03 +000020223 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020224/* confdefs.h. */
20225_ACEOF
20226cat confdefs.h >>conftest.$ac_ext
20227cat >>conftest.$ac_ext <<_ACEOF
20228/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020229/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20230 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20231#define $ac_func innocuous_$ac_func
20232
Jack Jansen150753c2003-03-29 22:07:47 +000020233/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020234 which can conflict with char $ac_func (); below.
20235 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020236 <limits.h> exists even on freestanding compilers. */
20237
20238#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020239# include <limits.h>
20240#else
20241# include <assert.h>
20242#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020243
20244#undef $ac_func
20245
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020246/* Override any GCC internal prototype to avoid an error.
20247 Use char because int might match the return type of a GCC
20248 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000020249#ifdef __cplusplus
20250extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000020251#endif
Jack Jansen150753c2003-03-29 22:07:47 +000020252char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000020253/* The GNU C library defines this for functions which it implements
20254 to always fail with ENOSYS. Some functions are actually named
20255 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020256#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000020257choke me
Jack Jansen150753c2003-03-29 22:07:47 +000020258#endif
20259
Skip Montanaro6dead952003-09-25 14:50:04 +000020260int
20261main ()
20262{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020263return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020264 ;
20265 return 0;
20266}
20267_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000020268rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020269if { (ac_try="$ac_link"
20270case "(($ac_try" in
20271 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20272 *) ac_try_echo=$ac_try;;
20273esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020274eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020275 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020276 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020277 grep -v '^ *+' conftest.er1 >conftest.err
20278 rm -f conftest.er1
20279 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020281 (exit $ac_status); } && {
20282 test -z "$ac_c_werror_flag" ||
20283 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020284 } && test -s conftest$ac_exeext &&
20285 $as_test_x conftest$ac_exeext; then
Jack Jansen150753c2003-03-29 22:07:47 +000020286 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020287else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020288 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020289sed 's/^/| /' conftest.$ac_ext >&5
20290
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020291 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020292fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020293
20294rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020295 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020296fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020297ac_res=`eval echo '${'$as_ac_var'}'`
20298 { echo "$as_me:$LINENO: result: $ac_res" >&5
20299echo "${ECHO_T}$ac_res" >&6; }
20300if test `eval echo '${'$as_ac_var'}'` = yes; then
Jack Jansen150753c2003-03-29 22:07:47 +000020301 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020302#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Jack Jansen150753c2003-03-29 22:07:47 +000020303_ACEOF
20304 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020305/* confdefs.h. */
20306_ACEOF
20307cat confdefs.h >>conftest.$ac_ext
20308cat >>conftest.$ac_ext <<_ACEOF
20309/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000020310#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000020311int
20312main ()
20313{
20314setpgrp(0,0);
20315 ;
20316 return 0;
20317}
20318_ACEOF
20319rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020320if { (ac_try="$ac_compile"
20321case "(($ac_try" in
20322 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20323 *) ac_try_echo=$ac_try;;
20324esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020325eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020326 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000020327 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020328 grep -v '^ *+' conftest.er1 >conftest.err
20329 rm -f conftest.er1
20330 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020332 (exit $ac_status); } && {
20333 test -z "$ac_c_werror_flag" ||
20334 test ! -s conftest.err
20335 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020336
20337cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000020338#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020339_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020340
Jack Jansen150753c2003-03-29 22:07:47 +000020341
20342else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020343 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020344sed 's/^/| /' conftest.$ac_ext >&5
20345
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020346
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020347fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020348
20349rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000020350
20351fi
20352done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020353
Martin v. Löwis11437992002-04-12 09:54:03 +000020354
Thomas Wouters3a584202000-08-05 23:28:51 +000020355for ac_func in gettimeofday
20356do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020357as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20358{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20359echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020360if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020361 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020362else
Martin v. Löwis11437992002-04-12 09:54:03 +000020363 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020364/* confdefs.h. */
20365_ACEOF
20366cat confdefs.h >>conftest.$ac_ext
20367cat >>conftest.$ac_ext <<_ACEOF
20368/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020369/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20370 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20371#define $ac_func innocuous_$ac_func
20372
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020373/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020374 which can conflict with char $ac_func (); below.
20375 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020376 <limits.h> exists even on freestanding compilers. */
20377
20378#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020379# include <limits.h>
20380#else
20381# include <assert.h>
20382#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020383
20384#undef $ac_func
20385
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020386/* Override any GCC internal prototype to avoid an error.
20387 Use char because int might match the return type of a GCC
20388 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020389#ifdef __cplusplus
20390extern "C"
20391#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020392char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020393/* The GNU C library defines this for functions which it implements
20394 to always fail with ENOSYS. Some functions are actually named
20395 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020396#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020397choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020398#endif
20399
Skip Montanaro6dead952003-09-25 14:50:04 +000020400int
20401main ()
20402{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020403return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020404 ;
20405 return 0;
20406}
20407_ACEOF
20408rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020409if { (ac_try="$ac_link"
20410case "(($ac_try" in
20411 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20412 *) ac_try_echo=$ac_try;;
20413esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020414eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020415 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020416 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020417 grep -v '^ *+' conftest.er1 >conftest.err
20418 rm -f conftest.er1
20419 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020421 (exit $ac_status); } && {
20422 test -z "$ac_c_werror_flag" ||
20423 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020424 } && test -s conftest$ac_exeext &&
20425 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020426 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020427else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020428 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020429sed 's/^/| /' conftest.$ac_ext >&5
20430
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020431 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020432fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020433
20434rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020435 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020436fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020437ac_res=`eval echo '${'$as_ac_var'}'`
20438 { echo "$as_me:$LINENO: result: $ac_res" >&5
20439echo "${ECHO_T}$ac_res" >&6; }
20440if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020441 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020442#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020443_ACEOF
20444 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020445/* confdefs.h. */
20446_ACEOF
20447cat confdefs.h >>conftest.$ac_ext
20448cat >>conftest.$ac_ext <<_ACEOF
20449/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000020450#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020451int
20452main ()
20453{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020454gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020455 ;
20456 return 0;
20457}
20458_ACEOF
20459rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020460if { (ac_try="$ac_compile"
20461case "(($ac_try" in
20462 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20463 *) ac_try_echo=$ac_try;;
20464esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020465eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020466 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020467 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020468 grep -v '^ *+' conftest.er1 >conftest.err
20469 rm -f conftest.er1
20470 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020472 (exit $ac_status); } && {
20473 test -z "$ac_c_werror_flag" ||
20474 test ! -s conftest.err
20475 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000020476 :
20477else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020478 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020479sed 's/^/| /' conftest.$ac_ext >&5
20480
Martin v. Löwis11437992002-04-12 09:54:03 +000020481
20482cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020483#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020484_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020485
Martin v. Löwis11437992002-04-12 09:54:03 +000020486
Guido van Rossum627b2d71993-12-24 10:39:16 +000020487fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020488
20489rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020490
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020491fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020492done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020493
Michael W. Hudson54241132001-12-07 15:38:26 +000020494
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020495{ echo "$as_me:$LINENO: checking for major" >&5
20496echo $ECHO_N "checking for major... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020497cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020498/* confdefs.h. */
20499_ACEOF
20500cat confdefs.h >>conftest.$ac_ext
20501cat >>conftest.$ac_ext <<_ACEOF
20502/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020503
Neal Norwitz6eb37f02003-02-23 23:28:15 +000020504#if defined(MAJOR_IN_MKDEV)
20505#include <sys/mkdev.h>
20506#elif defined(MAJOR_IN_SYSMACROS)
20507#include <sys/sysmacros.h>
20508#else
20509#include <sys/types.h>
20510#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020511
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020512int
20513main ()
20514{
20515
20516 makedev(major(0),minor(0));
20517
20518 ;
20519 return 0;
20520}
20521_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000020522rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020523if { (ac_try="$ac_link"
20524case "(($ac_try" in
20525 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20526 *) ac_try_echo=$ac_try;;
20527esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020528eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020529 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020530 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020531 grep -v '^ *+' conftest.er1 >conftest.err
20532 rm -f conftest.er1
20533 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020535 (exit $ac_status); } && {
20536 test -z "$ac_c_werror_flag" ||
20537 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020538 } && test -s conftest$ac_exeext &&
20539 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020540
20541
20542cat >>confdefs.h <<\_ACEOF
20543#define HAVE_DEVICE_MACROS 1
20544_ACEOF
20545
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020546 { echo "$as_me:$LINENO: result: yes" >&5
20547echo "${ECHO_T}yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020548
20549else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020550 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020551sed 's/^/| /' conftest.$ac_ext >&5
20552
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020553
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020554 { echo "$as_me:$LINENO: result: no" >&5
20555echo "${ECHO_T}no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020556
20557fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020558
20559rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020560 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020561
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020562# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000020563# for [no]getaddrinfo in netdb.h.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020564{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
20565echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020566cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020567/* confdefs.h. */
20568_ACEOF
20569cat confdefs.h >>conftest.$ac_ext
20570cat >>conftest.$ac_ext <<_ACEOF
20571/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020572
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000020573#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020574#include <sys/socket.h>
20575#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000020576#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020577
Martin v. Löwis11437992002-04-12 09:54:03 +000020578int
20579main ()
20580{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020581getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000020582 ;
20583 return 0;
20584}
20585_ACEOF
20586rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020587if { (ac_try="$ac_link"
20588case "(($ac_try" in
20589 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20590 *) ac_try_echo=$ac_try;;
20591esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020592eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020593 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020594 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020595 grep -v '^ *+' conftest.er1 >conftest.err
20596 rm -f conftest.er1
20597 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020598 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020599 (exit $ac_status); } && {
20600 test -z "$ac_c_werror_flag" ||
20601 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020602 } && test -s conftest$ac_exeext &&
20603 $as_test_x conftest$ac_exeext; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020604 have_getaddrinfo=yes
20605else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020606 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020607sed 's/^/| /' conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020608
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020609 have_getaddrinfo=no
20610fi
20611
20612rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20613 conftest$ac_exeext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020614{ echo "$as_me:$LINENO: result: $have_getaddrinfo" >&5
20615echo "${ECHO_T}$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020616if test $have_getaddrinfo = yes
20617then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020618 { echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
20619echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020620 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020621 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020622else
20623 if test "$cross_compiling" = yes; then
20624 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020625else
Martin v. Löwis11437992002-04-12 09:54:03 +000020626 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020627/* confdefs.h. */
20628_ACEOF
20629cat confdefs.h >>conftest.$ac_ext
20630cat >>conftest.$ac_ext <<_ACEOF
20631/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020632
20633#include <sys/types.h>
20634#include <netdb.h>
20635#include <string.h>
20636#include <sys/socket.h>
20637#include <netinet/in.h>
20638
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020639int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020640{
20641 int passive, gaierr, inet4 = 0, inet6 = 0;
20642 struct addrinfo hints, *ai, *aitop;
20643 char straddr[INET6_ADDRSTRLEN], strport[16];
20644
20645 for (passive = 0; passive <= 1; passive++) {
20646 memset(&hints, 0, sizeof(hints));
20647 hints.ai_family = AF_UNSPEC;
20648 hints.ai_flags = passive ? AI_PASSIVE : 0;
20649 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000020650 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020651 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
20652 (void)gai_strerror(gaierr);
20653 goto bad;
20654 }
20655 for (ai = aitop; ai; ai = ai->ai_next) {
20656 if (ai->ai_addr == NULL ||
20657 ai->ai_addrlen == 0 ||
20658 getnameinfo(ai->ai_addr, ai->ai_addrlen,
20659 straddr, sizeof(straddr), strport, sizeof(strport),
20660 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
20661 goto bad;
20662 }
20663 switch (ai->ai_family) {
20664 case AF_INET:
20665 if (strcmp(strport, "54321") != 0) {
20666 goto bad;
20667 }
20668 if (passive) {
20669 if (strcmp(straddr, "0.0.0.0") != 0) {
20670 goto bad;
20671 }
20672 } else {
20673 if (strcmp(straddr, "127.0.0.1") != 0) {
20674 goto bad;
20675 }
20676 }
20677 inet4++;
20678 break;
20679 case AF_INET6:
20680 if (strcmp(strport, "54321") != 0) {
20681 goto bad;
20682 }
20683 if (passive) {
20684 if (strcmp(straddr, "::") != 0) {
20685 goto bad;
20686 }
20687 } else {
20688 if (strcmp(straddr, "::1") != 0) {
20689 goto bad;
20690 }
20691 }
20692 inet6++;
20693 break;
20694 case AF_UNSPEC:
20695 goto bad;
20696 break;
20697 default:
20698 /* another family support? */
20699 break;
20700 }
20701 }
20702 }
20703
20704 if (!(inet4 == 0 || inet4 == 2))
20705 goto bad;
20706 if (!(inet6 == 0 || inet6 == 2))
20707 goto bad;
20708
20709 if (aitop)
20710 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020711 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020712
20713 bad:
20714 if (aitop)
20715 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020716 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020717}
20718
Martin v. Löwis11437992002-04-12 09:54:03 +000020719_ACEOF
20720rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020721if { (ac_try="$ac_link"
20722case "(($ac_try" in
20723 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20724 *) ac_try_echo=$ac_try;;
20725esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020726eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020727 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020728 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020730 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020731 { (case "(($ac_try" in
20732 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20733 *) ac_try_echo=$ac_try;;
20734esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020735eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020736 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020737 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020739 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020740 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020741else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020742 echo "$as_me: program exited with status $ac_status" >&5
20743echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020744sed 's/^/| /' conftest.$ac_ext >&5
20745
Martin v. Löwis11437992002-04-12 09:54:03 +000020746( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020747ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020748fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020749rm -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 +000020750fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020751
20752
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020753fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020754
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020755fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020756
Mark Dickinson2df5d282009-12-31 21:22:50 +000020757if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020758then
20759 if test $ipv6 = yes
20760 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020761 echo 'Fatal: You must get working getaddrinfo() function.'
20762 echo ' or you can specify "--disable-ipv6"'.
20763 exit 1
20764 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020765else
Martin v. Löwis11437992002-04-12 09:54:03 +000020766
20767cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020768#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020769_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020770
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020771fi
Martin v. Löwis11437992002-04-12 09:54:03 +000020772
Jack Jansen9a66b6d2001-08-08 13:56:14 +000020773for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020774do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020775as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20776{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20777echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020778if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020779 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020780else
Martin v. Löwis11437992002-04-12 09:54:03 +000020781 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020782/* confdefs.h. */
20783_ACEOF
20784cat confdefs.h >>conftest.$ac_ext
20785cat >>conftest.$ac_ext <<_ACEOF
20786/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020787/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20788 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20789#define $ac_func innocuous_$ac_func
20790
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020791/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020792 which can conflict with char $ac_func (); below.
20793 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020794 <limits.h> exists even on freestanding compilers. */
20795
20796#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020797# include <limits.h>
20798#else
20799# include <assert.h>
20800#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020801
20802#undef $ac_func
20803
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020804/* Override any GCC internal prototype to avoid an error.
20805 Use char because int might match the return type of a GCC
20806 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020807#ifdef __cplusplus
20808extern "C"
20809#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020810char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020811/* The GNU C library defines this for functions which it implements
20812 to always fail with ENOSYS. Some functions are actually named
20813 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020814#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020815choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020816#endif
20817
Skip Montanaro6dead952003-09-25 14:50:04 +000020818int
20819main ()
20820{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020821return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020822 ;
20823 return 0;
20824}
20825_ACEOF
20826rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020827if { (ac_try="$ac_link"
20828case "(($ac_try" in
20829 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20830 *) ac_try_echo=$ac_try;;
20831esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020832eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020833 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020834 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020835 grep -v '^ *+' conftest.er1 >conftest.err
20836 rm -f conftest.er1
20837 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020839 (exit $ac_status); } && {
20840 test -z "$ac_c_werror_flag" ||
20841 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020842 } && test -s conftest$ac_exeext &&
20843 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020844 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020845else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020846 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020847sed 's/^/| /' conftest.$ac_ext >&5
20848
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020849 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020850fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020851
20852rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020853 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020854fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020855ac_res=`eval echo '${'$as_ac_var'}'`
20856 { echo "$as_me:$LINENO: result: $ac_res" >&5
20857echo "${ECHO_T}$ac_res" >&6; }
20858if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020859 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020860#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020861_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020862
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020863fi
20864done
20865
Michael W. Hudson54241132001-12-07 15:38:26 +000020866
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020867# checks for structures
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020868{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
20869echo $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 +000020870if test "${ac_cv_header_time+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020871 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020872else
Martin v. Löwis11437992002-04-12 09:54:03 +000020873 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020874/* confdefs.h. */
20875_ACEOF
20876cat confdefs.h >>conftest.$ac_ext
20877cat >>conftest.$ac_ext <<_ACEOF
20878/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020879#include <sys/types.h>
20880#include <sys/time.h>
20881#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020882
Martin v. Löwis11437992002-04-12 09:54:03 +000020883int
20884main ()
20885{
20886if ((struct tm *) 0)
20887return 0;
20888 ;
20889 return 0;
20890}
20891_ACEOF
20892rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020893if { (ac_try="$ac_compile"
20894case "(($ac_try" in
20895 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20896 *) ac_try_echo=$ac_try;;
20897esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020898eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020899 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020900 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020901 grep -v '^ *+' conftest.er1 >conftest.err
20902 rm -f conftest.er1
20903 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020905 (exit $ac_status); } && {
20906 test -z "$ac_c_werror_flag" ||
20907 test ! -s conftest.err
20908 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020909 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000020910else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020911 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020912sed 's/^/| /' conftest.$ac_ext >&5
20913
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020914 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000020915fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020916
20917rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020918fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020919{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
20920echo "${ECHO_T}$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000020921if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020922
20923cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020924#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020925_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020926
20927fi
20928
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020929{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
20930echo $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 +000020931if test "${ac_cv_struct_tm+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020932 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020933else
Martin v. Löwis11437992002-04-12 09:54:03 +000020934 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020935/* confdefs.h. */
20936_ACEOF
20937cat confdefs.h >>conftest.$ac_ext
20938cat >>conftest.$ac_ext <<_ACEOF
20939/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020940#include <sys/types.h>
20941#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020942
Martin v. Löwis11437992002-04-12 09:54:03 +000020943int
20944main ()
20945{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020946struct tm tm;
20947 int *p = &tm.tm_sec;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020948 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000020949 ;
20950 return 0;
20951}
20952_ACEOF
20953rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020954if { (ac_try="$ac_compile"
20955case "(($ac_try" in
20956 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20957 *) ac_try_echo=$ac_try;;
20958esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020959eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020960 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020961 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020962 grep -v '^ *+' conftest.er1 >conftest.err
20963 rm -f conftest.er1
20964 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020966 (exit $ac_status); } && {
20967 test -z "$ac_c_werror_flag" ||
20968 test ! -s conftest.err
20969 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020970 ac_cv_struct_tm=time.h
20971else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020972 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020973sed 's/^/| /' conftest.$ac_ext >&5
20974
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020975 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020976fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020977
20978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020979fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020980{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
20981echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000020982if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020983
20984cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020985#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020986_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020987
20988fi
20989
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020990{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
20991echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020992if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020993 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020994else
Martin v. Löwis11437992002-04-12 09:54:03 +000020995 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020996/* confdefs.h. */
20997_ACEOF
20998cat confdefs.h >>conftest.$ac_ext
20999cat >>conftest.$ac_ext <<_ACEOF
21000/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021001#include <sys/types.h>
21002#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000021003
21004
Martin v. Löwis11437992002-04-12 09:54:03 +000021005int
21006main ()
21007{
21008static struct tm ac_aggr;
21009if (ac_aggr.tm_zone)
21010return 0;
21011 ;
21012 return 0;
21013}
21014_ACEOF
21015rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021016if { (ac_try="$ac_compile"
21017case "(($ac_try" in
21018 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21019 *) ac_try_echo=$ac_try;;
21020esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021021eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021022 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021023 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021024 grep -v '^ *+' conftest.er1 >conftest.err
21025 rm -f conftest.er1
21026 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021028 (exit $ac_status); } && {
21029 test -z "$ac_c_werror_flag" ||
21030 test ! -s conftest.err
21031 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021032 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021033else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021034 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021035sed 's/^/| /' conftest.$ac_ext >&5
21036
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021037 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021038/* confdefs.h. */
21039_ACEOF
21040cat confdefs.h >>conftest.$ac_ext
21041cat >>conftest.$ac_ext <<_ACEOF
21042/* end confdefs.h. */
21043#include <sys/types.h>
21044#include <$ac_cv_struct_tm>
21045
21046
21047int
21048main ()
21049{
21050static struct tm ac_aggr;
21051if (sizeof ac_aggr.tm_zone)
21052return 0;
21053 ;
21054 return 0;
21055}
21056_ACEOF
21057rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021058if { (ac_try="$ac_compile"
21059case "(($ac_try" in
21060 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21061 *) ac_try_echo=$ac_try;;
21062esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021063eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021064 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021065 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021066 grep -v '^ *+' conftest.er1 >conftest.err
21067 rm -f conftest.er1
21068 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021070 (exit $ac_status); } && {
21071 test -z "$ac_c_werror_flag" ||
21072 test ! -s conftest.err
21073 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021074 ac_cv_member_struct_tm_tm_zone=yes
21075else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021076 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021077sed 's/^/| /' conftest.$ac_ext >&5
21078
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021079 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021080fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021081
21082rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021083fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021084
21085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021086fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021087{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
21088echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
21089if test $ac_cv_member_struct_tm_tm_zone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021090
21091cat >>confdefs.h <<_ACEOF
21092#define HAVE_STRUCT_TM_TM_ZONE 1
21093_ACEOF
21094
21095
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021096fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000021097
Martin v. Löwis11437992002-04-12 09:54:03 +000021098if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
21099
21100cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021101#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021102_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021103
21104else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021105 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
21106echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021107if test "${ac_cv_have_decl_tzname+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021108 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021109else
21110 cat >conftest.$ac_ext <<_ACEOF
21111/* confdefs.h. */
21112_ACEOF
21113cat confdefs.h >>conftest.$ac_ext
21114cat >>conftest.$ac_ext <<_ACEOF
21115/* end confdefs.h. */
21116#include <time.h>
21117
21118int
21119main ()
21120{
21121#ifndef tzname
21122 (void) tzname;
21123#endif
21124
21125 ;
21126 return 0;
21127}
21128_ACEOF
21129rm -f conftest.$ac_objext
21130if { (ac_try="$ac_compile"
21131case "(($ac_try" in
21132 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21133 *) ac_try_echo=$ac_try;;
21134esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021135eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021136 (eval "$ac_compile") 2>conftest.er1
21137 ac_status=$?
21138 grep -v '^ *+' conftest.er1 >conftest.err
21139 rm -f conftest.er1
21140 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021142 (exit $ac_status); } && {
21143 test -z "$ac_c_werror_flag" ||
21144 test ! -s conftest.err
21145 } && test -s conftest.$ac_objext; then
21146 ac_cv_have_decl_tzname=yes
21147else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021148 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021149sed 's/^/| /' conftest.$ac_ext >&5
21150
21151 ac_cv_have_decl_tzname=no
21152fi
21153
21154rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21155fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021156{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
21157echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
21158if test $ac_cv_have_decl_tzname = yes; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021159
21160cat >>confdefs.h <<_ACEOF
21161#define HAVE_DECL_TZNAME 1
21162_ACEOF
21163
21164
21165else
21166 cat >>confdefs.h <<_ACEOF
21167#define HAVE_DECL_TZNAME 0
21168_ACEOF
21169
21170
21171fi
21172
21173
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021174 { echo "$as_me:$LINENO: checking for tzname" >&5
21175echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021176if test "${ac_cv_var_tzname+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021177 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021178else
Martin v. Löwis11437992002-04-12 09:54:03 +000021179 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021180/* confdefs.h. */
21181_ACEOF
21182cat confdefs.h >>conftest.$ac_ext
21183cat >>conftest.$ac_ext <<_ACEOF
21184/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000021185#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021186#if !HAVE_DECL_TZNAME
21187extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000021188#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021189
Martin v. Löwis11437992002-04-12 09:54:03 +000021190int
21191main ()
21192{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021193return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000021194 ;
21195 return 0;
21196}
21197_ACEOF
21198rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021199if { (ac_try="$ac_link"
21200case "(($ac_try" in
21201 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21202 *) ac_try_echo=$ac_try;;
21203esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021204eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021205 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021206 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021207 grep -v '^ *+' conftest.er1 >conftest.err
21208 rm -f conftest.er1
21209 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021211 (exit $ac_status); } && {
21212 test -z "$ac_c_werror_flag" ||
21213 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021214 } && test -s conftest$ac_exeext &&
21215 $as_test_x conftest$ac_exeext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021216 ac_cv_var_tzname=yes
21217else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021218 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021219sed 's/^/| /' conftest.$ac_ext >&5
21220
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021221 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000021222fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021223
21224rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021225 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000021226fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021227{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
21228echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000021229 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021230
21231cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021232#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021233_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000021234
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021235 fi
21236fi
21237
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021238{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
21239echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021240if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021241 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000021242else
21243 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021244/* confdefs.h. */
21245_ACEOF
21246cat confdefs.h >>conftest.$ac_ext
21247cat >>conftest.$ac_ext <<_ACEOF
21248/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021249$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021250int
21251main ()
21252{
21253static struct stat ac_aggr;
21254if (ac_aggr.st_rdev)
21255return 0;
21256 ;
21257 return 0;
21258}
21259_ACEOF
21260rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021261if { (ac_try="$ac_compile"
21262case "(($ac_try" in
21263 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21264 *) ac_try_echo=$ac_try;;
21265esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021266eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021267 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021268 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021269 grep -v '^ *+' conftest.er1 >conftest.err
21270 rm -f conftest.er1
21271 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021273 (exit $ac_status); } && {
21274 test -z "$ac_c_werror_flag" ||
21275 test ! -s conftest.err
21276 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021277 ac_cv_member_struct_stat_st_rdev=yes
21278else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021279 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021280sed 's/^/| /' conftest.$ac_ext >&5
21281
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021282 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021283/* confdefs.h. */
21284_ACEOF
21285cat confdefs.h >>conftest.$ac_ext
21286cat >>conftest.$ac_ext <<_ACEOF
21287/* end confdefs.h. */
21288$ac_includes_default
21289int
21290main ()
21291{
21292static struct stat ac_aggr;
21293if (sizeof ac_aggr.st_rdev)
21294return 0;
21295 ;
21296 return 0;
21297}
21298_ACEOF
21299rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021300if { (ac_try="$ac_compile"
21301case "(($ac_try" in
21302 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21303 *) ac_try_echo=$ac_try;;
21304esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021305eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021306 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021307 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021308 grep -v '^ *+' conftest.er1 >conftest.err
21309 rm -f conftest.er1
21310 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021312 (exit $ac_status); } && {
21313 test -z "$ac_c_werror_flag" ||
21314 test ! -s conftest.err
21315 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021316 ac_cv_member_struct_stat_st_rdev=yes
21317else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021318 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021319sed 's/^/| /' conftest.$ac_ext >&5
21320
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021321 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000021322fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021323
21324rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021325fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021326
21327rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021328fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021329{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
21330echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
21331if test $ac_cv_member_struct_stat_st_rdev = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021332
21333cat >>confdefs.h <<_ACEOF
21334#define HAVE_STRUCT_STAT_ST_RDEV 1
21335_ACEOF
21336
21337
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021338fi
21339
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021340{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
21341echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021342if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021343 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021344else
Martin v. Löwis11437992002-04-12 09:54:03 +000021345 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021346/* confdefs.h. */
21347_ACEOF
21348cat confdefs.h >>conftest.$ac_ext
21349cat >>conftest.$ac_ext <<_ACEOF
21350/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021351$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021352int
21353main ()
21354{
21355static struct stat ac_aggr;
21356if (ac_aggr.st_blksize)
21357return 0;
21358 ;
21359 return 0;
21360}
21361_ACEOF
21362rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021363if { (ac_try="$ac_compile"
21364case "(($ac_try" in
21365 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21366 *) ac_try_echo=$ac_try;;
21367esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021368eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021369 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021370 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021371 grep -v '^ *+' conftest.er1 >conftest.err
21372 rm -f conftest.er1
21373 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021375 (exit $ac_status); } && {
21376 test -z "$ac_c_werror_flag" ||
21377 test ! -s conftest.err
21378 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021379 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021380else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021381 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021382sed 's/^/| /' conftest.$ac_ext >&5
21383
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021384 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021385/* confdefs.h. */
21386_ACEOF
21387cat confdefs.h >>conftest.$ac_ext
21388cat >>conftest.$ac_ext <<_ACEOF
21389/* end confdefs.h. */
21390$ac_includes_default
21391int
21392main ()
21393{
21394static struct stat ac_aggr;
21395if (sizeof ac_aggr.st_blksize)
21396return 0;
21397 ;
21398 return 0;
21399}
21400_ACEOF
21401rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021402if { (ac_try="$ac_compile"
21403case "(($ac_try" in
21404 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21405 *) ac_try_echo=$ac_try;;
21406esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021407eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021408 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021409 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021410 grep -v '^ *+' conftest.er1 >conftest.err
21411 rm -f conftest.er1
21412 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021414 (exit $ac_status); } && {
21415 test -z "$ac_c_werror_flag" ||
21416 test ! -s conftest.err
21417 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021418 ac_cv_member_struct_stat_st_blksize=yes
21419else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021420 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021421sed 's/^/| /' conftest.$ac_ext >&5
21422
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021423 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021424fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021425
21426rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021427fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021428
21429rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021430fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021431{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
21432echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
21433if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000021434
Martin v. Löwis11437992002-04-12 09:54:03 +000021435cat >>confdefs.h <<_ACEOF
21436#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
21437_ACEOF
21438
21439
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021440fi
21441
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021442{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
21443echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021444if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021445 echo $ECHO_N "(cached) $ECHO_C" >&6
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021446else
21447 cat >conftest.$ac_ext <<_ACEOF
21448/* confdefs.h. */
21449_ACEOF
21450cat confdefs.h >>conftest.$ac_ext
21451cat >>conftest.$ac_ext <<_ACEOF
21452/* end confdefs.h. */
21453$ac_includes_default
21454int
21455main ()
21456{
21457static struct stat ac_aggr;
21458if (ac_aggr.st_flags)
21459return 0;
21460 ;
21461 return 0;
21462}
21463_ACEOF
21464rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021465if { (ac_try="$ac_compile"
21466case "(($ac_try" in
21467 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21468 *) ac_try_echo=$ac_try;;
21469esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021470eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021471 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021472 ac_status=$?
21473 grep -v '^ *+' conftest.er1 >conftest.err
21474 rm -f conftest.er1
21475 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021477 (exit $ac_status); } && {
21478 test -z "$ac_c_werror_flag" ||
21479 test ! -s conftest.err
21480 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021481 ac_cv_member_struct_stat_st_flags=yes
21482else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021483 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021484sed 's/^/| /' conftest.$ac_ext >&5
21485
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021486 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021487/* confdefs.h. */
21488_ACEOF
21489cat confdefs.h >>conftest.$ac_ext
21490cat >>conftest.$ac_ext <<_ACEOF
21491/* end confdefs.h. */
21492$ac_includes_default
21493int
21494main ()
21495{
21496static struct stat ac_aggr;
21497if (sizeof ac_aggr.st_flags)
21498return 0;
21499 ;
21500 return 0;
21501}
21502_ACEOF
21503rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021504if { (ac_try="$ac_compile"
21505case "(($ac_try" in
21506 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21507 *) ac_try_echo=$ac_try;;
21508esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021509eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021510 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021511 ac_status=$?
21512 grep -v '^ *+' conftest.er1 >conftest.err
21513 rm -f conftest.er1
21514 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021515 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021516 (exit $ac_status); } && {
21517 test -z "$ac_c_werror_flag" ||
21518 test ! -s conftest.err
21519 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021520 ac_cv_member_struct_stat_st_flags=yes
21521else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021522 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021523sed 's/^/| /' conftest.$ac_ext >&5
21524
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021525 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021526fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021527
21528rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021529fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021530
21531rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021532fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021533{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
21534echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
21535if test $ac_cv_member_struct_stat_st_flags = yes; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021536
21537cat >>confdefs.h <<_ACEOF
21538#define HAVE_STRUCT_STAT_ST_FLAGS 1
21539_ACEOF
21540
21541
21542fi
21543
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021544{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
21545echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021546if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021547 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021548else
21549 cat >conftest.$ac_ext <<_ACEOF
21550/* confdefs.h. */
21551_ACEOF
21552cat confdefs.h >>conftest.$ac_ext
21553cat >>conftest.$ac_ext <<_ACEOF
21554/* end confdefs.h. */
21555$ac_includes_default
21556int
21557main ()
21558{
21559static struct stat ac_aggr;
21560if (ac_aggr.st_gen)
21561return 0;
21562 ;
21563 return 0;
21564}
21565_ACEOF
21566rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021567if { (ac_try="$ac_compile"
21568case "(($ac_try" in
21569 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21570 *) ac_try_echo=$ac_try;;
21571esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021572eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021573 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021574 ac_status=$?
21575 grep -v '^ *+' conftest.er1 >conftest.err
21576 rm -f conftest.er1
21577 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021579 (exit $ac_status); } && {
21580 test -z "$ac_c_werror_flag" ||
21581 test ! -s conftest.err
21582 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021583 ac_cv_member_struct_stat_st_gen=yes
21584else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021585 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021586sed 's/^/| /' conftest.$ac_ext >&5
21587
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021588 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021589/* confdefs.h. */
21590_ACEOF
21591cat confdefs.h >>conftest.$ac_ext
21592cat >>conftest.$ac_ext <<_ACEOF
21593/* end confdefs.h. */
21594$ac_includes_default
21595int
21596main ()
21597{
21598static struct stat ac_aggr;
21599if (sizeof ac_aggr.st_gen)
21600return 0;
21601 ;
21602 return 0;
21603}
21604_ACEOF
21605rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021606if { (ac_try="$ac_compile"
21607case "(($ac_try" in
21608 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21609 *) ac_try_echo=$ac_try;;
21610esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021611eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021612 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021613 ac_status=$?
21614 grep -v '^ *+' conftest.er1 >conftest.err
21615 rm -f conftest.er1
21616 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021618 (exit $ac_status); } && {
21619 test -z "$ac_c_werror_flag" ||
21620 test ! -s conftest.err
21621 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021622 ac_cv_member_struct_stat_st_gen=yes
21623else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021624 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021625sed 's/^/| /' conftest.$ac_ext >&5
21626
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021627 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021628fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021629
21630rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021631fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021632
21633rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021634fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021635{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
21636echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
21637if test $ac_cv_member_struct_stat_st_gen = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021638
21639cat >>confdefs.h <<_ACEOF
21640#define HAVE_STRUCT_STAT_ST_GEN 1
21641_ACEOF
21642
21643
21644fi
21645
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021646{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
21647echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021648if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021649 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021650else
21651 cat >conftest.$ac_ext <<_ACEOF
21652/* confdefs.h. */
21653_ACEOF
21654cat confdefs.h >>conftest.$ac_ext
21655cat >>conftest.$ac_ext <<_ACEOF
21656/* end confdefs.h. */
21657$ac_includes_default
21658int
21659main ()
21660{
21661static struct stat ac_aggr;
21662if (ac_aggr.st_birthtime)
21663return 0;
21664 ;
21665 return 0;
21666}
21667_ACEOF
21668rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021669if { (ac_try="$ac_compile"
21670case "(($ac_try" in
21671 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21672 *) ac_try_echo=$ac_try;;
21673esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021674eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021675 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021676 ac_status=$?
21677 grep -v '^ *+' conftest.er1 >conftest.err
21678 rm -f conftest.er1
21679 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021681 (exit $ac_status); } && {
21682 test -z "$ac_c_werror_flag" ||
21683 test ! -s conftest.err
21684 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021685 ac_cv_member_struct_stat_st_birthtime=yes
21686else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021687 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021688sed 's/^/| /' conftest.$ac_ext >&5
21689
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021690 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021691/* confdefs.h. */
21692_ACEOF
21693cat confdefs.h >>conftest.$ac_ext
21694cat >>conftest.$ac_ext <<_ACEOF
21695/* end confdefs.h. */
21696$ac_includes_default
21697int
21698main ()
21699{
21700static struct stat ac_aggr;
21701if (sizeof ac_aggr.st_birthtime)
21702return 0;
21703 ;
21704 return 0;
21705}
21706_ACEOF
21707rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021708if { (ac_try="$ac_compile"
21709case "(($ac_try" in
21710 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21711 *) ac_try_echo=$ac_try;;
21712esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021713eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021714 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021715 ac_status=$?
21716 grep -v '^ *+' conftest.er1 >conftest.err
21717 rm -f conftest.er1
21718 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021720 (exit $ac_status); } && {
21721 test -z "$ac_c_werror_flag" ||
21722 test ! -s conftest.err
21723 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021724 ac_cv_member_struct_stat_st_birthtime=yes
21725else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021726 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021727sed 's/^/| /' conftest.$ac_ext >&5
21728
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021729 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021730fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021731
21732rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021733fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021734
21735rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021736fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021737{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
21738echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
21739if test $ac_cv_member_struct_stat_st_birthtime = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021740
21741cat >>confdefs.h <<_ACEOF
21742#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
21743_ACEOF
21744
21745
21746fi
21747
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021748{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
21749echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021750if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021751 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021752else
Martin v. Löwis11437992002-04-12 09:54:03 +000021753 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021754/* confdefs.h. */
21755_ACEOF
21756cat confdefs.h >>conftest.$ac_ext
21757cat >>conftest.$ac_ext <<_ACEOF
21758/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021759$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021760int
21761main ()
21762{
21763static struct stat ac_aggr;
21764if (ac_aggr.st_blocks)
21765return 0;
21766 ;
21767 return 0;
21768}
21769_ACEOF
21770rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021771if { (ac_try="$ac_compile"
21772case "(($ac_try" in
21773 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21774 *) ac_try_echo=$ac_try;;
21775esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021776eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021777 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021778 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021779 grep -v '^ *+' conftest.er1 >conftest.err
21780 rm -f conftest.er1
21781 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021783 (exit $ac_status); } && {
21784 test -z "$ac_c_werror_flag" ||
21785 test ! -s conftest.err
21786 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021787 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021788else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021789 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021790sed 's/^/| /' conftest.$ac_ext >&5
21791
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021792 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021793/* confdefs.h. */
21794_ACEOF
21795cat confdefs.h >>conftest.$ac_ext
21796cat >>conftest.$ac_ext <<_ACEOF
21797/* end confdefs.h. */
21798$ac_includes_default
21799int
21800main ()
21801{
21802static struct stat ac_aggr;
21803if (sizeof ac_aggr.st_blocks)
21804return 0;
21805 ;
21806 return 0;
21807}
21808_ACEOF
21809rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021810if { (ac_try="$ac_compile"
21811case "(($ac_try" in
21812 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21813 *) ac_try_echo=$ac_try;;
21814esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021815eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021816 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +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 Oussoren74f29b42009-09-20 20:09:26 +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
21825 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021826 ac_cv_member_struct_stat_st_blocks=yes
21827else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021828 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021829sed 's/^/| /' conftest.$ac_ext >&5
21830
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021831 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021832fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021833
21834rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021835fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021836
21837rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021838fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021839{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
21840echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
21841if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000021842
Martin v. Löwis11437992002-04-12 09:54:03 +000021843cat >>confdefs.h <<_ACEOF
21844#define HAVE_STRUCT_STAT_ST_BLOCKS 1
21845_ACEOF
21846
21847
21848cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021849#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021850_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021851
21852else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021853 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000021854 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021855 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
21856 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000021857esac
21858
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021859fi
21860
Michael W. Hudson54241132001-12-07 15:38:26 +000021861
Martin v. Löwis11437992002-04-12 09:54:03 +000021862
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021863{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
21864echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021865if test "${ac_cv_header_time_altzone+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021866 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021867else
Martin v. Löwis11437992002-04-12 09:54:03 +000021868 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021869/* confdefs.h. */
21870_ACEOF
21871cat confdefs.h >>conftest.$ac_ext
21872cat >>conftest.$ac_ext <<_ACEOF
21873/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021874#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021875int
21876main ()
21877{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021878return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000021879 ;
21880 return 0;
21881}
21882_ACEOF
21883rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021884if { (ac_try="$ac_compile"
21885case "(($ac_try" in
21886 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21887 *) ac_try_echo=$ac_try;;
21888esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021889eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021890 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021891 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021892 grep -v '^ *+' conftest.er1 >conftest.err
21893 rm -f conftest.er1
21894 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021896 (exit $ac_status); } && {
21897 test -z "$ac_c_werror_flag" ||
21898 test ! -s conftest.err
21899 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021900 ac_cv_header_time_altzone=yes
21901else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021902 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021903sed 's/^/| /' conftest.$ac_ext >&5
21904
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021905 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000021906fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021907
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021908rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21909fi
21910
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021911{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
21912echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021913if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021914
21915cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021916#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021917_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021918
21919fi
21920
Guido van Rossumda88dad1995-01-26 00:46:29 +000021921was_it_defined=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021922{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
21923echo $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 +000021924cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021925/* confdefs.h. */
21926_ACEOF
21927cat confdefs.h >>conftest.$ac_ext
21928cat >>conftest.$ac_ext <<_ACEOF
21929/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021930
21931#include <sys/types.h>
21932#include <sys/select.h>
21933#include <sys/time.h>
21934
Martin v. Löwis11437992002-04-12 09:54:03 +000021935int
21936main ()
21937{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021938;
Martin v. Löwis11437992002-04-12 09:54:03 +000021939 ;
21940 return 0;
21941}
21942_ACEOF
21943rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021944if { (ac_try="$ac_compile"
21945case "(($ac_try" in
21946 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21947 *) ac_try_echo=$ac_try;;
21948esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021949eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021950 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021951 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021952 grep -v '^ *+' conftest.er1 >conftest.err
21953 rm -f conftest.er1
21954 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021956 (exit $ac_status); } && {
21957 test -z "$ac_c_werror_flag" ||
21958 test ! -s conftest.err
21959 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021960
21961
21962cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021963#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021964_ACEOF
21965
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021966 was_it_defined=yes
21967
Guido van Rossumf78abae1997-01-21 22:02:36 +000021968else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021969 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021970sed 's/^/| /' conftest.$ac_ext >&5
21971
Thomas Wouters477c8d52006-05-27 19:21:47 +000021972
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021973fi
21974
21975rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021976{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
21977echo "${ECHO_T}$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021978
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021979{ echo "$as_me:$LINENO: checking for addrinfo" >&5
21980echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021981if test "${ac_cv_struct_addrinfo+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021982 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021983else
Martin v. Löwis11437992002-04-12 09:54:03 +000021984 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021985/* confdefs.h. */
21986_ACEOF
21987cat confdefs.h >>conftest.$ac_ext
21988cat >>conftest.$ac_ext <<_ACEOF
21989/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021990
21991# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021992int
21993main ()
21994{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021995struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000021996 ;
21997 return 0;
21998}
21999_ACEOF
22000rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022001if { (ac_try="$ac_compile"
22002case "(($ac_try" in
22003 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22004 *) ac_try_echo=$ac_try;;
22005esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022006eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022007 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022008 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022009 grep -v '^ *+' conftest.er1 >conftest.err
22010 rm -f conftest.er1
22011 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022013 (exit $ac_status); } && {
22014 test -z "$ac_c_werror_flag" ||
22015 test ! -s conftest.err
22016 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022017 ac_cv_struct_addrinfo=yes
22018else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022019 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022020sed 's/^/| /' conftest.$ac_ext >&5
22021
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022022 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022023fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000022024
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022025rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22026fi
22027
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022028{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
22029echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022030if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022031
22032cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022033#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022034_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022035
22036fi
22037
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022038{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
22039echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022040if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022041 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022042else
Martin v. Löwis11437992002-04-12 09:54:03 +000022043 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022044/* confdefs.h. */
22045_ACEOF
22046cat confdefs.h >>conftest.$ac_ext
22047cat >>conftest.$ac_ext <<_ACEOF
22048/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022049
22050# include <sys/types.h>
22051# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022052int
22053main ()
22054{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022055struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000022056 ;
22057 return 0;
22058}
22059_ACEOF
22060rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022061if { (ac_try="$ac_compile"
22062case "(($ac_try" in
22063 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22064 *) ac_try_echo=$ac_try;;
22065esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022066eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022067 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022068 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022069 grep -v '^ *+' conftest.er1 >conftest.err
22070 rm -f conftest.er1
22071 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022073 (exit $ac_status); } && {
22074 test -z "$ac_c_werror_flag" ||
22075 test ! -s conftest.err
22076 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022077 ac_cv_struct_sockaddr_storage=yes
22078else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022079 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022080sed 's/^/| /' conftest.$ac_ext >&5
22081
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022082 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022083fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000022084
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22086fi
22087
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022088{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
22089echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022090if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022091
22092cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022093#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022094_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022095
22096fi
22097
Guido van Rossum627b2d71993-12-24 10:39:16 +000022098# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000022099
Michael W. Hudson54241132001-12-07 15:38:26 +000022100
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022101{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
22102echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022103if test "${ac_cv_c_char_unsigned+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022104 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000022105else
Martin v. Löwis11437992002-04-12 09:54:03 +000022106 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022107/* confdefs.h. */
22108_ACEOF
22109cat confdefs.h >>conftest.$ac_ext
22110cat >>conftest.$ac_ext <<_ACEOF
22111/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022112$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000022113int
22114main ()
22115{
22116static int test_array [1 - 2 * !(((char) -1) < 0)];
22117test_array [0] = 0
22118
22119 ;
22120 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000022121}
Martin v. Löwis11437992002-04-12 09:54:03 +000022122_ACEOF
22123rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022124if { (ac_try="$ac_compile"
22125case "(($ac_try" in
22126 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22127 *) ac_try_echo=$ac_try;;
22128esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022129eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022130 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022131 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022132 grep -v '^ *+' conftest.er1 >conftest.err
22133 rm -f conftest.er1
22134 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022136 (exit $ac_status); } && {
22137 test -z "$ac_c_werror_flag" ||
22138 test ! -s conftest.err
22139 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000022140 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000022141else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022142 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022143sed 's/^/| /' conftest.$ac_ext >&5
22144
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022145 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022146fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022147
22148rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000022149fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022150{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
22151echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022152if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022153 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022154#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022155_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022156
22157fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000022158
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022159{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
22160echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022161if test "${ac_cv_c_const+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022162 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000022163else
22164 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022165/* confdefs.h. */
22166_ACEOF
22167cat confdefs.h >>conftest.$ac_ext
22168cat >>conftest.$ac_ext <<_ACEOF
22169/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022170
Martin v. Löwis11437992002-04-12 09:54:03 +000022171int
22172main ()
22173{
22174/* FIXME: Include the comments suggested by Paul. */
22175#ifndef __cplusplus
22176 /* Ultrix mips cc rejects this. */
22177 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022178 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000022179 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022180 char const *const *pcpcc;
22181 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000022182 /* NEC SVR4.0.2 mips cc rejects this. */
22183 struct point {int x, y;};
22184 static struct point const zero = {0,0};
22185 /* AIX XL C 1.02.0.0 rejects this.
22186 It does not let you subtract one const X* pointer from another in
22187 an arm of an if-expression whose if-part is not a constant
22188 expression */
22189 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022190 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000022191 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022192 ++pcpcc;
22193 ppc = (char**) pcpcc;
22194 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000022195 { /* SCO 3.2v4 cc rejects this. */
22196 char *t;
22197 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022198
Martin v. Löwis11437992002-04-12 09:54:03 +000022199 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022200 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022201 }
22202 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
22203 int x[] = {25, 17};
22204 const int *foo = &x[0];
22205 ++foo;
22206 }
22207 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
22208 typedef const int *iptr;
22209 iptr p = 0;
22210 ++p;
22211 }
22212 { /* AIX XL C 1.02.0.0 rejects this saying
22213 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
22214 struct s { int j; const int *ap[3]; };
22215 struct s *b; b->j = 5;
22216 }
22217 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
22218 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022219 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022220 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022221 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000022222#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000022223
Martin v. Löwis11437992002-04-12 09:54:03 +000022224 ;
22225 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000022226}
Martin v. Löwis11437992002-04-12 09:54:03 +000022227_ACEOF
22228rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022229if { (ac_try="$ac_compile"
22230case "(($ac_try" in
22231 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22232 *) ac_try_echo=$ac_try;;
22233esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022234eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022235 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022236 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022237 grep -v '^ *+' conftest.er1 >conftest.err
22238 rm -f conftest.er1
22239 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022241 (exit $ac_status); } && {
22242 test -z "$ac_c_werror_flag" ||
22243 test ! -s conftest.err
22244 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022245 ac_cv_c_const=yes
22246else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022247 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022248sed 's/^/| /' conftest.$ac_ext >&5
22249
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022250 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022251fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022252
22253rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022254fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022255{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
22256echo "${ECHO_T}$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022257if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022258
22259cat >>confdefs.h <<\_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022260#define const
Martin v. Löwis11437992002-04-12 09:54:03 +000022261_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022262
22263fi
22264
Michael W. Hudson54241132001-12-07 15:38:26 +000022265
Guido van Rossumda88dad1995-01-26 00:46:29 +000022266works=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022267{ echo "$as_me:$LINENO: checking for working volatile" >&5
22268echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022269cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022270/* confdefs.h. */
22271_ACEOF
22272cat confdefs.h >>conftest.$ac_ext
22273cat >>conftest.$ac_ext <<_ACEOF
22274/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000022275
Martin v. Löwis11437992002-04-12 09:54:03 +000022276int
22277main ()
22278{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022279volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022280 ;
22281 return 0;
22282}
22283_ACEOF
22284rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022285if { (ac_try="$ac_compile"
22286case "(($ac_try" in
22287 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22288 *) ac_try_echo=$ac_try;;
22289esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022290eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022291 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022292 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022293 grep -v '^ *+' conftest.er1 >conftest.err
22294 rm -f conftest.er1
22295 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022297 (exit $ac_status); } && {
22298 test -z "$ac_c_werror_flag" ||
22299 test ! -s conftest.err
22300 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000022301 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000022302else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022303 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022304sed 's/^/| /' conftest.$ac_ext >&5
22305
Martin v. Löwis11437992002-04-12 09:54:03 +000022306
22307cat >>confdefs.h <<\_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022308#define volatile
Martin v. Löwis11437992002-04-12 09:54:03 +000022309_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000022310
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022311
Guido van Rossum627b2d71993-12-24 10:39:16 +000022312fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022313
22314rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022315{ echo "$as_me:$LINENO: result: $works" >&5
22316echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022317
Guido van Rossumda88dad1995-01-26 00:46:29 +000022318works=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022319{ echo "$as_me:$LINENO: checking for working signed char" >&5
22320echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022321cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022322/* confdefs.h. */
22323_ACEOF
22324cat confdefs.h >>conftest.$ac_ext
22325cat >>conftest.$ac_ext <<_ACEOF
22326/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000022327
Martin v. Löwis11437992002-04-12 09:54:03 +000022328int
22329main ()
22330{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022331signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000022332 ;
22333 return 0;
22334}
22335_ACEOF
22336rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022337if { (ac_try="$ac_compile"
22338case "(($ac_try" in
22339 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22340 *) ac_try_echo=$ac_try;;
22341esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022342eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022343 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022344 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022345 grep -v '^ *+' conftest.er1 >conftest.err
22346 rm -f conftest.er1
22347 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022349 (exit $ac_status); } && {
22350 test -z "$ac_c_werror_flag" ||
22351 test ! -s conftest.err
22352 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000022353 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000022354else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022355 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022356sed 's/^/| /' conftest.$ac_ext >&5
22357
Martin v. Löwis11437992002-04-12 09:54:03 +000022358
22359cat >>confdefs.h <<\_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022360#define signed
Martin v. Löwis11437992002-04-12 09:54:03 +000022361_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000022362
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022363
Guido van Rossum7f43da71994-08-01 12:15:30 +000022364fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022365
22366rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022367{ echo "$as_me:$LINENO: result: $works" >&5
22368echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022369
Guido van Rossumda88dad1995-01-26 00:46:29 +000022370have_prototypes=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022371{ echo "$as_me:$LINENO: checking for prototypes" >&5
22372echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022373cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022374/* confdefs.h. */
22375_ACEOF
22376cat confdefs.h >>conftest.$ac_ext
22377cat >>conftest.$ac_ext <<_ACEOF
22378/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022379int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022380int
22381main ()
22382{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022383return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000022384 ;
22385 return 0;
22386}
22387_ACEOF
22388rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022389if { (ac_try="$ac_compile"
22390case "(($ac_try" in
22391 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22392 *) ac_try_echo=$ac_try;;
22393esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022394eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022395 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022396 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022397 grep -v '^ *+' conftest.er1 >conftest.err
22398 rm -f conftest.er1
22399 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022401 (exit $ac_status); } && {
22402 test -z "$ac_c_werror_flag" ||
22403 test ! -s conftest.err
22404 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022405
22406
22407cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022408#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022409_ACEOF
22410
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022411 have_prototypes=yes
22412
Guido van Rossumf78abae1997-01-21 22:02:36 +000022413else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022414 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022415sed 's/^/| /' conftest.$ac_ext >&5
22416
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022417
Guido van Rossum7f43da71994-08-01 12:15:30 +000022418fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022419
22420rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022421{ echo "$as_me:$LINENO: result: $have_prototypes" >&5
22422echo "${ECHO_T}$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022423
Guido van Rossumda88dad1995-01-26 00:46:29 +000022424works=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022425{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
22426echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022427cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022428/* confdefs.h. */
22429_ACEOF
22430cat confdefs.h >>conftest.$ac_ext
22431cat >>conftest.$ac_ext <<_ACEOF
22432/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022433
22434#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000022435int foo(int x, ...) {
22436 va_list va;
22437 va_start(va, x);
22438 va_arg(va, int);
22439 va_arg(va, char *);
22440 va_arg(va, double);
22441 return 0;
22442}
Guido van Rossum7f43da71994-08-01 12:15:30 +000022443
Martin v. Löwis11437992002-04-12 09:54:03 +000022444int
22445main ()
22446{
Guido van Rossum90eea071996-08-30 20:58:57 +000022447return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000022448 ;
22449 return 0;
22450}
22451_ACEOF
22452rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022453if { (ac_try="$ac_compile"
22454case "(($ac_try" in
22455 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22456 *) ac_try_echo=$ac_try;;
22457esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022458eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022459 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022460 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022461 grep -v '^ *+' conftest.er1 >conftest.err
22462 rm -f conftest.er1
22463 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022465 (exit $ac_status); } && {
22466 test -z "$ac_c_werror_flag" ||
22467 test ! -s conftest.err
22468 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022469
22470
22471cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022472#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022473_ACEOF
22474
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022475 works=yes
22476
Guido van Rossumf78abae1997-01-21 22:02:36 +000022477else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022478 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022479sed 's/^/| /' conftest.$ac_ext >&5
22480
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022481
Guido van Rossum627b2d71993-12-24 10:39:16 +000022482fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022483
22484rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022485{ echo "$as_me:$LINENO: result: $works" >&5
22486echo "${ECHO_T}$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022487
Martin v. Löwisd6320502004-08-12 13:45:08 +000022488# check for socketpair
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022489{ echo "$as_me:$LINENO: checking for socketpair" >&5
22490echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022491cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000022492/* confdefs.h. */
22493_ACEOF
22494cat confdefs.h >>conftest.$ac_ext
22495cat >>conftest.$ac_ext <<_ACEOF
22496/* end confdefs.h. */
22497
22498#include <sys/types.h>
22499#include <sys/socket.h>
22500
22501int
22502main ()
22503{
22504void *x=socketpair
22505 ;
22506 return 0;
22507}
22508_ACEOF
22509rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022510if { (ac_try="$ac_compile"
22511case "(($ac_try" in
22512 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22513 *) ac_try_echo=$ac_try;;
22514esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022515eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022516 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000022517 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022518 grep -v '^ *+' conftest.er1 >conftest.err
22519 rm -f conftest.er1
22520 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022522 (exit $ac_status); } && {
22523 test -z "$ac_c_werror_flag" ||
22524 test ! -s conftest.err
22525 } && test -s conftest.$ac_objext; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000022526
22527cat >>confdefs.h <<\_ACEOF
22528#define HAVE_SOCKETPAIR 1
22529_ACEOF
22530
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022531 { echo "$as_me:$LINENO: result: yes" >&5
22532echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022533else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022534 echo "$as_me: failed program was:" >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000022535sed 's/^/| /' conftest.$ac_ext >&5
22536
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022537 { echo "$as_me:$LINENO: result: no" >&5
22538echo "${ECHO_T}no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022539
22540fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022541
22542rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000022543
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022544# check if sockaddr has sa_len member
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022545{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
22546echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022547cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022548/* confdefs.h. */
22549_ACEOF
22550cat confdefs.h >>conftest.$ac_ext
22551cat >>conftest.$ac_ext <<_ACEOF
22552/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022553#include <sys/types.h>
22554#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022555int
22556main ()
22557{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022558struct sockaddr x;
22559x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022560 ;
22561 return 0;
22562}
22563_ACEOF
22564rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022565if { (ac_try="$ac_compile"
22566case "(($ac_try" in
22567 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22568 *) ac_try_echo=$ac_try;;
22569esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022570eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022571 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022572 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022573 grep -v '^ *+' conftest.er1 >conftest.err
22574 rm -f conftest.er1
22575 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022577 (exit $ac_status); } && {
22578 test -z "$ac_c_werror_flag" ||
22579 test ! -s conftest.err
22580 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022581 { echo "$as_me:$LINENO: result: yes" >&5
22582echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022583
22584cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022585#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022586_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022587
22588else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022589 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022590sed 's/^/| /' conftest.$ac_ext >&5
22591
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022592 { echo "$as_me:$LINENO: result: no" >&5
22593echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022594fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022595
22596rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022597
Guido van Rossumda88dad1995-01-26 00:46:29 +000022598va_list_is_array=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022599{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
22600echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022601cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022602/* confdefs.h. */
22603_ACEOF
22604cat confdefs.h >>conftest.$ac_ext
22605cat >>conftest.$ac_ext <<_ACEOF
22606/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022607
22608#ifdef HAVE_STDARG_PROTOTYPES
22609#include <stdarg.h>
22610#else
22611#include <varargs.h>
22612#endif
22613
Martin v. Löwis11437992002-04-12 09:54:03 +000022614int
22615main ()
22616{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022617va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000022618 ;
22619 return 0;
22620}
22621_ACEOF
22622rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022623if { (ac_try="$ac_compile"
22624case "(($ac_try" in
22625 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22626 *) ac_try_echo=$ac_try;;
22627esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022628eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022629 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022630 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022631 grep -v '^ *+' conftest.er1 >conftest.err
22632 rm -f conftest.er1
22633 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022635 (exit $ac_status); } && {
22636 test -z "$ac_c_werror_flag" ||
22637 test ! -s conftest.err
22638 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022639 :
22640else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022641 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022642sed 's/^/| /' conftest.$ac_ext >&5
22643
Martin v. Löwis11437992002-04-12 09:54:03 +000022644
22645
22646cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022647#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022648_ACEOF
22649
Guido van Rossumda88dad1995-01-26 00:46:29 +000022650 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022651
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022652fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022653
22654rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022655{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
22656echo "${ECHO_T}$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022657
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022658# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000022659
22660
22661
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022662{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
22663echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022664if test "${ac_cv_func_gethostbyname_r+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022665 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022666else
Martin v. Löwis11437992002-04-12 09:54:03 +000022667 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022668/* confdefs.h. */
22669_ACEOF
22670cat confdefs.h >>conftest.$ac_ext
22671cat >>conftest.$ac_ext <<_ACEOF
22672/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022673/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
22674 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22675#define gethostbyname_r innocuous_gethostbyname_r
22676
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022677/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022678 which can conflict with char gethostbyname_r (); below.
22679 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022680 <limits.h> exists even on freestanding compilers. */
22681
22682#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022683# include <limits.h>
22684#else
22685# include <assert.h>
22686#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022687
22688#undef gethostbyname_r
22689
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022690/* Override any GCC internal prototype to avoid an error.
22691 Use char because int might match the return type of a GCC
22692 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022693#ifdef __cplusplus
22694extern "C"
22695#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022696char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022697/* The GNU C library defines this for functions which it implements
22698 to always fail with ENOSYS. Some functions are actually named
22699 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022700#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022701choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022702#endif
22703
Skip Montanaro6dead952003-09-25 14:50:04 +000022704int
22705main ()
22706{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022707return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022708 ;
22709 return 0;
22710}
22711_ACEOF
22712rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022713if { (ac_try="$ac_link"
22714case "(($ac_try" in
22715 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22716 *) ac_try_echo=$ac_try;;
22717esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022718eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022719 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022720 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022721 grep -v '^ *+' conftest.er1 >conftest.err
22722 rm -f conftest.er1
22723 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022725 (exit $ac_status); } && {
22726 test -z "$ac_c_werror_flag" ||
22727 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022728 } && test -s conftest$ac_exeext &&
22729 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022730 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022731else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022732 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022733sed 's/^/| /' conftest.$ac_ext >&5
22734
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022735 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022736fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022737
22738rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022739 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022740fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022741{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
22742echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
22743if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022744
Martin v. Löwis11437992002-04-12 09:54:03 +000022745 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022746#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022747_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022748
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022749 { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
22750echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022751 OLD_CFLAGS=$CFLAGS
22752 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000022753 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022754/* confdefs.h. */
22755_ACEOF
22756cat confdefs.h >>conftest.$ac_ext
22757cat >>conftest.$ac_ext <<_ACEOF
22758/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022759
22760# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022761
Martin v. Löwis11437992002-04-12 09:54:03 +000022762int
22763main ()
22764{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022765
22766 char *name;
22767 struct hostent *he, *res;
22768 char buffer[2048];
22769 int buflen = 2048;
22770 int h_errnop;
22771
22772 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000022773
22774 ;
22775 return 0;
22776}
22777_ACEOF
22778rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022779if { (ac_try="$ac_compile"
22780case "(($ac_try" in
22781 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22782 *) ac_try_echo=$ac_try;;
22783esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022784eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022785 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022786 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022787 grep -v '^ *+' conftest.er1 >conftest.err
22788 rm -f conftest.er1
22789 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022791 (exit $ac_status); } && {
22792 test -z "$ac_c_werror_flag" ||
22793 test ! -s conftest.err
22794 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022795
22796 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022797#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022798_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022799
Martin v. Löwis11437992002-04-12 09:54:03 +000022800
22801cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022802#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022803_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022804
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022805 { echo "$as_me:$LINENO: result: yes" >&5
22806echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022807
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022808else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022809 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022810sed 's/^/| /' conftest.$ac_ext >&5
22811
Martin v. Löwis11437992002-04-12 09:54:03 +000022812
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022813 { echo "$as_me:$LINENO: result: no" >&5
22814echo "${ECHO_T}no" >&6; }
22815 { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
22816echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022817 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022818/* confdefs.h. */
22819_ACEOF
22820cat confdefs.h >>conftest.$ac_ext
22821cat >>conftest.$ac_ext <<_ACEOF
22822/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022823
22824# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022825
Martin v. Löwis11437992002-04-12 09:54:03 +000022826int
22827main ()
22828{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022829
22830 char *name;
22831 struct hostent *he;
22832 char buffer[2048];
22833 int buflen = 2048;
22834 int h_errnop;
22835
22836 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000022837
22838 ;
22839 return 0;
22840}
22841_ACEOF
22842rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022843if { (ac_try="$ac_compile"
22844case "(($ac_try" in
22845 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22846 *) ac_try_echo=$ac_try;;
22847esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022848eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022849 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022850 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022851 grep -v '^ *+' conftest.er1 >conftest.err
22852 rm -f conftest.er1
22853 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022855 (exit $ac_status); } && {
22856 test -z "$ac_c_werror_flag" ||
22857 test ! -s conftest.err
22858 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022859
22860 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022861#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022862_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022863
Martin v. Löwis11437992002-04-12 09:54:03 +000022864
22865cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022866#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022867_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022868
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022869 { echo "$as_me:$LINENO: result: yes" >&5
22870echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022871
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022872else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022873 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022874sed 's/^/| /' conftest.$ac_ext >&5
22875
Martin v. Löwis11437992002-04-12 09:54:03 +000022876
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022877 { echo "$as_me:$LINENO: result: no" >&5
22878echo "${ECHO_T}no" >&6; }
22879 { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
22880echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022881 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022882/* confdefs.h. */
22883_ACEOF
22884cat confdefs.h >>conftest.$ac_ext
22885cat >>conftest.$ac_ext <<_ACEOF
22886/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022887
22888# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022889
Martin v. Löwis11437992002-04-12 09:54:03 +000022890int
22891main ()
22892{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022893
22894 char *name;
22895 struct hostent *he;
22896 struct hostent_data data;
22897
22898 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000022899
22900 ;
22901 return 0;
22902}
22903_ACEOF
22904rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022905if { (ac_try="$ac_compile"
22906case "(($ac_try" in
22907 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22908 *) ac_try_echo=$ac_try;;
22909esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022910eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022911 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022912 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022913 grep -v '^ *+' conftest.er1 >conftest.err
22914 rm -f conftest.er1
22915 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022917 (exit $ac_status); } && {
22918 test -z "$ac_c_werror_flag" ||
22919 test ! -s conftest.err
22920 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022921
22922 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022923#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022924_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022925
Martin v. Löwis11437992002-04-12 09:54:03 +000022926
22927cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022928#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022929_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022930
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022931 { echo "$as_me:$LINENO: result: yes" >&5
22932echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022933
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022934else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022935 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022936sed 's/^/| /' conftest.$ac_ext >&5
22937
Martin v. Löwis11437992002-04-12 09:54:03 +000022938
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022939 { echo "$as_me:$LINENO: result: no" >&5
22940echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022941
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022942fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022943
22944rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022945
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022946fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022947
22948rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022949
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022950fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022951
22952rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022953 CFLAGS=$OLD_CFLAGS
22954
22955else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022956
Martin v. Löwis11437992002-04-12 09:54:03 +000022957
22958for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000022959do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022960as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
22961{ echo "$as_me:$LINENO: checking for $ac_func" >&5
22962echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022963if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022964 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022965else
Martin v. Löwis11437992002-04-12 09:54:03 +000022966 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022967/* confdefs.h. */
22968_ACEOF
22969cat confdefs.h >>conftest.$ac_ext
22970cat >>conftest.$ac_ext <<_ACEOF
22971/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022972/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22973 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22974#define $ac_func innocuous_$ac_func
22975
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022976/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022977 which can conflict with char $ac_func (); below.
22978 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022979 <limits.h> exists even on freestanding compilers. */
22980
22981#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022982# include <limits.h>
22983#else
22984# include <assert.h>
22985#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022986
22987#undef $ac_func
22988
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022989/* Override any GCC internal prototype to avoid an error.
22990 Use char because int might match the return type of a GCC
22991 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022992#ifdef __cplusplus
22993extern "C"
22994#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022995char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022996/* The GNU C library defines this for functions which it implements
22997 to always fail with ENOSYS. Some functions are actually named
22998 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022999#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023000choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023001#endif
23002
Skip Montanaro6dead952003-09-25 14:50:04 +000023003int
23004main ()
23005{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023006return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023007 ;
23008 return 0;
23009}
23010_ACEOF
23011rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023012if { (ac_try="$ac_link"
23013case "(($ac_try" in
23014 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23015 *) ac_try_echo=$ac_try;;
23016esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023017eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023018 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023019 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023020 grep -v '^ *+' conftest.er1 >conftest.err
23021 rm -f conftest.er1
23022 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023024 (exit $ac_status); } && {
23025 test -z "$ac_c_werror_flag" ||
23026 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023027 } && test -s conftest$ac_exeext &&
23028 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023029 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000023030else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023031 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023032sed 's/^/| /' conftest.$ac_ext >&5
23033
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023034 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000023035fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023036
23037rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023038 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000023039fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023040ac_res=`eval echo '${'$as_ac_var'}'`
23041 { echo "$as_me:$LINENO: result: $ac_res" >&5
23042echo "${ECHO_T}$ac_res" >&6; }
23043if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023044 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023045#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023046_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023047
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023048fi
Thomas Wouters3a584202000-08-05 23:28:51 +000023049done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023050
Michael W. Hudson54241132001-12-07 15:38:26 +000023051
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023052fi
23053
Michael W. Hudson54241132001-12-07 15:38:26 +000023054
23055
23056
23057
23058
23059
Guido van Rossum627b2d71993-12-24 10:39:16 +000023060# checks for system services
23061# (none yet)
23062
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023063# Linux requires this for correct f.p. operations
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023064{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
23065echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023066if test "${ac_cv_func___fpu_control+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023067 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023068else
Martin v. Löwis11437992002-04-12 09:54:03 +000023069 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023070/* confdefs.h. */
23071_ACEOF
23072cat confdefs.h >>conftest.$ac_ext
23073cat >>conftest.$ac_ext <<_ACEOF
23074/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023075/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
23076 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23077#define __fpu_control innocuous___fpu_control
23078
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023079/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000023080 which can conflict with char __fpu_control (); below.
23081 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023082 <limits.h> exists even on freestanding compilers. */
23083
23084#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000023085# include <limits.h>
23086#else
23087# include <assert.h>
23088#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023089
23090#undef __fpu_control
23091
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023092/* Override any GCC internal prototype to avoid an error.
23093 Use char because int might match the return type of a GCC
23094 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023095#ifdef __cplusplus
23096extern "C"
23097#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023098char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023099/* The GNU C library defines this for functions which it implements
23100 to always fail with ENOSYS. Some functions are actually named
23101 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023102#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023103choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023104#endif
23105
Skip Montanaro6dead952003-09-25 14:50:04 +000023106int
23107main ()
23108{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023109return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023110 ;
23111 return 0;
23112}
23113_ACEOF
23114rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023115if { (ac_try="$ac_link"
23116case "(($ac_try" in
23117 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23118 *) ac_try_echo=$ac_try;;
23119esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023120eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023121 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023122 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023123 grep -v '^ *+' conftest.er1 >conftest.err
23124 rm -f conftest.er1
23125 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023127 (exit $ac_status); } && {
23128 test -z "$ac_c_werror_flag" ||
23129 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023130 } && test -s conftest$ac_exeext &&
23131 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023132 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023133else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023134 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023135sed 's/^/| /' conftest.$ac_ext >&5
23136
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023137 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023138fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023139
23140rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023141 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023142fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023143{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
23144echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
23145if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023146 :
23147else
Martin v. Löwis11437992002-04-12 09:54:03 +000023148
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023149{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
23150echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023151if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023152 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023153else
Martin v. Löwis11437992002-04-12 09:54:03 +000023154 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023155LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000023156cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023157/* confdefs.h. */
23158_ACEOF
23159cat confdefs.h >>conftest.$ac_ext
23160cat >>conftest.$ac_ext <<_ACEOF
23161/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023162
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023163/* Override any GCC internal prototype to avoid an error.
23164 Use char because int might match the return type of a GCC
23165 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023166#ifdef __cplusplus
23167extern "C"
23168#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023169char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023170int
23171main ()
23172{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023173return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023174 ;
23175 return 0;
23176}
23177_ACEOF
23178rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023179if { (ac_try="$ac_link"
23180case "(($ac_try" in
23181 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23182 *) ac_try_echo=$ac_try;;
23183esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023184eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023185 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023186 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023187 grep -v '^ *+' conftest.er1 >conftest.err
23188 rm -f conftest.er1
23189 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023191 (exit $ac_status); } && {
23192 test -z "$ac_c_werror_flag" ||
23193 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023194 } && test -s conftest$ac_exeext &&
23195 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023196 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000023197else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023198 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023199sed 's/^/| /' conftest.$ac_ext >&5
23200
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023201 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000023202fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023203
23204rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023205 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023206LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023207fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023208{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
23209echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
23210if test $ac_cv_lib_ieee___fpu_control = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023211 cat >>confdefs.h <<_ACEOF
23212#define HAVE_LIBIEEE 1
23213_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023214
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023215 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023216
Guido van Rossum627b2d71993-12-24 10:39:16 +000023217fi
23218
Michael W. Hudson54241132001-12-07 15:38:26 +000023219
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023220fi
23221
Michael W. Hudson54241132001-12-07 15:38:26 +000023222
Guido van Rossum7f253911997-05-09 02:42:48 +000023223# Check for --with-fpectl
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023224{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
23225echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023226
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023227# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000023228if test "${with_fpectl+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023229 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000023230if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000023231then
23232
23233cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000023234#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023235_ACEOF
23236
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023237 { echo "$as_me:$LINENO: result: yes" >&5
23238echo "${ECHO_T}yes" >&6; }
23239else { echo "$as_me:$LINENO: result: no" >&5
23240echo "${ECHO_T}no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023241fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000023242else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023243 { echo "$as_me:$LINENO: result: no" >&5
23244echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023245fi
23246
Guido van Rossum7f253911997-05-09 02:42:48 +000023247
Guido van Rossum7f43da71994-08-01 12:15:30 +000023248# check for --with-libm=...
23249
Guido van Rossum563e7081996-09-10 18:20:48 +000023250case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000023251Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000023252*) LIBM=-lm
23253esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023254{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
23255echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023256
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023257# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000023258if test "${with_libm+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023259 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000023260if test "$withval" = no
23261then LIBM=
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023262 { echo "$as_me:$LINENO: result: force LIBM empty" >&5
23263echo "${ECHO_T}force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023264elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000023265then LIBM=$withval
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023266 { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
23267echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
23268else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
23269echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023270 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000023271fi
Guido van Rossum7f253911997-05-09 02:42:48 +000023272else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023273 { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
23274echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023275fi
23276
Guido van Rossum7f43da71994-08-01 12:15:30 +000023277
23278# check for --with-libc=...
23279
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023280{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
23281echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023282
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023283# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000023284if test "${with_libc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023285 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000023286if test "$withval" = no
23287then LIBC=
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023288 { echo "$as_me:$LINENO: result: force LIBC empty" >&5
23289echo "${ECHO_T}force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023290elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000023291then LIBC=$withval
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023292 { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
23293echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
23294else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
23295echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023296 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000023297fi
Guido van Rossum7f253911997-05-09 02:42:48 +000023298else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023299 { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
23300echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023301fi
23302
Guido van Rossum7f43da71994-08-01 12:15:30 +000023303
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023304# **************************************************
23305# * Check for various properties of floating point *
23306# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023307
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023308{ echo "$as_me:$LINENO: checking whether C doubles are little-endian IEEE 754 binary64" >&5
23309echo $ECHO_N "checking whether C doubles are little-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023310if test "${ac_cv_little_endian_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023311 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023312else
23313
23314if test "$cross_compiling" = yes; then
23315 ac_cv_little_endian_double=no
23316else
23317 cat >conftest.$ac_ext <<_ACEOF
23318/* confdefs.h. */
23319_ACEOF
23320cat confdefs.h >>conftest.$ac_ext
23321cat >>conftest.$ac_ext <<_ACEOF
23322/* end confdefs.h. */
23323
23324#include <string.h>
23325int main() {
23326 double x = 9006104071832581.0;
23327 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
23328 return 0;
23329 else
23330 return 1;
23331}
23332
23333_ACEOF
23334rm -f conftest$ac_exeext
23335if { (ac_try="$ac_link"
23336case "(($ac_try" in
23337 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23338 *) ac_try_echo=$ac_try;;
23339esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023340eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023341 (eval "$ac_link") 2>&5
23342 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023344 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23345 { (case "(($ac_try" in
23346 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23347 *) ac_try_echo=$ac_try;;
23348esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023349eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023350 (eval "$ac_try") 2>&5
23351 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023353 (exit $ac_status); }; }; then
23354 ac_cv_little_endian_double=yes
23355else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023356 echo "$as_me: program exited with status $ac_status" >&5
23357echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023358sed 's/^/| /' conftest.$ac_ext >&5
23359
23360( exit $ac_status )
23361ac_cv_little_endian_double=no
23362fi
23363rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23364fi
23365
23366
23367fi
23368
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023369{ echo "$as_me:$LINENO: result: $ac_cv_little_endian_double" >&5
23370echo "${ECHO_T}$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023371if test "$ac_cv_little_endian_double" = yes
23372then
23373
23374cat >>confdefs.h <<\_ACEOF
23375#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1
23376_ACEOF
23377
23378fi
23379
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023380{ echo "$as_me:$LINENO: checking whether C doubles are big-endian IEEE 754 binary64" >&5
23381echo $ECHO_N "checking whether C doubles are big-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023382if test "${ac_cv_big_endian_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023383 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023384else
23385
23386if test "$cross_compiling" = yes; then
23387 ac_cv_big_endian_double=no
23388else
23389 cat >conftest.$ac_ext <<_ACEOF
23390/* confdefs.h. */
23391_ACEOF
23392cat confdefs.h >>conftest.$ac_ext
23393cat >>conftest.$ac_ext <<_ACEOF
23394/* end confdefs.h. */
23395
23396#include <string.h>
23397int main() {
23398 double x = 9006104071832581.0;
23399 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
23400 return 0;
23401 else
23402 return 1;
23403}
23404
23405_ACEOF
23406rm -f conftest$ac_exeext
23407if { (ac_try="$ac_link"
23408case "(($ac_try" in
23409 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23410 *) ac_try_echo=$ac_try;;
23411esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023412eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023413 (eval "$ac_link") 2>&5
23414 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023416 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23417 { (case "(($ac_try" in
23418 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23419 *) ac_try_echo=$ac_try;;
23420esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023421eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023422 (eval "$ac_try") 2>&5
23423 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023425 (exit $ac_status); }; }; then
23426 ac_cv_big_endian_double=yes
23427else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023428 echo "$as_me: program exited with status $ac_status" >&5
23429echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023430sed 's/^/| /' conftest.$ac_ext >&5
23431
23432( exit $ac_status )
23433ac_cv_big_endian_double=no
23434fi
23435rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23436fi
23437
23438
23439fi
23440
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023441{ echo "$as_me:$LINENO: result: $ac_cv_big_endian_double" >&5
23442echo "${ECHO_T}$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023443if test "$ac_cv_big_endian_double" = yes
23444then
23445
23446cat >>confdefs.h <<\_ACEOF
23447#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1
23448_ACEOF
23449
23450fi
23451
23452# Some ARM platforms use a mixed-endian representation for doubles.
23453# While Python doesn't currently have full support for these platforms
23454# (see e.g., issue 1762561), we can at least make sure that float <-> string
23455# conversions work.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023456{ echo "$as_me:$LINENO: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
23457echo $ECHO_N "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023458if test "${ac_cv_mixed_endian_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023459 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023460else
23461
23462if test "$cross_compiling" = yes; then
23463 ac_cv_mixed_endian_double=no
23464else
23465 cat >conftest.$ac_ext <<_ACEOF
23466/* confdefs.h. */
23467_ACEOF
23468cat confdefs.h >>conftest.$ac_ext
23469cat >>conftest.$ac_ext <<_ACEOF
23470/* end confdefs.h. */
23471
23472#include <string.h>
23473int main() {
23474 double x = 9006104071832581.0;
23475 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
23476 return 0;
23477 else
23478 return 1;
23479}
23480
23481_ACEOF
23482rm -f conftest$ac_exeext
23483if { (ac_try="$ac_link"
23484case "(($ac_try" in
23485 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23486 *) ac_try_echo=$ac_try;;
23487esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023488eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023489 (eval "$ac_link") 2>&5
23490 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023492 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23493 { (case "(($ac_try" in
23494 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23495 *) ac_try_echo=$ac_try;;
23496esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023497eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023498 (eval "$ac_try") 2>&5
23499 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023501 (exit $ac_status); }; }; then
23502 ac_cv_mixed_endian_double=yes
23503else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023504 echo "$as_me: program exited with status $ac_status" >&5
23505echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023506sed 's/^/| /' conftest.$ac_ext >&5
23507
23508( exit $ac_status )
23509ac_cv_mixed_endian_double=no
23510fi
23511rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23512fi
23513
23514
23515fi
23516
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023517{ echo "$as_me:$LINENO: result: $ac_cv_mixed_endian_double" >&5
23518echo "${ECHO_T}$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023519if test "$ac_cv_mixed_endian_double" = yes
23520then
23521
23522cat >>confdefs.h <<\_ACEOF
23523#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1
23524_ACEOF
23525
23526fi
23527
Mark Dickinson7abf8d42009-04-18 20:17:52 +000023528# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000023529# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000023530# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000023531# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000023532# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000023533# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000023534
23535# This inline assembler syntax may also work for suncc and icc,
23536# so we try it on all platforms.
23537
23538{ echo "$as_me:$LINENO: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023539echo $ECHO_N "checking whether we can use gcc inline assembler to get and set x87 control word... $ECHO_C" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000023540cat >conftest.$ac_ext <<_ACEOF
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023541/* confdefs.h. */
23542_ACEOF
23543cat confdefs.h >>conftest.$ac_ext
23544cat >>conftest.$ac_ext <<_ACEOF
23545/* end confdefs.h. */
23546
23547int
23548main ()
23549{
23550
Mark Dickinsonf4243f62009-11-15 13:47:27 +000023551 unsigned short cw;
23552 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
23553 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023554
23555 ;
23556 return 0;
23557}
23558_ACEOF
23559rm -f conftest.$ac_objext
23560if { (ac_try="$ac_compile"
23561case "(($ac_try" in
23562 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23563 *) ac_try_echo=$ac_try;;
23564esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023565eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023566 (eval "$ac_compile") 2>conftest.er1
23567 ac_status=$?
23568 grep -v '^ *+' conftest.er1 >conftest.err
23569 rm -f conftest.er1
23570 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023572 (exit $ac_status); } && {
23573 test -z "$ac_c_werror_flag" ||
23574 test ! -s conftest.err
23575 } && test -s conftest.$ac_objext; then
23576 have_gcc_asm_for_x87=yes
23577else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023578 echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023579sed 's/^/| /' conftest.$ac_ext >&5
23580
23581 have_gcc_asm_for_x87=no
23582fi
23583
23584rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Mark Dickinsonf4243f62009-11-15 13:47:27 +000023585{ echo "$as_me:$LINENO: result: $have_gcc_asm_for_x87" >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023586echo "${ECHO_T}$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000023587if test "$have_gcc_asm_for_x87" = yes
23588then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023589
23590cat >>confdefs.h <<\_ACEOF
23591#define HAVE_GCC_ASM_FOR_X87 1
23592_ACEOF
23593
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023594fi
Martin v. Löwis11437992002-04-12 09:54:03 +000023595
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023596# Detect whether system arithmetic is subject to x87-style double
23597# rounding issues. The result of this test has little meaning on non
23598# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
23599# mode is round-to-nearest and double rounding issues are present, and
23600# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023601{ echo "$as_me:$LINENO: checking for x87-style double rounding" >&5
23602echo $ECHO_N "checking for x87-style double rounding... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023603# $BASECFLAGS may affect the result
23604ac_save_cc="$CC"
23605CC="$CC $BASECFLAGS"
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023606if test "$cross_compiling" = yes; then
23607 ac_cv_x87_double_rounding=no
23608else
23609 cat >conftest.$ac_ext <<_ACEOF
23610/* confdefs.h. */
23611_ACEOF
23612cat confdefs.h >>conftest.$ac_ext
23613cat >>conftest.$ac_ext <<_ACEOF
23614/* end confdefs.h. */
23615
23616#include <stdlib.h>
23617#include <math.h>
23618int main() {
23619 volatile double x, y, z;
23620 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
23621 x = 0.99999999999999989; /* 1-2**-53 */
23622 y = 1./x;
23623 if (y != 1.)
23624 exit(0);
23625 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
23626 x = 1e16;
23627 y = 2.99999;
23628 z = x + y;
23629 if (z != 1e16+4.)
23630 exit(0);
23631 /* both tests show evidence of double rounding */
23632 exit(1);
23633}
23634
23635_ACEOF
23636rm -f conftest$ac_exeext
23637if { (ac_try="$ac_link"
23638case "(($ac_try" in
23639 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23640 *) ac_try_echo=$ac_try;;
23641esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023642eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023643 (eval "$ac_link") 2>&5
23644 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023646 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23647 { (case "(($ac_try" in
23648 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23649 *) ac_try_echo=$ac_try;;
23650esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023651eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023652 (eval "$ac_try") 2>&5
23653 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023655 (exit $ac_status); }; }; then
23656 ac_cv_x87_double_rounding=no
23657else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023658 echo "$as_me: program exited with status $ac_status" >&5
23659echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023660sed 's/^/| /' conftest.$ac_ext >&5
23661
23662( exit $ac_status )
23663ac_cv_x87_double_rounding=yes
23664fi
23665rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23666fi
23667
23668
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023669CC="$ac_save_cc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023670{ echo "$as_me:$LINENO: result: $ac_cv_x87_double_rounding" >&5
23671echo "${ECHO_T}$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023672if test "$ac_cv_x87_double_rounding" = yes
23673then
23674
23675cat >>confdefs.h <<\_ACEOF
23676#define X87_DOUBLE_ROUNDING 1
23677_ACEOF
23678
23679fi
23680
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023681# ************************************
23682# * Check for mathematical functions *
23683# ************************************
23684
23685LIBS_SAVE=$LIBS
23686LIBS="$LIBS $LIBM"
23687
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023688# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
23689# -0. on some architectures.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023690{ echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5
23691echo $ECHO_N "checking whether tanh preserves the sign of zero... $ECHO_C" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023692if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023693 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023694else
23695
23696if test "$cross_compiling" = yes; then
23697 ac_cv_tanh_preserves_zero_sign=no
23698else
23699 cat >conftest.$ac_ext <<_ACEOF
23700/* confdefs.h. */
23701_ACEOF
23702cat confdefs.h >>conftest.$ac_ext
23703cat >>conftest.$ac_ext <<_ACEOF
23704/* end confdefs.h. */
23705
23706#include <math.h>
23707#include <stdlib.h>
23708int main() {
23709 /* return 0 if either negative zeros don't exist
23710 on this platform or if negative zeros exist
23711 and tanh(-0.) == -0. */
23712 if (atan2(0., -1.) == atan2(-0., -1.) ||
23713 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
23714 else exit(1);
23715}
23716
23717_ACEOF
23718rm -f conftest$ac_exeext
23719if { (ac_try="$ac_link"
23720case "(($ac_try" in
23721 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23722 *) ac_try_echo=$ac_try;;
23723esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023724eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023725 (eval "$ac_link") 2>&5
23726 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023728 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23729 { (case "(($ac_try" in
23730 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23731 *) ac_try_echo=$ac_try;;
23732esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023733eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023734 (eval "$ac_try") 2>&5
23735 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023737 (exit $ac_status); }; }; then
23738 ac_cv_tanh_preserves_zero_sign=yes
23739else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023740 echo "$as_me: program exited with status $ac_status" >&5
23741echo "$as_me: failed program was:" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023742sed 's/^/| /' conftest.$ac_ext >&5
23743
23744( exit $ac_status )
23745ac_cv_tanh_preserves_zero_sign=no
23746fi
23747rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23748fi
23749
23750
23751fi
23752
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023753{ echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5
23754echo "${ECHO_T}$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023755if test "$ac_cv_tanh_preserves_zero_sign" = yes
23756then
23757
23758cat >>confdefs.h <<\_ACEOF
23759#define TANH_PRESERVES_ZERO_SIGN 1
23760_ACEOF
23761
23762fi
23763
23764
Guido van Rossum2b3ac691996-08-30 15:18:41 +000023765
Michael W. Hudson54241132001-12-07 15:38:26 +000023766
Christian Heimes99170a52007-12-19 02:07:34 +000023767
23768
23769
23770
23771
Mark Dickinsonf2537862009-04-18 13:58:18 +000023772
Mark Dickinson9c113362009-09-05 10:36:23 +000023773for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
23774do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023775as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23776{ echo "$as_me:$LINENO: checking for $ac_func" >&5
23777echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Mark Dickinson9c113362009-09-05 10:36:23 +000023778if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023779 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson9c113362009-09-05 10:36:23 +000023780else
23781 cat >conftest.$ac_ext <<_ACEOF
23782/* confdefs.h. */
23783_ACEOF
23784cat confdefs.h >>conftest.$ac_ext
23785cat >>conftest.$ac_ext <<_ACEOF
23786/* end confdefs.h. */
23787/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23788 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23789#define $ac_func innocuous_$ac_func
23790
23791/* System header to define __stub macros and hopefully few prototypes,
23792 which can conflict with char $ac_func (); below.
23793 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23794 <limits.h> exists even on freestanding compilers. */
23795
23796#ifdef __STDC__
23797# include <limits.h>
23798#else
23799# include <assert.h>
23800#endif
23801
23802#undef $ac_func
23803
23804/* Override any GCC internal prototype to avoid an error.
23805 Use char because int might match the return type of a GCC
23806 builtin and then its argument prototype would still apply. */
23807#ifdef __cplusplus
23808extern "C"
23809#endif
23810char $ac_func ();
23811/* The GNU C library defines this for functions which it implements
23812 to always fail with ENOSYS. Some functions are actually named
23813 something starting with __ and the normal name is an alias. */
23814#if defined __stub_$ac_func || defined __stub___$ac_func
23815choke me
23816#endif
23817
23818int
23819main ()
23820{
23821return $ac_func ();
23822 ;
23823 return 0;
23824}
23825_ACEOF
23826rm -f conftest.$ac_objext conftest$ac_exeext
23827if { (ac_try="$ac_link"
23828case "(($ac_try" in
23829 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23830 *) ac_try_echo=$ac_try;;
23831esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023832eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson9c113362009-09-05 10:36:23 +000023833 (eval "$ac_link") 2>conftest.er1
23834 ac_status=$?
23835 grep -v '^ *+' conftest.er1 >conftest.err
23836 rm -f conftest.er1
23837 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson9c113362009-09-05 10:36:23 +000023839 (exit $ac_status); } && {
23840 test -z "$ac_c_werror_flag" ||
23841 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023842 } && test -s conftest$ac_exeext &&
23843 $as_test_x conftest$ac_exeext; then
Mark Dickinson9c113362009-09-05 10:36:23 +000023844 eval "$as_ac_var=yes"
23845else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023846 echo "$as_me: failed program was:" >&5
Mark Dickinson9c113362009-09-05 10:36:23 +000023847sed 's/^/| /' conftest.$ac_ext >&5
23848
23849 eval "$as_ac_var=no"
23850fi
23851
23852rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23853 conftest$ac_exeext conftest.$ac_ext
23854fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023855ac_res=`eval echo '${'$as_ac_var'}'`
23856 { echo "$as_me:$LINENO: result: $ac_res" >&5
23857echo "${ECHO_T}$ac_res" >&6; }
23858if test `eval echo '${'$as_ac_var'}'` = yes; then
Mark Dickinson9c113362009-09-05 10:36:23 +000023859 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023860#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Mark Dickinson9c113362009-09-05 10:36:23 +000023861_ACEOF
23862
23863fi
23864done
23865
23866
23867
23868
23869
23870
23871for ac_func in hypot lgamma log1p round tgamma
Christian Heimes99170a52007-12-19 02:07:34 +000023872do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023873as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23874{ echo "$as_me:$LINENO: checking for $ac_func" >&5
23875echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Christian Heimes99170a52007-12-19 02:07:34 +000023876if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023877 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes99170a52007-12-19 02:07:34 +000023878else
23879 cat >conftest.$ac_ext <<_ACEOF
23880/* confdefs.h. */
23881_ACEOF
23882cat confdefs.h >>conftest.$ac_ext
23883cat >>conftest.$ac_ext <<_ACEOF
23884/* end confdefs.h. */
23885/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23886 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23887#define $ac_func innocuous_$ac_func
23888
23889/* System header to define __stub macros and hopefully few prototypes,
23890 which can conflict with char $ac_func (); below.
23891 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23892 <limits.h> exists even on freestanding compilers. */
23893
23894#ifdef __STDC__
23895# include <limits.h>
23896#else
23897# include <assert.h>
23898#endif
23899
23900#undef $ac_func
23901
23902/* Override any GCC internal prototype to avoid an error.
23903 Use char because int might match the return type of a GCC
23904 builtin and then its argument prototype would still apply. */
23905#ifdef __cplusplus
23906extern "C"
23907#endif
23908char $ac_func ();
23909/* The GNU C library defines this for functions which it implements
23910 to always fail with ENOSYS. Some functions are actually named
23911 something starting with __ and the normal name is an alias. */
23912#if defined __stub_$ac_func || defined __stub___$ac_func
23913choke me
23914#endif
23915
23916int
23917main ()
23918{
23919return $ac_func ();
23920 ;
23921 return 0;
23922}
23923_ACEOF
23924rm -f conftest.$ac_objext conftest$ac_exeext
23925if { (ac_try="$ac_link"
23926case "(($ac_try" in
23927 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23928 *) ac_try_echo=$ac_try;;
23929esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023930eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes99170a52007-12-19 02:07:34 +000023931 (eval "$ac_link") 2>conftest.er1
23932 ac_status=$?
23933 grep -v '^ *+' conftest.er1 >conftest.err
23934 rm -f conftest.er1
23935 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes99170a52007-12-19 02:07:34 +000023937 (exit $ac_status); } && {
23938 test -z "$ac_c_werror_flag" ||
23939 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023940 } && test -s conftest$ac_exeext &&
23941 $as_test_x conftest$ac_exeext; then
Christian Heimes99170a52007-12-19 02:07:34 +000023942 eval "$as_ac_var=yes"
23943else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023944 echo "$as_me: failed program was:" >&5
Christian Heimes99170a52007-12-19 02:07:34 +000023945sed 's/^/| /' conftest.$ac_ext >&5
23946
23947 eval "$as_ac_var=no"
23948fi
23949
23950rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23951 conftest$ac_exeext conftest.$ac_ext
23952fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023953ac_res=`eval echo '${'$as_ac_var'}'`
23954 { echo "$as_me:$LINENO: result: $ac_res" >&5
23955echo "${ECHO_T}$ac_res" >&6; }
23956if test `eval echo '${'$as_ac_var'}'` = yes; then
Christian Heimes99170a52007-12-19 02:07:34 +000023957 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023958#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes99170a52007-12-19 02:07:34 +000023959_ACEOF
23960
23961fi
23962done
23963
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023964{ echo "$as_me:$LINENO: checking whether isinf is declared" >&5
23965echo $ECHO_N "checking whether isinf is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023966if test "${ac_cv_have_decl_isinf+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023967 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023968else
23969 cat >conftest.$ac_ext <<_ACEOF
23970/* confdefs.h. */
23971_ACEOF
23972cat confdefs.h >>conftest.$ac_ext
23973cat >>conftest.$ac_ext <<_ACEOF
23974/* end confdefs.h. */
23975#include <math.h>
23976
23977int
23978main ()
23979{
23980#ifndef isinf
23981 (void) isinf;
23982#endif
23983
23984 ;
23985 return 0;
23986}
23987_ACEOF
23988rm -f conftest.$ac_objext
23989if { (ac_try="$ac_compile"
23990case "(($ac_try" in
23991 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23992 *) ac_try_echo=$ac_try;;
23993esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023994eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023995 (eval "$ac_compile") 2>conftest.er1
23996 ac_status=$?
23997 grep -v '^ *+' conftest.er1 >conftest.err
23998 rm -f conftest.er1
23999 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024000 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024001 (exit $ac_status); } && {
24002 test -z "$ac_c_werror_flag" ||
24003 test ! -s conftest.err
24004 } && test -s conftest.$ac_objext; then
24005 ac_cv_have_decl_isinf=yes
24006else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024007 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024008sed 's/^/| /' conftest.$ac_ext >&5
24009
24010 ac_cv_have_decl_isinf=no
24011fi
24012
24013rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24014fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024015{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isinf" >&5
24016echo "${ECHO_T}$ac_cv_have_decl_isinf" >&6; }
24017if test $ac_cv_have_decl_isinf = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024018
24019cat >>confdefs.h <<_ACEOF
24020#define HAVE_DECL_ISINF 1
24021_ACEOF
24022
24023
24024else
24025 cat >>confdefs.h <<_ACEOF
24026#define HAVE_DECL_ISINF 0
24027_ACEOF
24028
24029
24030fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024031{ echo "$as_me:$LINENO: checking whether isnan is declared" >&5
24032echo $ECHO_N "checking whether isnan is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024033if test "${ac_cv_have_decl_isnan+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024034 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024035else
24036 cat >conftest.$ac_ext <<_ACEOF
24037/* confdefs.h. */
24038_ACEOF
24039cat confdefs.h >>conftest.$ac_ext
24040cat >>conftest.$ac_ext <<_ACEOF
24041/* end confdefs.h. */
24042#include <math.h>
24043
24044int
24045main ()
24046{
24047#ifndef isnan
24048 (void) isnan;
24049#endif
24050
24051 ;
24052 return 0;
24053}
24054_ACEOF
24055rm -f conftest.$ac_objext
24056if { (ac_try="$ac_compile"
24057case "(($ac_try" in
24058 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24059 *) ac_try_echo=$ac_try;;
24060esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024061eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024062 (eval "$ac_compile") 2>conftest.er1
24063 ac_status=$?
24064 grep -v '^ *+' conftest.er1 >conftest.err
24065 rm -f conftest.er1
24066 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024068 (exit $ac_status); } && {
24069 test -z "$ac_c_werror_flag" ||
24070 test ! -s conftest.err
24071 } && test -s conftest.$ac_objext; then
24072 ac_cv_have_decl_isnan=yes
24073else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024074 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024075sed 's/^/| /' conftest.$ac_ext >&5
24076
24077 ac_cv_have_decl_isnan=no
24078fi
24079
24080rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24081fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024082{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isnan" >&5
24083echo "${ECHO_T}$ac_cv_have_decl_isnan" >&6; }
24084if test $ac_cv_have_decl_isnan = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024085
24086cat >>confdefs.h <<_ACEOF
24087#define HAVE_DECL_ISNAN 1
24088_ACEOF
24089
24090
24091else
24092 cat >>confdefs.h <<_ACEOF
24093#define HAVE_DECL_ISNAN 0
24094_ACEOF
24095
24096
24097fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024098{ echo "$as_me:$LINENO: checking whether isfinite is declared" >&5
24099echo $ECHO_N "checking whether isfinite is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024100if test "${ac_cv_have_decl_isfinite+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024101 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024102else
24103 cat >conftest.$ac_ext <<_ACEOF
24104/* confdefs.h. */
24105_ACEOF
24106cat confdefs.h >>conftest.$ac_ext
24107cat >>conftest.$ac_ext <<_ACEOF
24108/* end confdefs.h. */
24109#include <math.h>
24110
24111int
24112main ()
24113{
24114#ifndef isfinite
24115 (void) isfinite;
24116#endif
24117
24118 ;
24119 return 0;
24120}
24121_ACEOF
24122rm -f conftest.$ac_objext
24123if { (ac_try="$ac_compile"
24124case "(($ac_try" in
24125 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24126 *) ac_try_echo=$ac_try;;
24127esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024128eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024129 (eval "$ac_compile") 2>conftest.er1
24130 ac_status=$?
24131 grep -v '^ *+' conftest.er1 >conftest.err
24132 rm -f conftest.er1
24133 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024135 (exit $ac_status); } && {
24136 test -z "$ac_c_werror_flag" ||
24137 test ! -s conftest.err
24138 } && test -s conftest.$ac_objext; then
24139 ac_cv_have_decl_isfinite=yes
24140else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024141 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024142sed 's/^/| /' conftest.$ac_ext >&5
24143
24144 ac_cv_have_decl_isfinite=no
24145fi
24146
24147rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24148fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024149{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isfinite" >&5
24150echo "${ECHO_T}$ac_cv_have_decl_isfinite" >&6; }
24151if test $ac_cv_have_decl_isfinite = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024152
24153cat >>confdefs.h <<_ACEOF
24154#define HAVE_DECL_ISFINITE 1
24155_ACEOF
24156
24157
24158else
24159 cat >>confdefs.h <<_ACEOF
24160#define HAVE_DECL_ISFINITE 0
24161_ACEOF
24162
24163
24164fi
24165
24166
Christian Heimes99170a52007-12-19 02:07:34 +000024167
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000024168LIBS=$LIBS_SAVE
24169
Mark Dickinsona614f042009-11-28 12:48:43 +000024170# For multiprocessing module, check that sem_open
24171# actually works. For FreeBSD versions <= 7.2,
24172# the kernel module that provides POSIX semaphores
24173# isn't loaded by default, so an attempt to call
24174# sem_open results in a 'Signal 12' error.
24175{ echo "$as_me:$LINENO: checking whether POSIX semaphores are enabled" >&5
24176echo $ECHO_N "checking whether POSIX semaphores are enabled... $ECHO_C" >&6; }
24177if test "${ac_cv_posix_semaphores_enabled+set}" = set; then
24178 echo $ECHO_N "(cached) $ECHO_C" >&6
24179else
24180 if test "$cross_compiling" = yes; then
24181 ac_cv_posix_semaphores_enabled=yes
24182else
24183 cat >conftest.$ac_ext <<_ACEOF
24184/* confdefs.h. */
24185_ACEOF
24186cat confdefs.h >>conftest.$ac_ext
24187cat >>conftest.$ac_ext <<_ACEOF
24188/* end confdefs.h. */
24189
24190#include <unistd.h>
24191#include <fcntl.h>
24192#include <stdio.h>
24193#include <semaphore.h>
24194#include <sys/stat.h>
24195
24196int main(void) {
24197 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
24198 if (a == SEM_FAILED) {
24199 perror("sem_open");
24200 return 1;
24201 }
24202 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000024203 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000024204 return 0;
24205}
24206
24207_ACEOF
24208rm -f conftest$ac_exeext
24209if { (ac_try="$ac_link"
24210case "(($ac_try" in
24211 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24212 *) ac_try_echo=$ac_try;;
24213esac
24214eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24215 (eval "$ac_link") 2>&5
24216 ac_status=$?
24217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24218 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24219 { (case "(($ac_try" in
24220 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24221 *) ac_try_echo=$ac_try;;
24222esac
24223eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24224 (eval "$ac_try") 2>&5
24225 ac_status=$?
24226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24227 (exit $ac_status); }; }; then
24228 ac_cv_posix_semaphores_enabled=yes
24229else
24230 echo "$as_me: program exited with status $ac_status" >&5
24231echo "$as_me: failed program was:" >&5
24232sed 's/^/| /' conftest.$ac_ext >&5
24233
24234( exit $ac_status )
24235ac_cv_posix_semaphores_enabled=no
24236fi
24237rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24238fi
24239
24240
24241
24242fi
24243
24244{ echo "$as_me:$LINENO: result: $ac_cv_posix_semaphores_enabled" >&5
24245echo "${ECHO_T}$ac_cv_posix_semaphores_enabled" >&6; }
24246if test $ac_cv_posix_semaphores_enabled = no
24247then
24248
24249cat >>confdefs.h <<\_ACEOF
24250#define POSIX_SEMAPHORES_NOT_ENABLED 1
24251_ACEOF
24252
24253fi
24254
Mark Dickinson10683072009-04-18 21:18:19 +000024255# Multiprocessing check for broken sem_getvalue
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024256{ echo "$as_me:$LINENO: checking for broken sem_getvalue" >&5
24257echo $ECHO_N "checking for broken sem_getvalue... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000024258if test "${ac_cv_broken_sem_getvalue+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024259 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000024260else
24261 if test "$cross_compiling" = yes; then
24262 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000024263else
24264 cat >conftest.$ac_ext <<_ACEOF
24265/* confdefs.h. */
24266_ACEOF
24267cat confdefs.h >>conftest.$ac_ext
24268cat >>conftest.$ac_ext <<_ACEOF
24269/* end confdefs.h. */
24270
24271#include <unistd.h>
24272#include <fcntl.h>
24273#include <stdio.h>
24274#include <semaphore.h>
24275#include <sys/stat.h>
24276
24277int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000024278 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000024279 int count;
24280 int res;
24281 if(a==SEM_FAILED){
24282 perror("sem_open");
24283 return 1;
24284
24285 }
24286 res = sem_getvalue(a, &count);
24287 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000024288 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000024289 return res==-1 ? 1 : 0;
24290}
24291
Mark Dickinson10683072009-04-18 21:18:19 +000024292_ACEOF
24293rm -f conftest$ac_exeext
24294if { (ac_try="$ac_link"
24295case "(($ac_try" in
24296 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24297 *) ac_try_echo=$ac_try;;
24298esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024299eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson10683072009-04-18 21:18:19 +000024300 (eval "$ac_link") 2>&5
24301 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024302 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000024303 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24304 { (case "(($ac_try" in
24305 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24306 *) ac_try_echo=$ac_try;;
24307esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024308eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson10683072009-04-18 21:18:19 +000024309 (eval "$ac_try") 2>&5
24310 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000024312 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000024313 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000024314else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024315 echo "$as_me: program exited with status $ac_status" >&5
24316echo "$as_me: failed program was:" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000024317sed 's/^/| /' conftest.$ac_ext >&5
24318
24319( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000024320ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024321fi
24322rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024323fi
24324
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024325
24326
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000024327fi
24328
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024329{ echo "$as_me:$LINENO: result: $ac_cv_broken_sem_getvalue" >&5
24330echo "${ECHO_T}$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000024331if test $ac_cv_broken_sem_getvalue = yes
24332then
24333
24334cat >>confdefs.h <<\_ACEOF
24335#define HAVE_BROKEN_SEM_GETVALUE 1
24336_ACEOF
24337
24338fi
24339
Mark Dickinsonbd792642009-03-18 20:06:12 +000024340# determine what size digit to use for Python's longs
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024341{ echo "$as_me:$LINENO: checking digit size for Python's longs" >&5
24342echo $ECHO_N "checking digit size for Python's longs... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000024343# Check whether --enable-big-digits was given.
24344if test "${enable_big_digits+set}" = set; then
24345 enableval=$enable_big_digits; case $enable_big_digits in
24346yes)
24347 enable_big_digits=30 ;;
24348no)
24349 enable_big_digits=15 ;;
2435015|30)
24351 ;;
24352*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024353 { { echo "$as_me:$LINENO: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&5
24354echo "$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 +000024355 { (exit 1); exit 1; }; } ;;
24356esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024357{ echo "$as_me:$LINENO: result: $enable_big_digits" >&5
24358echo "${ECHO_T}$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000024359
24360cat >>confdefs.h <<_ACEOF
24361#define PYLONG_BITS_IN_DIGIT $enable_big_digits
24362_ACEOF
24363
24364
24365else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024366 { echo "$as_me:$LINENO: result: no value specified" >&5
24367echo "${ECHO_T}no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000024368fi
24369
24370
Guido van Rossumef2255b2000-03-10 22:30:29 +000024371# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000024372if test "${ac_cv_header_wchar_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024373 { echo "$as_me:$LINENO: checking for wchar.h" >&5
24374echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024375if test "${ac_cv_header_wchar_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024376 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024377fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024378{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
24379echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000024380else
Martin v. Löwis11437992002-04-12 09:54:03 +000024381 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024382{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
24383echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024384cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024385/* confdefs.h. */
24386_ACEOF
24387cat confdefs.h >>conftest.$ac_ext
24388cat >>conftest.$ac_ext <<_ACEOF
24389/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024390$ac_includes_default
24391#include <wchar.h>
24392_ACEOF
24393rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024394if { (ac_try="$ac_compile"
24395case "(($ac_try" in
24396 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24397 *) ac_try_echo=$ac_try;;
24398esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024399eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024400 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024401 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024402 grep -v '^ *+' conftest.er1 >conftest.err
24403 rm -f conftest.er1
24404 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024406 (exit $ac_status); } && {
24407 test -z "$ac_c_werror_flag" ||
24408 test ! -s conftest.err
24409 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024410 ac_header_compiler=yes
24411else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024412 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024413sed 's/^/| /' conftest.$ac_ext >&5
24414
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024415 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000024416fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024417
24418rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024419{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
24420echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024421
24422# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024423{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
24424echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024425cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024426/* confdefs.h. */
24427_ACEOF
24428cat confdefs.h >>conftest.$ac_ext
24429cat >>conftest.$ac_ext <<_ACEOF
24430/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000024431#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024432_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024433if { (ac_try="$ac_cpp conftest.$ac_ext"
24434case "(($ac_try" in
24435 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24436 *) ac_try_echo=$ac_try;;
24437esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024438eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024439 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024440 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000024441 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000024442 rm -f conftest.er1
24443 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024445 (exit $ac_status); } >/dev/null && {
24446 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
24447 test ! -s conftest.err
24448 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024449 ac_header_preproc=yes
24450else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024451 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024452sed 's/^/| /' conftest.$ac_ext >&5
24453
Martin v. Löwis11437992002-04-12 09:54:03 +000024454 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000024455fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024456
Martin v. Löwis11437992002-04-12 09:54:03 +000024457rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024458{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
24459echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024460
24461# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024462case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
24463 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024464 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
24465echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
24466 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
24467echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000024468 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024469 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000024470 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024471 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
24472echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
24473 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
24474echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
24475 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
24476echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
24477 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
24478echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
24479 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
24480echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
24481 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
24482echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024483 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000024484## -------------------------------------- ##
24485## Report this to http://bugs.python.org/ ##
24486## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000024487_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024488 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000024489 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024490esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024491{ echo "$as_me:$LINENO: checking for wchar.h" >&5
24492echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024493if test "${ac_cv_header_wchar_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024494 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024495else
24496 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000024497fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024498{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
24499echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024500
24501fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024502if test $ac_cv_header_wchar_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024503
24504
24505cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000024506#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024507_ACEOF
24508
Martin v. Löwisc45929e2002-04-06 10:10:49 +000024509 wchar_h="yes"
24510
Guido van Rossumef2255b2000-03-10 22:30:29 +000024511else
Martin v. Löwis11437992002-04-12 09:54:03 +000024512 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000024513
24514fi
24515
Michael W. Hudson54241132001-12-07 15:38:26 +000024516
Martin v. Löwis11437992002-04-12 09:54:03 +000024517
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024518# determine wchar_t size
24519if test "$wchar_h" = yes
24520then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024521 { echo "$as_me:$LINENO: checking for wchar_t" >&5
24522echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
24523if test "${ac_cv_type_wchar_t+set}" = set; then
24524 echo $ECHO_N "(cached) $ECHO_C" >&6
24525else
24526 cat >conftest.$ac_ext <<_ACEOF
24527/* confdefs.h. */
24528_ACEOF
24529cat confdefs.h >>conftest.$ac_ext
24530cat >>conftest.$ac_ext <<_ACEOF
24531/* end confdefs.h. */
24532#include <wchar.h>
24533
24534typedef wchar_t ac__type_new_;
24535int
24536main ()
24537{
24538if ((ac__type_new_ *) 0)
24539 return 0;
24540if (sizeof (ac__type_new_))
24541 return 0;
24542 ;
24543 return 0;
24544}
24545_ACEOF
24546rm -f conftest.$ac_objext
24547if { (ac_try="$ac_compile"
24548case "(($ac_try" in
24549 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24550 *) ac_try_echo=$ac_try;;
24551esac
24552eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24553 (eval "$ac_compile") 2>conftest.er1
24554 ac_status=$?
24555 grep -v '^ *+' conftest.er1 >conftest.err
24556 rm -f conftest.er1
24557 cat conftest.err >&5
24558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24559 (exit $ac_status); } && {
24560 test -z "$ac_c_werror_flag" ||
24561 test ! -s conftest.err
24562 } && test -s conftest.$ac_objext; then
24563 ac_cv_type_wchar_t=yes
24564else
24565 echo "$as_me: failed program was:" >&5
24566sed 's/^/| /' conftest.$ac_ext >&5
24567
24568 ac_cv_type_wchar_t=no
24569fi
24570
24571rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24572fi
24573{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
24574echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
24575
24576# The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024577# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
24578# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
24579# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024580{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
24581echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024582if test "${ac_cv_sizeof_wchar_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024583 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024584else
Martin v. Löwis11437992002-04-12 09:54:03 +000024585 if test "$cross_compiling" = yes; then
24586 # Depending upon the size, compute the lo and hi bounds.
24587cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024588/* confdefs.h. */
24589_ACEOF
24590cat confdefs.h >>conftest.$ac_ext
24591cat >>conftest.$ac_ext <<_ACEOF
24592/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024593#include <wchar.h>
24594
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024595 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024596int
24597main ()
24598{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024599static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024600test_array [0] = 0
24601
24602 ;
24603 return 0;
24604}
24605_ACEOF
24606rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024607if { (ac_try="$ac_compile"
24608case "(($ac_try" in
24609 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24610 *) ac_try_echo=$ac_try;;
24611esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024612eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024613 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024614 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024615 grep -v '^ *+' conftest.er1 >conftest.err
24616 rm -f conftest.er1
24617 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024619 (exit $ac_status); } && {
24620 test -z "$ac_c_werror_flag" ||
24621 test ! -s conftest.err
24622 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024623 ac_lo=0 ac_mid=0
24624 while :; do
24625 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024626/* confdefs.h. */
24627_ACEOF
24628cat confdefs.h >>conftest.$ac_ext
24629cat >>conftest.$ac_ext <<_ACEOF
24630/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024631#include <wchar.h>
24632
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024633 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024634int
24635main ()
24636{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024637static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024638test_array [0] = 0
24639
24640 ;
24641 return 0;
24642}
24643_ACEOF
24644rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024645if { (ac_try="$ac_compile"
24646case "(($ac_try" in
24647 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24648 *) ac_try_echo=$ac_try;;
24649esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024650eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024651 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024652 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024653 grep -v '^ *+' conftest.er1 >conftest.err
24654 rm -f conftest.er1
24655 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024657 (exit $ac_status); } && {
24658 test -z "$ac_c_werror_flag" ||
24659 test ! -s conftest.err
24660 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024661 ac_hi=$ac_mid; break
24662else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024663 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024664sed 's/^/| /' conftest.$ac_ext >&5
24665
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024666 ac_lo=`expr $ac_mid + 1`
24667 if test $ac_lo -le $ac_mid; then
24668 ac_lo= ac_hi=
24669 break
24670 fi
24671 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000024672fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024673
24674rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024675 done
24676else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024677 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024678sed 's/^/| /' conftest.$ac_ext >&5
24679
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024680 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024681/* confdefs.h. */
24682_ACEOF
24683cat confdefs.h >>conftest.$ac_ext
24684cat >>conftest.$ac_ext <<_ACEOF
24685/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024686#include <wchar.h>
24687
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024688 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024689int
24690main ()
24691{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024692static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024693test_array [0] = 0
24694
24695 ;
24696 return 0;
24697}
24698_ACEOF
24699rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024700if { (ac_try="$ac_compile"
24701case "(($ac_try" in
24702 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24703 *) ac_try_echo=$ac_try;;
24704esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024705eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024706 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024707 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024708 grep -v '^ *+' conftest.er1 >conftest.err
24709 rm -f conftest.er1
24710 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024712 (exit $ac_status); } && {
24713 test -z "$ac_c_werror_flag" ||
24714 test ! -s conftest.err
24715 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024716 ac_hi=-1 ac_mid=-1
24717 while :; do
24718 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024719/* confdefs.h. */
24720_ACEOF
24721cat confdefs.h >>conftest.$ac_ext
24722cat >>conftest.$ac_ext <<_ACEOF
24723/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024724#include <wchar.h>
24725
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024726 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024727int
24728main ()
24729{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024730static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024731test_array [0] = 0
24732
24733 ;
24734 return 0;
24735}
24736_ACEOF
24737rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024738if { (ac_try="$ac_compile"
24739case "(($ac_try" in
24740 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24741 *) ac_try_echo=$ac_try;;
24742esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024743eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024744 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024745 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024746 grep -v '^ *+' conftest.er1 >conftest.err
24747 rm -f conftest.er1
24748 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024750 (exit $ac_status); } && {
24751 test -z "$ac_c_werror_flag" ||
24752 test ! -s conftest.err
24753 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024754 ac_lo=$ac_mid; break
24755else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024756 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024757sed 's/^/| /' conftest.$ac_ext >&5
24758
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024759 ac_hi=`expr '(' $ac_mid ')' - 1`
24760 if test $ac_mid -le $ac_hi; then
24761 ac_lo= ac_hi=
24762 break
24763 fi
24764 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000024765fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024766
24767rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024768 done
24769else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024770 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024771sed 's/^/| /' conftest.$ac_ext >&5
24772
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024773 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000024774fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024775
24776rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024777fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024778
24779rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024780# Binary search between lo and hi bounds.
24781while test "x$ac_lo" != "x$ac_hi"; do
24782 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
24783 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024784/* confdefs.h. */
24785_ACEOF
24786cat confdefs.h >>conftest.$ac_ext
24787cat >>conftest.$ac_ext <<_ACEOF
24788/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024789#include <wchar.h>
24790
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024791 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024792int
24793main ()
24794{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024795static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024796test_array [0] = 0
24797
24798 ;
24799 return 0;
24800}
24801_ACEOF
24802rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024803if { (ac_try="$ac_compile"
24804case "(($ac_try" in
24805 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24806 *) ac_try_echo=$ac_try;;
24807esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024808eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024809 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024810 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024811 grep -v '^ *+' conftest.er1 >conftest.err
24812 rm -f conftest.er1
24813 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024815 (exit $ac_status); } && {
24816 test -z "$ac_c_werror_flag" ||
24817 test ! -s conftest.err
24818 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024819 ac_hi=$ac_mid
24820else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024821 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024822sed 's/^/| /' conftest.$ac_ext >&5
24823
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024824 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000024825fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024826
24827rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024828done
24829case $ac_lo in
24830?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024831'') if test "$ac_cv_type_wchar_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024832 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024833See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024834echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024835See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024836 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024837 else
24838 ac_cv_sizeof_wchar_t=0
24839 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024840esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024841else
Martin v. Löwis11437992002-04-12 09:54:03 +000024842 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024843/* confdefs.h. */
24844_ACEOF
24845cat confdefs.h >>conftest.$ac_ext
24846cat >>conftest.$ac_ext <<_ACEOF
24847/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024848#include <wchar.h>
24849
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024850 typedef wchar_t ac__type_sizeof_;
24851static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
24852static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000024853#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024854#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024855int
24856main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024857{
Martin v. Löwis11437992002-04-12 09:54:03 +000024858
24859 FILE *f = fopen ("conftest.val", "w");
24860 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024861 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024862 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000024863 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024864 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024865 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024866 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024867 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000024868 }
24869 else
24870 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024871 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024872 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024873 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024874 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000024875 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024876 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000024877
24878 ;
24879 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000024880}
Martin v. Löwis11437992002-04-12 09:54:03 +000024881_ACEOF
24882rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024883if { (ac_try="$ac_link"
24884case "(($ac_try" in
24885 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24886 *) ac_try_echo=$ac_try;;
24887esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024888eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024889 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024890 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024892 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024893 { (case "(($ac_try" in
24894 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24895 *) ac_try_echo=$ac_try;;
24896esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024897eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024898 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024899 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024901 (exit $ac_status); }; }; then
24902 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000024903else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024904 echo "$as_me: program exited with status $ac_status" >&5
24905echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024906sed 's/^/| /' conftest.$ac_ext >&5
24907
Martin v. Löwis11437992002-04-12 09:54:03 +000024908( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024909if test "$ac_cv_type_wchar_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024910 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024911See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024912echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024913See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024914 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024915 else
24916 ac_cv_sizeof_wchar_t=0
24917 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000024918fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024919rm -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 +000024920fi
24921rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000024922fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024923{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
24924echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024925
24926
24927
Martin v. Löwis11437992002-04-12 09:54:03 +000024928cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024929#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000024930_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024931
Michael W. Hudson54241132001-12-07 15:38:26 +000024932
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024933fi
24934
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024935{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
24936echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024937have_ucs4_tcl=no
24938cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024939/* confdefs.h. */
24940_ACEOF
24941cat confdefs.h >>conftest.$ac_ext
24942cat >>conftest.$ac_ext <<_ACEOF
24943/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024944
24945#include <tcl.h>
24946#if TCL_UTF_MAX != 6
24947# error "NOT UCS4_TCL"
24948#endif
24949int
24950main ()
24951{
24952
24953 ;
24954 return 0;
24955}
24956_ACEOF
24957rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024958if { (ac_try="$ac_compile"
24959case "(($ac_try" in
24960 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24961 *) ac_try_echo=$ac_try;;
24962esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024963eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024964 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024965 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024966 grep -v '^ *+' conftest.er1 >conftest.err
24967 rm -f conftest.er1
24968 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024970 (exit $ac_status); } && {
24971 test -z "$ac_c_werror_flag" ||
24972 test ! -s conftest.err
24973 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024974
24975
24976cat >>confdefs.h <<\_ACEOF
24977#define HAVE_UCS4_TCL 1
24978_ACEOF
24979
24980 have_ucs4_tcl=yes
24981
24982else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024983 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024984sed 's/^/| /' conftest.$ac_ext >&5
24985
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024986
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024987fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024988
24989rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024990{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
24991echo "${ECHO_T}$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024992
Skip Montanaro6dead952003-09-25 14:50:04 +000024993# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024994if test "$wchar_h" = yes
24995then
24996 # check whether wchar_t is signed or not
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024997 { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
24998echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024999 if test "${ac_cv_wchar_t_signed+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025000 echo $ECHO_N "(cached) $ECHO_C" >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025001else
25002
25003 if test "$cross_compiling" = yes; then
25004 ac_cv_wchar_t_signed=yes
25005else
25006 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025007/* confdefs.h. */
25008_ACEOF
25009cat confdefs.h >>conftest.$ac_ext
25010cat >>conftest.$ac_ext <<_ACEOF
25011/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025012
25013 #include <wchar.h>
25014 int main()
25015 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000025016 /* Success: exit code 0 */
25017 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025018 }
25019
25020_ACEOF
25021rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025022if { (ac_try="$ac_link"
25023case "(($ac_try" in
25024 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25025 *) ac_try_echo=$ac_try;;
25026esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025027eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025028 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025029 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025031 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025032 { (case "(($ac_try" in
25033 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25034 *) ac_try_echo=$ac_try;;
25035esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025036eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025037 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025038 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025040 (exit $ac_status); }; }; then
25041 ac_cv_wchar_t_signed=yes
25042else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025043 echo "$as_me: program exited with status $ac_status" >&5
25044echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025045sed 's/^/| /' conftest.$ac_ext >&5
25046
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025047( exit $ac_status )
25048ac_cv_wchar_t_signed=no
25049fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025050rm -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 +000025051fi
25052
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025053
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025054fi
25055
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025056 { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
25057echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025058fi
25059
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025060{ echo "$as_me:$LINENO: checking what type to use for str" >&5
25061echo $ECHO_N "checking what type to use for str... $ECHO_C" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000025062
25063# Check whether --with-wide-unicode was given.
25064if test "${with_wide_unicode+set}" = set; then
25065 withval=$with_wide_unicode;
25066if test "$withval" != no
25067then unicode_size="4"
25068else unicode_size="2"
25069fi
25070
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025071else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025072
Georg Brandl52d168a2008-01-07 18:10:24 +000025073case "$have_ucs4_tcl" in
25074 yes) unicode_size="4" ;;
25075 *) unicode_size="2" ;;
25076esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025077
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025078fi
25079
Martin v. Löwis0036cba2002-04-12 09:58:45 +000025080
25081
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025082
Georg Brandl52d168a2008-01-07 18:10:24 +000025083case "$unicode_size" in
25084 4) cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025085#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000025086_ACEOF
Georg Brandl52d168a2008-01-07 18:10:24 +000025087 ;;
25088 *) cat >>confdefs.h <<\_ACEOF
25089#define Py_UNICODE_SIZE 2
25090_ACEOF
25091 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025092esac
25093
Michael W. Hudson54241132001-12-07 15:38:26 +000025094
Martin v. Löwis11437992002-04-12 09:54:03 +000025095
25096
Georg Brandl52d168a2008-01-07 18:10:24 +000025097# wchar_t is only usable if it maps to an unsigned type
25098if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000025099 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000025100then
25101 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025102
Martin v. Löwis11437992002-04-12 09:54:03 +000025103cat >>confdefs.h <<\_ACEOF
25104#define HAVE_USABLE_WCHAR_T 1
25105_ACEOF
25106
Georg Brandl52d168a2008-01-07 18:10:24 +000025107 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025108#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000025109_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025110
Georg Brandl52d168a2008-01-07 18:10:24 +000025111elif test "$ac_cv_sizeof_short" = "$unicode_size"
25112then
25113 PY_UNICODE_TYPE="unsigned short"
25114 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025115#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000025116_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025117
Georg Brandl52d168a2008-01-07 18:10:24 +000025118elif test "$ac_cv_sizeof_long" = "$unicode_size"
25119then
25120 PY_UNICODE_TYPE="unsigned long"
25121 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025122#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000025123_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025124
Georg Brandl52d168a2008-01-07 18:10:24 +000025125else
25126 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025127fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025128{ echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
25129echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000025130
25131# check for endianness
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025132{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
25133echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025134if test "${ac_cv_c_bigendian+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025135 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000025136else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025137 # See if sys/param.h defines the BYTE_ORDER macro.
25138cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025139/* confdefs.h. */
25140_ACEOF
25141cat confdefs.h >>conftest.$ac_ext
25142cat >>conftest.$ac_ext <<_ACEOF
25143/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000025144#include <sys/types.h>
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025145#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000025146
Martin v. Löwis11437992002-04-12 09:54:03 +000025147int
25148main ()
25149{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025150#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
25151 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
25152 bogus endian macros
25153#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025154
25155 ;
25156 return 0;
25157}
25158_ACEOF
25159rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025160if { (ac_try="$ac_compile"
25161case "(($ac_try" in
25162 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25163 *) ac_try_echo=$ac_try;;
25164esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025165eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025166 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025167 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025168 grep -v '^ *+' conftest.er1 >conftest.err
25169 rm -f conftest.er1
25170 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025172 (exit $ac_status); } && {
25173 test -z "$ac_c_werror_flag" ||
25174 test ! -s conftest.err
25175 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000025176 # It does; now see whether it defined to BIG_ENDIAN or not.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025177cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025178/* confdefs.h. */
25179_ACEOF
25180cat confdefs.h >>conftest.$ac_ext
25181cat >>conftest.$ac_ext <<_ACEOF
25182/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000025183#include <sys/types.h>
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025184#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000025185
Martin v. Löwis11437992002-04-12 09:54:03 +000025186int
25187main ()
25188{
Guido van Rossumef2255b2000-03-10 22:30:29 +000025189#if BYTE_ORDER != BIG_ENDIAN
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025190 not big endian
25191#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025192
25193 ;
25194 return 0;
25195}
25196_ACEOF
25197rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025198if { (ac_try="$ac_compile"
25199case "(($ac_try" in
25200 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25201 *) ac_try_echo=$ac_try;;
25202esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025203eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025204 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025205 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025206 grep -v '^ *+' conftest.er1 >conftest.err
25207 rm -f conftest.er1
25208 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025210 (exit $ac_status); } && {
25211 test -z "$ac_c_werror_flag" ||
25212 test ! -s conftest.err
25213 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000025214 ac_cv_c_bigendian=yes
25215else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025216 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025217sed 's/^/| /' conftest.$ac_ext >&5
25218
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025219 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000025220fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025221
25222rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000025223else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025224 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025225sed 's/^/| /' conftest.$ac_ext >&5
25226
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025227 # It does not; compile a test program.
25228if test "$cross_compiling" = yes; then
25229 # try to guess the endianness by grepping values into an object file
25230 ac_cv_c_bigendian=unknown
25231 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025232/* confdefs.h. */
25233_ACEOF
25234cat confdefs.h >>conftest.$ac_ext
25235cat >>conftest.$ac_ext <<_ACEOF
25236/* end confdefs.h. */
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025237short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
25238short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
25239void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
25240short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
25241short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
25242void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025243int
25244main ()
25245{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025246 _ascii (); _ebcdic ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025247 ;
25248 return 0;
25249}
25250_ACEOF
25251rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025252if { (ac_try="$ac_compile"
25253case "(($ac_try" in
25254 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25255 *) ac_try_echo=$ac_try;;
25256esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025257eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025258 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025259 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025260 grep -v '^ *+' conftest.er1 >conftest.err
25261 rm -f conftest.er1
25262 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025264 (exit $ac_status); } && {
25265 test -z "$ac_c_werror_flag" ||
25266 test ! -s conftest.err
25267 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025268 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025269 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025270fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025271if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
25272 if test "$ac_cv_c_bigendian" = unknown; then
25273 ac_cv_c_bigendian=no
25274 else
25275 # finding both strings is unlikely to happen, but who knows?
25276 ac_cv_c_bigendian=unknown
25277 fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025278fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025279else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025280 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025281sed 's/^/| /' conftest.$ac_ext >&5
25282
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025283
Martin v. Löwis11437992002-04-12 09:54:03 +000025284fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025285
25286rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025287else
25288 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025289/* confdefs.h. */
25290_ACEOF
25291cat confdefs.h >>conftest.$ac_ext
25292cat >>conftest.$ac_ext <<_ACEOF
25293/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025294$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000025295int
25296main ()
25297{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025298
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025299 /* Are we little or big endian? From Harbison&Steele. */
25300 union
25301 {
25302 long int l;
25303 char c[sizeof (long int)];
25304 } u;
25305 u.l = 1;
25306 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025307
25308 ;
25309 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000025310}
Martin v. Löwis11437992002-04-12 09:54:03 +000025311_ACEOF
25312rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025313if { (ac_try="$ac_link"
25314case "(($ac_try" in
25315 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25316 *) ac_try_echo=$ac_try;;
25317esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025318eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025319 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025320 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025322 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025323 { (case "(($ac_try" in
25324 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25325 *) ac_try_echo=$ac_try;;
25326esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025327eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025328 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025329 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025331 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000025332 ac_cv_c_bigendian=no
25333else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025334 echo "$as_me: program exited with status $ac_status" >&5
25335echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025336sed 's/^/| /' conftest.$ac_ext >&5
25337
Martin v. Löwis11437992002-04-12 09:54:03 +000025338( exit $ac_status )
25339ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000025340fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025341rm -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 +000025342fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025343
25344
Martin v. Löwis11437992002-04-12 09:54:03 +000025345fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025346
25347rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25348fi
25349{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
25350echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
25351case $ac_cv_c_bigendian in
25352 yes)
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025353
25354cat >>confdefs.h <<\_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025355#define WORDS_BIGENDIAN 1
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025356_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025357 ;;
25358 no)
25359 ;;
25360 *)
25361 { { echo "$as_me:$LINENO: error: unknown endianness
25362presetting ac_cv_c_bigendian=no (or yes) will help" >&5
25363echo "$as_me: error: unknown endianness
25364presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000025365 { (exit 1); exit 1; }; } ;;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025366esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000025367
Michael W. Hudson54241132001-12-07 15:38:26 +000025368
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025369# Check whether right shifting a negative integer extends the sign bit
25370# or fills with zeros (like the Cray J90, according to Tim Peters).
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025371{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
25372echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025373if test "${ac_cv_rshift_extends_sign+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025374 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000025375else
Martin v. Löwis11437992002-04-12 09:54:03 +000025376
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025377if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000025378 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025379else
Martin v. Löwis11437992002-04-12 09:54:03 +000025380 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025381/* confdefs.h. */
25382_ACEOF
25383cat confdefs.h >>conftest.$ac_ext
25384cat >>conftest.$ac_ext <<_ACEOF
25385/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025386
25387int main()
25388{
Vladimir Marangozova6180282000-07-12 05:05:06 +000025389 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025390}
25391
Martin v. Löwis11437992002-04-12 09:54:03 +000025392_ACEOF
25393rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025394if { (ac_try="$ac_link"
25395case "(($ac_try" in
25396 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25397 *) ac_try_echo=$ac_try;;
25398esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025399eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025400 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025401 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025403 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025404 { (case "(($ac_try" in
25405 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25406 *) ac_try_echo=$ac_try;;
25407esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025408eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025409 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025410 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025412 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000025413 ac_cv_rshift_extends_sign=yes
25414else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025415 echo "$as_me: program exited with status $ac_status" >&5
25416echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025417sed 's/^/| /' conftest.$ac_ext >&5
25418
Martin v. Löwis11437992002-04-12 09:54:03 +000025419( exit $ac_status )
25420ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000025421fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025422rm -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 +000025423fi
25424
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025425
25426fi
25427
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025428{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
25429echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000025430if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025431then
Martin v. Löwis11437992002-04-12 09:54:03 +000025432
25433cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025434#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025435_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025436
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025437fi
25438
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025439# check for getc_unlocked and related locking functions
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025440{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
25441echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025442if test "${ac_cv_have_getc_unlocked+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025443 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025444else
Martin v. Löwis11437992002-04-12 09:54:03 +000025445
25446cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025447/* confdefs.h. */
25448_ACEOF
25449cat confdefs.h >>conftest.$ac_ext
25450cat >>conftest.$ac_ext <<_ACEOF
25451/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025452#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025453int
25454main ()
25455{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025456
25457 FILE *f = fopen("/dev/null", "r");
25458 flockfile(f);
25459 getc_unlocked(f);
25460 funlockfile(f);
25461
Martin v. Löwis11437992002-04-12 09:54:03 +000025462 ;
25463 return 0;
25464}
25465_ACEOF
25466rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025467if { (ac_try="$ac_link"
25468case "(($ac_try" in
25469 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25470 *) ac_try_echo=$ac_try;;
25471esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025472eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025473 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025474 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025475 grep -v '^ *+' conftest.er1 >conftest.err
25476 rm -f conftest.er1
25477 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025478 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025479 (exit $ac_status); } && {
25480 test -z "$ac_c_werror_flag" ||
25481 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025482 } && test -s conftest$ac_exeext &&
25483 $as_test_x conftest$ac_exeext; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025484 ac_cv_have_getc_unlocked=yes
25485else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025486 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025487sed 's/^/| /' conftest.$ac_ext >&5
25488
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025489 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025490fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025491
25492rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025493 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025494fi
25495
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025496{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
25497echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025498if test "$ac_cv_have_getc_unlocked" = yes
25499then
Martin v. Löwis11437992002-04-12 09:54:03 +000025500
25501cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025502#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025503_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025504
25505fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025506
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025507# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000025508# save the value of LIBS so we don't actually link Python with readline
25509LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025510
Gregory P. Smith18820942008-09-07 06:24:49 +000025511# On some systems we need to link readline to a termcap compatible
25512# library. NOTE: Keep the precedence of listed libraries synchronised
25513# with setup.py.
25514py_cv_lib_readline=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025515{ echo "$as_me:$LINENO: checking how to link readline libs" >&5
25516echo $ECHO_N "checking how to link readline libs... $ECHO_C" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000025517for py_libtermcap in "" ncursesw ncurses curses termcap; do
25518 if test -z "$py_libtermcap"; then
25519 READLINE_LIBS="-lreadline"
25520 else
25521 READLINE_LIBS="-lreadline -l$py_libtermcap"
25522 fi
25523 LIBS="$READLINE_LIBS $LIBS_no_readline"
25524 cat >conftest.$ac_ext <<_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025525/* confdefs.h. */
25526_ACEOF
25527cat confdefs.h >>conftest.$ac_ext
25528cat >>conftest.$ac_ext <<_ACEOF
25529/* end confdefs.h. */
25530
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025531/* Override any GCC internal prototype to avoid an error.
25532 Use char because int might match the return type of a GCC
25533 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025534#ifdef __cplusplus
25535extern "C"
25536#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025537char readline ();
25538int
25539main ()
25540{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025541return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025542 ;
25543 return 0;
25544}
25545_ACEOF
25546rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025547if { (ac_try="$ac_link"
25548case "(($ac_try" in
25549 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25550 *) ac_try_echo=$ac_try;;
25551esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025552eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025553 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025554 ac_status=$?
25555 grep -v '^ *+' conftest.er1 >conftest.err
25556 rm -f conftest.er1
25557 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025559 (exit $ac_status); } && {
25560 test -z "$ac_c_werror_flag" ||
25561 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025562 } && test -s conftest$ac_exeext &&
25563 $as_test_x conftest$ac_exeext; then
Gregory P. Smith18820942008-09-07 06:24:49 +000025564 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025565else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025566 echo "$as_me: failed program was:" >&5
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025567sed 's/^/| /' conftest.$ac_ext >&5
25568
Gregory P. Smith18820942008-09-07 06:24:49 +000025569
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025570fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025571
25572rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025573 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000025574 if test $py_cv_lib_readline = yes; then
25575 break
25576 fi
25577done
25578# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
25579#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000025580if test $py_cv_lib_readline = no; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025581 { echo "$as_me:$LINENO: result: none" >&5
25582echo "${ECHO_T}none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000025583else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025584 { echo "$as_me:$LINENO: result: $READLINE_LIBS" >&5
25585echo "${ECHO_T}$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000025586
25587cat >>confdefs.h <<\_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025588#define HAVE_LIBREADLINE 1
25589_ACEOF
25590
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025591fi
25592
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025593# check for readline 2.1
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025594{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
25595echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025596if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025597 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025598else
25599 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025600LIBS="-lreadline $READLINE_LIBS $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025601cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025602/* confdefs.h. */
25603_ACEOF
25604cat confdefs.h >>conftest.$ac_ext
25605cat >>conftest.$ac_ext <<_ACEOF
25606/* end confdefs.h. */
25607
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025608/* Override any GCC internal prototype to avoid an error.
25609 Use char because int might match the return type of a GCC
25610 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025611#ifdef __cplusplus
25612extern "C"
25613#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025614char rl_callback_handler_install ();
25615int
25616main ()
25617{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025618return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025619 ;
25620 return 0;
25621}
25622_ACEOF
25623rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025624if { (ac_try="$ac_link"
25625case "(($ac_try" in
25626 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25627 *) ac_try_echo=$ac_try;;
25628esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025629eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025630 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025631 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025632 grep -v '^ *+' conftest.er1 >conftest.err
25633 rm -f conftest.er1
25634 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025636 (exit $ac_status); } && {
25637 test -z "$ac_c_werror_flag" ||
25638 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025639 } && test -s conftest$ac_exeext &&
25640 $as_test_x conftest$ac_exeext; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025641 ac_cv_lib_readline_rl_callback_handler_install=yes
25642else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025643 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025644sed 's/^/| /' conftest.$ac_ext >&5
25645
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025646 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025647fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025648
25649rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025650 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025651LIBS=$ac_check_lib_save_LIBS
25652fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025653{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
25654echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
25655if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025656
25657cat >>confdefs.h <<\_ACEOF
25658#define HAVE_RL_CALLBACK 1
25659_ACEOF
25660
25661fi
25662
25663
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025664# check for readline 2.2
25665cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025666/* confdefs.h. */
25667_ACEOF
25668cat confdefs.h >>conftest.$ac_ext
25669cat >>conftest.$ac_ext <<_ACEOF
25670/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025671#include <readline/readline.h>
25672_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025673if { (ac_try="$ac_cpp conftest.$ac_ext"
25674case "(($ac_try" in
25675 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25676 *) ac_try_echo=$ac_try;;
25677esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025678eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025679 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025680 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000025681 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025682 rm -f conftest.er1
25683 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025685 (exit $ac_status); } >/dev/null && {
25686 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
25687 test ! -s conftest.err
25688 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025689 have_readline=yes
25690else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025691 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025692sed 's/^/| /' conftest.$ac_ext >&5
25693
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025694 have_readline=no
25695fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025696
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025697rm -f conftest.err conftest.$ac_ext
25698if test $have_readline = yes
25699then
25700 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025701/* confdefs.h. */
25702_ACEOF
25703cat confdefs.h >>conftest.$ac_ext
25704cat >>conftest.$ac_ext <<_ACEOF
25705/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025706#include <readline/readline.h>
25707
25708_ACEOF
25709if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000025710 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025711
25712cat >>confdefs.h <<\_ACEOF
25713#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
25714_ACEOF
25715
25716fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000025717rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025718
Antoine Pitroud5131772009-10-26 19:22:14 +000025719 cat >conftest.$ac_ext <<_ACEOF
25720/* confdefs.h. */
25721_ACEOF
25722cat confdefs.h >>conftest.$ac_ext
25723cat >>conftest.$ac_ext <<_ACEOF
25724/* end confdefs.h. */
25725#include <readline/readline.h>
25726
25727_ACEOF
25728if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25729 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then
25730
25731cat >>confdefs.h <<\_ACEOF
25732#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1
25733_ACEOF
25734
25735fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000025736rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000025737
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025738fi
25739
Martin v. Löwis0daad592001-09-30 21:09:59 +000025740# check for readline 4.0
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025741{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
25742echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025743if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025744 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000025745else
Martin v. Löwis11437992002-04-12 09:54:03 +000025746 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025747LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000025748cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025749/* confdefs.h. */
25750_ACEOF
25751cat confdefs.h >>conftest.$ac_ext
25752cat >>conftest.$ac_ext <<_ACEOF
25753/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025754
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025755/* Override any GCC internal prototype to avoid an error.
25756 Use char because int might match the return type of a GCC
25757 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025758#ifdef __cplusplus
25759extern "C"
25760#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025761char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025762int
25763main ()
25764{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025765return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025766 ;
25767 return 0;
25768}
25769_ACEOF
25770rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025771if { (ac_try="$ac_link"
25772case "(($ac_try" in
25773 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25774 *) ac_try_echo=$ac_try;;
25775esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025776eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025777 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025778 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025779 grep -v '^ *+' conftest.er1 >conftest.err
25780 rm -f conftest.er1
25781 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025783 (exit $ac_status); } && {
25784 test -z "$ac_c_werror_flag" ||
25785 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025786 } && test -s conftest$ac_exeext &&
25787 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025788 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000025789else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025790 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025791sed 's/^/| /' conftest.$ac_ext >&5
25792
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025793 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000025794fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025795
25796rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025797 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025798LIBS=$ac_check_lib_save_LIBS
25799fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025800{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
25801echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
25802if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000025803
Martin v. Löwis11437992002-04-12 09:54:03 +000025804cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000025805#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025806_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000025807
Martin v. Löwis0daad592001-09-30 21:09:59 +000025808fi
25809
Michael W. Hudson54241132001-12-07 15:38:26 +000025810
Thomas Wouters89d996e2007-09-08 17:39:28 +000025811# also in 4.0
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025812{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
25813echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; }
Thomas Wouters89d996e2007-09-08 17:39:28 +000025814if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025815 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000025816else
25817 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025818LIBS="-lreadline $READLINE_LIBS $LIBS"
Thomas Wouters89d996e2007-09-08 17:39:28 +000025819cat >conftest.$ac_ext <<_ACEOF
25820/* confdefs.h. */
25821_ACEOF
25822cat confdefs.h >>conftest.$ac_ext
25823cat >>conftest.$ac_ext <<_ACEOF
25824/* end confdefs.h. */
25825
25826/* Override any GCC internal prototype to avoid an error.
25827 Use char because int might match the return type of a GCC
25828 builtin and then its argument prototype would still apply. */
25829#ifdef __cplusplus
25830extern "C"
25831#endif
25832char rl_completion_display_matches_hook ();
25833int
25834main ()
25835{
25836return rl_completion_display_matches_hook ();
25837 ;
25838 return 0;
25839}
25840_ACEOF
25841rm -f conftest.$ac_objext conftest$ac_exeext
25842if { (ac_try="$ac_link"
25843case "(($ac_try" in
25844 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25845 *) ac_try_echo=$ac_try;;
25846esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025847eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000025848 (eval "$ac_link") 2>conftest.er1
25849 ac_status=$?
25850 grep -v '^ *+' conftest.er1 >conftest.err
25851 rm -f conftest.er1
25852 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000025854 (exit $ac_status); } && {
25855 test -z "$ac_c_werror_flag" ||
25856 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025857 } && test -s conftest$ac_exeext &&
25858 $as_test_x conftest$ac_exeext; then
Thomas Wouters89d996e2007-09-08 17:39:28 +000025859 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
25860else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025861 echo "$as_me: failed program was:" >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000025862sed 's/^/| /' conftest.$ac_ext >&5
25863
25864 ac_cv_lib_readline_rl_completion_display_matches_hook=no
25865fi
25866
25867rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
25868 conftest$ac_exeext conftest.$ac_ext
25869LIBS=$ac_check_lib_save_LIBS
25870fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025871{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
25872echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
25873if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then
Thomas Wouters89d996e2007-09-08 17:39:28 +000025874
25875cat >>confdefs.h <<\_ACEOF
25876#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
25877_ACEOF
25878
25879fi
25880
25881
Martin v. Löwis0daad592001-09-30 21:09:59 +000025882# check for readline 4.2
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025883{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
25884echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025885if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025886 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000025887else
Martin v. Löwis11437992002-04-12 09:54:03 +000025888 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025889LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000025890cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025891/* confdefs.h. */
25892_ACEOF
25893cat confdefs.h >>conftest.$ac_ext
25894cat >>conftest.$ac_ext <<_ACEOF
25895/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025896
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025897/* Override any GCC internal prototype to avoid an error.
25898 Use char because int might match the return type of a GCC
25899 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025900#ifdef __cplusplus
25901extern "C"
25902#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025903char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025904int
25905main ()
25906{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025907return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025908 ;
25909 return 0;
25910}
25911_ACEOF
25912rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025913if { (ac_try="$ac_link"
25914case "(($ac_try" in
25915 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25916 *) ac_try_echo=$ac_try;;
25917esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025918eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025919 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025920 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025921 grep -v '^ *+' conftest.er1 >conftest.err
25922 rm -f conftest.er1
25923 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025925 (exit $ac_status); } && {
25926 test -z "$ac_c_werror_flag" ||
25927 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025928 } && test -s conftest$ac_exeext &&
25929 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025930 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000025931else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025932 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025933sed 's/^/| /' conftest.$ac_ext >&5
25934
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025935 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000025936fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025937
25938rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025939 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025940LIBS=$ac_check_lib_save_LIBS
25941fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025942{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
25943echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
25944if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000025945
Martin v. Löwis11437992002-04-12 09:54:03 +000025946cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000025947#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025948_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000025949
Guido van Rossum353ae582001-07-10 16:45:32 +000025950fi
25951
Jack Jansendd19cf82001-12-06 22:36:17 +000025952
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025953# also in readline 4.2
25954cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025955/* confdefs.h. */
25956_ACEOF
25957cat confdefs.h >>conftest.$ac_ext
25958cat >>conftest.$ac_ext <<_ACEOF
25959/* end confdefs.h. */
25960#include <readline/readline.h>
25961_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025962if { (ac_try="$ac_cpp conftest.$ac_ext"
25963case "(($ac_try" in
25964 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25965 *) ac_try_echo=$ac_try;;
25966esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025967eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025968 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025969 ac_status=$?
25970 grep -v '^ *+' conftest.er1 >conftest.err
25971 rm -f conftest.er1
25972 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025974 (exit $ac_status); } >/dev/null && {
25975 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
25976 test ! -s conftest.err
25977 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025978 have_readline=yes
25979else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025980 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025981sed 's/^/| /' conftest.$ac_ext >&5
25982
25983 have_readline=no
25984fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025985
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025986rm -f conftest.err conftest.$ac_ext
25987if test $have_readline = yes
25988then
25989 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025990/* confdefs.h. */
25991_ACEOF
25992cat confdefs.h >>conftest.$ac_ext
25993cat >>conftest.$ac_ext <<_ACEOF
25994/* end confdefs.h. */
25995#include <readline/readline.h>
25996
25997_ACEOF
25998if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25999 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
26000
26001cat >>confdefs.h <<\_ACEOF
26002#define HAVE_RL_CATCH_SIGNAL 1
26003_ACEOF
26004
26005fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000026006rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026007
26008fi
26009
Martin v. Löwis82bca632006-02-10 20:49:30 +000026010# End of readline checks: restore LIBS
26011LIBS=$LIBS_no_readline
26012
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026013{ echo "$as_me:$LINENO: checking for broken nice()" >&5
26014echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026015if test "${ac_cv_broken_nice+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026016 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000026017else
Martin v. Löwis11437992002-04-12 09:54:03 +000026018
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026019if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000026020 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026021else
Martin v. Löwis11437992002-04-12 09:54:03 +000026022 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026023/* confdefs.h. */
26024_ACEOF
26025cat confdefs.h >>conftest.$ac_ext
26026cat >>conftest.$ac_ext <<_ACEOF
26027/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026028
26029int main()
26030{
26031 int val1 = nice(1);
26032 if (val1 != -1 && val1 == nice(2))
26033 exit(0);
26034 exit(1);
26035}
26036
Martin v. Löwis11437992002-04-12 09:54:03 +000026037_ACEOF
26038rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026039if { (ac_try="$ac_link"
26040case "(($ac_try" in
26041 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26042 *) ac_try_echo=$ac_try;;
26043esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026044eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026045 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026046 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026048 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026049 { (case "(($ac_try" in
26050 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26051 *) ac_try_echo=$ac_try;;
26052esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026053eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026054 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026055 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026056 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026057 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026058 ac_cv_broken_nice=yes
26059else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026060 echo "$as_me: program exited with status $ac_status" >&5
26061echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026062sed 's/^/| /' conftest.$ac_ext >&5
26063
Martin v. Löwis11437992002-04-12 09:54:03 +000026064( exit $ac_status )
26065ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026066fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026067rm -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 +000026068fi
26069
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026070
26071fi
26072
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026073{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
26074echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026075if test "$ac_cv_broken_nice" = yes
26076then
Martin v. Löwis11437992002-04-12 09:54:03 +000026077
26078cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026079#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026080_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026081
26082fi
26083
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026084{ echo "$as_me:$LINENO: checking for broken poll()" >&5
26085echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026086if test "${ac_cv_broken_poll+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026087 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026088else
26089 if test "$cross_compiling" = yes; then
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026090 ac_cv_broken_poll=no
26091else
26092 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026093/* confdefs.h. */
26094_ACEOF
26095cat confdefs.h >>conftest.$ac_ext
26096cat >>conftest.$ac_ext <<_ACEOF
26097/* end confdefs.h. */
26098
26099#include <poll.h>
26100
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026101int main()
26102{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026103 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026104 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026105
26106 close (42);
26107
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026108 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026109 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026110 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026111 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026112 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026113 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026114 return 1;
26115}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026116
26117_ACEOF
26118rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026119if { (ac_try="$ac_link"
26120case "(($ac_try" in
26121 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26122 *) ac_try_echo=$ac_try;;
26123esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026124eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026125 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026126 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026128 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026129 { (case "(($ac_try" in
26130 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26131 *) ac_try_echo=$ac_try;;
26132esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026133eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026134 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026135 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026136 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026137 (exit $ac_status); }; }; then
26138 ac_cv_broken_poll=yes
26139else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026140 echo "$as_me: program exited with status $ac_status" >&5
26141echo "$as_me: failed program was:" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026142sed 's/^/| /' conftest.$ac_ext >&5
26143
26144( exit $ac_status )
26145ac_cv_broken_poll=no
26146fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026147rm -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 +000026148fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026149
26150
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026151fi
26152
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026153{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
26154echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026155if test "$ac_cv_broken_poll" = yes
26156then
26157
26158cat >>confdefs.h <<\_ACEOF
26159#define HAVE_BROKEN_POLL 1
26160_ACEOF
26161
26162fi
26163
Brett Cannon43802422005-02-10 20:48:03 +000026164# 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 +000026165# (which is not required by ISO C or UNIX spec) and/or if we support
26166# tzname[]
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026167{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
26168echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026169if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026170 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000026171else
26172 cat >conftest.$ac_ext <<_ACEOF
26173/* confdefs.h. */
26174_ACEOF
26175cat confdefs.h >>conftest.$ac_ext
26176cat >>conftest.$ac_ext <<_ACEOF
26177/* end confdefs.h. */
26178#include <sys/types.h>
26179#include <$ac_cv_struct_tm>
26180
26181
26182int
26183main ()
26184{
26185static struct tm ac_aggr;
26186if (ac_aggr.tm_zone)
26187return 0;
26188 ;
26189 return 0;
26190}
26191_ACEOF
26192rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026193if { (ac_try="$ac_compile"
26194case "(($ac_try" in
26195 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26196 *) ac_try_echo=$ac_try;;
26197esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026198eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026199 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000026200 ac_status=$?
26201 grep -v '^ *+' conftest.er1 >conftest.err
26202 rm -f conftest.er1
26203 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026205 (exit $ac_status); } && {
26206 test -z "$ac_c_werror_flag" ||
26207 test ! -s conftest.err
26208 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000026209 ac_cv_member_struct_tm_tm_zone=yes
26210else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026211 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000026212sed 's/^/| /' conftest.$ac_ext >&5
26213
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026214 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000026215/* confdefs.h. */
26216_ACEOF
26217cat confdefs.h >>conftest.$ac_ext
26218cat >>conftest.$ac_ext <<_ACEOF
26219/* end confdefs.h. */
26220#include <sys/types.h>
26221#include <$ac_cv_struct_tm>
26222
26223
26224int
26225main ()
26226{
26227static struct tm ac_aggr;
26228if (sizeof ac_aggr.tm_zone)
26229return 0;
26230 ;
26231 return 0;
26232}
26233_ACEOF
26234rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026235if { (ac_try="$ac_compile"
26236case "(($ac_try" in
26237 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26238 *) ac_try_echo=$ac_try;;
26239esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026240eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026241 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000026242 ac_status=$?
26243 grep -v '^ *+' conftest.er1 >conftest.err
26244 rm -f conftest.er1
26245 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026247 (exit $ac_status); } && {
26248 test -z "$ac_c_werror_flag" ||
26249 test ! -s conftest.err
26250 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000026251 ac_cv_member_struct_tm_tm_zone=yes
26252else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026253 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000026254sed 's/^/| /' conftest.$ac_ext >&5
26255
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026256 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000026257fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026258
26259rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000026260fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026261
26262rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000026263fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026264{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
26265echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
26266if test $ac_cv_member_struct_tm_tm_zone = yes; then
Brett Cannon43802422005-02-10 20:48:03 +000026267
26268cat >>confdefs.h <<_ACEOF
26269#define HAVE_STRUCT_TM_TM_ZONE 1
26270_ACEOF
26271
26272
26273fi
26274
26275if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
26276
26277cat >>confdefs.h <<\_ACEOF
26278#define HAVE_TM_ZONE 1
26279_ACEOF
26280
26281else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026282 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
26283echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026284if test "${ac_cv_have_decl_tzname+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026285 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026286else
26287 cat >conftest.$ac_ext <<_ACEOF
26288/* confdefs.h. */
26289_ACEOF
26290cat confdefs.h >>conftest.$ac_ext
26291cat >>conftest.$ac_ext <<_ACEOF
26292/* end confdefs.h. */
26293#include <time.h>
26294
26295int
26296main ()
26297{
26298#ifndef tzname
26299 (void) tzname;
26300#endif
26301
26302 ;
26303 return 0;
26304}
26305_ACEOF
26306rm -f conftest.$ac_objext
26307if { (ac_try="$ac_compile"
26308case "(($ac_try" in
26309 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26310 *) ac_try_echo=$ac_try;;
26311esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026312eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026313 (eval "$ac_compile") 2>conftest.er1
26314 ac_status=$?
26315 grep -v '^ *+' conftest.er1 >conftest.err
26316 rm -f conftest.er1
26317 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026318 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026319 (exit $ac_status); } && {
26320 test -z "$ac_c_werror_flag" ||
26321 test ! -s conftest.err
26322 } && test -s conftest.$ac_objext; then
26323 ac_cv_have_decl_tzname=yes
26324else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026325 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026326sed 's/^/| /' conftest.$ac_ext >&5
26327
26328 ac_cv_have_decl_tzname=no
26329fi
26330
26331rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26332fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026333{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
26334echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
26335if test $ac_cv_have_decl_tzname = yes; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026336
26337cat >>confdefs.h <<_ACEOF
26338#define HAVE_DECL_TZNAME 1
26339_ACEOF
26340
26341
26342else
26343 cat >>confdefs.h <<_ACEOF
26344#define HAVE_DECL_TZNAME 0
26345_ACEOF
26346
26347
26348fi
26349
26350
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026351 { echo "$as_me:$LINENO: checking for tzname" >&5
26352echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026353if test "${ac_cv_var_tzname+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026354 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000026355else
26356 cat >conftest.$ac_ext <<_ACEOF
26357/* confdefs.h. */
26358_ACEOF
26359cat confdefs.h >>conftest.$ac_ext
26360cat >>conftest.$ac_ext <<_ACEOF
26361/* end confdefs.h. */
26362#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026363#if !HAVE_DECL_TZNAME
26364extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000026365#endif
26366
26367int
26368main ()
26369{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026370return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000026371 ;
26372 return 0;
26373}
26374_ACEOF
26375rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026376if { (ac_try="$ac_link"
26377case "(($ac_try" in
26378 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26379 *) ac_try_echo=$ac_try;;
26380esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026381eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026382 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000026383 ac_status=$?
26384 grep -v '^ *+' conftest.er1 >conftest.err
26385 rm -f conftest.er1
26386 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026388 (exit $ac_status); } && {
26389 test -z "$ac_c_werror_flag" ||
26390 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026391 } && test -s conftest$ac_exeext &&
26392 $as_test_x conftest$ac_exeext; then
Brett Cannon43802422005-02-10 20:48:03 +000026393 ac_cv_var_tzname=yes
26394else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026395 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000026396sed 's/^/| /' conftest.$ac_ext >&5
26397
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026398 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000026399fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026400
26401rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000026402 conftest$ac_exeext conftest.$ac_ext
26403fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026404{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
26405echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026406 if test $ac_cv_var_tzname = yes; then
26407
26408cat >>confdefs.h <<\_ACEOF
26409#define HAVE_TZNAME 1
26410_ACEOF
26411
26412 fi
26413fi
26414
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026415
Martin v. Löwis1d459062005-03-14 21:23:33 +000026416# check tzset(3) exists and works like we expect it to
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026417{ echo "$as_me:$LINENO: checking for working tzset()" >&5
26418echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026419if test "${ac_cv_working_tzset+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026420 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026421else
26422
26423if test "$cross_compiling" = yes; then
26424 ac_cv_working_tzset=no
26425else
26426 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026427/* confdefs.h. */
26428_ACEOF
26429cat confdefs.h >>conftest.$ac_ext
26430cat >>conftest.$ac_ext <<_ACEOF
26431/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026432
26433#include <stdlib.h>
26434#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000026435#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000026436
26437#if HAVE_TZNAME
26438extern char *tzname[];
26439#endif
26440
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026441int main()
26442{
Brett Cannon18367812003-09-19 00:59:16 +000026443 /* Note that we need to ensure that not only does tzset(3)
26444 do 'something' with localtime, but it works as documented
26445 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000026446 This includes making sure that tzname is set properly if
26447 tm->tm_zone does not exist since it is the alternative way
26448 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000026449
26450 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000026451 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000026452 */
26453
Martin v. Löwis1d459062005-03-14 21:23:33 +000026454 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000026455 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
26456
Neal Norwitz7f2588c2003-04-11 15:35:53 +000026457 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026458 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000026459 if (localtime(&groundhogday)->tm_hour != 0)
26460 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026461#if HAVE_TZNAME
26462 /* For UTC, tzname[1] is sometimes "", sometimes " " */
26463 if (strcmp(tzname[0], "UTC") ||
26464 (tzname[1][0] != 0 && tzname[1][0] != ' '))
26465 exit(1);
26466#endif
Brett Cannon18367812003-09-19 00:59:16 +000026467
Neal Norwitz7f2588c2003-04-11 15:35:53 +000026468 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026469 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000026470 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026471 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026472#if HAVE_TZNAME
26473 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
26474 exit(1);
26475#endif
Brett Cannon18367812003-09-19 00:59:16 +000026476
26477 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
26478 tzset();
26479 if (localtime(&groundhogday)->tm_hour != 11)
26480 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026481#if HAVE_TZNAME
26482 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
26483 exit(1);
26484#endif
26485
26486#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000026487 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
26488 exit(1);
26489 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
26490 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026491#endif
Brett Cannon18367812003-09-19 00:59:16 +000026492
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026493 exit(0);
26494}
26495
26496_ACEOF
26497rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026498if { (ac_try="$ac_link"
26499case "(($ac_try" in
26500 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26501 *) ac_try_echo=$ac_try;;
26502esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026503eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026504 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026505 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026507 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026508 { (case "(($ac_try" in
26509 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26510 *) ac_try_echo=$ac_try;;
26511esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026512eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026513 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026514 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026515 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026516 (exit $ac_status); }; }; then
26517 ac_cv_working_tzset=yes
26518else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026519 echo "$as_me: program exited with status $ac_status" >&5
26520echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026521sed 's/^/| /' conftest.$ac_ext >&5
26522
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026523( exit $ac_status )
26524ac_cv_working_tzset=no
26525fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026526rm -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 +000026527fi
26528
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026529
26530fi
26531
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026532{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
26533echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026534if test "$ac_cv_working_tzset" = yes
26535then
26536
26537cat >>confdefs.h <<\_ACEOF
26538#define HAVE_WORKING_TZSET 1
26539_ACEOF
26540
26541fi
26542
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026543# Look for subsecond timestamps in struct stat
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026544{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
26545echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026546if test "${ac_cv_stat_tv_nsec+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026547 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026548else
26549 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026550/* confdefs.h. */
26551_ACEOF
26552cat confdefs.h >>conftest.$ac_ext
26553cat >>conftest.$ac_ext <<_ACEOF
26554/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026555#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026556int
26557main ()
26558{
26559
26560struct stat st;
26561st.st_mtim.tv_nsec = 1;
26562
26563 ;
26564 return 0;
26565}
26566_ACEOF
26567rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026568if { (ac_try="$ac_compile"
26569case "(($ac_try" in
26570 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26571 *) ac_try_echo=$ac_try;;
26572esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026573eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026574 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026575 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026576 grep -v '^ *+' conftest.er1 >conftest.err
26577 rm -f conftest.er1
26578 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026580 (exit $ac_status); } && {
26581 test -z "$ac_c_werror_flag" ||
26582 test ! -s conftest.err
26583 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000026584 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026585else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026586 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026587sed 's/^/| /' conftest.$ac_ext >&5
26588
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026589 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026590fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026591
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026592rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26593fi
26594
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026595{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
26596echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026597if test "$ac_cv_stat_tv_nsec" = yes
26598then
26599
26600cat >>confdefs.h <<\_ACEOF
26601#define HAVE_STAT_TV_NSEC 1
26602_ACEOF
26603
26604fi
26605
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026606# Look for BSD style subsecond timestamps in struct stat
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026607{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
26608echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026609if test "${ac_cv_stat_tv_nsec2+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026610 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026611else
26612 cat >conftest.$ac_ext <<_ACEOF
26613/* confdefs.h. */
26614_ACEOF
26615cat confdefs.h >>conftest.$ac_ext
26616cat >>conftest.$ac_ext <<_ACEOF
26617/* end confdefs.h. */
26618#include <sys/stat.h>
26619int
26620main ()
26621{
26622
26623struct stat st;
26624st.st_mtimespec.tv_nsec = 1;
26625
26626 ;
26627 return 0;
26628}
26629_ACEOF
26630rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026631if { (ac_try="$ac_compile"
26632case "(($ac_try" in
26633 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26634 *) ac_try_echo=$ac_try;;
26635esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026636eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026637 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026638 ac_status=$?
26639 grep -v '^ *+' conftest.er1 >conftest.err
26640 rm -f conftest.er1
26641 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026643 (exit $ac_status); } && {
26644 test -z "$ac_c_werror_flag" ||
26645 test ! -s conftest.err
26646 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026647 ac_cv_stat_tv_nsec2=yes
26648else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026649 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026650sed 's/^/| /' conftest.$ac_ext >&5
26651
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026652 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026653fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026654
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026655rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26656fi
26657
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026658{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
26659echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026660if test "$ac_cv_stat_tv_nsec2" = yes
26661then
26662
26663cat >>confdefs.h <<\_ACEOF
26664#define HAVE_STAT_TV_NSEC2 1
26665_ACEOF
26666
26667fi
26668
Jack Jansen666b1e72001-10-31 12:11:48 +000026669# On HP/UX 11.0, mvwdelch is a block with a return statement
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026670{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
26671echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026672if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026673 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000026674else
Martin v. Löwis11437992002-04-12 09:54:03 +000026675 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026676/* confdefs.h. */
26677_ACEOF
26678cat confdefs.h >>conftest.$ac_ext
26679cat >>conftest.$ac_ext <<_ACEOF
26680/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000026681#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000026682int
26683main ()
26684{
Jack Jansen666b1e72001-10-31 12:11:48 +000026685
26686 int rtn;
26687 rtn = mvwdelch(0,0,0);
26688
Martin v. Löwis11437992002-04-12 09:54:03 +000026689 ;
26690 return 0;
26691}
26692_ACEOF
26693rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026694if { (ac_try="$ac_compile"
26695case "(($ac_try" in
26696 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26697 *) ac_try_echo=$ac_try;;
26698esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026699eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026700 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026701 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026702 grep -v '^ *+' conftest.er1 >conftest.err
26703 rm -f conftest.er1
26704 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026706 (exit $ac_status); } && {
26707 test -z "$ac_c_werror_flag" ||
26708 test ! -s conftest.err
26709 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000026710 ac_cv_mvwdelch_is_expression=yes
26711else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026712 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026713sed 's/^/| /' conftest.$ac_ext >&5
26714
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026715 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000026716fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026717
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026718rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26719fi
26720
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026721{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
26722echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000026723
26724if test "$ac_cv_mvwdelch_is_expression" = yes
26725then
Martin v. Löwis11437992002-04-12 09:54:03 +000026726
26727cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026728#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026729_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026730
26731fi
26732
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026733{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
26734echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026735if test "${ac_cv_window_has_flags+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026736 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000026737else
Martin v. Löwis11437992002-04-12 09:54:03 +000026738 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026739/* confdefs.h. */
26740_ACEOF
26741cat confdefs.h >>conftest.$ac_ext
26742cat >>conftest.$ac_ext <<_ACEOF
26743/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000026744#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000026745int
26746main ()
26747{
Jack Jansen666b1e72001-10-31 12:11:48 +000026748
26749 WINDOW *w;
26750 w->_flags = 0;
26751
Martin v. Löwis11437992002-04-12 09:54:03 +000026752 ;
26753 return 0;
26754}
26755_ACEOF
26756rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026757if { (ac_try="$ac_compile"
26758case "(($ac_try" in
26759 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26760 *) ac_try_echo=$ac_try;;
26761esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026762eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026763 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026764 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026765 grep -v '^ *+' conftest.er1 >conftest.err
26766 rm -f conftest.er1
26767 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026769 (exit $ac_status); } && {
26770 test -z "$ac_c_werror_flag" ||
26771 test ! -s conftest.err
26772 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000026773 ac_cv_window_has_flags=yes
26774else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026775 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026776sed 's/^/| /' conftest.$ac_ext >&5
26777
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026778 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000026779fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026780
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026781rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26782fi
26783
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026784{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
26785echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000026786
Jack Jansen666b1e72001-10-31 12:11:48 +000026787
26788if test "$ac_cv_window_has_flags" = yes
26789then
Martin v. Löwis11437992002-04-12 09:54:03 +000026790
26791cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026792#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026793_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026794
26795fi
26796
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026797{ echo "$as_me:$LINENO: checking for is_term_resized" >&5
26798echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026799cat >conftest.$ac_ext <<_ACEOF
26800/* confdefs.h. */
26801_ACEOF
26802cat confdefs.h >>conftest.$ac_ext
26803cat >>conftest.$ac_ext <<_ACEOF
26804/* end confdefs.h. */
26805#include <curses.h>
26806int
26807main ()
26808{
26809void *x=is_term_resized
26810 ;
26811 return 0;
26812}
26813_ACEOF
26814rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026815if { (ac_try="$ac_compile"
26816case "(($ac_try" in
26817 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26818 *) ac_try_echo=$ac_try;;
26819esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026820eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026821 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026822 ac_status=$?
26823 grep -v '^ *+' conftest.er1 >conftest.err
26824 rm -f conftest.er1
26825 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026827 (exit $ac_status); } && {
26828 test -z "$ac_c_werror_flag" ||
26829 test ! -s conftest.err
26830 } && test -s conftest.$ac_objext; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026831
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026832cat >>confdefs.h <<\_ACEOF
26833#define HAVE_CURSES_IS_TERM_RESIZED 1
26834_ACEOF
26835
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026836 { echo "$as_me:$LINENO: result: yes" >&5
26837echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026838else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026839 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026840sed 's/^/| /' conftest.$ac_ext >&5
26841
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026842 { echo "$as_me:$LINENO: result: no" >&5
26843echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026844
26845fi
26846
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026847rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26848
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026849{ echo "$as_me:$LINENO: checking for resize_term" >&5
26850echo $ECHO_N "checking for resize_term... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026851cat >conftest.$ac_ext <<_ACEOF
26852/* confdefs.h. */
26853_ACEOF
26854cat confdefs.h >>conftest.$ac_ext
26855cat >>conftest.$ac_ext <<_ACEOF
26856/* end confdefs.h. */
26857#include <curses.h>
26858int
26859main ()
26860{
26861void *x=resize_term
26862 ;
26863 return 0;
26864}
26865_ACEOF
26866rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026867if { (ac_try="$ac_compile"
26868case "(($ac_try" in
26869 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26870 *) ac_try_echo=$ac_try;;
26871esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026872eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026873 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026874 ac_status=$?
26875 grep -v '^ *+' conftest.er1 >conftest.err
26876 rm -f conftest.er1
26877 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026878 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026879 (exit $ac_status); } && {
26880 test -z "$ac_c_werror_flag" ||
26881 test ! -s conftest.err
26882 } && test -s conftest.$ac_objext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026883
26884cat >>confdefs.h <<\_ACEOF
26885#define HAVE_CURSES_RESIZE_TERM 1
26886_ACEOF
26887
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026888 { echo "$as_me:$LINENO: result: yes" >&5
26889echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026890else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026891 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026892sed 's/^/| /' conftest.$ac_ext >&5
26893
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026894 { echo "$as_me:$LINENO: result: no" >&5
26895echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026896
26897fi
26898
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026899rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26900
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026901{ echo "$as_me:$LINENO: checking for resizeterm" >&5
26902echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026903cat >conftest.$ac_ext <<_ACEOF
26904/* confdefs.h. */
26905_ACEOF
26906cat confdefs.h >>conftest.$ac_ext
26907cat >>conftest.$ac_ext <<_ACEOF
26908/* end confdefs.h. */
26909#include <curses.h>
26910int
26911main ()
26912{
26913void *x=resizeterm
26914 ;
26915 return 0;
26916}
26917_ACEOF
26918rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026919if { (ac_try="$ac_compile"
26920case "(($ac_try" in
26921 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26922 *) ac_try_echo=$ac_try;;
26923esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026924eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026925 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026926 ac_status=$?
26927 grep -v '^ *+' conftest.er1 >conftest.err
26928 rm -f conftest.er1
26929 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026931 (exit $ac_status); } && {
26932 test -z "$ac_c_werror_flag" ||
26933 test ! -s conftest.err
26934 } && test -s conftest.$ac_objext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026935
26936cat >>confdefs.h <<\_ACEOF
26937#define HAVE_CURSES_RESIZETERM 1
26938_ACEOF
26939
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026940 { echo "$as_me:$LINENO: result: yes" >&5
26941echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026942else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026943 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026944sed 's/^/| /' conftest.$ac_ext >&5
26945
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026946 { echo "$as_me:$LINENO: result: no" >&5
26947echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026948
26949fi
26950
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026951rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26952
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026953{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
26954echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000026955
26956if test -r /dev/ptmx
26957then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026958 { echo "$as_me:$LINENO: result: yes" >&5
26959echo "${ECHO_T}yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026960
26961cat >>confdefs.h <<\_ACEOF
26962#define HAVE_DEV_PTMX 1
26963_ACEOF
26964
Thomas Wouters89f507f2006-12-13 04:49:30 +000026965else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026966 { echo "$as_me:$LINENO: result: no" >&5
26967echo "${ECHO_T}no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026968fi
26969
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026970{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
26971echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000026972
26973if test -r /dev/ptc
26974then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026975 { echo "$as_me:$LINENO: result: yes" >&5
26976echo "${ECHO_T}yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000026977
26978cat >>confdefs.h <<\_ACEOF
26979#define HAVE_DEV_PTC 1
26980_ACEOF
26981
Thomas Wouters89f507f2006-12-13 04:49:30 +000026982else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026983 { echo "$as_me:$LINENO: result: no" >&5
26984echo "${ECHO_T}no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000026985fi
26986
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000026987if test "$have_long_long" = yes
26988then
26989 { echo "$as_me:$LINENO: checking for %lld and %llu printf() format support" >&5
26990echo $ECHO_N "checking for %lld and %llu printf() format support... $ECHO_C" >&6; }
26991 if test "${ac_cv_have_long_long_format+set}" = set; then
26992 echo $ECHO_N "(cached) $ECHO_C" >&6
26993else
26994 if test "$cross_compiling" = yes; then
26995 ac_cv_have_long_long_format=no
26996else
26997 cat >conftest.$ac_ext <<_ACEOF
26998/* confdefs.h. */
26999_ACEOF
27000cat confdefs.h >>conftest.$ac_ext
27001cat >>conftest.$ac_ext <<_ACEOF
27002/* end confdefs.h. */
27003
27004 #include <stdio.h>
27005 #include <stddef.h>
27006 #include <string.h>
27007
27008 #ifdef HAVE_SYS_TYPES_H
27009 #include <sys/types.h>
27010 #endif
27011
27012 int main()
27013 {
27014 char buffer[256];
27015
27016 if (sprintf(buffer, "%lld", (long long)123) < 0)
27017 return 1;
27018 if (strcmp(buffer, "123"))
27019 return 1;
27020
27021 if (sprintf(buffer, "%lld", (long long)-123) < 0)
27022 return 1;
27023 if (strcmp(buffer, "-123"))
27024 return 1;
27025
27026 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
27027 return 1;
27028 if (strcmp(buffer, "123"))
27029 return 1;
27030
27031 return 0;
27032 }
27033
27034_ACEOF
27035rm -f conftest$ac_exeext
27036if { (ac_try="$ac_link"
27037case "(($ac_try" in
27038 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27039 *) ac_try_echo=$ac_try;;
27040esac
27041eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27042 (eval "$ac_link") 2>&5
27043 ac_status=$?
27044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27045 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
27046 { (case "(($ac_try" in
27047 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27048 *) ac_try_echo=$ac_try;;
27049esac
27050eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27051 (eval "$ac_try") 2>&5
27052 ac_status=$?
27053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27054 (exit $ac_status); }; }; then
27055 ac_cv_have_long_long_format=yes
27056else
27057 echo "$as_me: program exited with status $ac_status" >&5
27058echo "$as_me: failed program was:" >&5
27059sed 's/^/| /' conftest.$ac_ext >&5
27060
27061( exit $ac_status )
27062ac_cv_have_long_long_format=no
27063fi
27064rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
27065fi
27066
27067
27068
27069fi
27070
27071 { echo "$as_me:$LINENO: result: $ac_cv_have_long_long_format" >&5
27072echo "${ECHO_T}$ac_cv_have_long_long_format" >&6; }
27073fi
27074
Mark Dickinson89d7d412009-12-31 20:50:59 +000027075if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000027076then
27077
27078cat >>confdefs.h <<\_ACEOF
27079#define PY_FORMAT_LONG_LONG "ll"
27080_ACEOF
27081
27082fi
27083
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000027084if test $ac_sys_system = Darwin
27085then
27086 LIBS="$LIBS -framework CoreFoundation"
27087fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000027088
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027089{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
27090echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027091if test "${ac_cv_have_size_t_format+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027092 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027093else
27094 if test "$cross_compiling" = yes; then
Benjamin Peterson8f326b22009-12-13 02:10:36 +000027095 ac_cv_have_size_t_format="cross -- assuming yes"
27096
Thomas Wouters477c8d52006-05-27 19:21:47 +000027097else
27098 cat >conftest.$ac_ext <<_ACEOF
27099/* confdefs.h. */
27100_ACEOF
27101cat confdefs.h >>conftest.$ac_ext
27102cat >>conftest.$ac_ext <<_ACEOF
27103/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027104
Thomas Wouters477c8d52006-05-27 19:21:47 +000027105#include <stdio.h>
27106#include <stddef.h>
27107#include <string.h>
27108
Christian Heimes2c181612007-12-17 20:04:13 +000027109#ifdef HAVE_SYS_TYPES_H
27110#include <sys/types.h>
27111#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000027112
27113#ifdef HAVE_SSIZE_T
27114typedef ssize_t Py_ssize_t;
27115#elif SIZEOF_VOID_P == SIZEOF_LONG
27116typedef long Py_ssize_t;
27117#else
27118typedef int Py_ssize_t;
27119#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000027120
Christian Heimes2c181612007-12-17 20:04:13 +000027121int main()
27122{
27123 char buffer[256];
27124
Thomas Wouters477c8d52006-05-27 19:21:47 +000027125 if(sprintf(buffer, "%zd", (size_t)123) < 0)
27126 return 1;
27127
Thomas Wouters89f507f2006-12-13 04:49:30 +000027128 if (strcmp(buffer, "123"))
27129 return 1;
27130
27131 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
27132 return 1;
27133
27134 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000027135 return 1;
27136
27137 return 0;
27138}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027139
Thomas Wouters477c8d52006-05-27 19:21:47 +000027140_ACEOF
27141rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027142if { (ac_try="$ac_link"
27143case "(($ac_try" in
27144 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27145 *) ac_try_echo=$ac_try;;
27146esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027147eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027148 (eval "$ac_link") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000027149 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000027151 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027152 { (case "(($ac_try" in
27153 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27154 *) ac_try_echo=$ac_try;;
27155esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027156eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027157 (eval "$ac_try") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000027158 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000027160 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027161 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027162else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027163 echo "$as_me: program exited with status $ac_status" >&5
27164echo "$as_me: failed program was:" >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027165sed 's/^/| /' conftest.$ac_ext >&5
27166
27167( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027168ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027169fi
27170rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000027171fi
27172
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027173
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027174fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027175{ echo "$as_me:$LINENO: result: $ac_cv_have_size_t_format" >&5
27176echo "${ECHO_T}$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000027177if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027178
27179cat >>confdefs.h <<\_ACEOF
27180#define PY_FORMAT_SIZE_T "z"
27181_ACEOF
27182
27183fi
27184
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027185{ echo "$as_me:$LINENO: checking for socklen_t" >&5
27186echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000027187if test "${ac_cv_type_socklen_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027188 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000027189else
Martin v. Löwis11437992002-04-12 09:54:03 +000027190 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027191/* confdefs.h. */
27192_ACEOF
27193cat confdefs.h >>conftest.$ac_ext
27194cat >>conftest.$ac_ext <<_ACEOF
27195/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000027196
27197#ifdef HAVE_SYS_TYPES_H
27198#include <sys/types.h>
27199#endif
27200#ifdef HAVE_SYS_SOCKET_H
27201#include <sys/socket.h>
27202#endif
27203
27204
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027205typedef socklen_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000027206int
27207main ()
27208{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027209if ((ac__type_new_ *) 0)
27210 return 0;
27211if (sizeof (ac__type_new_))
27212 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000027213 ;
27214 return 0;
27215}
27216_ACEOF
27217rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027218if { (ac_try="$ac_compile"
27219case "(($ac_try" in
27220 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27221 *) ac_try_echo=$ac_try;;
27222esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027223eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027224 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000027225 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000027226 grep -v '^ *+' conftest.er1 >conftest.err
27227 rm -f conftest.er1
27228 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027230 (exit $ac_status); } && {
27231 test -z "$ac_c_werror_flag" ||
27232 test ! -s conftest.err
27233 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027234 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000027235else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027236 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000027237sed 's/^/| /' conftest.$ac_ext >&5
27238
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027239 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000027240fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027241
27242rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000027243fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027244{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
27245echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
27246if test $ac_cv_type_socklen_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027247 :
27248else
Guido van Rossum95713eb2000-05-18 20:53:31 +000027249
Martin v. Löwis01c04012002-11-11 14:58:44 +000027250cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000027251#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000027252_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000027253
27254fi
27255
Michael W. Hudson54241132001-12-07 15:38:26 +000027256
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027257{ echo "$as_me:$LINENO: checking for broken mbstowcs" >&5
27258echo $ECHO_N "checking for broken mbstowcs... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027259if test "${ac_cv_broken_mbstowcs+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027260 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027261else
27262 if test "$cross_compiling" = yes; then
Antoine Pitroufff95302008-09-03 18:58:51 +000027263 ac_cv_broken_mbstowcs=no
27264else
27265 cat >conftest.$ac_ext <<_ACEOF
27266/* confdefs.h. */
27267_ACEOF
27268cat confdefs.h >>conftest.$ac_ext
27269cat >>conftest.$ac_ext <<_ACEOF
27270/* end confdefs.h. */
27271
27272#include<stdlib.h>
27273int main() {
27274 size_t len = -1;
27275 const char *str = "text";
27276 len = mbstowcs(NULL, str, 0);
27277 return (len != 4);
27278}
27279
27280_ACEOF
27281rm -f conftest$ac_exeext
27282if { (ac_try="$ac_link"
27283case "(($ac_try" in
27284 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27285 *) ac_try_echo=$ac_try;;
27286esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027287eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000027288 (eval "$ac_link") 2>&5
27289 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000027291 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
27292 { (case "(($ac_try" in
27293 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27294 *) ac_try_echo=$ac_try;;
27295esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027296eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000027297 (eval "$ac_try") 2>&5
27298 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000027300 (exit $ac_status); }; }; then
27301 ac_cv_broken_mbstowcs=no
27302else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027303 echo "$as_me: program exited with status $ac_status" >&5
27304echo "$as_me: failed program was:" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000027305sed 's/^/| /' conftest.$ac_ext >&5
27306
27307( exit $ac_status )
27308ac_cv_broken_mbstowcs=yes
27309fi
27310rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
27311fi
27312
27313
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027314fi
27315
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027316{ echo "$as_me:$LINENO: result: $ac_cv_broken_mbstowcs" >&5
27317echo "${ECHO_T}$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000027318if test "$ac_cv_broken_mbstowcs" = yes
27319then
27320
27321cat >>confdefs.h <<\_ACEOF
27322#define HAVE_BROKEN_MBSTOWCS 1
27323_ACEOF
27324
27325fi
27326
Antoine Pitroub52ec782009-01-25 16:34:23 +000027327# Check for --with-computed-gotos
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027328{ echo "$as_me:$LINENO: checking for --with-computed-gotos" >&5
27329echo $ECHO_N "checking for --with-computed-gotos... $ECHO_C" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000027330
27331# Check whether --with-computed-gotos was given.
27332if test "${with_computed_gotos+set}" = set; then
27333 withval=$with_computed_gotos;
27334if test "$withval" != no
27335then
27336
27337cat >>confdefs.h <<\_ACEOF
27338#define USE_COMPUTED_GOTOS 1
27339_ACEOF
27340
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027341 { echo "$as_me:$LINENO: result: yes" >&5
27342echo "${ECHO_T}yes" >&6; }
27343else { echo "$as_me:$LINENO: result: no" >&5
27344echo "${ECHO_T}no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000027345fi
27346else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027347 { echo "$as_me:$LINENO: result: no" >&5
27348echo "${ECHO_T}no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000027349fi
27350
27351
27352
Michael W. Hudson54241132001-12-07 15:38:26 +000027353
27354
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000027355for h in `(cd $srcdir;echo Python/thread_*.h)`
27356do
27357 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
27358done
27359
Michael W. Hudson54241132001-12-07 15:38:26 +000027360
Neal Norwitzd24499d2005-12-18 21:36:39 +000027361SRCDIRS="Parser Grammar Objects Python Modules Mac"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027362{ echo "$as_me:$LINENO: checking for build directories" >&5
27363echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000027364for dir in $SRCDIRS; do
27365 if test ! -d $dir; then
27366 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000027367 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000027368done
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027369{ echo "$as_me:$LINENO: result: done" >&5
27370echo "${ECHO_T}done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000027371
Guido van Rossum627b2d71993-12-24 10:39:16 +000027372# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000027373ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000027374
Martin v. Löwis11437992002-04-12 09:54:03 +000027375cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027376# This file is a shell script that caches the results of configure
27377# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000027378# scripts and configure runs, see configure's option --config-cache.
27379# It is not useful on other systems. If it contains results you don't
27380# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027381#
Martin v. Löwis11437992002-04-12 09:54:03 +000027382# config.status only pays attention to the cache file if you give it
27383# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027384#
Skip Montanaro6dead952003-09-25 14:50:04 +000027385# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000027386# loading this file, other *unset* `ac_cv_foo' will be assigned the
27387# following values.
27388
27389_ACEOF
27390
Guido van Rossumf78abae1997-01-21 22:02:36 +000027391# The following way of writing the cache mishandles newlines in values,
27392# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027393# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027394# Ultrix sh set writes to stderr and can't be redirected directly,
27395# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027396(
27397 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
27398 eval ac_val=\$$ac_var
27399 case $ac_val in #(
27400 *${as_nl}*)
27401 case $ac_var in #(
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027402 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
27403echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027404 esac
27405 case $ac_var in #(
27406 _ | IFS | as_nl) ;; #(
27407 *) $as_unset $ac_var ;;
27408 esac ;;
27409 esac
27410 done
27411
Martin v. Löwis11437992002-04-12 09:54:03 +000027412 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027413 case $as_nl`(ac_space=' '; set) 2>&1` in #(
27414 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000027415 # `set' does not quote correctly, so add quotes (double-quote
27416 # substitution turns \\\\ into \\, and sed turns \\ into \).
27417 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000027418 "s/'/'\\\\''/g;
27419 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027420 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000027421 *)
27422 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027423 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000027424 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027425 esac |
27426 sort
27427) |
Martin v. Löwis11437992002-04-12 09:54:03 +000027428 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027429 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000027430 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027431 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000027432 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
27433 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027434 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
27435 :end' >>confcache
27436if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
27437 if test -w "$cache_file"; then
27438 test "x$cache_file" != "x/dev/null" &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027439 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
27440echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027441 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027442 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027443 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
27444echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027445 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027446fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027447rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000027448
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027449test "x$prefix" = xNONE && prefix=$ac_default_prefix
27450# Let make expand exec_prefix.
27451test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000027452
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027453DEFS=-DHAVE_CONFIG_H
27454
Skip Montanaro6dead952003-09-25 14:50:04 +000027455ac_libobjs=
27456ac_ltlibobjs=
27457for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
27458 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027459 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027460 ac_i=`echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027461 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
27462 # will be set to the directory where LIBOBJS objects are built.
27463 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
27464 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000027465done
27466LIBOBJS=$ac_libobjs
27467
27468LTLIBOBJS=$ac_ltlibobjs
27469
27470
Martin v. Löwis11437992002-04-12 09:54:03 +000027471
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027472: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000027473ac_clean_files_save=$ac_clean_files
27474ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027475{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
27476echo "$as_me: creating $CONFIG_STATUS" >&6;}
27477cat >$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027478#! $SHELL
27479# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000027480# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027481# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000027482# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000027483
Martin v. Löwis11437992002-04-12 09:54:03 +000027484debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000027485ac_cs_recheck=false
27486ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000027487SHELL=\${CONFIG_SHELL-$SHELL}
27488_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000027489
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027490cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027491## --------------------- ##
27492## M4sh Initialization. ##
27493## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000027494
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027495# Be more Bourne compatible
27496DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000027497if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
27498 emulate sh
27499 NULLCMD=:
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027500 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000027501 # is contrary to our usage. Disable this feature.
27502 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027503 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000027504else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027505 case `(set -o) 2>/dev/null` in
27506 *posix*) set -o posix ;;
27507esac
27508
Michael W. Hudson54241132001-12-07 15:38:26 +000027509fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000027510
27511
Michael W. Hudson54241132001-12-07 15:38:26 +000027512
Michael W. Hudson54241132001-12-07 15:38:26 +000027513
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027514# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000027515# Avoid depending upon Character Ranges.
27516as_cr_letters='abcdefghijklmnopqrstuvwxyz'
27517as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
27518as_cr_Letters=$as_cr_letters$as_cr_LETTERS
27519as_cr_digits='0123456789'
27520as_cr_alnum=$as_cr_Letters$as_cr_digits
27521
27522# The user is always right.
27523if test "${PATH_SEPARATOR+set}" != set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027524 echo "#! /bin/sh" >conf$$.sh
27525 echo "exit 0" >>conf$$.sh
27526 chmod +x conf$$.sh
27527 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
27528 PATH_SEPARATOR=';'
27529 else
27530 PATH_SEPARATOR=:
27531 fi
27532 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000027533fi
27534
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027535# Support unset when possible.
27536if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
27537 as_unset=unset
27538else
27539 as_unset=false
27540fi
Martin v. Löwis11437992002-04-12 09:54:03 +000027541
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027542
27543# IFS
27544# We need space, tab and new line, in precisely that order. Quoting is
27545# there to prevent editors from complaining about space-tab.
27546# (If _AS_PATH_WALK were called with IFS unset, it would disable word
27547# splitting by setting IFS to empty value.)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027548as_nl='
27549'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027550IFS=" "" $as_nl"
27551
27552# Find who we are. Look in the path if we contain no directory separator.
27553case $0 in
27554 *[\\/]* ) as_myself=$0 ;;
27555 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000027556for as_dir in $PATH
27557do
27558 IFS=$as_save_IFS
27559 test -z "$as_dir" && as_dir=.
27560 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
27561done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027562IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000027563
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027564 ;;
27565esac
27566# We did not find ourselves, most probably we were run as `sh COMMAND'
27567# in which case we are not to be found in the path.
27568if test "x$as_myself" = x; then
27569 as_myself=$0
27570fi
27571if test ! -f "$as_myself"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027572 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027573 { (exit 1); exit 1; }
27574fi
27575
27576# Work around bugs in pre-3.0 UWIN ksh.
27577for as_var in ENV MAIL MAILPATH
27578do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
27579done
27580PS1='$ '
27581PS2='> '
27582PS4='+ '
27583
27584# NLS nuisances.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027585for as_var in \
27586 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
27587 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
27588 LC_TELEPHONE LC_TIME
27589do
27590 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
27591 eval $as_var=C; export $as_var
27592 else
27593 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
27594 fi
27595done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027596
27597# Required to use basename.
27598if expr a : '\(a\)' >/dev/null 2>&1 &&
27599 test "X`expr 00001 : '.*\(...\)'`" = X001; then
27600 as_expr=expr
27601else
27602 as_expr=false
27603fi
27604
27605if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
27606 as_basename=basename
27607else
27608 as_basename=false
27609fi
27610
27611
27612# Name of the executable.
27613as_me=`$as_basename -- "$0" ||
27614$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
27615 X"$0" : 'X\(//\)$' \| \
27616 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027617echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027618 sed '/^.*\/\([^/][^/]*\)\/*$/{
27619 s//\1/
27620 q
27621 }
27622 /^X\/\(\/\/\)$/{
27623 s//\1/
27624 q
27625 }
27626 /^X\/\(\/\).*/{
27627 s//\1/
27628 q
27629 }
27630 s/.*/./; q'`
27631
27632# CDPATH.
27633$as_unset CDPATH
27634
27635
27636
Martin v. Löwis11437992002-04-12 09:54:03 +000027637 as_lineno_1=$LINENO
27638 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000027639 test "x$as_lineno_1" != "x$as_lineno_2" &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027640 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000027641
Martin v. Löwis11437992002-04-12 09:54:03 +000027642 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
27643 # uniformly replaced by the line number. The first 'sed' inserts a
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027644 # line-number line after each line using $LINENO; the second 'sed'
27645 # does the real work. The second script uses 'N' to pair each
27646 # line-number line with the line containing $LINENO, and appends
27647 # trailing '-' during substitution so that $LINENO is not a special
27648 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000027649 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027650 # scripts with optimization help from Paolo Bonzini. Blame Lee
27651 # E. McMahon (1931-1989) for sed's syntax. :-)
27652 sed -n '
27653 p
27654 /[$]LINENO/=
27655 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000027656 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027657 s/[$]LINENO.*/&-/
27658 t lineno
27659 b
27660 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000027661 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027662 :loop
27663 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000027664 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027665 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000027666 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027667 chmod +x "$as_me.lineno" ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027668 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027669 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000027670
Martin v. Löwis11437992002-04-12 09:54:03 +000027671 # Don't try to exec as it changes $[0], causing all sort of problems
27672 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027673 # original and so on. Autoconf is especially sensitive to this).
27674 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000027675 # Exit status is that of the last command.
27676 exit
27677}
27678
27679
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027680if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
27681 as_dirname=dirname
27682else
27683 as_dirname=false
27684fi
27685
27686ECHO_C= ECHO_N= ECHO_T=
27687case `echo -n x` in
27688-n*)
27689 case `echo 'x\c'` in
27690 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
27691 *) ECHO_C='\c';;
27692 esac;;
27693*)
27694 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000027695esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027696
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027697if expr a : '\(a\)' >/dev/null 2>&1 &&
27698 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027699 as_expr=expr
27700else
27701 as_expr=false
27702fi
27703
27704rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027705if test -d conf$$.dir; then
27706 rm -f conf$$.dir/conf$$.file
27707else
27708 rm -f conf$$.dir
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027709 mkdir conf$$.dir
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027710fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027711echo >conf$$.file
27712if ln -s conf$$.file conf$$ 2>/dev/null; then
27713 as_ln_s='ln -s'
27714 # ... but there are two gotchas:
27715 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
27716 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
27717 # In both cases, we have to default to `cp -p'.
27718 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +000027719 as_ln_s='cp -p'
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027720elif ln conf$$.file conf$$ 2>/dev/null; then
27721 as_ln_s=ln
Martin v. Löwis11437992002-04-12 09:54:03 +000027722else
27723 as_ln_s='cp -p'
27724fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027725rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
27726rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000027727
Skip Montanaro6dead952003-09-25 14:50:04 +000027728if mkdir -p . 2>/dev/null; then
27729 as_mkdir_p=:
27730else
Skip Montanarof0d5f792004-08-15 14:08:23 +000027731 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000027732 as_mkdir_p=false
27733fi
27734
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027735if test -x / >/dev/null 2>&1; then
27736 as_test_x='test -x'
27737else
27738 if ls -dL / >/dev/null 2>&1; then
27739 as_ls_L_option=L
27740 else
27741 as_ls_L_option=
27742 fi
27743 as_test_x='
27744 eval sh -c '\''
27745 if test -d "$1"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027746 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027747 else
27748 case $1 in
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027749 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027750 esac;
27751 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
27752 ???[sx]*):;;*)false;;esac;fi
27753 '\'' sh
27754 '
27755fi
27756as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000027757
27758# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000027759as_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 +000027760
27761# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000027762as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000027763
27764
Martin v. Löwis11437992002-04-12 09:54:03 +000027765exec 6>&1
27766
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027767# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000027768# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027769# values after options handling.
27770ac_log="
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000027771This file was extended by python $as_me 3.2, which was
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027772generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000027773
27774 CONFIG_FILES = $CONFIG_FILES
27775 CONFIG_HEADERS = $CONFIG_HEADERS
27776 CONFIG_LINKS = $CONFIG_LINKS
27777 CONFIG_COMMANDS = $CONFIG_COMMANDS
27778 $ $0 $@
27779
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027780on `(hostname || uname -n) 2>/dev/null | sed 1q`
27781"
27782
Martin v. Löwis11437992002-04-12 09:54:03 +000027783_ACEOF
27784
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027785cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027786# Files that config.status was made for.
Martin v. Löwis113a0852009-05-29 17:25:39 +000027787config_files="$ac_config_files"
27788config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000027789
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027790_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027791
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027792cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027793ac_cs_usage="\
27794\`$as_me' instantiates files from templates according to the
27795current configuration.
27796
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027797Usage: $0 [OPTIONS] [FILE]...
Martin v. Löwis11437992002-04-12 09:54:03 +000027798
27799 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027800 -V, --version print version number and configuration settings, then exit
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027801 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000027802 -d, --debug don't remove temporary files
27803 --recheck update $as_me by reconfiguring in the same conditions
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027804 --file=FILE[:TEMPLATE]
27805 instantiate the configuration file FILE
27806 --header=FILE[:TEMPLATE]
27807 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000027808
27809Configuration files:
27810$config_files
27811
27812Configuration headers:
27813$config_headers
27814
27815Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000027816
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027817_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027818cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027819ac_cs_version="\\
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000027820python config.status 3.2
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027821configured by $0, generated by GNU Autoconf 2.61,
27822 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000027823
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027824Copyright (C) 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000027825This config.status script is free software; the Free Software Foundation
27826gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027827
27828ac_pwd='$ac_pwd'
27829srcdir='$srcdir'
27830INSTALL='$INSTALL'
Martin v. Löwis11437992002-04-12 09:54:03 +000027831_ACEOF
27832
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027833cat >>$CONFIG_STATUS <<\_ACEOF
27834# If no file are specified by the user, then we need to provide default
27835# value. By we need to know if files were specified by the user.
Martin v. Löwis11437992002-04-12 09:54:03 +000027836ac_need_defaults=:
27837while test $# != 0
27838do
27839 case $1 in
27840 --*=*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027841 ac_option=`expr "X$1" : 'X\([^=]*\)='`
27842 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000027843 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000027844 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027845 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000027846 ac_option=$1
27847 ac_optarg=$2
27848 ac_shift=shift
27849 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027850 esac
27851
Skip Montanaro6dead952003-09-25 14:50:04 +000027852 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000027853 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000027854 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
27855 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027856 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027857 echo "$ac_cs_version"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027858 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000027859 debug=: ;;
27860 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000027861 $ac_shift
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027862 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000027863 ac_need_defaults=false;;
27864 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000027865 $ac_shift
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027866 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000027867 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027868 --he | --h)
27869 # Conflict between --help and --header
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027870 { echo "$as_me: error: ambiguous option: $1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027871Try \`$0 --help' for more information." >&2
27872 { (exit 1); exit 1; }; };;
27873 --help | --hel | -h )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027874 echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000027875 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
27876 | -silent | --silent | --silen | --sile | --sil | --si | --s)
27877 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027878
27879 # This is an error.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027880 -*) { echo "$as_me: error: unrecognized option: $1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027881Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027882 { (exit 1); exit 1; }; } ;;
27883
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027884 *) ac_config_targets="$ac_config_targets $1"
27885 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027886
27887 esac
27888 shift
27889done
27890
Skip Montanaro6dead952003-09-25 14:50:04 +000027891ac_configure_extra_args=
27892
27893if $ac_cs_silent; then
27894 exec 6>/dev/null
27895 ac_configure_extra_args="$ac_configure_extra_args --silent"
27896fi
27897
27898_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027899cat >>$CONFIG_STATUS <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027900if \$ac_cs_recheck; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027901 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
27902 CONFIG_SHELL=$SHELL
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027903 export CONFIG_SHELL
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027904 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000027905fi
27906
Martin v. Löwis11437992002-04-12 09:54:03 +000027907_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027908cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027909exec 5>>config.log
27910{
27911 echo
27912 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
27913## Running $as_me. ##
27914_ASBOX
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027915 echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027916} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000027917
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027918_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027919cat >>$CONFIG_STATUS <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027920_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027921
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027922cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027923
27924# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000027925for ac_config_target in $ac_config_targets
27926do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027927 case $ac_config_target in
27928 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
27929 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
27930 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000027931 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
27932 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027933 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
27934 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000027935 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027936
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027937 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
27938echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027939 { (exit 1); exit 1; }; };;
27940 esac
27941done
27942
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027943
Martin v. Löwis11437992002-04-12 09:54:03 +000027944# If the user did not use the arguments to specify the items to instantiate,
27945# then the envvar interface is used. Set only those that are not.
27946# We use the long form for the default assignment because of an extremely
27947# bizarre bug on SunOS 4.1.3.
27948if $ac_need_defaults; then
27949 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
27950 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
27951fi
27952
Skip Montanaro6dead952003-09-25 14:50:04 +000027953# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027954# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000027955# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027956# Hook for its removal unless debugging.
27957# Note that there is a small window in which the directory will not be cleaned:
27958# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000027959$debug ||
27960{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027961 tmp=
27962 trap 'exit_status=$?
27963 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
27964' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000027965 trap '{ (exit 1); exit 1; }' 1 2 13 15
27966}
Martin v. Löwis11437992002-04-12 09:54:03 +000027967# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000027968
Martin v. Löwis11437992002-04-12 09:54:03 +000027969{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027970 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000027971 test -n "$tmp" && test -d "$tmp"
27972} ||
27973{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027974 tmp=./conf$$-$RANDOM
27975 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000027976} ||
27977{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027978 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027979 { (exit 1); exit 1; }
27980}
27981
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027982#
27983# Set up the sed scripts for CONFIG_FILES section.
27984#
27985
27986# No need to generate the scripts if there are no CONFIG_FILES.
27987# This happens for instance when ./config.status config.h
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027988if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027989
27990_ACEOF
27991
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027992
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027993
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027994ac_delim='%!_!# '
27995for ac_last_try in false false false false false :; do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027996 cat >conf$$subs.sed <<_ACEOF
27997SHELL!$SHELL$ac_delim
27998PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
27999PACKAGE_NAME!$PACKAGE_NAME$ac_delim
28000PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
28001PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
28002PACKAGE_STRING!$PACKAGE_STRING$ac_delim
28003PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
28004exec_prefix!$exec_prefix$ac_delim
28005prefix!$prefix$ac_delim
28006program_transform_name!$program_transform_name$ac_delim
28007bindir!$bindir$ac_delim
28008sbindir!$sbindir$ac_delim
28009libexecdir!$libexecdir$ac_delim
28010datarootdir!$datarootdir$ac_delim
28011datadir!$datadir$ac_delim
28012sysconfdir!$sysconfdir$ac_delim
28013sharedstatedir!$sharedstatedir$ac_delim
28014localstatedir!$localstatedir$ac_delim
28015includedir!$includedir$ac_delim
28016oldincludedir!$oldincludedir$ac_delim
28017docdir!$docdir$ac_delim
28018infodir!$infodir$ac_delim
28019htmldir!$htmldir$ac_delim
28020dvidir!$dvidir$ac_delim
28021pdfdir!$pdfdir$ac_delim
28022psdir!$psdir$ac_delim
28023libdir!$libdir$ac_delim
28024localedir!$localedir$ac_delim
28025mandir!$mandir$ac_delim
28026DEFS!$DEFS$ac_delim
28027ECHO_C!$ECHO_C$ac_delim
28028ECHO_N!$ECHO_N$ac_delim
28029ECHO_T!$ECHO_T$ac_delim
28030LIBS!$LIBS$ac_delim
28031build_alias!$build_alias$ac_delim
28032host_alias!$host_alias$ac_delim
28033target_alias!$target_alias$ac_delim
28034VERSION!$VERSION$ac_delim
28035SOVERSION!$SOVERSION$ac_delim
28036CONFIG_ARGS!$CONFIG_ARGS$ac_delim
28037UNIVERSALSDK!$UNIVERSALSDK$ac_delim
28038ARCH_RUN_32BIT!$ARCH_RUN_32BIT$ac_delim
Ronald Oussoren6f6c5622009-12-24 14:03:19 +000028039LIPO_32BIT_FLAGS!$LIPO_32BIT_FLAGS$ac_delim
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028040PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
28041PYTHONFRAMEWORKIDENTIFIER!$PYTHONFRAMEWORKIDENTIFIER$ac_delim
28042PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
28043PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
28044PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
28045FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
28046FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
28047FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
28048FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
28049FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
28050MACHDEP!$MACHDEP$ac_delim
28051SGI_ABI!$SGI_ABI$ac_delim
28052CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
28053EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim
28054CC!$CC$ac_delim
28055CFLAGS!$CFLAGS$ac_delim
28056LDFLAGS!$LDFLAGS$ac_delim
28057CPPFLAGS!$CPPFLAGS$ac_delim
28058ac_ct_CC!$ac_ct_CC$ac_delim
28059EXEEXT!$EXEEXT$ac_delim
28060OBJEXT!$OBJEXT$ac_delim
28061CXX!$CXX$ac_delim
28062MAINCC!$MAINCC$ac_delim
28063CPP!$CPP$ac_delim
28064GREP!$GREP$ac_delim
28065EGREP!$EGREP$ac_delim
28066BUILDEXEEXT!$BUILDEXEEXT$ac_delim
28067LIBRARY!$LIBRARY$ac_delim
28068LDLIBRARY!$LDLIBRARY$ac_delim
28069DLLLIBRARY!$DLLLIBRARY$ac_delim
28070BLDLIBRARY!$BLDLIBRARY$ac_delim
28071LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
28072INSTSONAME!$INSTSONAME$ac_delim
28073RUNSHARED!$RUNSHARED$ac_delim
28074LINKCC!$LINKCC$ac_delim
28075GNULD!$GNULD$ac_delim
28076RANLIB!$RANLIB$ac_delim
28077AR!$AR$ac_delim
28078ARFLAGS!$ARFLAGS$ac_delim
28079SVNVERSION!$SVNVERSION$ac_delim
28080INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
28081INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
28082INSTALL_DATA!$INSTALL_DATA$ac_delim
28083LN!$LN$ac_delim
28084OPT!$OPT$ac_delim
28085BASECFLAGS!$BASECFLAGS$ac_delim
28086UNIVERSAL_ARCH_FLAGS!$UNIVERSAL_ARCH_FLAGS$ac_delim
28087OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
28088LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
28089SO!$SO$ac_delim
28090LDSHARED!$LDSHARED$ac_delim
28091BLDSHARED!$BLDSHARED$ac_delim
28092CCSHARED!$CCSHARED$ac_delim
28093LINKFORSHARED!$LINKFORSHARED$ac_delim
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028094_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028095
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028096 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028097 break
28098 elif $ac_last_try; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028099 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
28100echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028101 { (exit 1); exit 1; }; }
28102 else
28103 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000028104 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028105done
28106
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028107ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
28108if test -n "$ac_eof"; then
28109 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
28110 ac_eof=`expr $ac_eof + 1`
28111fi
28112
28113cat >>$CONFIG_STATUS <<_ACEOF
28114cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
28115/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028116_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028117sed '
28118s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
28119s/^/s,@/; s/!/@,|#_!!_#|/
28120:n
28121t n
28122s/'"$ac_delim"'$/,g/; t
28123s/$/\\/; p
28124N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
28125' >>$CONFIG_STATUS <conf$$subs.sed
28126rm -f conf$$subs.sed
28127cat >>$CONFIG_STATUS <<_ACEOF
28128CEOF$ac_eof
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028129_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028130
28131
28132ac_delim='%!_!# '
28133for ac_last_try in false false false false false :; do
28134 cat >conf$$subs.sed <<_ACEOF
Ronald Oussoren6f6c5622009-12-24 14:03:19 +000028135CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028136SHLIBS!$SHLIBS$ac_delim
Benjamin Petersond78735d2010-01-01 16:04:23 +000028137PKG_CONFIG!$PKG_CONFIG$ac_delim
28138LIBFFI_INCLUDEDIR!$LIBFFI_INCLUDEDIR$ac_delim
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028139USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
28140SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
28141USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
28142LDLAST!$LDLAST$ac_delim
28143THREADOBJ!$THREADOBJ$ac_delim
28144DLINCLDIR!$DLINCLDIR$ac_delim
28145DYNLOADFILE!$DYNLOADFILE$ac_delim
28146MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
28147TRUE!$TRUE$ac_delim
28148LIBOBJS!$LIBOBJS$ac_delim
28149HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
28150HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
28151HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
28152HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
28153HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
28154LIBM!$LIBM$ac_delim
28155LIBC!$LIBC$ac_delim
28156THREADHEADERS!$THREADHEADERS$ac_delim
28157SRCDIRS!$SRCDIRS$ac_delim
28158LTLIBOBJS!$LTLIBOBJS$ac_delim
28159_ACEOF
28160
Benjamin Petersond78735d2010-01-01 16:04:23 +000028161 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 24; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028162 break
28163 elif $ac_last_try; then
28164 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
28165echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028166 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028167 else
28168 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
28169 fi
28170done
28171
28172ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
28173if test -n "$ac_eof"; then
28174 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
28175 ac_eof=`expr $ac_eof + 1`
28176fi
28177
28178cat >>$CONFIG_STATUS <<_ACEOF
28179cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
28180/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028181_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028182sed '
28183s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
28184s/^/s,@/; s/!/@,|#_!!_#|/
28185:n
28186t n
28187s/'"$ac_delim"'$/,g/; t
28188s/$/\\/; p
28189N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
28190' >>$CONFIG_STATUS <conf$$subs.sed
28191rm -f conf$$subs.sed
28192cat >>$CONFIG_STATUS <<_ACEOF
28193:end
28194s/|#_!!_#|//g
28195CEOF$ac_eof
28196_ACEOF
28197
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028198
28199# VPATH may cause trouble with some makes, so we remove $(srcdir),
28200# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
28201# trailing colons and then remove the whole line if VPATH becomes empty
28202# (actually we leave an empty line to preserve line numbers).
28203if test "x$srcdir" = x.; then
28204 ac_vpsub='/^[ ]*VPATH[ ]*=/{
28205s/:*\$(srcdir):*/:/
28206s/:*\${srcdir}:*/:/
28207s/:*@srcdir@:*/:/
28208s/^\([^=]*=[ ]*\):*/\1/
28209s/:*$//
28210s/^[^=]*=[ ]*$//
28211}'
28212fi
28213
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028214cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028215fi # test -n "$CONFIG_FILES"
28216
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028217
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028218for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028219do
28220 case $ac_tag in
28221 :[FHLC]) ac_mode=$ac_tag; continue;;
28222 esac
28223 case $ac_mode$ac_tag in
28224 :[FHL]*:*);;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028225 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
28226echo "$as_me: error: Invalid tag $ac_tag." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028227 { (exit 1); exit 1; }; };;
28228 :[FH]-) ac_tag=-:-;;
28229 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
28230 esac
28231 ac_save_IFS=$IFS
28232 IFS=:
28233 set x $ac_tag
28234 IFS=$ac_save_IFS
28235 shift
28236 ac_file=$1
28237 shift
28238
28239 case $ac_mode in
28240 :L) ac_source=$1;;
28241 :[FH])
28242 ac_file_inputs=
28243 for ac_f
28244 do
28245 case $ac_f in
28246 -) ac_f="$tmp/stdin";;
28247 *) # Look for the file first in the build tree, then in the source tree
28248 # (if the path is not absolute). The absolute path cannot be DOS-style,
28249 # because $ac_f cannot contain `:'.
28250 test -f "$ac_f" ||
28251 case $ac_f in
28252 [\\/$]*) false;;
28253 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
28254 esac ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028255 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
28256echo "$as_me: error: cannot find input file: $ac_f" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028257 { (exit 1); exit 1; }; };;
28258 esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028259 ac_file_inputs="$ac_file_inputs $ac_f"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028260 done
28261
28262 # Let's still pretend it is `configure' which instantiates (i.e., don't
28263 # use $as_me), people would be surprised to read:
28264 # /* config.h. Generated by config.status. */
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028265 configure_input="Generated from "`IFS=:
28266 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028267 if test x"$ac_file" != x-; then
28268 configure_input="$ac_file. $configure_input"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028269 { echo "$as_me:$LINENO: creating $ac_file" >&5
28270echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028271 fi
28272
28273 case $ac_tag in
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028274 *:-:* | *:-) cat >"$tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028275 esac
28276 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028277 esac
28278
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028279 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000028280$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000028281 X"$ac_file" : 'X\(//\)[^/]' \| \
28282 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028283 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028284echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028285 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28286 s//\1/
28287 q
28288 }
28289 /^X\(\/\/\)[^/].*/{
28290 s//\1/
28291 q
28292 }
28293 /^X\(\/\/\)$/{
28294 s//\1/
28295 q
28296 }
28297 /^X\(\/\).*/{
28298 s//\1/
28299 q
28300 }
28301 s/.*/./; q'`
28302 { as_dir="$ac_dir"
28303 case $as_dir in #(
28304 -*) as_dir=./$as_dir;;
28305 esac
28306 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000028307 as_dirs=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028308 while :; do
28309 case $as_dir in #(
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028310 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028311 *) as_qdir=$as_dir;;
28312 esac
28313 as_dirs="'$as_qdir' $as_dirs"
28314 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000028315$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000028316 X"$as_dir" : 'X\(//\)[^/]' \| \
28317 X"$as_dir" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028318 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028319echo X"$as_dir" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028320 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28321 s//\1/
28322 q
28323 }
28324 /^X\(\/\/\)[^/].*/{
28325 s//\1/
28326 q
28327 }
28328 /^X\(\/\/\)$/{
28329 s//\1/
28330 q
28331 }
28332 /^X\(\/\).*/{
28333 s//\1/
28334 q
28335 }
28336 s/.*/./; q'`
28337 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000028338 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028339 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028340 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
28341echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000028342 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000028343 ac_builddir=.
28344
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028345case "$ac_dir" in
28346.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
28347*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028348 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028349 # A ".." for each directory in $ac_dir_suffix.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028350 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028351 case $ac_top_builddir_sub in
28352 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
28353 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
28354 esac ;;
28355esac
28356ac_abs_top_builddir=$ac_pwd
28357ac_abs_builddir=$ac_pwd$ac_dir_suffix
28358# for backward compatibility:
28359ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000028360
28361case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028362 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000028363 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028364 ac_top_srcdir=$ac_top_builddir_sub
28365 ac_abs_top_srcdir=$ac_pwd ;;
28366 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000028367 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028368 ac_top_srcdir=$srcdir
28369 ac_abs_top_srcdir=$srcdir ;;
28370 *) # Relative name.
28371 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
28372 ac_top_srcdir=$ac_top_build_prefix$srcdir
28373 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028374esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028375ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000028376
Martin v. Löwis11437992002-04-12 09:54:03 +000028377
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028378 case $ac_mode in
28379 :F)
28380 #
28381 # CONFIG_FILE
28382 #
Martin v. Löwis11437992002-04-12 09:54:03 +000028383
28384 case $INSTALL in
28385 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028386 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028387 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000028388_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028389
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028390cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028391# If the template does not know about datarootdir, expand it.
28392# FIXME: This hack should be removed a few years after 2.60.
28393ac_datarootdir_hack=; ac_datarootdir_seen=
28394
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028395case `sed -n '/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028396 p
28397 q
28398}
28399/@datadir@/p
28400/@docdir@/p
28401/@infodir@/p
28402/@localedir@/p
28403/@mandir@/p
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028404' $ac_file_inputs` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028405*datarootdir*) ac_datarootdir_seen=yes;;
28406*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028407 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
28408echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028409_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028410cat >>$CONFIG_STATUS <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028411 ac_datarootdir_hack='
28412 s&@datadir@&$datadir&g
28413 s&@docdir@&$docdir&g
28414 s&@infodir@&$infodir&g
28415 s&@localedir@&$localedir&g
28416 s&@mandir@&$mandir&g
28417 s&\\\${datarootdir}&$datarootdir&g' ;;
28418esac
28419_ACEOF
28420
28421# Neutralize VPATH when `$srcdir' = `.'.
28422# Shell code in configure.ac might set extrasub.
28423# FIXME: do we really want to maintain this feature?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028424cat >>$CONFIG_STATUS <<_ACEOF
28425 sed "$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000028426$extrasub
28427_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028428cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028429:t
28430/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028431s&@configure_input@&$configure_input&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028432s&@top_builddir@&$ac_top_builddir_sub&;t t
28433s&@srcdir@&$ac_srcdir&;t t
28434s&@abs_srcdir@&$ac_abs_srcdir&;t t
28435s&@top_srcdir@&$ac_top_srcdir&;t t
28436s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
28437s&@builddir@&$ac_builddir&;t t
28438s&@abs_builddir@&$ac_abs_builddir&;t t
28439s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
28440s&@INSTALL@&$ac_INSTALL&;t t
28441$ac_datarootdir_hack
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028442" $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 +000028443
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028444test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
28445 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
28446 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028447 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028448which seems to be undefined. Please make sure it is defined." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028449echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028450which seems to be undefined. Please make sure it is defined." >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000028451
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028452 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000028453 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028454 -) cat "$tmp/out"; rm -f "$tmp/out";;
28455 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
28456 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028457 ;;
28458 :H)
28459 #
28460 # CONFIG_HEADER
28461 #
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028462_ACEOF
28463
28464# Transform confdefs.h into a sed script `conftest.defines', that
28465# substitutes the proper values into config.h.in to produce config.h.
28466rm -f conftest.defines conftest.tail
28467# First, append a space to every undef/define line, to ease matching.
28468echo 's/$/ /' >conftest.defines
28469# Then, protect against being on the right side of a sed subst, or in
28470# an unquoted here document, in config.status. If some macros were
28471# called several times there might be several #defines for the same
28472# symbol, which is useless. But do not sort them, since the last
28473# AC_DEFINE must be honored.
28474ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
28475# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
28476# NAME is the cpp macro being defined, VALUE is the value it is being given.
28477# PARAMS is the parameter list in the macro definition--in most cases, it's
28478# just an empty string.
28479ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
28480ac_dB='\\)[ (].*,\\1define\\2'
28481ac_dC=' '
28482ac_dD=' ,'
28483
28484uniq confdefs.h |
28485 sed -n '
28486 t rset
28487 :rset
28488 s/^[ ]*#[ ]*define[ ][ ]*//
28489 t ok
28490 d
28491 :ok
28492 s/[\\&,]/\\&/g
28493 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
28494 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
28495 ' >>conftest.defines
28496
28497# Remove the space that was appended to ease matching.
28498# Then replace #undef with comments. This is necessary, for
28499# example, in the case of _POSIX_SOURCE, which is predefined and required
28500# on some systems where configure will not decide to define it.
28501# (The regexp can be short, since the line contains either #define or #undef.)
28502echo 's/ $//
28503s,^[ #]*u.*,/* & */,' >>conftest.defines
28504
28505# Break up conftest.defines:
28506ac_max_sed_lines=50
28507
28508# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
28509# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
28510# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
28511# et cetera.
28512ac_in='$ac_file_inputs'
28513ac_out='"$tmp/out1"'
28514ac_nxt='"$tmp/out2"'
28515
28516while :
28517do
28518 # Write a here document:
28519 cat >>$CONFIG_STATUS <<_ACEOF
28520 # First, check the format of the line:
28521 cat >"\$tmp/defines.sed" <<\\CEOF
28522/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
28523/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
28524b
28525:def
28526_ACEOF
28527 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
28528 echo 'CEOF
28529 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
28530 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
28531 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
28532 grep . conftest.tail >/dev/null || break
28533 rm -f conftest.defines
28534 mv conftest.tail conftest.defines
28535done
28536rm -f conftest.defines conftest.tail
28537
28538echo "ac_result=$ac_in" >>$CONFIG_STATUS
28539cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028540 if test x"$ac_file" != x-; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028541 echo "/* $configure_input */" >"$tmp/config.h"
28542 cat "$ac_result" >>"$tmp/config.h"
28543 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
28544 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
28545echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000028546 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028547 rm -f $ac_file
28548 mv "$tmp/config.h" $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000028549 fi
28550 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028551 echo "/* $configure_input */"
28552 cat "$ac_result"
Martin v. Löwis11437992002-04-12 09:54:03 +000028553 fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028554 rm -f "$tmp/out12"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028555 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000028556
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028557
28558 esac
28559
28560done # for ac_tag
28561
Guido van Rossum627b2d71993-12-24 10:39:16 +000028562
Martin v. Löwis11437992002-04-12 09:54:03 +000028563{ (exit 0); exit 0; }
28564_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000028565chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000028566ac_clean_files=$ac_clean_files_save
28567
28568
28569# configure is writing to config.log, and then calls config.status.
28570# config.status does its own redirection, appending to config.log.
28571# Unfortunately, on DOS this fails, as config.log is still kept open
28572# by configure, so config.status won't be able to write to it; its
28573# output is simply discarded. So we exec the FD to /dev/null,
28574# effectively closing config.log, so it can be properly (re)opened and
28575# appended to by config.status. When coming back to configure, we
28576# need to make the FD available again.
28577if test "$no_create" != yes; then
28578 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000028579 ac_config_status_args=
28580 test "$silent" = yes &&
28581 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000028582 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000028583 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000028584 exec 5>>config.log
28585 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
28586 # would make configure fail if this is the last instruction.
28587 $ac_cs_success || { (exit 1); exit 1; }
28588fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000028589
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000028590
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000028591echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000028592if test ! -f Modules/Setup
28593then
28594 cp $srcdir/Modules/Setup.dist Modules/Setup
28595fi
28596
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000028597echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000028598if test ! -f Modules/Setup.local
28599then
28600 echo "# Edit this file for local setup changes" >Modules/Setup.local
28601fi
28602
28603echo "creating Makefile"
28604$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
28605 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000028606 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000028607mv config.c Modules